diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 7522a6a1..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { "project": "./tsconfig.json" }, - "env": { "es6": true }, - "ignorePatterns": ["node_modules", "build", "coverage", "src/openapi/"], - "plugins": ["import", "eslint-comments", "functional"], - "extends": [ - "eslint:recommended", - "plugin:eslint-comments/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/typescript", - "prettier", - "prettier/@typescript-eslint" - ], - "globals": { "BigInt": true, "console": true, "WebAssembly": true }, - "rules": { - "no-useless-escape": "off", - "no-prototype-builtins": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "eslint-comments/disable-enable-pair": ["error", { "allowWholeFile": true }], - "eslint-comments/no-unused-disable": "warn", - "import/order": ["error", { "newlines-between": "always", "alphabetize": { "order": "asc" } }], - "sort-imports": ["error", { "ignoreDeclarationSort": true, "ignoreCase": true }], - "@typescript-eslint/ban-types": [ - "error", - { - "extendDefaults": true, - "types": { - "{}": false - } - } - ] - } -} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5ac541a7..6bcfda78 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,3 +1,211 @@ -# Example Contributing Guidelines +# Contributing -This is an example of GitHub's contributing guidelines file. Check out GitHub's [CONTRIBUTING.md help center article](https://help.github.com/articles/setting-guidelines-for-repository-contributors/) for more information. +Install the Node version from `.nvmrc` and pnpm 12.8.1. From the repository root: + +```sh +pnpm audit --audit-level=moderate +pnpm install --frozen-lockfile --ignore-scripts +pnpm hooks:install +pnpm verify +``` + +`verify` runs the frozen dependency check, Oxlint, Oxfmt, strict TypeScript, both module builds, +all local unit, module-import, and tooling tests, and the reviewed API contract inventory. +It requires no Permit credentials or Java. CI runs these checks in separate required jobs, +then validates generated contracts, workflows, packed consumers and dependency security. +Use `pnpm fix` for lint fixes and formatting, then rerun `pnpm verify`. +Hooks check files without rewriting them. + +Packed-customer fixture preparation resolves and audits an isolated dependency lock before a +frozen installation with scripts disabled. It may fetch packages and registry audit data, so a +fresh checkout does not depend on a developer's pnpm metadata cache. The copied migration skill +uses its shipped compiler lock without re-resolving it. SDK behavior tests use local fixtures; +package preparation does not contact Permit services. Cold dependency setup has a separate bounded +setup budget; behavioral assertions and failure/skip gates remain unchanged. + +The hook installer writes pinned prek shims under `permit-hooks/hooks` in the current checkout's +Git directory, then enables Git's per-worktree configuration and selects that private hook path. +Primary and linked checkouts preserve shared default/custom hook files and sibling configuration. +A failed shim installation leaves the existing hook selection intact. Repeated installation is safe. +Tool versions are pinned in the pnpm lockfile; Dependabot groups updates with a seven-day delay. +For any future remote prek hooks, use frozen commit hashes and `pnpm exec prek update +--cooldown-days 7 --freeze` when reviewing updates. + +## Builds and imports + +Authored source is ESM under `src/package.json`. Use `#src/` imports, including type-only imports +where appropriate. The root package keeps its CommonJS metadata because it publishes both +`build/index.js` and `build/index.mjs`. TypeScript emits declarations; a checked AST pass replaces +source aliases with paths that resolve inside the packed package. Do not publish source aliases +or change public entry points as an incidental tooling fix. + +TypeScript 7 is the SDK checker and emitter. TypeDoc and the generation guard need a JavaScript +compiler API, so the private `tools/compiler` workspace explicitly owns maintained TypeScript 6 +and TypeDoc. The SDK has no runtime dependency on that workspace. + +## Tests + +Use `pnpm exec vitest run --project unit path/to/file.test.ts` for focused unit work. +`pnpm test:unit` runs the complete unit project with the execution report gate; +`pnpm test:module-imports` checks the built entry points. +Add new source tests beside the code as `*.test.ts`; existing grouped `src/tests` suites can be +extended in place. Mock external boundaries and test malformed input and failures. Demonstrate +that a representative regression fails when its fix is removed. + +`pnpm test:codegen` tests the generator guard and local tooling without Java. Regeneration requires +Java 17: `pnpm generate-openapi-client` reads the reviewed committed snapshot and shared +configuration, then validates and normalizes the generated output before replacing it. +`pnpm check:openapi` compares two clean generations with each other and the committed output. +The separate `pnpm check:codegen` +guard regenerates the historical fixture using the same pinned generator and configuration. +See [the generation guide](../openapi/README.md) before refreshing the snapshot. Never replace the +historical fixture or change API shapes merely to make a tooling check pass. + +`test:integration` and `test:e2e` use a Permit backend. Run them locally only with explicit +authorization. The standard verification command uses local fixtures only. + +Gated commands write native JSON and execution summaries to `.test-results/`. They reject missing +files, empty/all-skipped suites and unreasoned skips. Missing `PDP_API_KEY` reports `UNAVAILABLE` +and exits 2 before backend tests start. Optional organization/project credentials may be absent, +but supplied keys with the wrong scope fail. Named optional gaps and the existing PER-16553 ABAC +block appear separately from executed tests as a `PARTIAL` result. `pnpm coverage` reports every +authored runtime module, excluding generated clients and tests, without a percentage threshold. + +## API operation and shape evidence + +`pnpm check:api-contracts` verifies the local AST inventory, source provenance and exact operation +omission decisions. `pnpm check:api-drift` also compares current public schema documentation with +the pinned snapshots; it makes no backend operation calls. Reports distinguish local integrity, +coverage gaps, the unavailable shared parity target and unmeasured backend behavior. See +[the evidence guide](../api-coverage/README.md) before changing a baseline or exclusion. + +## Documentation and changes + +Run `pnpm run docs` to generate API documentation, or `pnpm run docs:watch` while editing TSDoc. +Use `pnpm run docs -- --out /absolute/output/path` to inspect output without replacing tracked docs. +Keep generated documentation out of unrelated changes. +Generation fails on missing root method contracts, API group navigation/member links and broken +local files, fragments or media assets. `pnpm run check:docs` checks an existing output tree; +pass an absolute output directory to check a preview. These checks do not fetch external links +or publish the reference. Root API exports determine the grouped interface inventory. + +CI's candidate `docs` job rebuilds the public reference and checks these links. Failed, skipped, +cancelled or missing docs prevent the candidate and `SDK required checks` from passing. + +### Website publication + +Website publication uses the separate manual `Publish API reference` workflow +(`reference-pages.yaml`); it does not publish npm. After the owner switches Pages to GitHub Actions, +no push, PR, release tag or npm publication automatically deploys the website. Until that switch, +the existing legacy `main:/docs` publisher remains active. Run the manual workflow only after the +owner approves reference publication. + +Before that approved rollout, the repository owner must switch Settings → Pages → Build and +deployment → Source from the current legacy `main:/docs` source to GitHub Actions. The owner must +also configure the `github-pages` environment with a main-only deployment branch policy and +required reviewer approval. These are prerequisites, not settings applied by the workflow. +It does not run `configure-pages` or enable/switch Pages automatically. + +After the approved source commit is on main and its required checks pass, select main in the +workflow's Run workflow control and enter that exact full 40-character commit SHA in `commit`. +Another branch, repository or mismatched SHA fails before checkout. The build checks HEAD, +requires a clean tracked/untracked source checkout, rebuilds/validates docs and records the commit, +run and attempt with a digest of the actual files in `reference-source.json`. Symlinks, hard links +and excluded repository paths fail the artifact check. Only that run's uniquely named artifact +reaches the deployment job; it runs no checkout or repository code and alone receives Pages/OIDC +write permissions. + +After an authorized deployment succeeds, use the workflow's deployed URL to fetch +`reference-source.json` and compare its commit, run/attempt and content digest with the build's +`Reference source/content identity PASS` output. Check the intended public class/interface pages +and their navigation at that URL. Record this hosted verification before claiming the intended +commit is published; local builds and green CI do not establish the hosted site's identity. +The existing site is `https://permitio.github.io/permit-node/`. This rollout does not change npm +publisher settings or bypass npm's separate publication acceptance. + +Keep changes focused, preserve supported runtime behavior, and describe validation and remaining +limitations in the PR. Check [AGENTS.md](../AGENTS.md) for repository development rules. + +## Dependency security + +Install [Trivy 0.74.0](https://github.com/aquasecurity/trivy/releases/tag/v0.74.0) for the same +scanner used in CI. The audit runner uses Node built-ins and runs before SDK dependencies install: + +```sh +node scripts/audit-dependencies.mjs --locked-only --out security-preinstall +pnpm install --frozen-lockfile --ignore-scripts +pnpm build +pnpm pack --out candidate.tgz --ignore-scripts +pnpm audit:dependencies --artifact candidate.tgz --out security-report +``` + +The report covers the locked SDK runtime graph, the complete development/tooling workspace, +and two independently resolved consumers of the actual tarball. Runtime dependencies are exact +pins, so the minimum and newest supported direct versions are identical. Both consumer lanes +resolve current compatible transitive versions; neither claims to test the lowest transitive +versions. Adding dependency ranges or peer dependencies requires explicit supported-range lanes. + +The pinned pnpm resolver uses a 24-hour release delay and disables scripts. It resolves a consumer +lockfile, audits it, then performs a frozen installation only after that lane passes. Trivy's +runtime dependency graph must match an independent pnpm lock inventory. Empty results, incomplete +inventory, malformed output, process failures and unresolved consumer installs are INVALID. + +Exit codes are 0 (PASS), 1 (FAIL: fixable HIGH/CRITICAL findings) and 2 (INVALID: not completed). +All other advisories and registry severity totals remain visible in JSON and Markdown, including +findings without available fixes. Raw scanner output and each consumer lockfile are retained. +Do not add ignored advisory IDs, dependency overrides or scanner suppression files. + +CI requires these checks on Node 22.13 and 24.0. The weekly Monday workflow and manual dispatch +publish GitHub summaries and downloadable evidence; repository maintainers review failed runs. +Slack delivery requires a separately authorized destination and is not configured here. +The shared candidate security jobs scan the same versioned archive as the packed consumer jobs. +Failed, skipped, cancelled or missing candidate gates prevent the publisher from running. +npm Trusted Publishing requires Node >=22.14.0 and npm >=11.5.1; the release job validates +the npm bundled with its Node 24 runner. +The SDK supports Node >=22.13.0, including later major versions. Local behavior and packed +consumer CI retain the 22.13.0 and 24.0.0 floors and test current Node 22, 24 and 26 releases. + +Dependabot groups runtime and tooling minor/patch updates, uses `increase`, and waits seven days +(fourteen for majors). Its published support matrix currently lists pnpm through version 10; +pnpm 12 lock updates are not yet verified. Maintainers must review dependency update failures and +apply compatible pinned updates manually until the bot supports this lockfile. The scheduled +security gate does not depend on Dependabot and continues to scan all four trees. + +## Release gate rollout + +The `SDK required checks` aggregate requires the shared candidate, the explicit trusted/fork backend +path and cleanup to succeed. Candidate gates require lint, strict types, public docs, +unit/tooling tests, workflow checks, generated contracts, the versioned archive, +the floor and current-release packed consumers +and dependency security. Fork and Dependabot runs report backend coverage as UNAVAILABLE and run +local checks; same-repository backend runs fail when their required secret is missing. Failed +cleanup attempts every owned environment deletion, then fails the aggregate rather than warning +and reporting success. + +The publisher receives the archive from the same workflow run. Its SHA-256, metadata and committed +source identity must match before npm executes. Publication acceptance is separate: SDK71 has no +`releaseReady=true` contract while the shared target and Curtain Call remain unresolved. There is +no dispatch flag or manual approval boolean that substitutes for those contracts. + +The following owner rollout is proposed, not applied. First observe a successful GitHub Actions +check named exactly `SDK required checks` on the final PR commit, including a fork run and a +trusted backend run. In active ruleset `main2` (24216899), add that exact context with GitHub +Actions integration ID 15368 to `required_status_checks`; preserve every other field, including +strict checks, no bypass actors, approval and thread-resolution requirements. Verify a +missing/failing check blocks merge before relying on the setting. The 2026-10-01 read-only audit +found the list empty; legacy branch-protection lookup returned 404 because the repository uses +rulesets. + +After the acceptance blockers are resolved, propose production environment reviewers, prevent +self-review, restrict deployment to the approved release tags, and create tag rules restricting +creation, updates and deletion to the owner's release process. The same audit found no production +protection rules/deployment policy and no tag rulesets. These settings require a separate concrete +owner approval; retain existing branch rules and do not grant a bypass to get a release through. + +Before an authorized release, an npm package owner must verify the active Trusted Publisher binds +`permitio/permit-node`, `node_sdk_publish.yaml` and `production`, with publication permission and +appropriate account protection. Public registry provenance for 2.7.6 confirms that historical +workflow identity, but does not prove the current trust configuration. Read-only `npm trust list` +returned E401 in the audit; no authentication, ownership or publisher settings were changed. +No credentials belong in the archive, validation evidence or workflow logs. Website reference +publication remains separate from npm publication. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..4e3d4a7b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,34 @@ +version: 2 +updates: + # Keeps the SHA-pinned actions in .github/workflows current. The PDP image in + # ci.yaml is started with docker run, which Dependabot does not track, so its + # version and digest are bumped by hand. + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + cooldown: + default-days: 7 + groups: + github-actions: + patterns: + - '*' + - package-ecosystem: npm + versioning-strategy: increase + directory: / + schedule: + interval: weekly + cooldown: + default-days: 7 + semver-major-days: 14 + groups: + runtime-dependencies: + dependency-type: production + update-types: [minor, patch] + patterns: + - '*' + development-dependencies: + dependency-type: development + update-types: [minor, patch] + patterns: + - '*' diff --git a/.github/workflows/api-contract-drift.yaml b/.github/workflows/api-contract-drift.yaml new file mode 100644 index 00000000..bdd42ca6 --- /dev/null +++ b/.github/workflows/api-contract-drift.yaml @@ -0,0 +1,65 @@ +name: Published API contract drift + +on: + schedule: + - cron: '17 7 * * 1' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: api-contract-drift-${{ github.ref }} + cancel-in-progress: false + +defaults: + run: + shell: bash --noprofile --norc -euo pipefail {0} + +jobs: + published-contracts: + name: Compare published API contracts + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - name: Checkout reviewed SDK + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + - name: Audit dependency metadata before installation + timeout-minutes: 3 + run: pnpm audit --audit-level=moderate + - name: Install locked tools + timeout-minutes: 5 + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Inspect published source drift + timeout-minutes: 3 + run: pnpm check:api-drift + - name: Summarize evidence + if: always() + run: | + if [[ -f coverage/api-contracts/report.md ]]; then + cat coverage/api-contracts/report.md >> "$GITHUB_STEP_SUMMARY" + else + printf '%s\n' 'API contract inspection did not complete. Inspect the failed setup step.' >> "$GITHUB_STEP_SUMMARY" + fi + - name: Retain drift evidence + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: api-contract-evidence + path: coverage/api-contracts/ + if-no-files-found: error + retention-days: 30 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 85963af5..97ab14ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,75 +2,295 @@ name: CI on: push: - branches: [ main ] + branches: [main] + # Run on every PR regardless of base branch so stacked PRs get CI too. pull_request: - branches: [ main ] + +concurrency: + # A new push to a PR cancels that PR's superseded run. Pushes to main get a + # group per commit, so no merge's run is cancelled or replaced while queued. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read +defaults: + run: + shell: bash --noprofile --norc -euo pipefail {0} + env: - PDP_API_KEY: test + # github actions project id (under 'Permit.io Tests' workspace) + PROJECT_ID: 7f55831d77c642739bc17733ab0af138 + # The integration and e2e tests run when the environment-provisioning secret + # is available. Fork PRs and Dependabot PRs get no Actions secrets, so they + # run only the unit and module-import tests. + RUN_BACKEND: ${{ secrets.PROJECT_API_KEY != '' }} + # Pushes and PRs from this repository, other than Dependabot's, must run the + # backend suite; the test job fails them if the secret is missing. + BACKEND_REQUIRED: ${{ github.event_name == 'push' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }} + PDP_IMAGE: permitio/pdp-v2:0.9.16@sha256:e3cf30794ec2d256636b4714641df46e51ee58a3f1f0d24c606e214e0bf8669a jobs: - test-and-lint: - runs-on: ubuntu-latest - + candidate: + # Both forms use the caller's commit; actionlint 1.7.12 does not yet accept `$/`. + uses: ./.github/workflows/release-candidate.yaml # zizmor: ignore[self-repository] + + test: + name: test (${{ matrix.node }}) + needs: candidate + runs-on: ubuntu-24.04 + timeout-minutes: 30 strategy: + fail-fast: false matrix: - node-version: [18, 20] - + # Keep node labels in sync with NODE_LABELS in the cleanup job. + include: + - node: '22' + node-version: '22.13.0' + - node: '24' + node-version: '24.0.0' + env: + # Known before the env is created, so the cleanup job can delete it by + # key even when this job is cancelled while creating it. + ENV_KEY: node-sdk-ci-${{ github.run_id }}-${{ github.run_attempt }}-n${{ matrix.node }} steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Run linting - run: yarn lint - - - name: Build project - run: yarn build - - - name: Run all tests - run: yarn test - - codegen-guard: - runs-on: ubuntu-latest - timeout-minutes: 15 - permissions: - contents: read + # Fail instead of reporting green on the unit and module-import tests alone. + - name: Require backend secret on same-repo runs + if: env.BACKEND_REQUIRED == 'true' && env.RUN_BACKEND != 'true' + run: | + echo "::error::UNAVAILABLE: PROJECT_API_KEY is not set for a same-repo run; integration and e2e tests cannot run." >&2 + exit 1 - steps: + - name: Report unavailable backend coverage on untrusted runs + if: env.BACKEND_REQUIRED != 'true' && env.RUN_BACKEND != 'true' + run: | + echo "::notice::UNAVAILABLE: integration and e2e coverage require PROJECT_API_KEY; no backend tests execute on this run." + + # ---------- Backend setup ---------- + # PROJECT_API_KEY is used only in the next two steps. They run before + # checkout, so no repository or dependency code runs while it is in use. + - name: Provision temp Permit env + id: provision + if: env.RUN_BACKEND == 'true' + timeout-minutes: 2 + env: + PROJECT_API_KEY: ${{ secrets.PROJECT_API_KEY }} + run: | + response=$(curl -sS --max-time 30 -w '\n%{http_code}' -X POST \ + "https://api.permit.io/v2/projects/${PROJECT_ID}/envs" \ + -H "Authorization: Bearer ${PROJECT_API_KEY}" \ + -H 'Content-Type: application/json' \ + -d "{\"key\":\"${ENV_KEY}\",\"name\":\"${ENV_KEY}\"}") + status=${response##*$'\n'} + body=${response%$'\n'*} + if [[ "$status" != 2* ]]; then + echo "::error::Creating env ${ENV_KEY} failed with HTTP ${status}: ${body}" >&2 + exit 1 + fi + env_id=$(jq -r '.id // empty' <<<"$body") + if [[ -z "$env_id" ]]; then + echo "::error::Creating env ${ENV_KEY} returned HTTP ${status} without an id: ${body}" >&2 + exit 1 + fi + echo "env_id=${env_id}" >> "$GITHUB_OUTPUT" + + # The key goes to a step output, not $GITHUB_ENV, so only the steps that + # name it get it: the PDP, and the integration and e2e tests. + - name: Fetch env API key + id: env_api_key + if: env.RUN_BACKEND == 'true' + timeout-minutes: 2 + env: + PROJECT_API_KEY: ${{ secrets.PROJECT_API_KEY }} + ENV_ID: ${{ steps.provision.outputs.env_id }} + run: | + response=$(curl -sS --max-time 30 --retry 3 -w '\n%{http_code}' \ + "https://api.permit.io/v2/api-key/${PROJECT_ID}/${ENV_ID}" \ + -H "Authorization: Bearer ${PROJECT_API_KEY}") + status=${response##*$'\n'} + body=${response%$'\n'*} + # A successful body holds the key, so it is printed only on HTTP errors. + if [[ "$status" != 2* ]]; then + echo "::error::Fetching the API key of env ${ENV_KEY} failed with HTTP ${status}: ${body}" >&2 + exit 1 + fi + env_api_key=$(jq -r '.secret // empty' <<<"$body") + if [[ -z "$env_api_key" ]]; then + echo "::error::The API key response for env ${ENV_KEY} (HTTP ${status}) has no secret field." >&2 + exit 1 + fi + # Mask BEFORE writing the output so it is redacted everywhere. + echo "::add-mask::${env_api_key}" + echo "api_key=${env_api_key}" >> "$GITHUB_OUTPUT" + + # 7766 is the PDP API. 8181 is the PDP's OPA, which the SDK derives from + # the PDP URL for the rbac spec's useOpa checks. + - name: Start local PDP + if: env.RUN_BACKEND == 'true' + timeout-minutes: 5 + env: + PDP_API_KEY: ${{ steps.env_api_key.outputs.api_key }} + PERMIT_API_KEY: ${{ steps.env_api_key.outputs.api_key }} + run: | + docker run -d --name pdp \ + -p 127.0.0.1:7766:7000 -p 127.0.0.1:8181:8181 \ + -e PDP_API_KEY -e PERMIT_API_KEY \ + "$PDP_IMAGE" + + # ---------- Both paths ---------- - name: Checkout code - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - name: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' with: - node-version: 22 - cache: 'yarn' + run_install: false - - name: Setup Java (required by openapi-generator-cli) - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - distribution: temurin - java-version: '17' + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + cache-dependency-path: pnpm-lock.yaml + # --ignore-scripts: this job holds the env API key, so dependency install + # scripts and the prepare script do not run. The test scripts build. - name: Install dependencies - run: yarn install --frozen-lockfile --ignore-scripts + timeout-minutes: 5 + run: pnpm install --frozen-lockfile --ignore-scripts + + # Builds, then runs the tests that need no backend. No API key is set. + - name: Run unit and module-import tests + timeout-minutes: 10 + run: pnpm test + + # ---------- Backend tests ---------- + - name: Wait for PDP to be ready + if: env.RUN_BACKEND == 'true' + timeout-minutes: 3 + run: | + curl -fsS -o /dev/null --max-time 2 \ + --retry 60 --retry-delay 2 --retry-max-time 150 --retry-all-errors \ + http://127.0.0.1:7766/healthy - - name: Test codegen guard failure paths - run: yarn test:codegen + - name: Run integration tests + if: env.RUN_BACKEND == 'true' + timeout-minutes: 10 + env: + PDP_API_KEY: ${{ steps.env_api_key.outputs.api_key }} + PERMIT_API_KEY: ${{ steps.env_api_key.outputs.api_key }} + API_TIER: prod + # The project-level environment test needs a project-scoped key. It + # is skipped, with the reason in the report, while this secret is + # unset, because the env key above is scoped to one environment. + PROJECT_PDP_API_KEY: ${{ secrets.PROJECT_PDP_API_KEY }} + run: pnpm test:integration - - name: Codegen type-shape guard - run: yarn check:codegen + - name: Run e2e tests + if: env.RUN_BACKEND == 'true' + timeout-minutes: 20 + env: + PDP_API_KEY: ${{ steps.env_api_key.outputs.api_key }} + PERMIT_API_KEY: ${{ steps.env_api_key.outputs.api_key }} + API_TIER: prod + # Force IPv4: Node resolves `localhost` to ::1 first, but the PDP is + # published on 127.0.0.1 only, so PDP checks would hit ECONNREFUSED. + PDP_URL: http://127.0.0.1:7766 + PERMIT_RUN_OPA_E2E: 'true' + run: pnpm test:e2e + + # Dump PDP diagnostics whenever the backend path fails. The SDK reports + # PDP connection errors with no HTTP response, so the PDP side is otherwise + # invisible; this captures container state and logs to tell a transient + # restart/readiness blip apart from a crashed/exited container. + - name: Dump PDP diagnostics on failure + if: failure() && env.RUN_BACKEND == 'true' + timeout-minutes: 2 + run: | + echo "::group::docker ps -a" + docker ps -a --filter name=pdp || true + echo "::endgroup::" + echo "::group::PDP container state" + docker inspect -f \ + 'status={{.State.Status}} restartCount={{.RestartCount}} exitCode={{.State.ExitCode}} oomKilled={{.State.OOMKilled}} startedAt={{.State.StartedAt}} finishedAt={{.State.FinishedAt}}' \ + pdp || true + echo "::endgroup::" + echo "::group::docker logs pdp" + docker logs pdp || true + echo "::endgroup::" + echo "::group::curl -sv http://127.0.0.1:7766/healthy" + curl -sv --max-time 5 http://127.0.0.1:7766/healthy || true + echo "::endgroup::" + + # Runs after every test leg, including failed and cancelled ones, with no + # checkout, so the project API key never shares a job with repository code. + cleanup: + name: Delete temp Permit envs + needs: test + if: always() + runs-on: ubuntu-24.04 + timeout-minutes: 5 + env: + # Keep in sync with the test job's node labels. + NODE_LABELS: 22 24 + steps: + # A 404 means the env was never created or is already gone. Attempt every + # owned deletion and fail the gate if any environment still needs removal. + - name: Delete temp Permit envs + if: env.RUN_BACKEND == 'true' + env: + PROJECT_API_KEY: ${{ secrets.PROJECT_API_KEY }} + ENV_KEY_PREFIX: node-sdk-ci-${{ github.run_id }}-${{ github.run_attempt }} + run: | + failures=0 + for node_label in $NODE_LABELS; do + env_key="${ENV_KEY_PREFIX}-n${node_label}" + status=$(curl -sS -o /dev/null -w '%{http_code}' --max-time 30 --retry 3 -X DELETE \ + "https://api.permit.io/v2/projects/${PROJECT_ID}/envs/${env_key}" \ + -H "Authorization: Bearer ${PROJECT_API_KEY}") || status=000 + case "$status" in + 2??) echo "Deleted temp env ${env_key}." ;; + 404) echo "Temp env ${env_key} does not exist; nothing to delete." ;; + *) + echo "::error::Temp env ${env_key} was not deleted (HTTP ${status});" \ + "delete it from project ${PROJECT_ID} manually." >&2 + failures=$((failures + 1)) + ;; + esac + done + if [[ "$failures" -ne 0 ]]; then + exit 1 + fi + + required-checks: + name: SDK required checks + needs: [candidate, test, cleanup] + if: always() + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Require candidate and backend path checks + env: + GATE_STAGE: ci + GATE_RESULTS: ${{ toJSON(needs) }} + run: node scripts/check-release-gates.mjs diff --git a/.github/workflows/dependency-security.yaml b/.github/workflows/dependency-security.yaml new file mode 100644 index 00000000..45d74174 --- /dev/null +++ b/.github/workflows/dependency-security.yaml @@ -0,0 +1,103 @@ +name: Dependency security + +on: + workflow_call: + inputs: + artifact-name: + type: string + default: '' + artifact-sha256: + type: string + default: '' + workflow_dispatch: + schedule: + - cron: '23 8 * * 1' + +permissions: + contents: read + +defaults: + run: + shell: bash --noprofile --norc -euo pipefail {0} + +jobs: + audit: + name: Dependency security (Node ${{ matrix.node }}) + runs-on: ubuntu-24.04 + timeout-minutes: 25 + strategy: + fail-fast: false + matrix: + node: ['22.13.0', '24.0.0'] + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ matrix.node }} + package-manager-cache: false + - name: Setup Trivy + uses: aquasecurity/setup-trivy@81e514348e19b6112ce2a7e3ecbafe19c1e1f567 # v0.3.1 + with: + version: v0.74.0 + cache: false + - name: Audit before installing dependencies + run: node scripts/audit-dependencies.mjs --locked-only --out security-preinstall + - name: Install dependencies + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Build and pack the candidate + if: inputs.artifact-name == '' + run: | + pnpm build + pnpm pack --out candidate.tgz --ignore-scripts + - name: Download the already validated candidate + if: inputs.artifact-name != '' + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ${{ inputs.artifact-name }} + path: .test-results/release-candidate/ + - name: Validate supplied candidate identity + if: inputs.artifact-name != '' + env: + EXPECTED_SHA256: ${{ inputs.artifact-sha256 }} + run: >- + node scripts/release-artifact.mjs --artifact .test-results/release-candidate/permitio.tgz + --identity .test-results/release-candidate/identity.json --sha256 "$EXPECTED_SHA256" + - name: Audit locked and fresh consumer trees + env: + CANDIDATE_ARTIFACT: >- + ${{ inputs.artifact-name != '' && + '.test-results/release-candidate/permitio.tgz' || 'candidate.tgz' }} + run: >- + node scripts/audit-dependencies.mjs --artifact "$CANDIDATE_ARTIFACT" + --out security-report + - name: Validate supplied candidate after scans + if: inputs.artifact-name != '' + env: + EXPECTED_SHA256: ${{ inputs.artifact-sha256 }} + run: >- + node scripts/release-artifact.mjs --artifact .test-results/release-candidate/permitio.tgz + --identity .test-results/release-candidate/identity.json --sha256 "$EXPECTED_SHA256" + - name: Report a scan that did not complete + if: failure() || cancelled() + run: | + echo 'Dependency security failed; inspect the lane reports and failed steps.' \ + >> "$GITHUB_STEP_SUMMARY" + - name: Save dependency security evidence + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: dependency-security-${{ matrix.node }} + path: | + security-preinstall/ + security-report/ + if-no-files-found: error diff --git a/.github/workflows/node_sdk_publish.yaml b/.github/workflows/node_sdk_publish.yaml index d3faf07a..8c438253 100644 --- a/.github/workflows/node_sdk_publish.yaml +++ b/.github/workflows/node_sdk_publish.yaml @@ -3,143 +3,109 @@ name: Release permit Node SDK on: release: types: [published] -env: - PROJECT_ID: 7f55831d77c642739bc17733ab0af138 #github actions project id (under 'Permit.io Tests' workspace) - ENV_NAME: node-sdk-ci + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.release.tag_name }} + cancel-in-progress: false + +defaults: + run: + shell: bash --noprofile --norc -euo pipefail {0} jobs: + candidate: + permissions: + contents: read + # Both forms use the caller's commit; actionlint 1.7.12 does not yet accept `$/`. + uses: ./.github/workflows/release-candidate.yaml # zizmor: ignore[self-repository] + with: + release-tag: ${{ github.event.release.tag_name }} + prerelease: ${{ github.event.release.prerelease }} + + publication-acceptance: + name: Publication acceptance + needs: candidate + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + # SDK71 has no releaseReady=true state. Shared adoption and Curtain Call must + # provide their reviewed acceptance contract before publication can proceed. + - name: Require the unresolved shared release acceptance + run: node scripts/check-publication-readiness.mjs + publish_node_sdk: - runs-on: ubuntu-latest + needs: [candidate, publication-acceptance] + if: github.repository == 'permitio/permit-node' + runs-on: ubuntu-24.04 + timeout-minutes: 20 environment: production permissions: contents: read id-token: write # Required for npm Trusted Publishing (OIDC) + env: + NODE_AUTH_TOKEN: '' steps: - name: Checkout code - uses: actions/checkout@v4 - + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: '20' + node-version: '24' registry-url: 'https://registry.npmjs.org' - - - name: Upgrade npm for Trusted Publishing - run: npm install -g npm@latest && npm --version - - - name: Set git user - run: | - git config --global user.email "eli@permit.io" - git config --global user.name "elimoshkovich" - - - name: Install dependencies - run: | - rm -rf node_modules - yarn install - yarn run build - yarn docs ; git add docs/ ; git commit -m "update tsdoc" - - - name: Creation env ${{ env.ENV_NAME }} under 'Permit.io Tests' workspace - run: | - response=$(curl -X POST \ - https://api.permit.io/v2/projects/${{ env.PROJECT_ID }}/envs \ - -H 'Authorization: Bearer ${{ secrets.PROJECT_API_KEY }}' \ - -H 'Content-Type: application/json' \ - -d '{ - "key": "${{ env.ENV_NAME }}", - "name": "${{ env.ENV_NAME }}" - }') - - # Extract the new env id - echo "ENV_ID=$(echo "$response" | jq -r '.id')" >> $GITHUB_ENV - - echo "New env ID: $ENV_ID" - - - name: Fetch API_KEY of ${{ env.ENV_NAME }} - run: | - response=$(curl -X GET \ - https://api.permit.io/v2/api-key/${{ env.PROJECT_ID }}/${{ env.ENV_ID }} \ - -H 'Authorization: Bearer ${{ secrets.PROJECT_API_KEY }}') - - # Extract the api key secret and register it for masking BEFORE writing - # it to the environment, so it is redacted everywhere in the logs - # (including the env-group dumps of every later step). Do not echo it. - ENV_API_KEY=$(echo "$response" | jq -r '.secret') - echo "::add-mask::$ENV_API_KEY" - echo "ENV_API_KEY=$ENV_API_KEY" >> "$GITHUB_ENV" - - - name: local PDP runnning + package-manager-cache: false + - name: Require all publication dependencies env: - PDP_API_KEY: ${{ env.ENV_API_KEY }} - PERMIT_API_KEY: ${{ env.ENV_API_KEY }} - PDP_DEBUG: true - run: docker run -d -p 7766:7000 permitio/pdp-v2:latest - - - name: Run tests - env: - PDP_API_KEY: ${{ env.ENV_API_KEY }} - PERMIT_API_KEY: ${{ env.ENV_API_KEY }} - API_TIER: 'prod' - run: yarn test - - - name: Delete env ${{ env.ENV_NAME }} - if: always() - run: | - curl -X DELETE \ - https://api.permit.io/v2/projects/${{ env.PROJECT_ID }}/envs/${{ env.ENV_ID }} \ - -H 'Authorization: Bearer ${{ secrets.PROJECT_API_KEY }}' - - - name: Bump version at package.json + GATE_STAGE: publication + GATE_RESULTS: ${{ toJSON(needs) }} + run: node scripts/check-release-gates.mjs + - name: Verify bundled npm supports Trusted Publishing + run: node scripts/check-publish-runtime.mjs + - name: Download the exact tested and scanned archive + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: release-candidate + path: .test-results/release-candidate/ + - name: Recheck archive hash, metadata and source identity env: - RELEASE_TAG: ${{ github.event.release.tag_name }} - run: | - # Pass the release tag through an environment variable to prevent shell - # injection. Validate it is a literal semantic version (not a keyword like - # "minor" or "patch" that npm version would accept). Bump only the - # top-level "version" field. npm is JSON-aware (unlike greedy sed, which - # also rewrites scripts.version); no git tag/commit is created, re-runs on - # the same version are tolerated, and the "version" lifecycle script - # (standard-version) is skipped. - node -e " - const semver = require('semver'); - const tag = process.env.RELEASE_TAG; - if (!semver.valid(tag)) { - console.error('Release tag', JSON.stringify(tag), 'is not a valid semantic version'); - process.exit(1); - } - " - npm version "$RELEASE_TAG" --no-git-tag-version --allow-same-version --ignore-scripts - # Assert: package.json version matches the normalized release tag - node -e " - const semver = require('semver'); - const tag = process.env.RELEASE_TAG; - // npm strips both the optional 'v' prefix and semver build metadata. - const normalized = semver.valid(tag); - const pkg = require('./package.json'); - if (pkg.version !== normalized) { - console.error('Version mismatch: expected', normalized, 'got', pkg.version); - process.exit(1); - } - if (pkg.scripts.version !== 'standard-version') { - console.error('scripts.version was corrupted by the version bump'); - process.exit(1); - } - " - + EXPECTED_SHA256: ${{ needs.candidate.outputs.sha256 }} + run: >- + node scripts/release-artifact.mjs --artifact .test-results/release-candidate/permitio.tgz + --identity .test-results/release-candidate/identity.json --sha256 "$EXPECTED_SHA256" - name: Publish package to NPM + timeout-minutes: 15 env: IS_PRERELEASE: ${{ github.event.release.prerelease }} run: | if [[ "$IS_PRERELEASE" == "true" ]]; then - echo "Publishing as a release candidate (rc)..." - npm publish --access public --tag rc + npm publish .test-results/release-candidate/permitio.tgz \ + --ignore-scripts --access public --tag rc + elif [[ "$IS_PRERELEASE" == "false" ]]; then + npm publish .test-results/release-candidate/permitio.tgz \ + --ignore-scripts --access public else - echo "Publishing as the latest release..." - npm publish --access public + echo '::error::Release prerelease metadata is invalid.' >&2 + exit 1 fi - # No NPM_TOKEN needed — authenticated via npm Trusted Publishing (OIDC), - # which requires the job's `id-token: write` permission above plus a - # Trusted Publisher configured on npmjs.com: - # permitio/permit-node -> Settings -> Trusted Publishers - # (workflow: node_sdk_publish.yaml, environment: production) - # Provenance attestations are generated automatically. + # npm OIDC trust remains bound to permitio/permit-node, + # node_sdk_publish.yaml and production. No NPM_TOKEN is used. diff --git a/.github/workflows/reference-pages.yaml b/.github/workflows/reference-pages.yaml new file mode 100644 index 00000000..850f3210 --- /dev/null +++ b/.github/workflows/reference-pages.yaml @@ -0,0 +1,116 @@ +name: Publish API reference + +on: + workflow_dispatch: + inputs: + commit: + description: Full commit SHA selected on main for the approved reference publication + required: true + type: string + +concurrency: + group: reference-pages-main + cancel-in-progress: false + +permissions: {} + +defaults: + run: + shell: bash --noprofile --norc -euo pipefail {0} + +jobs: + guard: + name: Validate approved reference source + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Require trusted main and exact intended commit before checkout + env: + EXPECTED_COMMIT: ${{ inputs.commit }} + run: | + set -euo pipefail + if [[ "$GITHUB_EVENT_NAME" != workflow_dispatch || + "$GITHUB_REPOSITORY" != permitio/permit-node || + "$GITHUB_REF" != refs/heads/main ]]; then + echo '::error::Dispatch the reference only on permitio/permit-node main.' >&2 + exit 1 + fi + if [[ ! "$EXPECTED_COMMIT" =~ ^[0-9a-f]{40}$ || + "$EXPECTED_COMMIT" != "$GITHUB_SHA" ]]; then + echo '::error::The commit input must be the full SHA selected on main for this run.' >&2 + exit 1 + fi + + build: + name: Build the approved reference artifact + needs: guard + runs-on: ubuntu-24.04 + timeout-minutes: 15 + permissions: + contents: read + env: + EXPECTED_COMMIT: ${{ github.sha }} + outputs: + artifact-name: reference-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} + steps: + - name: Checkout the validated commit + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + persist-credentials: false + - name: Verify checked-out source + run: | + set -euo pipefail + if [[ "$(git rev-parse HEAD)" != "$EXPECTED_COMMIT" ]]; then + echo '::error::Checkout differs from the intended commit; rebuild that SHA.' >&2 + exit 1 + fi + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Audit the locked dependency graph before installation + run: pnpm audit --audit-level=moderate + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Rebuild and validate the public reference + run: pnpm run docs -- --out .test-results/reference + - name: Bind and verify source and reference file bytes + run: | + node scripts/reference-pages.mjs --out .test-results/reference --write + node scripts/reference-pages.mjs --out .test-results/reference + - name: Upload this run's validated reference + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + name: reference-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} + path: .test-results/reference + include-hidden-files: true + + deploy: + name: Deploy the approved reference + needs: [guard, build] + if: >- + github.event_name == 'workflow_dispatch' && + github.repository == 'permitio/permit-node' && github.ref == 'refs/heads/main' && + inputs.commit == github.sha + runs-on: ubuntu-24.04 + timeout-minutes: 15 + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy only this run's named artifact + id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 + with: + artifact_name: ${{ needs.build.outputs.artifact-name }} diff --git a/.github/workflows/release-candidate.yaml b/.github/workflows/release-candidate.yaml new file mode 100644 index 00000000..f2852791 --- /dev/null +++ b/.github/workflows/release-candidate.yaml @@ -0,0 +1,407 @@ +name: SDK candidate validation + +on: + workflow_call: + inputs: + release-tag: + type: string + default: '' + prerelease: + type: boolean + default: false + outputs: + sha256: + value: ${{ jobs.build-candidate.outputs.sha256 }} + version: + value: ${{ jobs.build-candidate.outputs.version }} + +permissions: + contents: read + +defaults: + run: + shell: bash --noprofile --norc -euo pipefail {0} + +jobs: + preinstall-security: + name: Locked dependency security (${{ matrix.node }}) + runs-on: ubuntu-24.04 + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + node: ['22.13.0', '24.0.0'] + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ matrix.node }} + package-manager-cache: false + - name: Setup Trivy + uses: aquasecurity/setup-trivy@81e514348e19b6112ce2a7e3ecbafe19c1e1f567 # v0.3.1 + with: + version: v0.74.0 + cache: false + - name: Audit locked runtime and tooling before installation + run: node scripts/audit-dependencies.mjs --locked-only --out security-preinstall + - name: Save preinstall evidence + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: candidate-preinstall-${{ matrix.node }} + path: security-preinstall/ + if-no-files-found: error + + lint: + name: SDK lint + needs: preinstall-security + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Run required check + run: pnpm lint:oxlint && pnpm lint:format + + types: + name: SDK strict types + needs: preinstall-security + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Run required check + run: pnpm lint:types + + docs: + name: SDK public reference + needs: preinstall-security + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Build and validate the actual public reference + run: pnpm run docs -- --out .test-results/reference + + unit: + name: SDK unit and tooling (${{ matrix.node }}) + needs: preinstall-security + runs-on: ubuntu-24.04 + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + node: ['22.13.0', '22.23.3', '24.0.0', '24.21.0', '26.11.0'] + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ matrix.node }} + package-manager-cache: false + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Build and run local behavior checks + run: | + pnpm test + pnpm test:codegen + pnpm check:api-contracts + + workflow-validation: + name: SDK workflow checks + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Install verified actionlint binary + run: | + actionlint_url=https://github.com/rhysd/actionlint/releases/download/v1.7.12 + curl --fail --silent --show-error --location --max-time 60 \ + "$actionlint_url/actionlint_1.7.12_linux_amd64.tar.gz" \ + --output "$RUNNER_TEMP/actionlint.tar.gz" + printf '%s %s\n' \ + '8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8' \ + "$RUNNER_TEMP/actionlint.tar.gz" | sha256sum --check + tar -xzf "$RUNNER_TEMP/actionlint.tar.gz" -C "$RUNNER_TEMP" actionlint + - name: Validate workflow behavior and shell scripts + run: '"$RUNNER_TEMP/actionlint" .github/workflows/*.yaml' + - name: Inspect workflow security with online audits + uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4 + with: + inputs: .github/workflows + version: '1.30.1' + online-audits: true + advanced-security: false + + codegen-guard: + name: SDK generated contract checks + needs: preinstall-security + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Setup Java + uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 + with: + distribution: temurin + java-version: '17' + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Reproduce reviewed generated source + run: | + pnpm check:codegen + pnpm check:openapi + + build-candidate: + name: SDK versioned archive + needs: [lint, types, docs, unit, workflow-validation, codegen-guard] + runs-on: ubuntu-24.04 + timeout-minutes: 10 + outputs: + sha256: ${{ steps.identity.outputs.sha256 }} + version: ${{ steps.identity.outputs.version }} + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Validate the reviewed release version + env: + RELEASE_TAG: ${{ inputs.release-tag }} + IS_PRERELEASE: ${{ inputs.prerelease }} + run: node scripts/check-release-tag.mjs + - name: Validate npm version rerun without changing reviewed metadata + if: inputs.release-tag != '' + env: + RELEASE_TAG: ${{ inputs.release-tag }} + IS_PRERELEASE: ${{ inputs.prerelease }} + run: | + node scripts/set-release-version.mjs + git diff --exit-code -- package.json pnpm-lock.yaml + - name: Build and pack the single candidate + run: | + pnpm build + mkdir -p .test-results/release-candidate + pnpm pack --out .test-results/release-candidate/permitio.tgz --ignore-scripts + - name: Bind archive and reviewed source identity + id: identity + run: | + node scripts/release-artifact.mjs \ + --artifact .test-results/release-candidate/permitio.tgz \ + --identity .test-results/release-candidate/identity.json --write + node --input-type=module <<'NODE' + import { appendFileSync, readFileSync } from 'node:fs'; + const file = '.test-results/release-candidate/identity.json'; + const identity = JSON.parse(readFileSync(file)); + appendFileSync(process.env.GITHUB_OUTPUT, + `sha256=${identity.sha256}\nversion=${identity.version}\n`); + NODE + - name: Save the exact candidate archive + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: release-candidate + path: .test-results/release-candidate/ + include-hidden-files: true + if-no-files-found: error + + packed-consumers: + name: SDK packed consumers (${{ matrix.node }}) + needs: build-candidate + runs-on: ubuntu-24.04 + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + node: ['22.13.0', '22.23.3', '24.0.0', '24.21.0', '26.11.0'] + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ matrix.node }} + package-manager-cache: false + - name: Install locked tools without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Download the candidate from this run + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: release-candidate + path: .test-results/release-candidate/ + - name: Verify candidate bytes and source identity + env: + EXPECTED_SHA256: ${{ needs.build-candidate.outputs.sha256 }} + run: >- + node scripts/release-artifact.mjs --artifact .test-results/release-candidate/permitio.tgz + --identity .test-results/release-candidate/identity.json --sha256 "$EXPECTED_SHA256" + - name: Compile and run installed customer fixtures + env: + EXPECTED_SHA256: ${{ needs.build-candidate.outputs.sha256 }} + run: >- + pnpm check:packed-consumers --artifact .test-results/release-candidate/permitio.tgz + --sha256 "$EXPECTED_SHA256" --output .test-results/packed-consumers.json + - name: Verify archive identity after customer execution + env: + EXPECTED_SHA256: ${{ needs.build-candidate.outputs.sha256 }} + run: >- + node scripts/release-artifact.mjs --artifact .test-results/release-candidate/permitio.tgz + --identity .test-results/release-candidate/identity.json --sha256 "$EXPECTED_SHA256" + - name: Save packed consumer evidence + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: packed-consumers-${{ matrix.node }} + path: .test-results/packed-consumers.json + include-hidden-files: true + if-no-files-found: error + + dependency-security: + needs: build-candidate + # Both forms use the caller's commit; actionlint 1.7.12 does not yet accept `$/`. + uses: ./.github/workflows/dependency-security.yaml # zizmor: ignore[self-repository] + with: + artifact-name: release-candidate + artifact-sha256: ${{ needs.build-candidate.outputs.sha256 }} + + candidate-ready: + name: SDK candidate gates + needs: + [ + lint, + types, + docs, + unit, + workflow-validation, + codegen-guard, + build-candidate, + packed-consumers, + dependency-security, + ] + if: always() + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + env: + npm_config_ignore_scripts: 'true' + with: + run_install: false + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.13.0' + package-manager-cache: false + - name: Require every quality gate to succeed + env: + GATE_STAGE: candidate + GATE_RESULTS: ${{ toJSON(needs) }} + run: node scripts/check-release-gates.mjs diff --git a/.gitignore b/.gitignore index 4688981b..335f387e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ node_modules test src/**.js coverage +.test-results/ *.log package-lock.json # openapi @@ -15,3 +16,8 @@ src/openapi/.npmignore src/openapi/.openapi-generator-ignore src/openapi/git_push.sh + +security-report/ +security-preinstall/ +security-release/ +*.tgz diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index dc0378c3..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -yarn lint-staged \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..97b895e2 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +ignore-scripts=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..6fa8dec4 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.13.0 diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 00000000..c5be18f3 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,20 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 100, + "singleQuote": true, + "trailingComma": "all", + "semi": true, + "ignorePatterns": [ + "build/**", + "docs/**", + "coverage/**", + "node_modules/**", + ".openapi-*/**", + "pnpm-lock.yaml", + "openapi/permit-api.json", + "src/tests/codegen/fixtures/openapi-3.1.0.json", + "CHANGELOG.md", + "LICENSE", + "openapi/pdp/*.json" + ] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 00000000..c89a7a0e --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,46 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["typescript", "import", "unicorn"], + "categories": { + "correctness": "error" + }, + "ignorePatterns": ["build/**", "docs/**", "coverage/**", "node_modules/**", ".openapi-*/**"], + "env": { + "builtin": true, + "node": true, + "vitest": true + }, + "rules": { + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ] + }, + "overrides": [ + { + "files": ["src/**/*.ts", "scripts/**/*.mjs", "tools/**/*.mjs"], + "rules": { + "no-restricted-imports": [ + "error", + { + "patterns": [ + { + "group": ["./*", "../*"], + "message": "Use #src/ or #scripts/ absolute authored imports." + } + ] + } + ] + } + }, + { + "files": ["src/openapi/**/*.ts"], + "rules": { + "no-restricted-imports": "off" + } + } + ] +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..9cf913e4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,31 @@ +minimum_prek_version: '0.5.4' +update: + cooldown_days: 7 + freeze: true +repos: + - repo: local + hooks: + - id: lockfile + name: Frozen dependency graph + entry: pnpm install --lockfile-only --offline --frozen-lockfile --ignore-scripts + language: system + pass_filenames: false + always_run: true + - id: oxlint + name: Oxlint + entry: pnpm run lint:oxlint + language: system + pass_filenames: false + types_or: [javascript, ts] + - id: oxfmt + name: Oxfmt + entry: pnpm run lint:format + language: system + pass_filenames: false + always_run: true + - id: typescript + name: Strict TypeScript + entry: pnpm run lint:types + language: system + pass_filenames: false + types_or: [javascript, ts] diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 6ef78fe6..00000000 --- a/.prettierignore +++ /dev/null @@ -1,7 +0,0 @@ -# package.json is formatted by package managers, so we ignore it here -package.json -node_modules/* -build/* -nyc_output/* -.github/* -docs/ diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 1563a4a5..00000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "printWidth": 100, - "singleQuote": true, - "trailingComma": "all", - "semi": true -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 439ccd5b..eb7b4344 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,3 @@ { - "recommendations": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "eamodio.gitlens", - "streetsidesoftware.code-spell-checker", - ] + "recommendations": ["oxc.oxc-vscode", "eamodio.gitlens", "streetsidesoftware.code-spell-checker"] } diff --git a/.vscode/launch.json b/.vscode/launch.json index 171e54aa..1837437f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,29 +1,18 @@ { "version": "0.2.0", "configurations": [ - // To debug, make sure a *.spec.ts file is active in the editor, then run a configuration + // Debugs the *.spec.ts file open in the editor. Vitest picks the project from the file's + // path. The module-imports specs load build/, so run `pnpm build` before debugging them. { "type": "node", "request": "launch", "name": "Debug Active Spec", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava", - "runtimeArgs": ["debug", "--break", "--serial", "${file}"], - "port": 9229, - "outputCapture": "std", - "skipFiles": ["/**/*.js"], - "preLaunchTask": "npm: build" - // "smartStep": true - }, - { - // Use this one if you're already running `yarn watch` - "type": "node", - "request": "launch", - "name": "Debug Active Spec (no build)", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava", - "runtimeArgs": ["debug", "--break", "--serial", "${file}"], - "port": 9229, - "outputCapture": "std", - "skipFiles": ["/**/*.js"] - // "smartStep": true - }] + "program": "${workspaceFolder}/node_modules/vitest/vitest.mjs", + "args": ["run", "${relativeFile}"], + "autoAttachChildProcesses": true, + "smartStep": true, + "console": "integratedTerminal", + "skipFiles": ["/**", "**/node_modules/**"] + } + ] } diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..b8d03051 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,44 @@ +# Working on the Permit Node SDK + +Use Node 22.13.0 or newer, and the exact pnpm version in `package.json`. +Run `pnpm verify` before proposing a change. This runs the pinned prek checks, builds both +published entry points, and runs local unit, module-import, and tooling tests. + +## Source and types + +- Authored TypeScript uses ESM and `#src/` imports. Tooling tests use `#scripts/` imports. +- Keep every strict compiler option enabled. Do not use `skipLibCheck`, blanket exclusions, + or assertions to conceal unsupported public types. +- esbuild bundles CJS and ESM; TypeScript 7 emits declarations. The declaration build resolves + source aliases to portable paths. Preserve the existing package entry points. +- `tools/compiler` explicitly contains TypeScript 6's maintained compiler API for TypeDoc and + AST tooling. It does not check or emit the SDK build. +- Use Oxlint with the TypeScript, import, and unicorn plugins and Oxfmt's 100-column format. +- New source tests should be colocated `*.test.ts` files. Existing grouped suites remain in + `src/tests`; add focused regressions there when changing an existing tested behavior. +- Document non-trivial public APIs with parameters, return values, and relevant failure cases. + +## Generated source + +Regenerate from the reviewed committed snapshot with `pnpm generate-openapi-client`. The shared +configuration, checked schema corrections and narrow template adaptations live in `openapi/` and +`scripts/openapi-*.mjs`. The generator normalizes strict imports and annotations, formats output, +and checks the SDK before replacing generated files. Keep the normalization and shape tests passing. +`pnpm check:openapi` verifies two clean generations and committed output; `pnpm check:codegen` +retains the historical fixture checks. Both require Java 17. See `openapi/README.md` before +refreshing the snapshot; never bypass schema validation or invent unspecified bulk-result fields. + +## Dependencies and hooks + +Run `pnpm audit --audit-level=moderate` before changing dependencies. Pin exact direct versions, +keep the 24-hour release delay, and leave install scripts disabled. Audit findings require a +named owner and follow-up; do not add overrides or ignore advisory IDs to hide them. + +Run `pnpm hooks:install` for each checkout. It installs pinned prek under that checkout's +Git directory at `permit-hooks/hooks`, then sets only its worktree hook path. Shared default +and custom hook files stay intact, including when installing from the primary checkout. +Never unset the common `core.hooksPath`: another worktree may still use it. Hook dependencies are +the exact tools in the pnpm lockfile; Dependabot groups their updates with a seven-day cooldown. + +Run tests against local fixtures on this computer. Backend integration and e2e commands require +explicit authorization and suitable credentials; `pnpm verify` never invokes them. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e3d94a73 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,55 @@ +# Changelog + +## Unreleased — 3.0 + +These changes describe the unpublished 3.0.0 candidate; they do not announce a release. +See [the migration guide](MIGRATION.md) for affected callers, actions and retained behavior. + +- **P1**: Upgrade the direct dependency and application lock after the 3.0 publication. +- **C1**: Support Node `>=22.13.0`. +- **C2**: Preserve named CommonJS/ESM imports and loader-specific declarations; + review internal paths. +- **C3**: Remove four unused transitive packages; direct consumers must declare them. +- **A1**: Remove all 29 flat API methods in favor of grouped clients. +- **A2**: Remove getMethods, five legacy exports, and ApiContext.level. +- **A3**: Adapt page/sync/rule results; reject empty rule creation and return void on unassign. +- **A4**: Allow omitted/partial condition filters; permission filters use the action key/ID. +- **F1**: Validate effective constructor options and default unset logging format to JSON. + Breaking: `log.json: false` now selects pretty text rather than the old JSON output. + Update log parsers or use `log.json: true`. Pretty output writes synchronously; blocked stdout + can delay the application. The default JSON destination is unchanged. +- **F2**: Freeze SDK settings and copy initial context while keeping caller transports live. +- **E1**: Normalize PDP errors and preserve denial cardinality in non-throwing bulk results. +- **E2**: Detach and bound REST/scope error data; remove raw request and error identity access. +- **W1**: Require literal booleans and validate complete authorization responses. +- **W2**: Serialize enforcement bodies before Axios; OPA hooks now receive JSON text. +- **W3**: Send normalized all-tenants JSON and validate allowed_tenants grants. +- **W4**: Exclude REST POST/PATCH retries and share the PDP timeout budget across attempts. +- **W5**: Preserve live injected Axios behavior across entries without changing caller defaults. +- **W6**: Apply per-check context precedence and snapshot caller inputs without mutation. +- **T1**: Rename/remove generated symbols and require actual tenant fields. +- **T2**: Type five bulk results as unspecified object; verify persisted outcomes by reads. +- **T3**: Separate constructor/config types and accurately infer role-list envelopes. +- **N1**: Add eight GA grouped Groups operations. +- **N2**: Add new-user tenant membership, three detailed lists, and environment refresh ack. +- **N3**: Add permission context, authorized-user/role-tenant discovery, and object filtering. +- Add `permit.getLocalRoleAssignments` with dedicated local query/row types, complete array + validation and one-page REST pagination. Invalid input, OPA, malformed pages and unavailable + HTTP 404/405/501 remain visible even in non-throwing mode. +- Add typed `permit.api.apiKeys` list/get/create/delete/rotate/getScope operations through + the control plane, preserving complete pages, scoped bodies and optional returned secrets. + Management does not initialize context; rotation is bodyless and is not replayed by the SDK. +- Add typed `permit.api.proxyConfigs` for the five published control-plane configuration routes, + preserving complete mapping rules and received secret values without input rehydration. +- Add `permit.checkUrl` and `CheckUrlConfig` for the published container URL check, with + tenant/context/timeout options. Invalid input, unsupported OPA, malformed decisions and + unavailable HTTP 404/405/501 remain visible even in non-throwing mode. +- Add typed `permit.api.roles.bulkCreateOrReplace` for existing tenant and resource role bulk + creation/replacement, preserving the complete `created` and `updated` result arrays. +- Add `permit.api.userAttributes` for user attribute schema list/get/create/update/delete, + preserving the dedicated routes and complete `ResourceAttributeRead` results. User values + remain managed through `permit.api.users`. +- Export existing resource-relation/resource-role clients and their public contracts, plus missing + method input/result types. `ApiContextLevel` and `PermitContextChangeError` are also named root + exports. Generate linked group reference pages and validate local reference targets; building + documentation does not publish the candidate. diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 00000000..b55a612c --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,356 @@ +# Migrating to Permit Node SDK 3.0 + +This guide describes the upcoming 3.0 behavior. The reviewed candidate identifies itself as +3.0.0 and remains unpublished. Check the official release before +changing production requirements. Compare your actual installed 2.x version: some fixes were already +present in recent 2.x source. Stable IDs below are shared with the scanner and release notes. + +The inventory compares the official npm 2.7.5 package and the reviewed main source separately. +Published 2.7.5 already had root CJS/ESM exports and the 29 flat methods, but no SDK retry options. +Statements about retained retry or routing behavior refer to reviewed main, not every 2.x release. + +## Upgrade and compatibility + +### P1 — Dependency and lock + +After 3.0 is released, update the direct `permitio` requirement and regenerate the application lock +with your package manager. Check every workspace, deployment image and independent consumer. Review +transitive pins rather than assuming a successful install migrated application behavior. + +### C1 — Supported Node versions + +Use Node `>=22.13.0`, including later major versions. The former `>=10` requirement no longer +applies. Check CI, containers, deployment providers and local pins. Validation retains the 22.13.0 +and 24.0.0 floors and exercises current releases of Node 22, 24 and 26. + +### C2 — Imports and modules + +Both native CommonJS and ES modules remain supported; there is no forced module conversion. +Use `require('permitio')` or `import { Permit } from 'permitio'`. Both loaders expose named exports. +Root-only package exports already existed in 2.x. If you bypassed them with generated/internal file +paths, review those imports: generated files and the physical runtime layout changed. Do not replace +them with another internal path. The historical generated inventory lists removed declarations. + +`ResourceRelationsApi`, `ResourceRolesApi`, `ApiContextLevel` and `PermitContextChangeError` are +now named root exports. Use the grouped clients through `permit.api.resourceRelations` and +`permit.api.resourceRoles`, and use their exported classes for constructor identity checks. + +### C3 — Direct use of former transitive dependencies + +The SDK no longer brings in `@bitauth/libauth`, `path-to-regexp`, `require-in-the-middle` or +`url-parse`. If application code imports these packages, declare and review its own dependencies. +Do not add them back to Permit. Review dependency changes through the application lock and audit. + +## API migration + +### A1 — Flat methods are removed + +The 29 deprecated methods directly under `permit.api` are absent in 3.0. There are no compatibility +shims or warnings that keep them callable. Below, `api` means `permit.api`; supply the corresponding +typed arguments and await calls as before. Read A3 before adapting consumers of returned values. + +| Removed call | Grouped replacement | +| -------------------------------------------- | ------------------------------------------------- | +| `api.listUsers()` | `(await api.users.list()).data` | +| `api.listRoles()` | `api.roles.list()` | +| `api.listConditionSets(type, page, perPage)` | `api.conditionSets.list({ type, page, perPage })` | +| `api.listConditionSetsRules(page, perPage)` | `api.conditionSetRules.list({ page, perPage })` | +| `api.getUser(key)` | `api.users.get(key)` | +| `api.getTenant(key)` | `api.tenants.get(key)` | +| `api.listTenants(page)` | `api.tenants.list({ page })` | +| `api.getRole(key)` | `api.roles.get(key)` | +| `api.getAssignedRoles(user, tenant)` | `api.users.getAssignedRoles({ user, tenant })` | +| `api.createResource(data)` | `api.resources.create(data)` | +| `api.updateResource(key, data)` | `api.resources.update(key, data)` | +| `api.deleteResource(key)` | `api.resources.delete(key)` | +| `api.createUser(data)` | `api.users.create(data)` | +| `api.syncUser(data)` | `(await api.users.sync(data)).user` | +| `api.updateUser(key, data)` | `api.users.update(key, data)` | +| `api.deleteUser(key)` | `api.users.delete(key)` | +| `api.createTenant(data)` | `api.tenants.create(data)` | +| `api.updateTenant(key, data)` | `api.tenants.update(key, data)` | +| `api.deleteTenant(key)` | `api.tenants.delete(key)` | +| `api.createRole(data)` | `api.roles.create(data)` | +| `api.updateRole(key, data)` | `api.roles.update(key, data)` | +| `api.deleteRole(key)` | `api.roles.delete(key)` | +| `api.assignRole(data)` | `api.users.assignRole(data)` | +| `api.unassignRole(data)` | `api.users.unassignRole(data)` | +| `api.createConditionSet(data)` | `api.conditionSets.create(data)` | +| `api.updateConditionSet(key, data)` | `api.conditionSets.update(key, data)` | +| `api.deleteConditionSet(key)` | `api.conditionSets.delete(key)` | +| `api.assignConditionSetRule(data)` | `api.conditionSetRules.create(data)` | +| `api.unassignConditionSetRule(data)` | `api.conditionSetRules.delete(data)` | + +### A2 — Method bag, five legacy exports, and context alias + +Remove `api.getMethods()`. For callbacks keep the grouped method's receiver with a closure, such as +`const getUser = (key: string) => permit.api.users.get(key)`. + +| Removed export | Replacement | +| ---------------------- | ----------------------------------------------------- | +| `DeprecatedApiClient` | `permit.api`, or `ApiClient` for direct construction | +| `IDeprecatedPermitApi` | `IPermitApi` | +| `IDeprecatedReadApis` | The applicable grouped interface, such as `IUsersApi` | +| `IDeprecatedWriteApis` | The applicable grouped interface, such as `IUsersApi` | +| `ContextTransform` | Transform context in application code before the call | + +Use `permit.config.apiContext.permittedAccessLevel` instead of the removed `ApiContext.level`. +There was no public runtime transform registration API. Do not invent a global-context setter or +register an unused transform. Two additional removed root exports are covered under T1. + +### A3 — Returned values and runtime corrections + +- Flat `listUsers()` returned an array; grouped `users.list()` returns a page. Read `page.data`. +- Flat `syncUser()` returned the record; grouped `users.sync()` returns `{ user, created }`. +- Flat `assignConditionSetRule()` returned an array; grouped `conditionSetRules.create()` returns + one record. Existing grouped create already had this shape; it now rejects an empty success body + instead of returning `undefined`. +- Grouped deletes/unassignments are typed `Promise`: use completion, not response body, + status or headers. Only `users.unassignRole()` and `roleAssignments.unassign()` now explicitly + resolve `undefined`; they were declared void in 2.x but returned bodies. Other unchanged void + wrappers can expose empty Axios response text for HTTP 204; do not require identical empty + runtime values or treat them as substantive results. +- Ordinary condition-set, tenant, instance, tuple and resource-relation lists keep their declared + array result, unwrapping a server pagination envelope when required. Do not add `.data` to these + high-level array results. Generated-only clients can have different result unions. + +### A4 — Condition filters + +`conditionSets.list()` accepts optional `{ type, page, perPage }`; no type lists both kinds. +`conditionSetRules.list()` accepts omitted, empty or partial filters. Both default to page 1 and +100 records per page. `permissionKey: 'write'` filters by the action key/ID; rule create/read +permission is canonical `document:write`. The SDK forwards filters unchanged. Do not confuse a +permission's persisted representation with the GET action filter. Use full typed read records. + +## Configuration and errors + +### F1 — Effective constructor validation and logging defaults + +Use `IPermitOptions` for constructor input. Supply a nonempty token without whitespace/control +characters, after `PERMIT_API_KEY` fallback, and absolute HTTP(S) `pdp`/`apiUrl` URLs. Validate +deployment variables before construction. Base URLs cannot contain literal query (`?`) or +fragment (`#`) components, even empty trailing delimiters. Remove those components rather than +expecting the SDK to strip them. Existing path prefixes and encoded path characters such as +`%3F` and `%23` remain supported, including existing environment URL defaults. Logger levels, +booleans, timeout and retry values are checked. Invalid effective options throw `TypeError` +before HTTP, without echoing credentials. +Use complete instances from `axios.create()` and a genuine current-version `ApiContext`, rather +than partial mock objects. Explicit `undefined` is permitted for constructor options. + +Unset `PERMIT_LOG_JSON` now selects JSON lines. Explicit `log.json: false` produced JSON in 2.x +and now selects pretty output. Environment value `false` also selects pretty output; case and +surrounding whitespace are ignored. Update log parsers, or explicitly set `log.json: true`. +Pretty output writes synchronously on the calling thread; blocked stdout can delay the application. +The default JSON output keeps Pino's default destination and is preferred for production collection. +Logs omit raw configuration, credentials, full attributes, request bodies and private errors. + +### F2 — Configuration and API context ownership + +SDK-owned settings and nested log/tenancy/retry options are copied and frozen. Construct a new +client to change token, routes or these settings. The config reference is readonly; do not replace +`permit.config` to rotate settings. Caller Axios instances and callbacks stay live. + +A supplied initial `ApiContext` is validated and copied. Change selection afterward through +`permit.config.apiContext`, within the key's validated scope, once permissions are available. +Mutating the originally supplied context no longer changes this client. Current CJS/ESM contexts +interoperate; an old-version/plain context is not a supported substitute. Concurrent wrappers +share one scope lookup, and a failed lookup allows a later retry. + +### E1 — PDP errors and non-throwing results + +Catch `PermitPDPStatusError` before `PermitConnectionError`: the status class now extends the +connection class. HTTP failures and malformed successful PDP bodies retain the specific status +class with safe `statusCode`/`responseBody`; transport failures have safe cause/code metadata. +Stop matching raw/private error text or assuming raw request/body identity is retained. + +With `throwOnError: false`, check failure returns `false`, bulk failure returns one `false` per +input rather than `[]`, permissions return `{}`, and all-tenants return `[]`. These are denial +fallbacks, not proof a policy denied a healthy request. New discovery exceptions are covered in N3. + +### E2 — REST and scope error snapshots + +`PermitApiError` is named and non-generic. `originalError` is a detached bounded Axios snapshot, +not the caller's thrown object. `request` is `undefined`; response data and formatted error bodies +are `unknown`. Narrow them before reading fields. Use `status`, `code` and safe cause metadata. +Do not rely on sockets, hooks, raw headers/bodies, identity, stacks or private server messages. +Non-Axios adapter/hook failures are normalized too. Scope errors expose safe status/code/cause as +`PermitContextError`. Update log pipelines that relied on raw error or user/resource contents. + +## Wire and enforcement review + +### W1 — Literal and whole-result validation + +Authorization mocks and custom PDPs must return literal booleans. Bulk responses must contain +exactly one valid decision per input, including zero. One malformed member invalidates the whole +bulk, permissions or all-tenant result; no partial allow result is accepted. All-tenant entries +require `allow: true` and a string tenant key. Permission entries validate arrays/details, default +missing permissions/attributes, and omit nullable optional members. Legal own dictionary keys and +additive fields survive. Update truthy/incomplete fixtures and verify the live policy contract. +Sparse bulk slots reject before partial dispatch. `useOpa: true` on bulk/permission queries now +rejects through their configured throw/deny policy instead of being ignored; only check supports it. + +### W2 — OPA request hooks now receive JSON text + +The SDK serializes enforcement bodies before Axios merging to preserve legal `__proto__` and +`constructor` own keys. Supplied OPA interceptors/transforms receive a JSON string, including the +OPA input envelope. Parse/edit/stringify that text if a hook changes it; do not access it as a raw +object. Direct caller requests keep the caller's own shape. Circular/unsupported serialization +inputs produce safe `PermitError` before HTTP, or the operation's configured denial fallback. +Review custom adapters/hooks manually; the scanner cannot prove their transformations correct. + +### W3 — All-tenants requests + +`checkAllTenants(user, action, resource, context?, sdk?)` keeps its public call shape. Its request +sends actual normalized JSON input/context with SDK Authorization/language headers to +`allowed/all-tenants`; these are not misplaced body header/params objects. It parses +`allowed_tenants` and validates every grant. It does not inject the default resource tenant for +an all-tenant query. Update wire mocks and custom proxy expectations; keep authorization semantics. + +### W4 — Retries and shared timeout budget + +Retries are opt-in, as on reviewed main; published 2.7.5 had no SDK retry options. `maxRetries` +counts retries after the initial attempt. SDK REST POST/PATCH +writes are excluded even if listed; cancellation, invalid configuration and a non-boolean custom +predicate are not made safe by a retry condition. PDP/OPA authorization POST can retry when enabled. +Caller-owned retries/redirects remain the caller's responsibility. + +A positive timeout covers failed attempts plus delays; each retry receives the remaining Axios +timeout. Caller adapters must honor it; arbitrary hooks are not interrupted by a wall-clock timer. +Per-call timeout `0` disables that timeout instead of falling through to the configured value. +SDK timeout applies to PDP/OPA; REST/Elements use the caller transport's timeout defaults. + +### W5 — Injected Axios ownership + +REST/Elements use `axiosInstance`; PDP has an internal transport; OPA uses `opaAxiosInstance`. +The SDK no longer registers handlers or rewrites caller defaults. Direct caller requests get no +SDK retries/logging. Current adapters, transforms, interceptors and default headers stay live on +every SDK attempt, including both Axios module entries. Explicit SDK Bearer credentials/routes +prevail over default Basic auth, `baseURL` or `allowAbsoluteUrls: false`. Intentional caller hooks +can still rewrite requests. Review applications relying on old shared-client pollution or doubled +retry policies. Explicit SDK routing precedence is retained from reviewed main. + +### W6 — Context and snapshots + +Per-check context now overrides call context, which overrides existing internal global context. +Review policies or fixtures that depended on per-check context being ignored. Legal own context +keys survive; request inputs are normalized without mutating the caller's resource. Filtering +uses a synchronous object-array snapshot. No new public global context registration API is added. + +## Type review + +### T1 — Removed symbols and generated models + +Replace root `EnvironmentCopyConflictStrategyEnum` with `EnvironmentCopyConflictStrategy`. +Root `Statistics` is removed without a generic substitute. Together with A2, exactly seven root +names were removed from the reviewed main baseline. The generated derivation-settings name becomes +`PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings` and is available from `permitio` +alongside the resource-role method contracts. Other generated-only internal imports need review. +Resource-role and `granted_to` dictionaries use current named models. Review the historical +[generated inventory][inventory] and compile against the final package, not its old counts. + +Required fields include `ResourceInstanceCreate.tenant`, `ResourceInstanceRead.tenant/tenant_id`, +`RoleAssignmentRemove.tenant` and generated-only `UserRoleRemove.tenant`. Supply actual tenants in +typed fixtures. Role inheritance remains optional `string[]`; it is not a new stricter behavior. +Server-generated array/envelope unions and generated removals do not imply backend route removal. + +### T2 — Unspecified bulk results + +`users.bulkUserCreate`, `bulkUserDelete`, `bulkUserReplace`, +`relationshipTuples.bulkRelationshipTuples` and `bulkUnRelationshipTuples` return `object`. +Their old request-payload result types were incorrect. Do not read synthetic counts, operation +arrays or processing reports; verify persisted outcomes through readbacks when needed. + +### T3 — Strict consumer types + +Constructor input is `IPermitOptions`; effective config is readonly `IPermitConfig`. Narrow unknown +error data and shape unions. `roleAssignments.list()` correctly reflects literal, dynamic, optional +and correlated detail/count flags; its existing wire behavior is retained. Prefer `listDetailed()` +when a guaranteed detailed envelope is appropriate. With `exactOptionalPropertyTypes`, omit absent +generated properties instead of explicitly setting `undefined`; constructor options are different. +Downstream projects are not forced to adopt the SDK's compiler flags. Import `CheckConfig`, +`ICheckQuery`, `IUserPermissions` and the named pagination/list result contracts from `permitio` +for explicit call and result annotations. `FormattedAxiosError` describes sanitized REST +diagnostics; its `error` body remains unknown until narrowed. + +## Additions, not compulsory replacements + +### N1 — Groups + +Eight GA Groups wrappers preserve full envelopes and typed key/ID behavior. Group-to-group routes +remain deferred. Adopt these operations only when needed; they are not replacements for every role. + +### N2 — Membership, detailed reads and refresh + +`tenants.addUser()` creates a new user; an existing user is a duplicate error, not a generic +membership association. Three `listDetailed()` methods preserve their full detailed envelopes. +These operations always use the control plane even with facts proxying or waitForSync enabled. +`pdps.refresh({ reason })` is an environment refresh acknowledgement, not reload completion or an +individual-PDP refresh API. Do not treat acknowledgements as synchronization guarantees. + +### N3 — Permission context, discovery and filtering + +Permission context uses the fifth `getUserPermissions()` config argument. `getAuthorizedUsers()` +returns a validated full envelope for container/cloud PDP contracts. `getUserTenants()` is container +role-derived tenant discovery, not general membership or a cloud endpoint. An unavailable 404 always +rejects with actionable status, including non-throwing mode. New discovery/filter `useOpa` always +rejects. Other operational failures follow their documented error policy: normalized empty +authorized-user envelope, or empty tenant/filter arrays in non-throwing mode. + +`filterObjects()` evaluates one dense readonly array through bulk decisions, preserving original +identity, order and duplicates. Only known resource fields are dispatched. Object request context +overrides call context; extra application fields remain in returned objects only. Empty inputs do +not bypass unsupported-option validation. URL checks and AuthZEN remain deferred. + +## What scanning cannot certify + +The read-only scanner identifies supported syntax and local Permit binding provenance. A COMPLETE +report means traversal/parsing completed for declared supported inputs, not that an application is +semantically migrated. Always review constructor environment values, authorization policy/results, +OPA hooks, error/log consumers, returned values, generated types, timeouts and external code. +REVIEW_REQUIRED marks unresolved/dynamic/escaped SDK sites. INCOMPLETE records parse/read failures, +unsupported wrappers, escaped/broken symlinks or zero supported sources. Exclusions are listed. +The scanner never executes target code, scripts, configuration modules or target dependencies. + +[inventory]: https://github.com/permitio/permit-node/blob/90b49a1878f0/openapi/MIGRATION.md + +## Complete migrated consumer + +Both entry styles are supported. Validate the effective token; this example performs only a read. +The environment key selects its scope automatically. Broader keys need an allowed environment +selection through `permit.config.apiContext` after scope initialization. + +```ts +import { Permit, PermitApiError } from 'permitio'; + +async function listUsers() { + const token = process.env['PERMIT_API_KEY']; + if (!token || /[\s\p{Cc}]/u.test(token)) { + throw new Error('Set PERMIT_API_KEY to a nonempty whitespace-free API key.'); + } + const permit = new Permit({ token }); + try { + const page = await permit.api.users.list({ page: 1, perPage: 20 }); + return page.data; + } catch (error: unknown) { + if (error instanceof PermitApiError) { + console.error('Permit users read failed', { status: error.status, code: error.code }); + } + throw error; + } +} + +void listUsers(); +``` + +For CommonJS, use `const { Permit, PermitApiError } = require('permitio')` and the same grouped +calls. Strict CJS/ESM fixtures and private loopback tests validate the packed entries. + +## Migrate with an agent + +The package contains [the customer migration skill](skills/permit-node-3-migration/SKILL.md). +Copy the whole `skills/permit-node-3-migration` directory from the package into your agent's skill +directory. Install its locked compiler prerequisite with pnpm and lifecycle scripts disabled, +as described in SKILL.md; then run its read-only scanner against the application directory. +Review the stable IDs above alongside the scanner's findings and coverage limitations. The scanner +does not perform edits, network calls or execute application code. A clean scan does not replace +policy, transport, generated-type and real consumer verification. diff --git a/README.md b/README.md index dc9836e7..f40c9e26 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,112 @@ ![Node.png](imgs/Node.png) +Preparing for 3.0? Read the [2.x-to-3.0 migration guide](MIGRATION.md) and customer agent skill. + # Permit.io client for Node.js Node.js client library for the Permit.io full-stack permissions platform. +## Supported runtimes + +Node.js 22.13.0 or newer is supported, including later major versions. +CI retains the 22.13.0 and 24.0.0 floors and tests current releases of Node 22, 24 and 26. +The package provides both +CommonJS (`require`) and ES module (`import`) entry points. + ## Installation ``` npm install permitio ``` +See the [3.0 migration guide](MIGRATION.md) for grouped API replacements and removed exports. + +## Development + +Use the Node version in `.nvmrc` and pnpm 12.8.1, pinned in `package.json`. +Install pnpm with `npm install --global --ignore-scripts pnpm@12.8.1`. Then run: + +```sh +pnpm audit --audit-level=moderate +pnpm install --frozen-lockfile +pnpm hooks:install +pnpm verify +``` + +Installs disable lifecycle scripts, so builds and hook setup are explicit. Run `pnpm hooks:install` +to install prek for the current checkout without changing sibling worktree hooks. New dependency +versions must be at least 24 hours old; direct dependencies are saved with exact versions. + +`pnpm test` runs the unit and module-import suites without a Permit backend. +`pnpm test:codegen` tests the generator guard without Java; `pnpm check:codegen` also +regenerates the fixture and requires Java 17. `pnpm check:openapi` regenerates the reviewed +production snapshot twice and verifies committed output. See [OpenAPI generation](openapi/README.md) +and its [migration inventory](openapi/MIGRATION.md). + +Test commands save native Vitest reports and execution summaries in `.test-results/`. The gate +requires collected files and executed tests in every selected suite, and rejects unexpected skips. +Backend commands exit with `UNAVAILABLE` and a nonzero status when `PDP_API_KEY` is absent. +Absent optional organization/project keys and disabled direct OPA checks are named `UNAVAILABLE` +limitations; a supplied key with the wrong scope fails. The known ABAC decision test remains +`BLOCKED` by PER-16553. A run with these limitations reports `PARTIAL`, with passed execution counted +separately. CI runs backend checks against the cloud control plane and a pinned local PDP; fork and +Dependabot runs explicitly report unavailable backend coverage. + +`pnpm coverage` measures all authored runtime TypeScript, including API wrappers, enforcement, +configuration and utilities. Generated OpenAPI clients and test files are excluded. Text, HTML, +LCOV and JSON summaries are saved in `coverage/`; this measured scope has no percentage threshold. + ## Release -1. Update the version in `package.json` -2. Execute `yarn run build` -3. Execute `yarn docs ; git add docs/ ; git commit -m "update tsdoc"` to update the auto generated docs -4. Execute `yarn publish --access public` +The shared candidate workflow builds `permitio@3.0.0` from the committed version, validates the +package metadata and file allowlist, and records its archive hash and source identity. Required +quality checks cover lint, strict types, local unit/tooling tests, generated contracts, workflow +security, and external packed ESM/CommonJS customers on Node 22.13.0, 24.0.0, and current +Node 22, 24 and 26 releases. The customer +fixtures also compile with TypeScript 6 and 7 under Node16, NodeNext and Bundler resolution. +Both runtime entry points expose named exports; the ESM declaration facade preserves shared +class identity with CommonJS. Dependency security scans the same archive on both Node floors. + +The release workflow normalizes semantic-version tags, including an optional `v` prefix, and +requires the resulting version to match the reviewed package version. +Its production job downloads and revalidates the tested/scanned archive, then uses npm Trusted +Publishing with lifecycle scripts disabled. It does not build, change the version or repack. +Release candidates use the `rc` distribution tag. + +**Publication is currently blocked.** SDK71's local release evidence has 13 unproved operations, +its `releaseReady` remains false, and the shared target is unavailable (PER-16345). +Shared acceptance and Curtain Call (PER-16561, PER-16574) must provide their reviewed acceptance +contract before publication can proceed. Ordinary PR quality checks do not claim this external +acceptance. + +Repository check, production approval, release tag and npm publisher settings require the separate +owner rollout described in [Contributing](.github/CONTRIBUTING.md). Workflow +source alone does not configure those protections. Actual merge, tag creation and publication +also require separate authorization. + +See [Contributing](.github/CONTRIBUTING.md) for scan commands and reports. + +## Constructor Configuration + +The constructor accepts `IPermitOptions`. Omitted values use environment variables and SDK +defaults. A nonempty token is required after `PERMIT_API_KEY` fallback; tokens are opaque strings +and cannot contain whitespace or control characters. PDP and REST URLs must be absolute HTTP(S) +URLs without literal query (`?`) or fragment (`#`) components, including empty delimiters. +Path prefixes and encoded path characters such as `%3F` and `%23` remain supported. Omitted +`pdp` and `apiUrl` use the existing `PERMIT_PDP_URL` and `PERMIT_API_URL` defaults. Invalid +settings throw before the SDK creates a logger or transport, with errors that omit caller values. + +In 3.0, `permit.config` settings and their SDK-owned nested objects are frozen. Configure tokens, +URLs, logging, tenancy and retry settings at construction time. Supplied Axios instances and +retry callbacks remain caller-owned and live; their defaults, interceptors and mutable callback +state can still change. + +A supplied `apiContext` is copied into an independent SDK-owned context, preserving its initial +permissions and selection. It no longer retains the supplied object's identity. Make later +context changes through `permit.config.apiContext`. Concurrent first REST calls share one scope +lookup per SDK. A failed initial lookup rejects its waiting calls and allows a later retry. Invalid +hierarchical scope replies are rejected atomically, and late replies preserve explicit context +changes. ## Retry Configuration @@ -25,7 +116,7 @@ they are **off** unless you pass a `retry` config (or `retry: { enabled: true }` When enabled, the defaults are: - **3 retries** (up to 4 total attempts) with exponential backoff -- Retries on network errors and status codes: `408`, `429`, `500`, `502`, `503`, `504` +- Retries on recognized transient network errors and status codes: `408`, `429`, `500`, `502`, `503`, `504` - Respects `Retry-After` headers for rate limiting (429) `maxRetries` is the number of retries _after_ the initial request, so the default of `3` means up to 4 total requests. @@ -33,8 +124,44 @@ When enabled, the defaults are: > **Behavioral note** > > - Retries are opt-in — providing a `retry` config object turns them on; omitting it (or passing `retry: false`) leaves them off. -> - When enabled, PDP/OPA calls additionally retry `POST` because check operations are idempotent. The REST API does **not** retry `POST`, so non-idempotent writes are never repeated. -> - A custom `axiosInstance` applies to the REST API only; PDP and OPA calls use dedicated internal axios instances. +> - When enabled, PDP/OPA calls additionally retry `POST` because authorization queries are idempotent. +> - SDK retries never repeat REST `POST` or `PATCH`, even when listed in `retryMethods`. The default idempotent methods remain `GET`, `HEAD`, `OPTIONS`, `PUT` and `DELETE`. +> - Cancellation and invalid request configuration are never retried, even with a custom predicate. Unclassified response-less errors are not retried by the default predicate. + +Retry options are checked when the SDK is constructed. Counts must be nonnegative safe integers; +delays must be finite milliseconds from 0 through 2,147,483,647; the backoff multiplier must be +finite and at least 1. Retry predicates must return a boolean. Invalid configuration fails with +an actionable error instead of silently accepting a malformed policy. + +For 3.0, failed attempts and backoff consume **one Axios timeout budget**. Each retry gets the +remaining timeout, and a delay that exhausts the budget prevents another attempt. The SDK `timeout` +option applies to PDP/OPA; REST and Elements use the supplied Axios instance's timeout. A timeout +of 0 disables the deadline; omitted SDK timeouts preserve caller defaults. This changes the earlier +behavior that reset the full timeout for every retry. Axios adapters must honor the timeout; +arbitrary caller interceptors or adapters are not interrupted by an SDK wall-clock deadline. + +A supplied `axiosInstance` serves REST and Elements; `opaAxiosInstance` serves OPA. The SDK keeps +these caller instances unchanged and delegates every attempt through their live adapters, +transforms and interceptors, including when the SDK and supplied Axios client use different +CommonJS/ESM entry points. Caller default headers remain live on every attempt. Two SDK instances +can share a client while retaining separate routes, Bearer tokens, logging and SDK retry policies. +SDK requests explicitly allow their configured absolute URLs even when the caller default +`allowAbsoluteUrls` is false, so a caller base URL cannot prefix or reroute an SDK destination. +Direct caller requests retain that caller restriction and remain usable and acquire no SDK retries. +Default Basic credentials cannot replace an explicit +SDK Bearer token. Intentional caller hooks can still rewrite request configuration, including +headers and transforms; caller-owned retry or redirect behavior remains the caller's responsibility. +For 3.0, the SDK serializes enforcement request bodies before dispatch so legal JSON dictionary +keys such as `__proto__` and `constructor` survive Axios merging. A supplied OPA request +interceptor or transform receives **JSON text**, including the `{ input: ... }` envelope. +To edit it, parse the text, update the parsed object, and return serialized JSON. Earlier hooks +that expected a raw object must be updated. Direct caller requests retain their own data shape. +Circular references and unsupported JSON values raise a contextual `PermitError` before HTTP; +explicit non-throwing authorization mode retains its deny result. The raw serialization exception +and input are omitted from diagnostics. + +PDP requests use a separate internal transport. There are no SDK registrations on supplied +instances to dispose of. ### Customizing Retry Behavior @@ -49,9 +176,9 @@ const permitCustom = new Permit({ token: 'your-api-key', retry: { maxRetries: 5, - retryDelay: 500, // Initial delay in ms - backoffMultiplier: 2, // Exponential backoff multiplier - maxDelay: 30000, // Maximum delay cap + retryDelay: 500, // Initial delay in ms + backoffMultiplier: 2, // Exponential backoff multiplier + maxDelay: 30000, // Maximum delay cap }, }); @@ -69,10 +196,707 @@ const permitPdp = new Permit({ }); ``` +## Logging and errors + +`log.level` controls the SDK's log level (default: `warn`). Set it to `debug` to include HTTP +request and response diagnostics, or `silent` to disable SDK logs. `PERMIT_LOG_LEVEL` supplies +the default when `log.level` is omitted. + +Logs are JSON lines by default. Set `log.json: false` for pretty text. When `log.json` is +omitted, `PERMIT_LOG_JSON` supplies the default: `false` selects pretty text, while `true`, an +unset variable, or any other value keeps JSON lines. The variable ignores letter case and +surrounding whitespace. An explicit `log.json` setting always overrides the environment variable. +This is a breaking logging change: explicit `log.json: false` produced JSON in 2.x and selects +pretty text in 3.0. Update log parsers, or set `log.json: true` to retain JSON output. +Pretty output uses an in-process synchronous stream without worker threads. Writes run on the +calling thread, so blocked stdout can delay the application. Prefer the default JSON output for +production log collection. SDK initialization logs do not include the API key or serialized +configuration. + +```typescript +import { Permit } from 'permitio'; + +const permit = new Permit({ + token: process.env.PERMIT_API_KEY, + log: { level: 'debug', json: false }, +}); +``` + +With the default `throwOnError: true`, a PDP response with an unexpected status code, or a `200` +response with a body the SDK cannot read, throws `PermitPDPStatusError`, a subclass of +`PermitConnectionError`. It carries the HTTP `statusCode` and a bounded, sanitized `responseBody`. +Transport failures, such as refused connections or timeouts, throw `PermitConnectionError` with +a safe `cause` and transport `code` when available. Match errors with `instanceof`, +not their `name` or message, and check the more specific status error first: + +```typescript +import { PermitConnectionError, PermitPDPStatusError } from 'permitio'; + +try { + await permit.check('user-1', 'read', 'document:one'); +} catch (error) { + if (error instanceof PermitPDPStatusError) { + console.error('PDP HTTP status:', error.statusCode); + } else if (error instanceof PermitConnectionError) { + console.error('PDP connection failed'); + } else { + throw error; + } +} +``` + +REST failures throw named `PermitApiError` errors. +The SDK accepts `message`, `detail` (including validation-error arrays), and text error bodies; +missing descriptions fall back to the HTTP status or transport failure. `status`, `code` and a +detached safe `cause` retain failure metadata. API-key scope failures use `PermitContextError` +with the same safe metadata. + +These are deliberate 3.0 error-property changes. `PermitApiError.originalError` is a detached Axios +snapshot; `response.data` and `formattedAxiosError.error` have type `unknown` after redaction. +`PermitApiError` no longer takes a response-body type parameter; narrow the sanitized data before use. +`request` is always undefined. Snapshots omit request bodies, parameters, socket objects, hooks, +original stacks and raw causes. Response diagnostics keep only `message`, `detail`, `msg`, +`error_code`, `code` and `errors`; nested values, item counts and text lengths are bounded. +Request header values remain redacted except known protocol/SDK headers. Response header values +are redacted except content type, content length and retry timing. Credential URL components +(user information, query values and fragments) are removed. Known request credentials and private +values are scrubbed from error descriptions; oversized or deeply nested requests cause descriptions +to be redacted. Failures from caller adapters, interceptors and retry hooks follow the same rules; +uninspectable primitive rejections use a useful operation fallback. Credentials and identity/permission +attributes are omitted from JSON and pretty +SDK logs, including successful authorization calls. + +These rules apply to `check`, `bulkCheck`, `getUserPermissions`, `checkAllTenants`, +`getAuthorizedUsers`, `getUserTenants`, and `filterObjects`. +PDP responses are validated before authorization data reaches the caller. Direct PDP responses +and OPA `result` envelopes are supported. Decisions must be literal booleans; bulk results must +contain exactly one decision for each requested position. An empty bulk request requires an empty +result. Every all-tenant entry must have `allow: true` and a tenant with a string key; a denied or +malformed entry invalidates the whole result. A legacy `result` boolean alongside `allow` is +additive metadata and does not override the decision. + +Permission entries must contain string arrays when `permissions` or `roles` are supplied. Tenant +and resource details require string keys, resources also require a string type, and supplied +attributes must be objects. The SDK applies the PDP's documented defaults: missing permissions +become `[]`, missing attributes become `{}`, and nullable optional roles/tenant/resource fields are +omitted. Null permissions or attributes are invalid. Extra fields are retained. Dictionary identifiers +such as `result`, `permissions`, and `__proto__` remain valid; a valid direct map takes precedence +over interpreting it as an OPA envelope. + +These are deliberate next-major response contract changes: malformed responses that previously +escaped as truthy values, incomplete bulk arrays, or unchecked permission/tenant objects now fail. +`useOpa: true` is supported by `check()` only; bulk and permission calls reject it under the same +error policy instead of ignoring it. Per-call `timeout: 0` disables the timeout. + +With `throwOnError: false`, failures, including an invalid resource string, return `false` for +`check`, one `false` per input for `bulkCheck`, `{}` for `getUserPermissions`, and `[]` for +`checkAllTenants`. The first three methods also accept per-call error-policy overrides; +`checkAllTenants` uses the SDK setting. + +## PDP discovery and object filtering + +`getUserPermissions(user, tenants?, resources?, resourceTypes?, config?)` accepts request context +in its existing fifth argument: `{ context: { requestFlag: true }, timeout: 1000 }`. Request values +override the internal global context. A general `CheckConfig` does not accept a context option; +other methods receive context as their own argument. + +`getAuthorizedUsers(action, resource, context?, config?)` queries `/authorized_users`, published +by both container and cloud PDP contracts. It returns the complete `{ resource, tenant, users }` +result, with each user's assignments retaining `user`, `tenant`, `resource`, and `role`. Legal +own dictionary keys and additive response fields are preserved. Malformed results invalidate the +whole response. A resource type or `type:key` string follows the same tenant defaults as `check`. + +`getUserTenants(user, context?, config?)` queries `/user-tenants` on a compatible container PDP. +It returns role-derived tenant details; membership without a relevant role does not establish a +positive result. Missing tenant attributes default to `{}`. The cloud PDP contract does not publish +this endpoint, and no cloud runtime support is claimed. HTTP 404 raises an actionable capability +error regardless of `throwOnError`; it does not guess which PDP host is configured. + +`filterObjects(user, action, objects, context?, config?)` performs one supported bulk check and +returns the authorized original objects in input order, preserving duplicates, extra fields and +object identity. Pass a dense readonly array of resources. Only `type`, `key`, `tenant`, and +`attributes` are sent as resource fields; extra application fields remain on returned objects. +Each object's optional `context` is sent as top-level check context with precedence global, +then call, then object. A synchronous array snapshot keeps results aligned if the caller changes +the array while the request is pending. Sparse or undefined slots reject before HTTP. Empty input +returns `[]` without HTTP after validating options. + +```typescript +const permissions = await permit.getUserPermissions('alice', undefined, undefined, undefined, { + context: { requestFlag: true }, +}); +const authorized = await permit.getAuthorizedUsers('read', 'document:report', { + requestFlag: true, +}); +const tenants = await permit.getUserTenants('alice'); +const visible = await permit.filterObjects('alice', 'read', [ + { type: 'document', key: 'report', title: 'Report', context: { requestFlag: true } }, +]); +``` + +The new discovery and filtering methods reject `useOpa: true` regardless of the error policy, +including an empty filtering call. Operational or malformed-response failures follow normal +`throwOnError`: non-throwing mode returns `[]` for tenant discovery/filtering and a normalized empty +`{ resource, tenant, users: {} }` for authorized users. No partial authorization data is returned. +Existing permission-query and bulk OPA error policies remain unchanged. `checkAllTenants` is +retained; future deprecation planning does not remove it here. AuthZEN remains deferred. +Internal context transforms are not activated by these methods. + +## Local role assignments + +`permit.getLocalRoleAssignments(query?, config?)` reads one page of assignments cached by a +compatible container PDP. It uses `GET /local/role_assignments`; the cloud PDP does not publish +this endpoint. These key-based rows are distinct from `permit.api.roleAssignments.list` records +with control-plane IDs. The helper does not synchronize the local cache or promise freshness. + +```typescript +const assignments = await permit.getLocalRoleAssignments({ + user: 'alice', + tenant: 'east', + resource: 'document', + resourceInstance: 'document:report', + page: 1, + perPage: 30, +}); +``` + +Optional `user`, `role`, `tenant`, `resource` and `resourceInstance` filters are strings forwarded +unchanged. `resource` selects a resource type; `resourceInstance` is its type:key identifier. +Omitted tenant leaves tenants unfiltered and does not inject `multiTenancy.defaultTenant`. +No request context, total count, control-plane IDs or envelope is added. The result is a complete +`ILocalRoleAssignment[]` page with required string `user`, `role` and `tenant`, optional +`resource_instance` and preserved additive fields, order and duplicates. Missing and explicit +null `resource_instance` values remain distinct, matching the public Python SDK compatibility. + +`page` defaults to 1 and must be a positive safe integer. `perPage` defaults to the REST value 30 +and must be an integer from 1 through 100. The SDK rejects invalid values instead of clamping them. +There is no automatic pagination: request subsequent pages until a page is shorter than `perPage`. +Timeout/error policy uses `CheckConfig`; a per-call timeout overrides the SDK value, and `0` +disables it. `useOpa: true` and invalid query/options always reject before HTTP with `PermitError`. +Malformed 200 pages and unavailable HTTP 404/405/501 endpoints always reject with +`PermitPDPStatusError`, even with `throwOnError: false`. Ordinary HTTP, connection and timeout +failures follow the per-call/global error policy: typed sanitized errors in throwing mode or `[]` +in non-throwing mode. A genuine empty page also returns `[]`. + +## URL authorization + +`permit.checkUrl(user, httpMethod, url, config?)` evaluates a full URL through the compatible +container PDP's `POST /allowed_url` endpoint and its configured URL mapping rules. It returns +only a literal boolean `allow`: `false` represents policy denial or no matching mapping. +The cloud PDP snapshot does not publish this endpoint. See the +[public URL mapping guide](https://docs.permit.io/how-to/enforce-permissions/url-mapping/regex-url-mapping-check/) +for mapping configuration. + +```typescript +import { type CheckUrlConfig } from 'permitio'; + +const urlOptions: CheckUrlConfig = { + tenant: 'east', + context: { requestFlag: true }, + timeout: 1000, + throwOnError: true, +}; +const allowed = await permit.checkUrl( + { key: 'alice', attributes: { eligible: true } }, + 'GET', + 'https://api.example.com/documents/report?version=1', + urlOptions, +); +``` + +`CheckUrlConfig` adds optional `tenant` and `context` to the existing timeout/error options. +Omitted or empty tenant uses `multiTenancy.defaultTenant` when `useDefaultTenantIfEmpty` is true; +otherwise the call requires an explicit tenant. Context merges global values then per-call +values without changing either source. User, tenant and context are serialized before the +request, so later caller changes do not alter a pending request or its retries. Per-call timeout +uses milliseconds and overrides the SDK timeout; `0` disables it. + +The HTTP method is a string sent unchanged; the published contract has no closed method enum. +The URL must be an absolute URI of 1..65536 Unicode characters without unescaped whitespace or +control characters, raw backslashes, or malformed percent escapes. Its original scheme, case, +percent encoding, query and fragment are sent +unchanged. The SDK imposes no HTTP(S)-only scheme restriction and does not fetch this URL; +matching and authorization remain the PDP's responsibility. Relative paths are invalid. + +Invalid input, input that cannot be JSON-serialized and `useOpa: true` reject with `PermitError` +before HTTP, regardless of +`throwOnError`. A malformed decision (missing or nonboolean top-level `allow`, including an +OPA-only envelope) and unavailable HTTP `404`, `405` or `501` always reject with +`PermitPDPStatusError`. Ordinary HTTP, connection and timeout failures follow the per-call +`throwOnError` override or SDK policy: throwing mode preserves typed sanitized errors, and +non-throwing mode returns `false`. + +## Proxy configurations + +`permit.api.proxyConfigs` manages the selected environment's proxy configurations through the +control-plane API. It supports `list`, `get`, `create`, `update` and `delete`; keys or IDs identify +individual configurations. Listing returns a plain array and defaults to page 1/perPage 100. + +```typescript +import { AuthMechanism, Methods, Permit } from 'permitio'; + +const permit = new Permit({ token: process.env.PERMIT_API_KEY }); +const created = await permit.api.proxyConfigs.create({ + key: 'payments', + name: 'Payments', + secret: 'example-only-credential', + auth_mechanism: AuthMechanism.Bearer, + mapping_rules: [ + { + url: 'https://service.example.test/items/{id}', + http_method: Methods.Get, + resource: 'document', + action: 'read', + priority: 0, + }, + ], +}); +const stored = await permit.api.proxyConfigs.get(created.id); +const changed = await permit.api.proxyConfigs.update(created.id, { + secret: { 'X-Authorization': 'example-only-header' }, + auth_mechanism: AuthMechanism.Headers, +}); +const page = await permit.api.proxyConfigs.list({ page: 1, perPage: 7 }); +await permit.api.proxyConfigs.delete(created.id); +``` + +The exported `ProxyConfigCreate`, `ProxyConfigUpdate`, `ProxyConfigRead`, `Secret`, `MappingRule` +and `MappingRuleUpdate` retain the published fields. `Secret` accepts a string or string-valued +header dictionary. Mapping rules use the lowercase `Methods` enum; regex rules set +`url_type: MappingRuleUrlTypeEnum.Regex`, while plain/template rules omit `url_type`. +Updates may mark a rule with `should_delete: true`; they cannot rename the configuration key. + +Results preserve the complete received configuration and any returned secret mask. Submitted +credentials are never merged into a returned result; the API decides which secret value it +returns. Write bodies and pagination are copied before asynchronous context discovery. Inputs +that cannot be JSON-serialized reject before a write. Named REST/context failures remain visible, +and REST POST/PATCH follow the existing SDK policy of no automatic retries. These operations use +the control plane even when `proxyFactsViaPdp` is enabled and have no `waitForSync` helper. + +## Authorization audit logs + +`permit.api.auditLogs.list` and `get` read the selected environment's authorization audit logs +through the control-plane API, including when `proxyFactsViaPdp` is enabled. List returns the full +`LimitedPaginatedResultAuditLogModel` envelope with `data`, `total_count`, `pagination_count` and +optional nullable `page_count`. Get takes a log UUID and returns `DetailedAuditLogModel`, including its +required `raw_data` and optional nullable `objects`. Successful results preserve all received +decision data, including nullable optional fields and nested objects. + +```typescript +import { AuditLogQueryType, AuditLogSortKey, Permit } from 'permitio'; + +const permit = new Permit({ token: process.env.PERMIT_API_KEY }); +const page = await permit.api.auditLogs.list({ + users: ['alice', 'bob'], + resources: ['document'], + tenant: 'east', + action: 'read', + decision: false, + query: AuditLogQueryType.None, + sortBy: AuditLogSortKey.Timestamp, + page: 1, + perPage: 100, +}); +for (const log of page.data) { + const detail = await permit.api.auditLogs.get(log.id); + if ('metrics' in detail.raw_data) { + const metrics = detail.raw_data.metrics; + } +} +``` + +`IListAuditLogs` exposes pagination plus `pdpId`, `users`, `decision`, `resources`, `tenant`, +`action`, `timestampFrom`, `timestampTo`, `sortBy` and `query`. Arrays use repeated query entries, +retaining order, duplicates, commas and empty strings; empty arrays omit those entries. Options +and arrays are copied before asynchronous context discovery. Explicit false, zero and empty values +are forwarded for server validation. User filter items have a published 500-character maximum. +Numeric timestamp filters are forwarded unchanged because their units are not specified by the +published contract. Omitted sorting/query fields retain the service's timestamp/check defaults; +`AuditLogSortKey.None` and `AuditLogQueryType.None` serialize as `None` and `none`, respectively. + +The SDK defaults to page 1/perPage 100; the REST omission default is 1/30 and maximum page size +is 100. Reads do not auto-paginate or promise an atomic list/detail snapshot. The exported +`AuditLogModel`, `DetailedAuditLogModel`, `RawData`, `RawData1`, `OPAEngineDecisionLog`, +`AVPEngineDecisionLog`, `GenericEngineDecisionLog`, `DummyEngineModel` and `AuditLogObjectsModel` +preserve the published read schemas, including optional nullable engine tags and metrics. +Engine tags overlap the dummy branch, so guard properties +before using engine-specific fields. Named REST/context failures reject, including unavailable +records; there is no empty-page fallback. Audit replay, deletion, Elements and `waitForSync` +are outside this read API. Record availability and retention remain service responsibilities. + +## User lists + +`permit.api.users.list` returns the full `PaginatedResultUserRead` envelope. Pass +`searchOperator: 'contains'`, `'startswith'` or `'endswith'` to match user keys, emails +and names. Omitting it leaves the API default of `contains`. Search, role and pagination +options can be combined; `role: ''` selects users without roles. + +```typescript +const users = await permit.api.users.list({ + search: 'alice', + searchOperator: 'startswith', + includeResourceInstanceRoles: true, + page: 1, + perPage: 20, +}); +console.log(users.total_count, users.data[0]?.associated_tenants); +``` + +`includeResourceInstanceRoles` defaults to false at the API. When true, resource roles +appear in each associated tenant's `resource_instance_roles`, with `resource`, +`resource_instance` and `role` fields. Both flag values retain the same paginated result. + +## Bulk roles + +`permit.api.roles.bulkCreateOrReplace` creates or replaces role definitions in the selected +environment. Pass `RoleCreateBulk[]`: each definition requires a `key` and `name`. Omit `resource` +for a tenant role, or set it to the resource key for a resource role. + +```typescript +import type { RoleCreateBulk, RoleCreateBulkOperationResult } from 'permitio'; + +const roles: RoleCreateBulk[] = [ + { key: 'reader', name: 'Reader', permissions: ['document:read'] }, + { key: 'editor', name: 'Editor', resource: 'document', permissions: ['read', 'write'] }, +]; +const result: RoleCreateBulkOperationResult = await permit.api.roles.bulkCreateOrReplace(roles); +console.log(result.created, result.updated); +``` + +Calls use `PUT /v2/schema/{proj_id}/{env_id}/bulk/roles` on `apiUrl`, including when +`proxyFactsViaPdp` is enabled. The SDK wraps the definitions in `{ operations: roles }` and returns +the complete received result, including both `created` and `updated` string arrays. Those strings +have no published UUID, ordering or input-index guarantee. The contract does not promise batch +atomicity or first-attempt classifications; existing PUT retries can replay a request. Read role +definitions through `roles.get` or `resourceRoles.get` to verify persisted outcomes. These schema +writes have no `waitForSync()` method. Context failures use `PermitContextError`; HTTP failures use +`PermitApiError`. + +## User attribute definitions + +`permit.api.userAttributes` manages the selected environment's user attribute schema through +`list`, `get`, `create`, `update` and `delete`. These definitions describe policy attributes; +individual user values are supplied through `permit.api.users`, such as `users.update`. +Calls use the dedicated `/v2/schema/{proj_id}/{env_id}/users/attributes` routes on `apiUrl`, +including when `proxyFactsViaPdp` is enabled. + +```typescript +import { AttributeType } from 'permitio'; + +const definition = await permit.api.userAttributes.create({ + key: 'department', + type: AttributeType.String, + description: 'The department used by user policies.', +}); +const definitions = await permit.api.userAttributes.list({ page: 1, perPage: 20 }); +const stored = await permit.api.userAttributes.get(definition.id); +const updated = await permit.api.userAttributes.update(stored.key, { + description: 'Updated policy schema description.', +}); +await permit.api.users.update('user-key', { attributes: { department: 'engineering' } }); +console.log(definitions.length, updated.resource_key, updated.built_in); +await permit.api.userAttributes.delete(definition.id); +``` + +Creation requires the schema `key` and `AttributeType`; `description` is optional. Update is a +partial schema body containing `type` and/or `description`. `get`, `update` and `delete` accept +an attribute key or UUID. Results retain the full `ResourceAttributeRead` metadata, including +resource identity, environment, timestamps and `built_in`; list returns an array, with SDK +defaults page 1 and perPage 100. This dedicated group has no resource selector or `waitForSync()` +method. Deleting a definition also removes its related data; policies then evaluate it as +`undefined`. Context failures use `PermitContextError`; HTTP failures use `PermitApiError`. + +## API keys + +`permit.api.apiKeys` exposes `list`, `get`, `create`, `delete`, `rotate` and `getScope` through +the control-plane `/v2/api-key` routes on `apiUrl`, including with `proxyFactsViaPdp` enabled. +Server authorization governs access. These methods do not initialize or require selected API +context, inject scope into creation bodies, or provide a facts synchronization helper. + +```typescript +import { APIKeyOwnerType, MemberAccessLevel, MemberAccessObj } from 'permitio'; + +const scope = await permit.api.apiKeys.getScope(); +const page = await permit.api.apiKeys.list({ + objectType: MemberAccessObj.Project, + projId: 'project-key-or-uuid', + page: 1, + perPage: 20, +}); +const disposable = await permit.api.apiKeys.create({ + organization_id: scope.organization_id, + object_type: MemberAccessObj.Org, + access_level: MemberAccessLevel.Read, + owner_type: APIKeyOwnerType.Member, + name: 'Disposable key', +}); +const stored = await permit.api.apiKeys.get(disposable.id); +const rotated = await permit.api.apiKeys.rotate(disposable.id); +// Store returned secrets securely when present; do not log them. +console.log(page.total_count, stored.organization_id, rotated.id); +await permit.api.apiKeys.delete(rotated.id); +``` + +Creation uses the complete `APIKeyCreate` body: `organization_id` is required; project and +environment IDs, record scope, access level, owner type and name are optional. The SDK forwards +these values without replacing them from selected context. List accepts only `objectType`, +`projId`, `page` and `perPage`; its defaults are 1/100, while REST defaults are 1/30 with a +maximum page size of 100. It returns the complete `PaginatedResultAPIKeyRead` envelope, +including required `total_count` and optional nullable `page_count`, without automatic +pagination. + +Record operations accept API-key IDs, not names or credential strings; rotation's published ID +is a UUID. `APIKeyRead` retains all received metadata and its optional nullable `secret`. +A successful response may omit the secret or return null; the SDK does not recover it from +earlier inputs or responses. +`getScope()` returns `APIKeyScopeRead` directly without initializing or changing selected API +context. Optional record scope, name, enum, timestamp and nested metadata fields also allow null. +The organization ID is required; project/environment IDs may be omitted or null. +Use a null-and-undefined guard before treating those optional IDs as strings. + +Rotation sends a bodyless POST to `/v2/api-key/{api_key_id}/rotate-secret`. The SDK does not +retry create or rotation POSTs, or replace the client's configured credential. Preserve the +received result without assuming its ID stays unchanged. API failures always reject with +`PermitApiError`; the authorization-check fallback setting does not suppress management errors. +Existing `permit.api.environments.getApiKey` remains the separate environment-key helper. + +## User invites + +`permit.api.userInvites` manages API-key facts invites through `create`, `list`, `get`, +`update`, `delete` and `approve`. Calls use the selected environment on `apiUrl`, including +when `proxyFactsViaPdp` is enabled. These methods store and approve facts; they do not send +invitation mail and have no `waitForSync()` method or PDP synchronization guarantee. + +```typescript +const invite = await permit.api.userInvites.create({ + key: null, + status: 'pending', + email: 'invitee@example.com', + first_name: null, + last_name: null, + role_id: role.id, + tenant_id: tenant.id, + resource_instance_id: null, +}); +const page = await permit.api.userInvites.list({ tenant: tenant.key, page: 1, perPage: 20 }); +const user = await permit.api.userInvites.approve(invite.id, { + email: invite.email, + key: 'approved-user', + attributes: null, +}); +console.log(page.total_count, user.key); +``` + +Creation and update require every editable field, including the four nullable fields shown +above. `update` requires this full body despite using PATCH. Use internal UUIDs for `role_id`, +`tenant_id` and a non-null `resource_instance_id`; null selects a tenant role invite. Setting +`status` alone does not grant membership or roles. `get`, `update`, `delete` and `approve` use +the invite's internal ID, without user-key lookup. + +`list` accepts role and tenant keys or IDs, text `search`, `page` and `perPage`. It returns the +complete `PaginatedResultElementsUserInviteRead` page, preserving nullable fields and counts. +`page_count`, when present, is the number of rows on the current page. The SDK's list defaults +are page 1 and perPage 100. `UserInviteStatus` exposes the `pending` and `approved` values. + +Approval requires the matching email, final user key and nullable `attributes`. It creates or +reuses the user, adds tenant membership and grants the invite's role. It returns +`UserInviteApprovalRead`, whose optional names and attributes can be null. An optional attribute +type argument is a caller assertion of the response shape, without validation or write inference; +approval does not guarantee replacing an existing user's profile attributes. HTTP 400 approval +refusals retain safe status, transport code and route details with generic guidance; remote text +and response bodies are omitted because they can contain another invite's stored email. +Other failures use the existing API diagnostics. Deleting an invite resolves to undefined and +does not revoke membership or roles created by approval. + +## Tenant lists and totals + +`permit.api.tenants.list()` returns a tenant array. Pass `includeTotalCount: true` to keep the +complete API page, including `data`, `total_count` and optional `page_count`. False or omitted +flags preserve the array result. Search, page and perPage are forwarded without new defaults. + +```typescript +interface TenantAttributes { + region: string; +} + +const tenants = await permit.api.tenants.list(); +const page = await permit.api.tenants.list({ + includeTotalCount: true, + search: 'east', + page: 1, + perPage: 20, +}); +console.log(tenants[0]?.attributes?.region, page.total_count, page.data); +``` + +A dynamic or optional boolean flag produces a union of the array and page types; narrow with +`Array.isArray(result)` before reading page metadata. The attribute type is optional and remains +a caller assertion of server data. `waitForSync()` clones support the same flag and types. + +## Attribute types + +User, tenant and resource-instance reads accept an optional per-call attribute type. The default +is `object`, and `attributes` remains optional. This type describes the server data you expect; +it does not validate responses or infer attributes from write requests. + +```typescript +interface UserAttributes { + department: string; + note: string | null; +} + +const user = await permit.api.users.get('alice'); +const users = await permit.api.users.list({ search: 'alice' }); +const synced = await permit.api.users.sync({ key: 'alice' }); +console.log(user.attributes?.department, users.data[0]?.attributes?.note, synced.created); +``` + +The type also flows through `getByKey`, `getById`, `create`, `update` and `waitForSync()` clones. +Tenant `list`/read/create/update methods select tenant attributes; `addUser` and `listTenantUsers` +select user attributes. Resource-instance `list`, `listDetailed` and read/create/update methods +select instance attributes. Lists keep their existing array or paginated envelope, and sync keeps +its `{ user, created }` result. `ResourceRead` describes resource schema definitions and has no +attribute-data type parameter. Role assignment and other nested partial models are unchanged. + +## Groups + +`permit.api.groups` supports the eight GA core operations: `create`, `delete`, `list`, `get`, +`assignUser`, `removeUser`, `assignRole`, and `removeRole`. `list` and `get` use the direct Groups +endpoints. Pass a qualified resource:instance key (such as `team:support`) or an internal group +instance ID to identify a group. + +Create and assignment calls return `GroupRead`, which contains the group and membership fields. +Direct reads return `GroupReadSchema`, which also contains `id`. `list` always returns the full +`PaginatedResultGroupReadSchema` envelope: `data`, `total_count`, and optional `page_count`. +It accepts `tenant`, `resource`, `search`, `page`, and `perPage`; pagination defaults to page 1 +with 100 rows per page. + +```typescript +// The group resource type, user, tenant, target resource instance, and role already exist. +const groupKey = 'team:support'; +await permit.api.groups.create({ + group_resource_type_key: 'team', + group_instance_key: 'support', + group_tenant: 'east', +}); +await permit.api.groups.assignUser(groupKey, 'alice', { tenant: 'east' }); + +const grant = { + role: 'reader', + resource: 'document', + resource_instance: 'quarterly-report', + tenant: 'east', +}; +await permit.api.groups.assignRole(groupKey, grant); +const page = await permit.api.groups.list({ tenant: 'east', page: 1, perPage: 20 }); +console.log(page.data, page.total_count); + +await permit.api.groups.removeRole(groupKey, grant); +await permit.api.groups.removeUser(groupKey, 'alice', { tenant: 'east' }); +await permit.api.groups.delete(groupKey); +``` + +Group role grants apply through ReBAC relationships and role derivation. Members inherit the +granted resource role; revoking the grant or removing membership removes that inheritance after +policy and facts synchronization. Both adding and removing a user require the tenant JSON body. +Role assignment and removal require `role`, `resource`, `resource_instance`, and `tenant`. + +## Tenant membership, detailed lists, and PDP refresh + +`permit.api.tenants.addUser(tenantKeyOrId, userData)` creates a new user and associates it +with an existing tenant. Pass `UserCreate` data with a `key`; no role assignment is required. +The backend rejects an already-existing user. This method always uses the control-plane API, +even with `proxyFactsViaPdp` or `waitForSync`; its response does not guarantee PDP synchronization. + +```typescript +await permit.api.tenants.addUser('east', { key: 'new-user' }); +const tuples = await permit.api.relationshipTuples.listDetailed({ tenant: 'east' }); +const instances = await permit.api.resourceInstances.listDetailed({ + tenant: 'east', + resource: 'document', + search: ['report'], + page: 1, + perPage: 20, +}); +const assignments = await permit.api.roleAssignments.listDetailed({ user: 'new-user' }); +console.log(tuples.data, instances.total_count, assignments.page_count); + +const refresh = await permit.api.pdps.refresh({ reason: 'Reload external data' }); +console.log(refresh.update_id, refresh.pdp_ids); +``` + +Each `listDetailed` uses the dedicated control-plane `/detailed` endpoint, even when facts +proxying or `waitForSync` is enabled, and returns its full paginated +envelope, including nested details, `total_count`, and optional `page_count`. Pagination defaults +to page 1 with 100 rows. Relationship filters accept `tenant`, `subject`, `relation`, `object`, +`objectType`, and `subjectType`. Instance filters accept `tenant`, `resource`, and `search` terms. +Assignment filters accept `user`, `role`, `tenant`, `resource`, and `resourceInstance`. +Dedicated detailed lists have no `detailed` or `includeTotalCount` switches. The existing +`roleAssignments.list` retains its query behavior; dynamic flags return the corresponding +array/envelope and base/detailed type unions. + +`permit.api.pdps.refresh` requests a data refresh for all PDP configurations in the selected +environment through the control plane. It requires an API key with update access to those +configurations and accepts an optional `reason`. The returned update ID and PDP IDs acknowledge +the request; they do not signal completion. Environment refresh does not accept `shard_id`. +Individual-PDP refresh remains deferred. All five methods require a selected environment and +an environment-level API key or broader access. + ## Documentation [Read the documentation at Permit.io website](https://docs.permit.io/sdk/nodejs/quickstart-nodejs#add-the-sdk-to-your-js-code) ## API Reference -[Check out the tsdoc reference here.](https://permitio.github.io/permit-node/classes/Permit.html) +The [API reference](https://permitio.github.io/permit-node/classes/Permit.html) is hosted on +GitHub Pages. For this unreleased candidate, run `pnpm run docs` and inspect the generated +`docs/index.html`; building the reference does not publish it. + +Grouped interfaces and the named input/result/error contracts used by public methods are imported +from `permitio`. This includes `IRelationshipTuplesApi`, `IResourceInstancesApi`, +`IResourceRelationsApi` and `IResourceRolesApi`. The reference links these interfaces from +`IPermitApi` and its navigation. Generated-only internal files are not a supported deep-import API. + +## Background environment copies + +`permit.api.environments.copyAsync` submits a copy in the same project and returns the complete +received task response. Pass the source project and source environment explicitly; `target_env` +selects the destination. The existing `copy` method retains its synchronous environment response. + +```typescript +const task = await permit.api.environments.copyAsync( + 'project', + 'source', + { + target_env: { new: { key: 'staging', name: 'Staging' } }, + conflict_strategy: 'fail', + scope: { resources: { include: ['document'] } }, + }, + 0, +); + +const current = await permit.api.environments.getCopyResult('project', 'source', task.task_id, 0.5); +if (current.status === 'success' && current.result) { + console.log(current.result.id, current.result.key); +} else if (current.status === 'failure' && current.error) { + console.log(current.error.error_code); +} +``` + +Both methods return once and preserve `task_id`, `status`, optional nullable `result` and `error`, +and any additional response fields. Status is `processing`, `success`, `failure` or `cancelled`; +a failure or cancelled task response is data, while HTTP and transport failures throw named SDK +errors. A fast task may already be complete in the submission response. The SDK does not poll, +replay submission or cancel the task. Keep the acknowledged task ID to request another result. + +The optional `wait` is a finite server wait in seconds from 0 through 60, including fractions. +Omitting it omits the query parameter; explicit zero is forwarded. It is independent of the +caller's Axios REST timeout in milliseconds. `Config.timeout` configures PDP/OPA requests. +Expiration of a wait or caller transport timeout does not cancel an accepted background task. +Submission requires a project or organization API key in the SDK preflight. Result reads use the +existing environment-read preflight; the server still determines permission for either request. + +The [public background-task guide](https://docs.permit.io/api/background-tasks/) describes the +wait and task responses. The +[copy guide](https://github.com/permitio/docs/blob/6ec47cd3f04da6fa1bc9d48226ccbe781b304f77/docs/manage-your-account/creating-environments.mdx) describes destination, +conflict strategy and scope filters. diff --git a/api-coverage/README.md b/api-coverage/README.md new file mode 100644 index 00000000..84447232 --- /dev/null +++ b/api-coverage/README.md @@ -0,0 +1,145 @@ +# API contract evidence + +`pnpm check:api-contracts` checks the reviewed local operation inventory and declared shapes. +`pnpm check:api-drift` additionally fetches the public control-plane and cloud-PDP OpenAPI +**documentation** and compares it with the committed snapshots. Neither command calls API +operations, creates fixtures, or measures real-backend behavior. Reports are written to ignored +`coverage/api-contracts/report.json` and `report.md`; use `--output DIRECTORY` with the script to +save them elsewhere. + +## Status and scope + +The report deliberately has separate results: + +| Result | Meaning | +| ----------------------------- | ---------------------------------------------------------------------------- | +| Local integrity PASS | Current extraction, source provenance and reviewed decisions are consistent. | +| Coverage GAPS | Planned additions or existing undecided omissions remain. | +| Shared target UNAVAILABLE | PER-16345 has not published an adopted machine-readable cross-SDK target. | +| Backend NOT_MEASURED | This command performs no real-backend tests. | +| Latest container NOT_MEASURED | The retained container schema comes from the pinned image only. | +| Future PDP NOT_ADOPTED | No approved future-PDP contract snapshot has been adopted. | + +Exit **0** means local integrity, not complete coverage or parity. Exit **1** means changed +contracts, new/unexplained operations or stale decisions. Exit **2** means incomplete or invalid +input: missing files, unsupported referenced Path Items, invalid supported structures, empty +inventories, unresolved references or a failed source fetch. Structural checks cover the operation, +response, parameter, server and local-reference forms this inventory consumes; they are not an +exhaustive OpenAPI specification validator. A network error cannot produce a clean drift result. + +The initial reviewed denominator is 263 control-plane operations, 34 pinned-container PDP +operations and 10 cloud-PDP operations. Every published operation remains visible, including +GA, EAP, deprecated, generated-only and excluded operations. There is no coverage percentage +that silently removes exclusions from the denominator. + +`decisions.json` contains exact **Node-local** decisions and reasons, with issue ownership and +source links. Its prose sources are [PER-16337](https://linear.app/permit/issue/PER-16337) and +[PER-16345](https://linear.app/permit/issue/PER-16345); it is not their unpublished shared target. +Existing undecided entries remain gaps. A newly published operation without an exact reviewed +entry fails the gate, as does a decision whose operation disappeared or changed lifecycle. +An exclusion fails when a public method begins exposing that operation. Local decisions must +be reconciled with the shared artifact when its owner publishes it; adoption is not complete. + +## Extraction and shape evidence + +The compiler-based extractor starts at the public `Permit` instance type. It follows exposed +API properties, constructor-assigned implementations, inherited aliases and resolved calls +through generated dispatch to HTTP parameter creators. Enforcement JSON serialization retains the +structural input body in the inventory: the compiler verifies the private serializer's native +`JSON.stringify` call and input parameter identity. Removing it, substituting a local lookalike, +or bypassing it remains a measured change. Generated clients alone do not count +as public `Permit` methods. Internal scope discovery remains supporting evidence; +`permit.api.apiKeys.getScope` independently exposes its complete typed result through the +control plane. Explicit helper decisions cover route-free public methods; +new unresolved methods fail instead of disappearing from the inventory. + +PER-16949 exposes the six published API-key management operations through `permit.api.apiKeys`. +The compiler and separate wire cases retain API-only routing, bodyless rotation, finite list +filters, complete pagination envelopes and optional response secrets. Successful DTO preservation +and sanitized failure diagnostics are distinct checks; these wrappers do not infer server privilege +or inject selected scope. + +The snapshot includes authored interfaces/type aliases, generated model and request shapes, +resolved generated return types, actual exposed overloads, HTTP paths/methods and transport selection. +Authored function signatures, enums, supporting variable values, class initializers and reachable +declarations (including parameter defaults) are retained alongside generated request/dispatch bodies. +All authored class declarations and generated support modules also have normalized AST fingerprints, +so constructor helpers, static defaults and shared routing changes require review. These conservative +fingerprints are separate from operation coverage and do not establish public reachability. +This deliberately conservative snapshot means: +request-mapping edits behind unchanged signatures require review, and unrelated body edits may +also require a baseline update. The separate strict compiler and wire tests remain necessary. +This is drift evidence, not a proof that every field of every published schema is implemented. + +Source drift includes request/response schemas, model fields, nullability, required fields, +array/envelope shapes, defaults, unions, enum values, reusable components and authentication schemes. +Declared path/operation servers, effective server precedence and all source counts are retained. +Referenced root Path Items are explicitly unsupported and return INVALID until their operation +resolution is implemented and reviewed; they cannot silently reduce the operation inventory. +Documentation annotations are ignored; application property names and literal defaults are retained. Even an +additive source field requires review. That review gate does not reject additive runtime data: +local Axios-boundary tests verify that extra object/row fields and unknown enum-like values +survive supported read/list paths. Existing wrappers that return arrays intentionally unwrap +only the documented envelope. + +## PDP routing and source exceptions + +`sources.json` pins exact public source URLs, raw-byte hashes, counts and the container image +reference. The full provenance, including alias proof and unavailable capability statuses, is +also pinned in `baseline.json`. Reviewed schema repairs and unspecified bulk-result limitations +remain documented in [the OpenAPI guide](../openapi/README.md), with source defects tracked by +PER-16342 and bulk placeholders by PER-9298. + +The pinned image mounts the same facts router under `/facts` and the hidden compatibility +prefix `/v2/facts/{proj_id}/{env_id}`. Only exact method/suffix matches receive container alias +evidence. The source-file digest records this observation; private implementation and deployment +configuration are not published. Other `proxyFactsViaPdp` paths are listed as SDK-only forwarding +with unverified support, never treated as published local PDP operations. The optional OPA path +and retained Elements login supplement also have explicit SDK-only decisions. Missing or stale +exceptions fail the gate. + +The cloud schema lacks container-only routes such as all-tenants and user-tenants. A method's +presence in one source never establishes support in another. Future and moving-latest PDPs need +separate reviewed evidence. PER-16568 adds complete authorized-user discovery to the published +container/cloud route and role-derived tenant discovery to the container-only route. It retains +all-tenants behavior; future deprecation communication belongs to PER-16015. Object filtering +composes the supported bulk operation and adds no server route. + +## Reviewing a change + +1. Run the local command and inspect the JSON changes and operation rows. Do not delete baseline + entries, shrink a denominator or relabel an omission solely to make the gate pass. +2. For upstream drift, review the exact public schema delta, source hash and generated effects. + Update the committed raw snapshot only through the OpenAPI review/generation procedure. +3. Give each new or changed operation an explicit decision, reason and issue owner. Keep an + unresolved product decision visible; source corrections need their existing source ticket. +4. For an intentional SDK change, inspect its actual route, signature, model and implementation + changes before replacing that portion of `baseline.json`. Update the reviewed provenance + alongside source changes. There is no automatic acceptance mode in CI. +5. Run `pnpm verify`, the focused contract tests and the applicable separate wire/backend tests. + Record the actual test level and runtime; do not copy a static PASS into backend evidence. + +The shared parity artifact is an external dependency of PER-16561. Feature additions have +separate owners and independent wire/backend evidence; this check does not implement those +methods or establish live behavior. + +## Scheduled review and ownership + +The `Published API contract drift` workflow runs weekly and on manual dispatch. It fetches only +allowlisted public schema documents with time and size limits, stores the JSON/Markdown evidence +for 30 days, and fails on drift or incomplete inspection. Local checks also run in `pnpm verify`, +so PR validation does not depend on a mutable external schema. + +SDK maintainers own failure triage through [PER-16561](https://linear.app/permit/issue/PER-16561). +Review a failed scheduled run before the next SDK release and link the resolved decision or source +issue in the baseline-change PR. GitHub's workflow failure notifications, job summary and retained +artifact are the implemented alert surfaces. No Slack destination, automated ticket creation or +cross-SDK owner service is configured by this change. + +## Packed release evidence + +[The release-evidence contract](RELEASE-EVIDENCE.md) validates a separate compatibility harness's +allowlisted observations against the exact candidate package, official released baseline, clean +source inventory, and reviewed runtime/case matrix. It does not start services. Package/wire/API/PDP +proof remain distinct, and missing execution remains INVALID. This command's local PASS never +resolves the unavailable shared parity target or approves npm publication. diff --git a/api-coverage/RELEASE-EVIDENCE.md b/api-coverage/RELEASE-EVIDENCE.md new file mode 100644 index 00000000..d132e759 --- /dev/null +++ b/api-coverage/RELEASE-EVIDENCE.md @@ -0,0 +1,154 @@ +# Packed release evidence + +`pnpm check:release-evidence` checks a compatibility harness's public-safe evidence against the +actual package and a reviewed test plan. It runs local build and packaging tools, reads supplied +files, and never contacts a backend or PDP. Run service tests separately through the authorized +harness, using isolated local services on this computer. Existing cloud-backed CI lanes are +separate evidence and remain unchanged. + +The committed [matrix](release-matrix.json) is a requirement, **not a test result**. Missing cases +and source-operation gaps remain visible. A method call, a passing phase, and a static route link +are different observations; none establishes complete schema or backend fidelity. + +## Inputs and invocation + +Use the exact repository-pinned pnpm, a supported Node runtime, installed frozen dependencies, +and a clean committed checkout. Place evidence and consumer lockfiles outside the tracked source +(or under ignored `coverage/`). The candidate is the actual tarball installed by the harness; +its version remains whatever `package.json` currently declares until the release-version change. +An unreleased development tarball labeled 2.7.5 is not the released baseline. + +```sh +pnpm check:release-evidence \ + --evidence /path/to/public-evidence.json \ + --artifact /path/to/candidate.tgz \ + --baseline /path/to/released-permitio-2.7.5.tgz \ + --candidate-lock /path/to/candidate-consumer/pnpm-lock.yaml \ + --baseline-lock /path/to/baseline-consumer/pnpm-lock.yaml +``` + +The checker independently: + +1. Verifies that the checkout is clean and records its Git tree. +2. Reads both tarballs without installing them, extracting files onto disk, or running their code. + Paths, member types, duplicates, input sizes, process duration, and output sizes are bounded. + Harmless archive directories are allowed; links and other member types are rejected. +3. Builds the SDK and packs a reference archive with the exact pnpm and disabled package lifecycle + scripts. The supplied candidate must match that archive byte for byte. This includes omitted + files, file boundaries, declarations, package metadata, documentation, and exported entry points. + The checkout must still be clean and at the same tree afterward. +4. Matches the baseline against the reviewed SHA-256 and official npm SHA-512 integrity in the + matrix. The baseline is [published permitio 2.7.5](https://registry.npmjs.org/permitio/2.7.5). + File counts include regular files only, not tar directory entries. +5. Hashes both actual consumer lockfiles, extracts the current public SDK inventory, and validates + the existing source-contract baseline and operation decisions before reading execution claims. +6. Checks the evidence against those inputs and the independently committed cases and matrix. + +The result is written to ignored `coverage/release-evidence/report.json`. Use `--output DIRECTORY` +for another destination. Invalid-input diagnostics stay on the local console; the JSON result +never copies arbitrary filesystem errors or rejected producer identifiers. + +## Result meanings + +| Exit | Local result | Meaning | +| ---- | ------------ | ------------------------------------------------------------------------------- | +| 0 | PASS | Required local observations, identities, comparisons, and cleanup are complete. | +| 1 | FAIL | A phase, case, or baseline comparison reported a behavioral failure. | +| 2 | INVALID | Inputs, bindings, execution, matrix coverage, setup, or cleanup are incomplete. | + +INVALID takes precedence when failures and incomplete evidence coexist. The `failures` array +still retains producer-reported FAILED positions such as `runs[1].caseResults[3]`. These positions +are useful for private diagnosis; an invalid report's claims are not independently confirmed. +A missing backend, a wrong artifact, a zero-assertion PASS, or phase counts without case observations +cannot pass. Merely invoking the CLI without every required input also returns 2. + +`releaseReady` is **always false** while PER-16345's shared target is unavailable. No adopted +shared-target payload is defined by this contract. A local PASS is neither a parity claim nor a +publication approval. Operations marked add/retain without proof keep local evidence incomplete; +excluded, deferred, and undecided operations remain in the inventory instead of disappearing. + +## Public payload version 1 + +Every object has an explicit allowlist. Missing or unknown fields are rejected, including nested +objects. The executable field contract is in `scripts/release-evidence.mjs`; the required public +identifiers and case links are in `release-matrix.json`. + +- **Root**: `schema: 1`, `artifact`, `sdk`, `inventory`, `runs`, `ab`, `gates`. +- **Candidate artifact**: `name`, `version`, `sha256`, `fileCount`, `lockSha256`. +- **SDK**: `tree`, `inventorySha256`. +- **Inventory method**: `name`, `caseIds`. +- **Inventory operation**: `source`, `method`, `path`, `decision`, `caseIds`. +- **Run**: `id`, `artifactSha256`, `nativeReportSha256`, `node`, `target`, `pdp`, `phaseResults`, + `caseResults`, `cleanup`, `setupErrorCount`, `cleanupErrorCount`. +- **PDP**: `digest`, `roles`, `resolvedAt`. +- **Phase result**: `id`, `kind`, `status`, `assertions`. +- **Case result**: `id`, `phaseId`, `methodNames`, `operationKeys`, `level`, `status`, + `assertions`. +- **Cleanup**: `registered`, `completed`, `verified`. +- **A/B**: `baseline`, `candidateSha256`, `cases`, `intentionalDifferences`. +- **Released baseline**: `version`, `sha256`, `fileCount`, `lockSha256`, `kind: released-npm`, + `integrity`. +- **A/B comparison**: `id`, `baselineRunId`, `candidateRunId`, `status`, `assertions`. +- **Intentional difference**: `id`, `changeId`. +- **Shared gate**: `sharedTarget: {status: UNAVAILABLE, owner: PER-16345}`. + +Statuses are PASSED, FAILED, INVALID, and NOT_RUN. Assertion/error/cleanup counts are nonnegative +safe integers. File counts and PASSED assertion counts must be positive. SHA-256 values use 64 +lowercase hexadecimal characters; Git trees use 40. The public run IDs are stable cell labels, +not native random run IDs. Baseline and candidate cells carry their actual different artifact hashes. + +Inventory hashing uses the existing `digest` canonicalization in `scripts/api-contracts.mjs`: +recursive object-key sorting and UTF-8 JSON serialization. The input contains sorted method names +and operations sorted by `source + " " + method + " " + path`; each operation includes only source, +method, path, and reviewed decision. Case links are excluded from this hash and checked separately. +All 170 current methods and all 307 reviewed published operations remain visible. The extractor, +not these documented counts, is authoritative after future reviewed changes. + +## Proof levels and matrix + +Package, wire, mock-PDP, API, and PDP evidence stay separate. HTTP methods require at least actual +wire behavior; package-presence checks cannot replace it. Route-free helpers can have package +behavior cases. Local API/PDP observations cannot claim cloud-PDP execution. Each case records +only the routes, methods, and successful assertions actually exercised inside its bounded callback. +Case assertion totals cannot exceed their containing phase's assertions. Cases must reference an +existing phase of the same level, and PASSED cases require a successful containing phase. + +The SDK supports Node >=22.13.0, including later major versions. The matrix retains Node 22.13.0 +and 24.0.0 floors plus current Node 22.23.3, 24.21.0 and 26.11.0 releases verified on 2026-10-08 +from [Node's official release index](https://nodejs.org/dist/index.json). Pinned and +current PDP roles share one image digest in this dated snapshot. One execution can fulfill both +roles only when the reviewed digest and resolution date match. This is not ongoing monitoring of +moving tags; refresh and review the matrix before relying on a newer runtime or image. + +Each candidate local cell must include every required phase and case. Existing phase-only reports +cannot be retroactively relabeled as case execution. Missing planned cases stay missing. A/B +comparisons require matching local runtime/PDP cells, successful case observations on each artifact, +and an actual positive-count comparison. The harness compares normalized values from shared +supported behavior; it must preserve semantic fields, falsy/null values, promised order, and response +shapes. Explicit migration change IDs document intentional differences; they are not successful +A/B comparisons and never erase missing execution. + +## Trust, privacy, and review + +This is an evidence validator, not a remote attestation system. A hash binds supplied bytes; it +does not prove that unsigned native reports describe genuine execution. The authorized producer, +its real comparison assertions, case instrumentation, and native reports require independent review. +Two independently passing calls are not evidence that their values were equal. A declared link is +not proof that every field or every mapped route was exercised. Consumer lock hashing binds the +recorded dependency resolution; the separate dependency/security gates assess those dependencies. + +The private runner must construct the public payload field by field. Never spread native report +objects into it. Do not include credentials, headers, raw responses, fixture keys, ownership labels, +internal topology, private checkout paths, backend commits, harness trees, or freeform diagnostics. +Public case IDs must come from the reviewed plan. Preserve private failed runs for diagnosis instead +of replacing them with a later success. Review the exported payload before publishing it. + +When changing the matrix, review the actual method/route/assertion implementation and its failure +probes. Preserve missing proof; do not remove a case, source operation, or runtime solely to obtain +PASS. No automatic catalog adoption, parity approval, service setup, or npm publication is performed. + +The proxy configuration unit registers separate installed ESM/CommonJS wire cases for all five +control-plane methods and local API lifecycle cases. Its owned-fixture phase supplies readiness +only; it cannot credit any method case. The strict allowlist includes both wire phases, the +fixture phase and the API lifecycle phase; unknown or unexecuted phases remain incomplete. +Proxy configuration proof adds no PDP or downstream proxy request claim. diff --git a/api-coverage/baseline.json b/api-coverage/baseline.json new file mode 100644 index 00000000..10000e5a --- /dev/null +++ b/api-coverage/baseline.json @@ -0,0 +1,31146 @@ +{ + "provenance": { + "containerFactsAlias": { + "basis": "The pinned image mounts the same facts router at both prefixes; the compatibility mount is intentionally omitted from OpenAPI.", + "from": "/v2/facts/{proj_id}/{env_id}", + "sourceSha256": "8a5f22fd7e1e65f576716d73db9e58eb6801208c1d9f0ede89b581c7b892c5e8", + "to": "/facts" + }, + "sources": [ + { + "capturedAt": "2026-09-30", + "counts": { + "operations": 263, + "paths": 164, + "schemas": 333 + }, + "file": "openapi/permit-api.json", + "name": "control-plane", + "sha256": "1a29f1c75002d214b442a678a2b9f178db83a28f5fd1032322aa26d1eb835655", + "url": "https://api.permit.io/v2/openapi.json" + }, + { + "capturedAt": "2026-09-30", + "counts": { + "operations": 34, + "paths": 29, + "schemas": 39 + }, + "file": "openapi/pdp/container.json", + "image": "permitio/pdp-v2:0.9.16@sha256:e3cf30794ec2d256636b4714641df46e51ee58a3f1f0d24c606e214e0bf8669a", + "name": "pdp-container", + "sha256": "863635167e13483f21ccce5b3f38d93a2f8625c4e480d5fdea306c56a461b46f" + }, + { + "capturedAt": "2026-09-30", + "counts": { + "operations": 10, + "paths": 10, + "schemas": 32 + }, + "file": "openapi/pdp/cloud.json", + "name": "pdp-cloud", + "sha256": "8fb3ad79b93679b24ddd90596e17b7f6baa6b662e2c09a96f1a3ffc938292a29", + "url": "https://cloudpdp.api.permit.io/openapi.json" + } + ], + "unmeasuredCapabilities": { + "futurePdp": { + "owner": "PER-16568", + "reason": "No approved future PDP contract snapshot is published in this SDK.", + "status": "NOT_ADOPTED" + }, + "latestContainer": { + "owner": "PER-16571", + "reason": "The inventory is tied to the pinned image, not a moving latest image.", + "status": "NOT_MEASURED" + }, + "sharedTarget": { + "owner": "PER-16345", + "reason": "No machine-readable shared target artifact was published when this Node evidence was reviewed.", + "status": "UNAVAILABLE" + } + } + }, + "scope": "Reviewed Node AST evidence, not a shared target", + "sdk": { + "authoredClassShapes": { + "src/api/api-client.ts:ApiClient": "df687bd8d749332a4f3b7ea096cf6d9147be47002e03c027c4a7b737dc130cd5", + "src/api/api-keys.ts:ApiKeysApi": "cbd94ec83da3b52872cd370bae2e28cb39d11dbdb53f4bbc07114eb9d0193954", + "src/api/audit-logs.ts:AuditLogsApi": "b4cb11d373c4a133e5ab9873f130ac8d2a1997479e7cbf6f9af9284983dd2b6b", + "src/api/base.ts:BaseFactsPermitAPI": "d54abe08baf1c3cf60b7c2dcc6de5daa886d258067988490df118b6f042e7c40", + "src/api/base.ts:BasePermitApi": "c226bd3d4f364e0484706683e1073a21ac6fa201749ffa2903dae4ed1d6d0239", + "src/api/base.ts:PermitApiError": "6aa8dbec715101edd3fe8b7835cc023149bf80f041964aa6f18783d1daa47f9a", + "src/api/condition-set-rules.ts:ConditionSetRulesApi": "4cc9ae3de9b9fa0cb6e4f781479330b9bd279f615202af4abe8adb8db47ea76e", + "src/api/condition-sets.ts:ConditionSetsApi": "b1c3e6d605536a286a0b5b4051d90e08d4f91dc99886073f3300d5eac42524d2", + "src/api/context.ts:ApiContext": "6615adc35376c7368fc46e864ee3dcee30bdea3771470fe16e7e7fc21e560c1a", + "src/api/context.ts:PermitContextChangeError": "15512e4e2f0e61c047c9b8ce2f2ea571b355649ffcb8e7849952f5a361191c40", + "src/api/context.ts:PermitContextError": "bd676798f4c3b1eae37b00bd62c9116792f7db977899800e9d8dda4c0568b6ee", + "src/api/elements.ts:ElementsClient": "28b2c12fed9a0c22c3f340213dc0f5de0c750827e99eafff67ee7850a622c822", + "src/api/environments.ts:EnvironmentsApi": "81f916b124b09b3b8f71da60d45068e165a6a396f2c4c666ecdbde62a448e7e2", + "src/api/groups.ts:GroupsApi": "d971dc683695b0d5c5eea026e26f8aee661397231b5aab6d37eb1fef865ae2cc", + "src/api/pdps.ts:PdpsApi": "017e9bcd53ea41fc029b18c453cbf349c731613c9a994f236cb4029e5a1ae4b4", + "src/api/projects.ts:ProjectsApi": "6160a88ca2873cb03fdbbf74aa80af386412ecf951a9d55ecc208f391c0f38e1", + "src/api/proxy-configs.ts:ProxyConfigsApi": "2d7c1ee5dba03a851f25ac2b3b4373cc01b7304cf8ab76ec0553d42b0559da31", + "src/api/relationship-tuples.ts:RelationshipTuplesApi": "d00e5554087790967f936173301c40375b73bfe31e178ab12eb760b4a7fc104d", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi": "8cb11d18e3a92d70b411e8c32f705494dea95fcef42b4f3c45c7eb3c7a4449bc", + "src/api/resource-actions.ts:ResourceActionsApi": "77cb8378b7803934e8e54aab9c6df3d012938bae4084e376df08b4d5a897604c", + "src/api/resource-attributes.ts:ResourceAttributesApi": "c05611f87b6590869bd74c170c0895e9bf2bb804353b6dcfe06353371ef44587", + "src/api/resource-instances.ts:ResourceInstancesApi": "f739afcf7dbf4bd649ad0e8770446723374060fa23acef3f5d8287d5e3cd3e3f", + "src/api/resource-relations.ts:ResourceRelationsApi": "7940cd5cbdd5444060ed34f7d68766f646a023e5c7487aad41589cd3ab1c5742", + "src/api/resource-roles.ts:ResourceRolesApi": "d3e78d2175b02561645930a8a575795b2a8caaab9a212cf72675b8c135287701", + "src/api/resources.ts:ResourcesApi": "3c35f246b7fa105b504d69d77ae1e57228c934b8b6ddc7488eed378ca2f56145", + "src/api/role-assignments.ts:RoleAssignmentsApi": "48903ae8fa791d37fd53fd3402388a36b34dc0d60a21b53e9cb4e99dbdf18618", + "src/api/roles.ts:RolesApi": "64e3a5eebe7c7c1e674fa6a0e8757c892de1a17ae60df8253f802a32bb174485", + "src/api/tenants.ts:TenantsApi": "0d1b4b8ebd111804a89aa027043091ea95d5d8c2c3011aac016d3057e7c3d9bf", + "src/api/user-attributes.ts:UserAttributesApi": "5e0081bc92454c12785e3ab3b97882b2547d257da6d078c507bd2a22511c96e8", + "src/api/user-invites.ts:UserInvitesApi": "0f000adabfee6953fe5ce7944e11adbf952c901f86b7163755918c733b1c7e6e", + "src/api/users.ts:UsersApi": "a777e0965c966b00d2fe916374b924251aa75c406c6dec78f21830b6d79f4e2a", + "src/config.ts:ConfigFactory": "5dc5eeecb95886e850dae6c76c83ab96ac7c3f3661cee616d47e8e9f5dde4be4", + "src/enforcement/enforcer.ts:Enforcer": "c1c2553efc71223a9d15cd969ce590b4d752c210d8821057f3762f2c557a30cb", + "src/enforcement/enforcer.ts:PermitConnectionError": "86cd79f9aa748daf1d8324a63993215e2aa1d7b7a05fdb71229666d5ad98dffb", + "src/enforcement/enforcer.ts:PermitError": "93daac3739a0e4feefad07b32fd3817ddfd0682880874c0783c9ffd8d528e8c9", + "src/enforcement/enforcer.ts:PermitPDPStatusError": "25fff480295bb4b4afaca85625891e5ea3e98c8767a68333a2a246f3a4acd82a", + "src/index.ts:Permit": "05f98e480ba03b03ded2ca0900c67ff8166845c09deeb5df0f280c593dfc90f7", + "src/logger.ts:LoggerFactory": "ac4bd9886641019a5aa3fb64bfe2d4baac7b8904c854afcbcda48af87fb35974", + "src/utils/context.ts:ContextStore": "0a94c1379b87bea55588ee5624ef329a97befe0e32988588dce84847798c2d09" + }, + "authoredShapes": { + "src/api/api-client.ts:IPermitApi": { + "extends": [], + "kind": "interface", + "members": [ + "actionGroups: IResourceActionGroupsApi;", + "apiKeys: IApiKeysApi;", + "auditLogs: IAuditLogsApi;", + "conditionSetRules: IConditionSetRulesApi;", + "conditionSets: IConditionSetsApi;", + "ensureAccessLevel(requiredAccessLevel: ApiKeyLevel): Promise;", + "ensureContext(requiredContext: ApiContextLevel): Promise;", + "environments: IEnvironmentsApi;", + "groups: IGroupsApi;", + "pdps: IPdpsApi;", + "projects: IProjectsApi;", + "proxyConfigs: IProxyConfigsApi;", + "relationshipTuples: IRelationshipTuplesApi;", + "resourceActions: IResourceActionsApi;", + "resourceAttributes: IResourceAttributesApi;", + "resourceInstances: IResourceInstancesApi;", + "resourceRelations: IResourceRelationsApi;", + "resourceRoles: IResourceRolesApi;", + "resources: IResourcesApi;", + "roleAssignments: IRoleAssignmentsApi;", + "roles: IRolesApi;", + "tenants: ITenantsApi;", + "userAttributes: IUserAttributesApi;", + "userInvites: IUserInvitesApi;", + "users: IUsersApi;" + ] + }, + "src/api/api-keys.ts:IApiKeysApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(apiKey: APIKeyCreate): Promise;", + "delete(apiKeyId: string): Promise;", + "get(apiKeyId: string): Promise;", + "getScope(): Promise;", + "list(params?: IListApiKeys): Promise;", + "rotate(apiKeyId: string): Promise;" + ] + }, + "src/api/api-keys.ts:IListApiKeys": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["objectType?: MemberAccessObj;", "projId?: string;"] + }, + "src/api/audit-logs.ts:IAuditLogsApi": { + "extends": [], + "kind": "interface", + "members": [ + "get(logId: string): Promise;", + "list(params?: IListAuditLogs): Promise;" + ] + }, + "src/api/audit-logs.ts:IListAuditLogs": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": [ + "readonly action?: string;", + "readonly decision?: boolean;", + "readonly pdpId?: string;", + "readonly query?: AuditLogQueryType;", + "readonly resources?: readonly string[];", + "readonly sortBy?: AuditLogSortKey;", + "readonly tenant?: string;", + "readonly timestampFrom?: number;", + "readonly timestampTo?: number;", + "readonly users?: readonly string[];" + ] + }, + "src/api/base.ts:FormattedAxiosError": { + "extends": [], + "kind": "interface", + "members": [ + "code?: string | undefined;", + "error?: unknown;", + "message: string;", + "status?: number | undefined;" + ] + }, + "src/api/base.ts:IBasePaginationExtended": { + "extends": [], + "kind": "interface", + "members": ["includeTotalCount?: boolean;", "page?: number;", "perPage?: number;"] + }, + "src/api/base.ts:IPagination": { + "extends": [], + "kind": "interface", + "members": ["page?: number;", "perPage?: number;"] + }, + "src/api/base.ts:IPaginationExtended": { + "kind": "type", + "type": "IBasePaginationExtended | IPaginationForceIncludeTotal" + }, + "src/api/base.ts:IPaginationForceIncludeTotal": { + "kind": "type", + "type": "IBasePaginationExtended & {\n includeTotalCount: true;\n}" + }, + "src/api/base.ts:IWaitForSync": { + "extends": [], + "kind": "interface", + "members": ["waitForSync(timeout: number | null, policy?: FactsSyncTimeoutPolicy): this;"] + }, + "src/api/base.ts:ReturnPaginationType": { + "kind": "type", + "type": "T extends IPaginationForceIncludeTotal ? Y : Z" + }, + "src/api/condition-set-rules.ts:IConditionSetRulesApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(rule: ConditionSetRuleCreate): Promise;", + "delete(rule: ConditionSetRuleRemove): Promise;", + "list(params?: IListConditionSetRules): Promise;" + ] + }, + "src/api/condition-set-rules.ts:IListConditionSetRules": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["permissionKey?: string;", "resourceSetKey?: string;", "userSetKey?: string;"] + }, + "src/api/condition-sets.ts:IConditionSetsApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(conditionSetData: ConditionSetCreate): Promise;", + "delete(conditionSetKey: string): Promise;", + "get(conditionSetKey: string): Promise;", + "getById(conditionSetId: string): Promise;", + "getByKey(conditionSetKey: string): Promise;", + "list(params?: IListConditionSets): Promise;", + "update(conditionSetKey: string, conditionSetData: ConditionSetUpdate): Promise;" + ] + }, + "src/api/condition-sets.ts:IListConditionSets": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["type?: ConditionSetType;"] + }, + "src/api/context.ts:ApiContextLevel": { + "kind": "enum", + "members": ["WAIT_FOR_INIT = 0", "ORGANIZATION = 1", "PROJECT = 2", "ENVIRONMENT = 3"] + }, + "src/api/context.ts:ApiKeyLevel": { + "kind": "enum", + "members": [ + "WAIT_FOR_INIT = 'WAIT_FOR_INIT'", + "ORGANIZATION_LEVEL_API_KEY = 'ORGANIZATION_LEVEL_API_KEY'", + "PROJECT_LEVEL_API_KEY = 'PROJECT_LEVEL_API_KEY'", + "ENVIRONMENT_LEVEL_API_KEY = 'ENVIRONMENT_LEVEL_API_KEY'" + ] + }, + "src/api/context.ts:ContextSnapshot": { + "extends": [], + "kind": "interface", + "members": ["readonly scope: Scope | null;", "readonly selection: Selection;"] + }, + "src/api/context.ts:ContextState": { + "extends": [], + "kind": "interface", + "members": [ + "initialization: Promise | undefined;", + "revision: number;", + "scope: Scope | null;", + "selection: Selection;" + ] + }, + "src/api/context.ts:Scope": { + "kind": "type", + "type": "{\n level: ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY;\n organization: string;\n project: null;\n environment: null;\n} | {\n level: ApiKeyLevel.PROJECT_LEVEL_API_KEY;\n organization: string;\n project: string;\n environment: null;\n} | {\n level: ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY;\n organization: string;\n project: string;\n environment: string;\n}" + }, + "src/api/context.ts:Selection": { + "kind": "type", + "type": "{\n level: ApiContextLevel.WAIT_FOR_INIT;\n organization: null;\n project: null;\n environment: null;\n} | {\n level: ApiContextLevel.ORGANIZATION;\n organization: string;\n project: null;\n environment: null;\n} | {\n level: ApiContextLevel.PROJECT;\n organization: string;\n project: string;\n environment: null;\n} | {\n level: ApiContextLevel.ENVIRONMENT;\n organization: string;\n project: string;\n environment: string;\n}" + }, + "src/api/elements.ts:ElementsApiErrors": { + "kind": "enum", + "members": [ + "USER_NOT_FOUND = 'User not found'", + "TENANT_NOT_FOUND = 'Tenant not found'", + "INVALID_PERMISSION_LEVEL = 'Invalid user permission level'", + "FORBIDDEN_ACCESS = 'Forbidden access'" + ] + }, + "src/api/elements.ts:EmbeddedLoginRequestOutputWithContent": { + "extends": [" extends EmbeddedLoginRequestOutput"], + "kind": "interface", + "members": ["content?: any;"] + }, + "src/api/elements.ts:IPermitElementsApi": { + "extends": [], + "kind": "interface", + "members": [ + "loginAs({ userId, tenantId }: loginAsSchema): Promise;" + ] + }, + "src/api/elements.ts:loginAsSchema": { + "extends": [], + "kind": "interface", + "members": ["tenantId: string;", "userId: string;"] + }, + "src/api/environments.ts:IEnvironmentsApi": { + "extends": [], + "kind": "interface", + "members": [ + "copy(projectKey: string, environmentKey: string, copyParams: EnvironmentCopy): Promise;", + "copyAsync(projectKey: string, environmentKey: string, copyParams: EnvironmentCopy, wait?: number): Promise;", + "create(projectKey: string, environmentData: EnvironmentCreate): Promise;", + "delete(projectKey: string, environmentKey: string): Promise;", + "get(projectKey: string, environmentKey: string): Promise;", + "getApiKey(projectKey: string, environmentKey: string): Promise;", + "getById(projectId: string, environmentId: string): Promise;", + "getByKey(projectKey: string, environmentKey: string): Promise;", + "getCopyResult(projectKey: string, environmentKey: string, taskId: string, wait?: number): Promise;", + "getStats(projectKey: string, environmentKey: string): Promise;", + "list(params: IListEnvironments): Promise;", + "update(projectKey: string, environmentKey: string, environmentData: EnvironmentUpdate): Promise;" + ] + }, + "src/api/environments.ts:IListEnvironments": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["projectKey: string;"] + }, + "src/api/groups.ts:IGroupsApi": { + "extends": [], + "kind": "interface", + "members": [ + "assignRole(groupKeyOrId: string, assignment: GroupAddRole): Promise;", + "assignUser(groupKeyOrId: string, userKeyOrId: string, assignment: GroupAssignUser): Promise;", + "create(group: GroupCreate): Promise;", + "delete(groupKeyOrId: string): Promise;", + "get(groupKeyOrId: string): Promise;", + "list(params?: IListGroups): Promise;", + "removeRole(groupKeyOrId: string, assignment: GroupAddRole): Promise;", + "removeUser(groupKeyOrId: string, userKeyOrId: string, assignment: GroupAssignUser): Promise;" + ] + }, + "src/api/groups.ts:IListGroups": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resource?: string;", "search?: string;", "tenant?: string;"] + }, + "src/api/pdps.ts:IEnvironmentPdpDataRefreshRequest": { + "kind": "type", + "type": "Pick" + }, + "src/api/pdps.ts:IPdpsApi": { + "extends": [], + "kind": "interface", + "members": [ + "refresh(request?: IEnvironmentPdpDataRefreshRequest): Promise;" + ] + }, + "src/api/projects.ts:IProjectsApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(projectData: ProjectCreate): Promise;", + "delete(projectKey: string): Promise;", + "get(projectKey: string): Promise;", + "getById(projectId: string): Promise;", + "getByKey(projectKey: string): Promise;", + "list(pagination?: IPagination): Promise;", + "update(projectKey: string, projectData: ProjectUpdate): Promise;" + ] + }, + "src/api/proxy-configs.ts:IProxyConfigsApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(proxyConfig: ProxyConfigCreate): Promise;", + "delete(proxyConfigKeyOrId: string): Promise;", + "get(proxyConfigKeyOrId: string): Promise;", + "list(params?: IPagination): Promise;", + "update(proxyConfigKeyOrId: string, proxyConfig: ProxyConfigUpdate): Promise;" + ] + }, + "src/api/relationship-tuples.ts:IListRelationshipTuples": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": [ + "object?: string;", + "objectType?: string;", + "relation?: string;", + "subject?: string;", + "subjectType?: string;", + "tenant?: string;" + ] + }, + "src/api/relationship-tuples.ts:IRelationshipTuplesApi": { + "extends": [" extends IWaitForSync"], + "kind": "interface", + "members": [ + "bulkRelationshipTuples(tuples: RelationshipTupleCreate[]): Promise;", + "bulkUnRelationshipTuples(tuples: RelationshipTupleDelete[]): Promise;", + "create(tuple: RelationshipTupleCreate): Promise;", + "delete(tuple: RelationshipTupleDelete): Promise;", + "list(params: IListRelationshipTuples): Promise;", + "listDetailed(params?: IListRelationshipTuples): Promise;" + ] + }, + "src/api/resource-action-groups.ts:IListActionGroups": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resourceKey: string;"] + }, + "src/api/resource-action-groups.ts:IResourceActionGroupsApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(resourceKey: string, groupData: ResourceActionGroupCreate): Promise;", + "delete(resourceKey: string, groupKey: string): Promise;", + "get(resourceKey: string, groupKey: string): Promise;", + "getById(resourceId: string, groupId: string): Promise;", + "getByKey(resourceKey: string, groupKey: string): Promise;", + "list(params: IListActionGroups): Promise;", + "update(resourceKey: string, groupKey: string, groupData: ResourceActionGroupUpdate): Promise;" + ] + }, + "src/api/resource-actions.ts:IListActions": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resourceKey: string;"] + }, + "src/api/resource-actions.ts:IResourceActionsApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(resourceKey: string, actionData: ResourceActionCreate): Promise;", + "delete(resourceKey: string, actionKey: string): Promise;", + "get(resourceKey: string, actionKey: string): Promise;", + "getById(resourceId: string, actionId: string): Promise;", + "getByKey(resourceKey: string, actionKey: string): Promise;", + "list(params: IListActions): Promise;", + "update(resourceKey: string, actionKey: string, actionData: ResourceActionUpdate): Promise;" + ] + }, + "src/api/resource-attributes.ts:IListAttributes": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resourceKey: string;"] + }, + "src/api/resource-attributes.ts:IResourceAttributesApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(resourceKey: string, attributeData: ResourceAttributeCreate): Promise;", + "delete(resourceKey: string, attributeKey: string): Promise;", + "get(resourceKey: string, attributeKey: string): Promise;", + "getById(resourceId: string, attributeId: string): Promise;", + "getByKey(resourceKey: string, attributeKey: string): Promise;", + "list(params: IListAttributes): Promise;", + "update(resourceKey: string, attributeKey: string, attributeData: ResourceAttributeUpdate): Promise;" + ] + }, + "src/api/resource-instances.ts:IListResourceInstanceDetailedParams": { + "extends": [" extends IListResourceInstanceParams"], + "kind": "interface", + "members": ["search?: string[];"] + }, + "src/api/resource-instances.ts:IListResourceInstanceParams": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resource?: string;", "tenant?: string;"] + }, + "src/api/resource-instances.ts:IListResourceInstanceUsers": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["instanceKey: string;"] + }, + "src/api/resource-instances.ts:IResourceInstancesApi": { + "extends": [" extends IWaitForSync"], + "kind": "interface", + "members": [ + "create(instanceData: ResourceInstanceCreate): Promise>;", + "delete(instanceKey: string): Promise;", + "get(instanceKey: string): Promise>;", + "getById(instanceId: string): Promise>;", + "getByKey(instanceKey: string): Promise>;", + "list(params?: IListResourceInstanceParams): Promise[]>;", + "listDetailed(params?: IListResourceInstanceDetailedParams): Promise>;", + "update(instanceKey: string, instanceData: ResourceInstanceUpdate): Promise>;" + ] + }, + "src/api/resource-instances.ts:PaginatedResultResourceInstanceDetailedRead": { + "extends": [" extends GeneratedDetailedPage"], + "kind": "interface", + "members": ["data: ResourceInstanceDetailedRead[];"] + }, + "src/api/resource-instances.ts:ResourceInstanceDetailedRead": { + "extends": [" extends GeneratedResourceInstanceDetailedRead"], + "kind": "interface", + "members": ["attributes?: Attributes;"] + }, + "src/api/resource-instances.ts:ResourceInstanceRead": { + "extends": [" extends GeneratedResourceInstanceRead"], + "kind": "interface", + "members": ["attributes?: Attributes;"] + }, + "src/api/resource-relations.ts:IListRelations": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resourceKey: string;"] + }, + "src/api/resource-relations.ts:IResourceRelationsApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(resourceKey: string, RelationData: RelationCreate): Promise;", + "delete(resourceKey: string, relationKey: string): Promise;", + "get(resourceKey: string, relationKey: string): Promise;", + "getById(resourceId: string, relationId: string): Promise;", + "getByKey(resourceKey: string, relationKey: string): Promise;", + "list(params: IListRelations): Promise;" + ] + }, + "src/api/resource-roles.ts:IListResourceRoles": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["resourceKey: string;"] + }, + "src/api/resource-roles.ts:IResourceRolesApi": { + "extends": [], + "kind": "interface", + "members": [ + "assignPermissions(resourceKey: string, roleKey: string, permissions: string[]): Promise;", + "create(resourceKey: string, roleData: ResourceRoleCreate): Promise;", + "createRoleDerivation(resourceKey: string, roleKey: string, derivationData: DerivedRoleRuleCreate): Promise;", + "delete(resourceKey: string, roleKey: string): Promise;", + "deleteRoleDerivation(resourceKey: string, roleKey: string, derivationRule: DerivedRoleRuleDelete): Promise;", + "get(resourceKey: string, roleKey: string): Promise;", + "getById(resourceId: string, roleId: string): Promise;", + "getByKey(resourceKey: string, roleKey: string): Promise;", + "list(params: IListResourceRoles): Promise;", + "removePermissions(resourceKey: string, roleKey: string, permissions: string[]): Promise;", + "update(resourceKey: string, roleKey: string, roleData: ResourceRoleUpdate): Promise;", + "updateRoleDerivationConditions(resourceKey: string, roleKey: string, conditions: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings): Promise;" + ] + }, + "src/api/resources.ts:IResourcesApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(resourceData: ResourceCreate): Promise;", + "delete(resourceKey: string): Promise;", + "get(resourceKey: string): Promise;", + "getById(resourceId: string): Promise;", + "getByKey(resourceKey: string): Promise;", + "list(): Promise;", + "list(pagination?: T): Promise>;", + "replace(resourceKey: string, resourceData: ResourceReplace): Promise;", + "update(resourceKey: string, resourceData: ResourceUpdate): Promise;" + ] + }, + "src/api/role-assignments.ts:IBaseListRoleAssignments": { + "extends": [" extends IBasePaginationExtended"], + "kind": "interface", + "members": [ + "detailed?: boolean;", + "resourceInstance?: string;", + "role?: string;", + "tenant?: string;", + "user?: string;" + ] + }, + "src/api/role-assignments.ts:IListRoleAssignments": { + "kind": "type", + "type": "IBaseListRoleAssignments" + }, + "src/api/role-assignments.ts:IListRoleAssignmentsDetailed": { + "kind": "type", + "type": "Omit & {\n resource?: string;\n}" + }, + "src/api/role-assignments.ts:IRoleAssignmentsApi": { + "extends": [" extends IWaitForSync"], + "kind": "interface", + "members": [ + "assign(assignment: RoleAssignmentCreate): Promise;", + "bulkAssign(assignments: RoleAssignmentCreate[]): Promise;", + "bulkUnassign(unassignments: RoleAssignmentRemove[]): Promise;", + "list(params: T): Promise>;", + "listDetailed(params?: IListRoleAssignmentsDetailed): Promise;", + "unassign(unassignment: RoleAssignmentRemove): Promise;" + ] + }, + "src/api/role-assignments.ts:ReturnListRoleAssignments": { + "kind": "type", + "type": "T extends unknown ? RoleAssignmentListResult<'detailed' extends keyof T ? T['detailed'] : false, 'includeTotalCount' extends keyof T ? T['includeTotalCount'] : false> : never" + }, + "src/api/role-assignments.ts:RoleAssignmentListResult": { + "kind": "type", + "type": "Details extends true ? Counts extends true ? PaginatedResultRoleAssignmentDetailedRead : RoleAssignmentDetailedRead[] : Counts extends true ? PaginatedResultRoleAssignmentRead : RoleAssignmentRead[]" + }, + "src/api/roles.ts:IRolesApi": { + "extends": [], + "kind": "interface", + "members": [ + "assignPermissions(roleKey: string, permissions: string[]): Promise;", + "bulkCreateOrReplace(roles: RoleCreateBulk[]): Promise;", + "create(roleData: RoleCreate): Promise;", + "delete(roleKey: string): Promise;", + "get(roleKey: string): Promise;", + "getById(roleId: string): Promise;", + "getByKey(roleKey: string): Promise;", + "list(): Promise;", + "list(pagination?: T): Promise>;", + "removePermissions(roleKey: string, permissions: string[]): Promise;", + "update(roleKey: string, roleData: RoleUpdate): Promise;" + ] + }, + "src/api/tenants.ts:IListTenantUsers": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["role?: string;", "search?: string;", "tenantKey: string;"] + }, + "src/api/tenants.ts:IListTenantsParams": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["includeTotalCount?: boolean;", "search?: string;"] + }, + "src/api/tenants.ts:ITenantsApi": { + "extends": [" extends IWaitForSync"], + "kind": "interface", + "members": [ + "addUser(tenantKey: string, userData: UserCreate): Promise>;", + "create(tenantData: TenantCreate): Promise>;", + "delete(tenantKey: string): Promise;", + "deleteTenantUser(tenantKey: string, userKey: string): Promise;", + "get(tenantKey: string): Promise>;", + "getById(tenantId: string): Promise>;", + "getByKey(tenantKey: string): Promise>;", + "list(params: IListTenantsParams & {\n includeTotalCount: true;\n}): Promise>;", + "list(params?: IListTenantsParams & {\n includeTotalCount?: false;\n}): Promise[]>;", + "list(params?: IListTenantsParams): Promise[] | PaginatedResultTenantRead>;", + "listTenantUsers(params: IListTenantUsers): Promise>;", + "update(tenantKey: string, tenantData: TenantUpdate): Promise>;" + ] + }, + "src/api/tenants.ts:PaginatedResultTenantRead": { + "extends": [" extends GeneratedPaginatedResultTenantRead"], + "kind": "interface", + "members": ["data: TenantRead[];"] + }, + "src/api/tenants.ts:TenantRead": { + "extends": [" extends GeneratedTenantRead"], + "kind": "interface", + "members": ["attributes?: Attributes;"] + }, + "src/api/user-attributes.ts:IUserAttributesApi": { + "extends": [], + "kind": "interface", + "members": [ + "create(attribute: ResourceAttributeCreate): Promise;", + "delete(attributeKey: string): Promise;", + "get(attributeKey: string): Promise;", + "list(params?: IPagination): Promise;", + "update(attributeKey: string, attribute: ResourceAttributeUpdate): Promise;" + ] + }, + "src/api/user-invites.ts:ElementsUserInviteApprove": { + "extends": [" extends Omit"], + "kind": "interface", + "members": ["attributes: object | null;"] + }, + "src/api/user-invites.ts:ElementsUserInviteCreate": { + "extends": [" extends Omit"], + "kind": "interface", + "members": [ + "first_name: string | null;", + "key: string | null;", + "last_name: string | null;", + "resource_instance_id: string | null;" + ] + }, + "src/api/user-invites.ts:ElementsUserInviteRead": { + "extends": [" extends Omit"], + "kind": "interface", + "members": [ + "first_name: string | null;", + "key: string | null;", + "last_name: string | null;", + "resource_instance_id: string | null;" + ] + }, + "src/api/user-invites.ts:ElementsUserInviteUpdate": { + "extends": [" extends Omit"], + "kind": "interface", + "members": [ + "first_name: string | null;", + "key: string | null;", + "last_name: string | null;", + "resource_instance_id: string | null;" + ] + }, + "src/api/user-invites.ts:IListUserInvites": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": ["role?: string;", "search?: string;", "tenant?: string;"] + }, + "src/api/user-invites.ts:IUserInvitesApi": { + "extends": [], + "kind": "interface", + "members": [ + "approve(userInviteId: string, approval: ElementsUserInviteApprove): Promise>;", + "create(invite: ElementsUserInviteCreate): Promise;", + "delete(userInviteId: string): Promise;", + "get(userInviteId: string): Promise;", + "list(params?: IListUserInvites): Promise;", + "update(userInviteId: string, invite: ElementsUserInviteUpdate): Promise;" + ] + }, + "src/api/user-invites.ts:NullableInviteKeys": { + "kind": "type", + "type": "'key' | 'first_name' | 'last_name' | 'resource_instance_id'" + }, + "src/api/user-invites.ts:PaginatedResultElementsUserInviteRead": { + "extends": [" extends Omit"], + "kind": "interface", + "members": ["data: ElementsUserInviteRead[];"] + }, + "src/api/user-invites.ts:UserInviteApprovalRead": { + "extends": [ + " extends Omit, 'first_name' | 'last_name' | 'attributes'>" + ], + "kind": "interface", + "members": [ + "attributes?: Attributes | null;", + "first_name?: string | null;", + "last_name?: string | null;" + ] + }, + "src/api/users.ts:IBaseGetUserRoles": { + "extends": [], + "kind": "interface", + "members": [ + "readonly detailed?: boolean;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly tenant?: string;", + "readonly user: string;" + ] + }, + "src/api/users.ts:ICreateOrUpdateUserResult": { + "extends": [], + "kind": "interface", + "members": ["created: boolean;", "user: UserRead;"] + }, + "src/api/users.ts:IGetUserRoles": { + "kind": "type", + "type": "IBaseGetUserRoles | IGetUserRolesWithTotalCount | IGetUserRolesWithDetails" + }, + "src/api/users.ts:IGetUserRolesWithDetails": { + "kind": "type", + "type": "IBaseGetUserRoles & {\n detailed: true;\n}" + }, + "src/api/users.ts:IGetUserRolesWithTotalCount": { + "kind": "type", + "type": "IBaseGetUserRoles & {\n includeTotalCount: true;\n}" + }, + "src/api/users.ts:IUsersApi": { + "extends": [" extends IWaitForSync"], + "kind": "interface", + "members": [ + "assignRole(assignment: RoleAssignmentCreate): Promise;", + "bulkUserCreate(users: UserCreate[]): Promise;", + "bulkUserDelete(userKeys: string[]): Promise;", + "bulkUserReplace(users: UserCreate[]): Promise;", + "create(userData: UserCreate): Promise>;", + "delete(userKey: string): Promise;", + "get(userKey: string): Promise>;", + "getAssignedRoles(params: T): Promise>;", + "getById(userId: string): Promise>;", + "getByKey(userKey: string): Promise>;", + "list(params?: IUsersListParams): Promise>;", + "sync(userData: UserCreate): Promise>;", + "unassignRole(unassignment: RoleAssignmentRemove): Promise;", + "update(userKey: string, userData: UserUpdate): Promise>;" + ] + }, + "src/api/users.ts:IUsersListParams": { + "extends": [" extends IPagination"], + "kind": "interface", + "members": [ + "includeResourceInstanceRoles?: boolean;", + "role?: string;", + "search?: string;", + "searchOperator?: SearchOperator;" + ] + }, + "src/api/users.ts:PaginatedResultUserRead": { + "extends": [" extends GeneratedPaginatedResultUserRead"], + "kind": "interface", + "members": ["data: UserRead[];"] + }, + "src/api/users.ts:ReturnIGetUserRolesType": { + "kind": "type", + "type": "T extends IGetUserRolesWithTotalCount ? T extends IGetUserRolesWithDetails ? PaginatedResultRoleAssignmentDetailedRead : PaginatedResultRoleAssignmentRead : T extends IGetUserRolesWithDetails ? RoleAssignmentDetailedRead[] : RoleAssignmentRead[]" + }, + "src/api/users.ts:UserRead": { + "extends": [" extends GeneratedUserRead"], + "kind": "interface", + "members": ["attributes?: Attributes;"] + }, + "src/config.ts:FactsSyncTimeoutPolicy": { + "kind": "type", + "type": "'ignore' | 'fail'" + }, + "src/config.ts:ILoggerConfig": { + "extends": [], + "kind": "interface", + "members": ["json: boolean;", "label: string;", "level: string;"] + }, + "src/config.ts:IMultiTenancyConfig": { + "extends": [], + "kind": "interface", + "members": ["defaultTenant: string;", "useDefaultTenantIfEmpty: boolean;"] + }, + "src/config.ts:IPermitConfig": { + "extends": [], + "kind": "interface", + "members": [ + "readonly apiContext: ApiContext;", + "readonly apiUrl: string;", + "readonly axiosInstance: AxiosInstance;", + "readonly factsSyncTimeout: number | null;", + "readonly factsSyncTimeoutPolicy: FactsSyncTimeoutPolicy | null;", + "readonly log: Readonly;", + "readonly multiTenancy: Readonly;", + "readonly opaAxiosInstance?: AxiosInstance;", + "readonly pdp: string;", + "readonly pdpRetry?: Readonly | false;", + "readonly proxyFactsViaPdp: boolean;", + "readonly retry?: Readonly | false;", + "readonly throwOnError: boolean | undefined;", + "readonly timeout: number | undefined;", + "readonly token: string;" + ] + }, + "src/config.ts:IPermitOptions": { + "extends": [], + "kind": "interface", + "members": [ + "apiContext?: ApiContext | undefined;", + "apiUrl?: string | undefined;", + "axiosInstance?: AxiosInstance | undefined;", + "factsSyncTimeout?: number | null | undefined;", + "factsSyncTimeoutPolicy?: FactsSyncTimeoutPolicy | null | undefined;", + "log?: Partial | undefined;", + "multiTenancy?: Partial | undefined;", + "opaAxiosInstance?: AxiosInstance | undefined;", + "pdp?: string | undefined;", + "pdpRetry?: IRetryConfig | false | undefined;", + "proxyFactsViaPdp?: boolean | undefined;", + "retry?: IRetryConfig | false | undefined;", + "throwOnError?: boolean | undefined;", + "timeout?: number | undefined;", + "token?: string | undefined;" + ] + }, + "src/enforcement/enforcer.ts:IEnforcer": { + "extends": [], + "kind": "interface", + "members": [ + "bulkCheck(checks: Array, context?: Context, config?: CheckConfig): Promise>;", + "check(user: IUser | string, action: IAction, resource: IResource | string, context?: Context, config?: CheckConfig): Promise;", + "checkAllTenants(user: IUser | string, action: string, resource: IResource | string, context: Context | undefined, sdk: string | undefined): Promise;", + "checkUrl(user: IUser | string, httpMethod: string, url: string, config?: CheckUrlConfig): Promise;", + "filterObjects(user: IUser | string, action: IAction, objects: readonly T[], context?: Context, config?: CheckConfig): Promise;", + "getAuthorizedUsers(action: IAction, resource: IResource | string, context?: Context, config?: CheckConfig): Promise;", + "getLocalRoleAssignments(query?: ILocalRoleAssignmentsQuery, config?: CheckConfig): Promise;", + "getUserPermissions(user: IUser | string, tenants?: string[], resources?: string[], resource_types?: string[], config?: GetUserPermissionsConfig): Promise;", + "getUserTenants(user: IUser | string, context?: Context, config?: CheckConfig): Promise;" + ] + }, + "src/enforcement/interfaces.ts:AllTenantsCheckResponse": { + "extends": [], + "kind": "interface", + "members": ["allow: true;", "tenant: TenantDetails;"] + }, + "src/enforcement/interfaces.ts:AllTenantsResponse": { + "extends": [], + "kind": "interface", + "members": ["allowed_tenants: AllTenantsCheckResponse[];"] + }, + "src/enforcement/interfaces.ts:BulkOpaDecisionResult": { + "extends": [], + "kind": "interface", + "members": ["result: BulkPolicyDecision;"] + }, + "src/enforcement/interfaces.ts:BulkPolicyDecision": { + "extends": [], + "kind": "interface", + "members": ["allow: Array;"] + }, + "src/enforcement/interfaces.ts:GetUserPermissionsResult": { + "extends": [], + "kind": "interface", + "members": ["permissions: IUserPermissions;"] + }, + "src/enforcement/interfaces.ts:IAction": { + "kind": "type", + "type": "string" + }, + "src/enforcement/interfaces.ts:IAuthorizedUserAssignment": { + "extends": [], + "kind": "interface", + "members": [ + "[id: string]: unknown;", + "resource: string;", + "role: string;", + "tenant: string;", + "user: string;" + ] + }, + "src/enforcement/interfaces.ts:IAuthorizedUsersResult": { + "extends": [], + "kind": "interface", + "members": [ + "[id: string]: unknown;", + "resource: string;", + "tenant: string;", + "users: Record;" + ] + }, + "src/enforcement/interfaces.ts:ICheckInput": { + "extends": [], + "kind": "interface", + "members": [ + "action: IAction;", + "context?: Context;", + "resource: IResource;", + "user: IUser;" + ] + }, + "src/enforcement/interfaces.ts:ICheckOpaInput": { + "extends": [], + "kind": "interface", + "members": ["input: ICheckInput;"] + }, + "src/enforcement/interfaces.ts:ICheckQuery": { + "extends": [], + "kind": "interface", + "members": [ + "action: IAction | string;", + "context?: Context;", + "resource: IResource | string;", + "user: IUser | string;" + ] + }, + "src/enforcement/interfaces.ts:ICheckUrlInput": { + "extends": [], + "kind": "interface", + "members": [ + "context: Context;", + "http_method: string;", + "tenant: string;", + "url: string;", + "user: IUser;" + ] + }, + "src/enforcement/interfaces.ts:IFilterObject": { + "extends": [" extends IResource"], + "kind": "interface", + "members": ["context?: Context;"] + }, + "src/enforcement/interfaces.ts:IGetUserPermissionsInput": { + "extends": [], + "kind": "interface", + "members": [ + "resource?: string[];", + "resource_type?: string[];", + "tenants?: string[];", + "user: IUser | string;" + ] + }, + "src/enforcement/interfaces.ts:ILocalRoleAssignment": { + "extends": [], + "kind": "interface", + "members": [ + "[id: string]: unknown;", + "resource_instance?: string | null;", + "role: string;", + "tenant: string;", + "user: string;" + ] + }, + "src/enforcement/interfaces.ts:ILocalRoleAssignmentsQuery": { + "extends": [], + "kind": "interface", + "members": [ + "page?: number;", + "perPage?: number;", + "resource?: string;", + "resourceInstance?: string;", + "role?: string;", + "tenant?: string;", + "user?: string;" + ] + }, + "src/enforcement/interfaces.ts:IResource": { + "extends": [], + "kind": "interface", + "members": ["attributes?: Dict;", "key?: string;", "tenant?: string;", "type: string;"] + }, + "src/enforcement/interfaces.ts:IUser": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: Dict;", + "email?: string;", + "firstName?: string;", + "key: string;", + "lastName?: string;" + ] + }, + "src/enforcement/interfaces.ts:IUserPermissions": { + "extends": [], + "kind": "interface", + "members": ["[id: string]: ResourcePermissions | TenantPermissions;"] + }, + "src/enforcement/interfaces.ts:OpaDecisionResult": { + "extends": [], + "kind": "interface", + "members": ["result: PolicyDecision;"] + }, + "src/enforcement/interfaces.ts:OpaGetUserPermissionsResult": { + "extends": [], + "kind": "interface", + "members": ["result: GetUserPermissionsResult;"] + }, + "src/enforcement/interfaces.ts:PolicyDecision": { + "extends": [], + "kind": "interface", + "members": ["allow: boolean;"] + }, + "src/enforcement/interfaces.ts:ResourcePermissions": { + "extends": [], + "kind": "interface", + "members": [ + "permissions: string[];", + "resource?: {\n type: string;\n key: string;\n attributes: {\n [id: string]: any;\n };\n};", + "roles?: string[];" + ] + }, + "src/enforcement/interfaces.ts:TenantDetails": { + "extends": [], + "kind": "interface", + "members": ["attributes: {\n [id: string]: any;\n};", "key: string;"] + }, + "src/enforcement/interfaces.ts:TenantPermissions": { + "extends": [], + "kind": "interface", + "members": [ + "permissions: string[];", + "roles?: string[];", + "tenant?: {\n key: string;\n attributes: {\n [id: string]: any;\n };\n};" + ] + }, + "src/enforcement/responses.ts:TenantDetailsWire": { + "extends": [" extends Record"], + "kind": "interface", + "members": ["attributes?: Record;", "key: string;"] + }, + "src/index.ts:IPermitClient": { + "extends": [" extends IEnforcer"], + "kind": "interface", + "members": [ + "api: IPermitApi;", + "elements: IPermitElementsApi;", + "readonly config: IPermitConfig;" + ] + }, + "src/utils/context.ts:CheckConfig": { + "extends": [], + "kind": "interface", + "members": ["throwOnError?: boolean;", "timeout?: number;", "useOpa?: boolean;"] + }, + "src/utils/context.ts:CheckUrlConfig": { + "extends": [" extends CheckConfig"], + "kind": "interface", + "members": ["context?: Context;", "tenant?: string;"] + }, + "src/utils/context.ts:Context": { + "extends": [], + "kind": "interface", + "members": ["[id: string]: any;"] + }, + "src/utils/context.ts:GetUserPermissionsConfig": { + "extends": [" extends CheckConfig"], + "kind": "interface", + "members": ["context?: Context;"] + }, + "src/utils/diagnostics.ts:CollectedSecrets": { + "extends": [], + "kind": "interface", + "members": ["complete: boolean;", "values: string[];"] + }, + "src/utils/diagnostics.ts:SecretContext": { + "kind": "type", + "type": "readonly string[] | CollectedSecrets" + }, + "src/utils/dict.ts:Dict": { + "kind": "type", + "type": "Record" + }, + "src/utils/http-transport.ts:TransportOptions": { + "extends": [], + "kind": "interface", + "members": [ + "caller: AxiosInstance;", + "defaults?: Pick;", + "logger: Logger;", + "name: string;", + "retry: IResolvedRetryConfig;" + ] + }, + "src/utils/retry.ts:IResolvedRetryConfig": { + "extends": [], + "kind": "interface", + "members": [ + "backoffMultiplier: number;", + "enabled: boolean;", + "maxDelay: number;", + "maxRetries: number;", + "respectRetryAfter: boolean;", + "retryCondition: RetryConditionFn;", + "retryDelay: number;", + "retryMethods: string[];" + ] + }, + "src/utils/retry.ts:IRetryConfig": { + "extends": [], + "kind": "interface", + "members": [ + "backoffMultiplier?: number;", + "enabled?: boolean;", + "maxDelay?: number;", + "maxRetries?: number;", + "respectRetryAfter?: boolean;", + "retryCondition?: RetryConditionFn;", + "retryDelay?: number;", + "retryMethods?: readonly string[];" + ] + }, + "src/utils/retry.ts:RetryConditionFn": { + "kind": "type", + "type": "(error: AxiosError) => boolean" + } + }, + "functionShapes": { + "src/api/context.ts:defaultSelection": { + "implementationSha256": "dd72bbae285c4b6cf4837997c32987ef46328b8042d70f05911dbdd38c3af56f", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "scope", + "optional": false, + "type": "Scope" + } + ], + "returns": "Selection" + } + }, + "src/api/context.ts:identifier": { + "implementationSha256": "02c81be28a42bf9656413a1478b2f38019941b1d13733a6332c215ab27bc1b40", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "field", + "optional": false, + "type": "string" + } + ], + "returns": "string" + } + }, + "src/api/context.ts:initializeApiContext": { + "implementationSha256": "6ff85d52bb1aa5b57e9a3f4c97bc39da6a6f35ba8055ed90b076165f76f5b953", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "context", + "optional": false, + "type": "ApiContext" + }, + { + "initializer": null, + "name": "load", + "optional": false, + "type": "() => Promise" + } + ], + "returns": "Promise" + } + }, + "src/api/context.ts:parseContextSnapshot": { + "implementationSha256": "5f46417ed61ed4825475e4a3898eeda75afde26f2ccc46a71bad8a616b9562ec", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "ContextSnapshot" + } + }, + "src/api/context.ts:parseScope": { + "implementationSha256": "843072c023f90492b241e47176825ab666f667f6781f298c24fc12928daaa9b6", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "Scope" + } + }, + "src/api/context.ts:parseSelection": { + "implementationSha256": "e2b9fd5aa2fe5b715d9d841cc98650df2d94924c6d20584f2f868ff66129a2ad", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "Selection" + } + }, + "src/api/context.ts:readApiContextSnapshot": { + "implementationSha256": "485855472db118a82233957ed4c6d21ba68194a7dfb0d755da6bfb0b303a9c74", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "this", + "optional": false, + "type": "ApiContext" + } + ], + "returns": "ContextSnapshot" + } + }, + "src/api/context.ts:snapshotApiContext": { + "implementationSha256": "9ae84fab15fd536e2d49226091ebe1ddfbdff76f5046206f99428824132961bf", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "source", + "optional": false, + "type": "ApiContext" + } + ], + "returns": "ApiContext" + } + }, + "src/api/context.ts:stateOf": { + "implementationSha256": "ca997d8d1871cc0201c32fef38ae8972dbbc58204aa38eed54e590e47b4dd744", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "context", + "optional": false, + "type": "ApiContext" + } + ], + "returns": "ContextState" + } + }, + "src/api/context.ts:verifySelection": { + "implementationSha256": "2223bea143d3a5c16d400e32917a6edf8373f7951e3b941e3cacc403a719ce64", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "scope", + "optional": false, + "type": "Scope | null" + }, + { + "initializer": null, + "name": "selection", + "optional": false, + "type": "Selection" + } + ], + "returns": "void" + } + }, + "src/config.ts:axiosOption": { + "implementationSha256": "603c3f0138a0cb8ec084349dc528410f6dd8cef9641d603ca2945a5343678ed3", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "name", + "optional": false, + "type": "string" + } + ], + "returns": "void" + } + }, + "src/config.ts:booleanOption": { + "implementationSha256": "7194b97162eeea36254d39ef8cc60f3215492797c7c297653510fd4cabe306b4", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "name", + "optional": false, + "type": "string" + } + ], + "returns": "void" + } + }, + "src/config.ts:defaultSettings": { + "implementationSha256": "72975b47e1df7ee1ba549b876711307b5fb55f7011ed2814a31245a10e7d5339", + "signature": { + "generics": [], + "parameters": [], + "returns": "{ token: string; pdp: string; apiUrl: string; log: { level: string; label: string; json: boolean; }; multiTenancy: { defaultTenant: string; useDefaultTenantIfEmpty: boolean; }; timeout: undefined; throwOnError: boolean; proxyFactsViaPdp: boolean; factsSyncTimeout: null; factsSyncTimeoutPolicy: null; }" + } + }, + "src/config.ts:logJsonFromEnv": { + "implementationSha256": "2a1e21c34028374c7e22151b9be6f93be86a1053bbdb9d96b90c70c7f4e3f506", + "signature": { + "generics": [], + "parameters": [], + "returns": "boolean" + } + }, + "src/config.ts:nonnegativeOption": { + "implementationSha256": "8c407a5018b5715924db55cf773567b87f94b02a81bcb229e6bea7b8ce91865d", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "name", + "optional": false, + "type": "string" + }, + { + "initializer": "Number.MAX_VALUE", + "name": "maximum", + "optional": true, + "type": "(inferred)" + } + ], + "returns": "void" + } + }, + "src/config.ts:objectOption": { + "implementationSha256": "6121a968970967f72e47c384eb0a76745caf754029a2bb585ab33064a5efd8f7", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "name", + "optional": false, + "type": "string" + } + ], + "returns": "void" + } + }, + "src/config.ts:snapshotRetry": { + "implementationSha256": "db72d6789040d2f86f96aed2e267c635bd6b341f0f0ee7f4b7ea45c1f21c905f", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "IRetryConfig | false | undefined" + } + ], + "returns": "Readonly | false | undefined" + } + }, + "src/config.ts:stringOption": { + "implementationSha256": "d8b98c53ac614074dd1091dca7e2b909e986b28c2e3d3b34d5969dc7df60dd06", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "name", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "nonempty", + "optional": false, + "type": "boolean" + } + ], + "returns": "void" + } + }, + "src/config.ts:urlOption": { + "implementationSha256": "97f9f431071975b07d421661b6247d200597c6b9fbf386a87849501e208b46ae", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "name", + "optional": false, + "type": "string" + } + ], + "returns": "void" + } + }, + "src/enforcement/enforcer.ts:buildOpaBaseUrl": { + "implementationSha256": "f0c1577c58314dc3b45403cf92d8f371905b0e939ea35b416887ef966d3bf69a", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "pdp", + "optional": false, + "type": "string" + } + ], + "returns": "string" + } + }, + "src/enforcement/enforcer.ts:isString": { + "implementationSha256": "ee20ca428df8008662b8167f7948271036ce80ad31f46243db4c1e84a8f95c77", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "x", + "optional": false, + "type": "unknown" + } + ], + "returns": "x is string" + } + }, + "src/enforcement/responses.ts:decisionEnvelope": { + "implementationSha256": "057e14852409bd5f8e25bdc7cc61cf585443a94fb3f1e9208340da769434ffed", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "field", + "optional": false, + "type": "string" + } + ], + "returns": "Record" + } + }, + "src/enforcement/responses.ts:isRecord": { + "implementationSha256": "e8ba18488aa181efd09e4a3bd6be4410dceb7c494daf75f552aaea9fd7b7f130", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "value is Record" + } + }, + "src/enforcement/responses.ts:isResourceDetails": { + "implementationSha256": "3a43e457ab5a0a7fea881dd8889376231ee541a094b55f5f8e04240e22d224ea", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "value is TenantDetailsWire & {\n type: string;\n}" + } + }, + "src/enforcement/responses.ts:isStringArray": { + "implementationSha256": "691853e951870d83032444005e932d71126a2e512d3ea10cbef4cccda5bf77a6", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "value is string[]" + } + }, + "src/enforcement/responses.ts:isTenantDetails": { + "implementationSha256": "84964c6d3cea95f0d268a5e404d726a1d0941d08c5791fbcb7e7d00e2d66ccd2", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "value is TenantDetailsWire" + } + }, + "src/enforcement/responses.ts:normalizeTenant": { + "implementationSha256": "633e9ddc4da01a08d27c2c8f3922224b8804f62c37520d7b0914175e6d6ff8dd", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "TenantDetailsWire" + } + ], + "returns": "TenantDetails" + } + }, + "src/enforcement/responses.ts:parseAllTenantsResponse": { + "implementationSha256": "3447bc1cdf00a82b00384501334e5669d76ad644d748e3528a2d25c3c0477159", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "TenantDetails[]" + } + }, + "src/enforcement/responses.ts:parseAuthorizedUsersResponse": { + "implementationSha256": "36351955abe299a5b88949e9b16be0a5dab108310f5b74c726cb28a6040fd51a", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "IAuthorizedUsersResult" + } + }, + "src/enforcement/responses.ts:parseBulkResponse": { + "implementationSha256": "cda5acb1ab33f6db718593e4cfc858fbfe4ee013d14f74e5c2463b910e32c397", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "expectedLength", + "optional": false, + "type": "number" + } + ], + "returns": "boolean[]" + } + }, + "src/enforcement/responses.ts:parseCheckResponse": { + "implementationSha256": "ad2430d45ef6a2d3083b288ad3d81d2fec5339347281b2ded2eb22d969103c37", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "boolean" + } + }, + "src/enforcement/responses.ts:parseCheckUrlResponse": { + "implementationSha256": "13286cfcbff766043ffd2937d0383bed191ee638646628c8079e7f5420e590e9", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "boolean" + } + }, + "src/enforcement/responses.ts:parseLocalRoleAssignmentsResponse": { + "implementationSha256": "a6405894471dd4cc01d4d3722f91a6a0139a1ba67151d3eec2b5a55cca400f53", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "ILocalRoleAssignment[]" + } + }, + "src/enforcement/responses.ts:parsePermissionsResponse": { + "implementationSha256": "add9b40ca071b5ab1616c123cd3640deb69cd053f4f0df2a2928cb3ac370aec5", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "IUserPermissions" + } + }, + "src/enforcement/responses.ts:parseUserTenantsResponse": { + "implementationSha256": "aec2cb606825f30e55aa71e346565e9f58f0768e4d99f4ce8c80bea010b0dcb2", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "TenantDetails[]" + } + }, + "src/enforcement/responses.ts:readPermissionEntry": { + "implementationSha256": "0c2684483be17440bb0241e684853c49cb23331248f5cd1e813bb8fca420b775", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "IUserPermissions[string] | undefined" + } + }, + "src/enforcement/responses.ts:readPermissionMap": { + "implementationSha256": "6294731467cd3368b10512db03ad607d7965bd6de56a3682fc9c2d4200768ecf", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "IUserPermissions | undefined" + } + }, + "src/logger.ts:prettyConsoleLog": { + "implementationSha256": "4211d3f691db2ee155595c836ca78e3555f20c3d2483cde3212df94ae660b966", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "label", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "data", + "optional": false, + "type": "unknown" + } + ], + "returns": "void" + } + }, + "src/utils/diagnostics.ts:diagnosticAxiosError": { + "implementationSha256": "faae394b2cdc3fbf64b49106e18bc0fc14d8edec1945f1cea5b12286a870d653", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "AxiosError" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "AxiosError" + } + }, + "src/utils/diagnostics.ts:diagnosticBody": { + "implementationSha256": "fe086a34090bc6abe8ec7f7b16fafa05ea3206baf5ada28df005ac8ad0e9fc98", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "unknown" + } + }, + "src/utils/diagnostics.ts:diagnosticCause": { + "implementationSha256": "f4fe59d8a58ca8c250c732f3656329cc05000f67215b03fe6017a3bdd1fcbb73", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "unknown" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "Error" + } + }, + "src/utils/diagnostics.ts:diagnosticErrorSecrets": { + "implementationSha256": "def85ea25a87d3cdf3cbb7a89a18d3d10e5e2d10402df96b174b5e675682cced", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "unknown" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "CollectedSecrets" + } + }, + "src/utils/diagnostics.ts:diagnosticMessage": { + "implementationSha256": "1b3bd02600d26ff373547ddaa66741f0186ecb49ec042d7e853ff3bf1753d8f8", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "unknown" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "string" + } + }, + "src/utils/diagnostics.ts:diagnosticMetadata": { + "implementationSha256": "dd245b592303a29ab7f1cc2684e2574ea121d204ccfcc5fd9fae4c54fec42aaa", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "unknown" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "{\n status?: number;\n code?: string;\n}" + } + }, + "src/utils/diagnostics.ts:diagnosticRequestSecrets": { + "implementationSha256": "91ca6e4ae9c3d00f55bc6d3074a1283a098ce7c56e47b9d3e08c71904973c53d", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "Pick, 'config' | 'response'>" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "CollectedSecrets" + } + }, + "src/utils/diagnostics.ts:diagnosticSecrets": { + "implementationSha256": "af87d299326eee2ccc09ea5e9bae9549572d977e87a6ff3abff9768ebea5c96b", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "CollectedSecrets" + } + }, + "src/utils/diagnostics.ts:diagnosticStatus": { + "implementationSha256": "a124b1f64f55603367e6fd0e076e2816cfbaa5a6e01acc2cba011ca9892c4070", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "number | undefined" + } + }, + "src/utils/diagnostics.ts:diagnosticText": { + "implementationSha256": "4e96845c31c905a092ce1b4d421cb1fc94b96a9bc53d9e794539293c9d5be87a", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "string" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "string" + } + }, + "src/utils/diagnostics.ts:diagnosticUrl": { + "implementationSha256": "b6a39dab0a13569c114669065d606957a6071e7fe838334fc4e0116c7525c7bf", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "string | undefined" + }, + { + "initializer": "[]", + "name": "secrets", + "optional": true, + "type": "SecretContext" + } + ], + "returns": "string | undefined" + } + }, + "src/utils/diagnostics.ts:mergeDiagnosticSecrets": { + "implementationSha256": "a70768620528bf45ed0f078ddf902ded7016eeba76e87bc6dd1c8811e9bdb43e", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "left", + "optional": false, + "type": "SecretContext" + }, + { + "initializer": null, + "name": "right", + "optional": false, + "type": "SecretContext" + } + ], + "returns": "CollectedSecrets" + } + }, + "src/utils/diagnostics.ts:omittedResponseSecrets": { + "implementationSha256": "5217d040569cdd1ec681539478668555f95f49eb20b666c2631e97c04d1d778c", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "secrets", + "optional": false, + "type": "SecretContext" + } + ], + "returns": "CollectedSecrets" + } + }, + "src/utils/diagnostics.ts:recordDiagnosticSecrets": { + "implementationSha256": "3cb8505fa4fd2bb1c018a5face549836db9748d12cd5ede3c3568dcef45d4e92", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "unknown" + }, + { + "initializer": null, + "name": "secrets", + "optional": false, + "type": "SecretContext" + } + ], + "returns": "void" + } + }, + "src/utils/diagnostics.ts:redactPrivateValues": { + "implementationSha256": "28bd84300e3299f34e9537e4509f9367b52448e9a2a1abb1430742480997af71", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "secrets", + "optional": false, + "type": "SecretContext" + } + ], + "returns": "string" + } + }, + "src/utils/diagnostics.ts:sharedFailurePrivacy": { + "implementationSha256": "a47039cbbf747ed6dd8acb66e246a8877a85745293cca54216a6bb55096a96ee", + "signature": { + "generics": [], + "parameters": [], + "returns": "WeakMap" + } + }, + "src/utils/http-transport.ts:createOwnedTransport": { + "implementationSha256": "c7efe8a54efdb7a6bb51e9cc49382724ff2cfae33494f8780ecaf40ca03dbf6a", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": false, + "type": "TransportOptions" + } + ], + "returns": "AxiosInstance" + } + }, + "src/utils/http-transport.ts:dispatch": { + "implementationSha256": "5d9c09b61efcab961a0a6e68a087f5b7484c6ff57ec81de213c00b150a2a73d6", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": false, + "type": "TransportOptions" + }, + { + "initializer": null, + "name": "config", + "optional": false, + "type": "InternalAxiosRequestConfig" + } + ], + "returns": "Promise" + } + }, + "src/utils/http-transport.ts:throwIfCancelled": { + "implementationSha256": "cfecb5dd11985a9ecec8c07d8dee50302972a2c892f4824adc0116f3fec03c56", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "config", + "optional": false, + "type": "InternalAxiosRequestConfig" + } + ], + "returns": "void" + } + }, + "src/utils/http-transport.ts:waitForRetry": { + "implementationSha256": "ee4bfc6495844e453d1aa2cbed595f499a699663ebd55c9fd87bda382966cc59", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "delay", + "optional": false, + "type": "number" + }, + { + "initializer": null, + "name": "configs", + "optional": false, + "type": "readonly InternalAxiosRequestConfig[]" + } + ], + "returns": "Promise" + } + }, + "src/utils/retry.ts:calculateRetryDelay": { + "implementationSha256": "e3dd9f15b1ee3bbfdb8e330a221331bc3d02bf99cd3bbfbcadbdd6af1415125d", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attemptNumber", + "optional": false, + "type": "number" + }, + { + "initializer": null, + "name": "config", + "optional": false, + "type": "IResolvedRetryConfig" + }, + { + "initializer": null, + "name": "retryAfterHeader", + "optional": true, + "type": "unknown" + } + ], + "returns": "number" + } + }, + "src/utils/retry.ts:defaultRetryCondition": { + "implementationSha256": "4d1b77c87c755b6d1dd4e21fd4813d4598782c270e5224f41df2e929afff3728", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "AxiosError" + } + ], + "returns": "boolean" + } + }, + "src/utils/retry.ts:isNonRetryableError": { + "implementationSha256": "50fe6803eebbc75baba4e62f6bf30eaac36b6af42d34a342b09c9bb8cb6eb7c9", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "error", + "optional": false, + "type": "AxiosError" + } + ], + "returns": "boolean" + } + }, + "src/utils/retry.ts:parseRetryAfter": { + "implementationSha256": "3d1437cb28d7c9250c235ba4662e81026c39f042662b642a1fee84204ea02655", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "value", + "optional": false, + "type": "unknown" + } + ], + "returns": "number | null" + } + }, + "src/utils/retry.ts:resolveRetryConfig": { + "implementationSha256": "573281b5397cb5c1bd2d9f559d6abda8a113d0cf7dd45a79a24c7850d6f3f5e8", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userConfig", + "optional": false, + "type": "IRetryConfig | false | undefined" + } + ], + "returns": "IResolvedRetryConfig" + } + }, + "src/utils/retry.ts:validateRetryConfig": { + "implementationSha256": "091fe57386160cc68fbcc583bc25e8c9dcfe8733c8d8d96e28f3969b783861e0", + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "config", + "optional": false, + "type": "IRetryConfig" + } + ], + "returns": "void" + } + } + }, + "generated": { + "APIHistoryApi.getApiEventV2HistoryEventIdGet": { + "body": null, + "dispatchSha256": "be0c9541cbb1ec86788a32c3b5f93c25ff454551daa4c9b47d90a0c2ced81134", + "generatedMethod": "APIHistoryApi.getApiEventV2HistoryEventIdGet", + "implementationSha256": "0ca978c4796a5b5de1d217c5b5d781f31cfda5a43ceb895f384edcc38b3281f1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "eventId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIHistoryApiGetApiEventV2HistoryEventIdGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/history/{event_id}" + }, + "APIHistoryApi.getRequestBodyV2HistoryEventIdRequestGet": { + "body": null, + "dispatchSha256": "caf99876b55121d59fa1fada87b4641661cf15823d64f1aa93ed4d2656cf5b68", + "generatedMethod": "APIHistoryApi.getRequestBodyV2HistoryEventIdRequestGet", + "implementationSha256": "4e19845114427e0652968177e02b8535f4b8f41731bb2b3c30656ca133de5290", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "eventId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/history/{event_id}/request" + }, + "APIHistoryApi.getResponseBodyV2HistoryEventIdResponseGet": { + "body": null, + "dispatchSha256": "62fb42348acf94c72f1b961fb31eed72299415fab8343224ecc159c06c6cd054", + "generatedMethod": "APIHistoryApi.getResponseBodyV2HistoryEventIdResponseGet", + "implementationSha256": "fca552069242d9b4f0b6a842b67e9c667d139f890f6a9d306855f1e4ccb91cc3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "eventId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/history/{event_id}/response" + }, + "APIHistoryApi.listApiEventsV2HistoryGet": { + "body": null, + "dispatchSha256": "ec0eb36bfead2c5c199e8e03aa404bee4cc7cb4554fef2d84e2c94a9e8909d50", + "generatedMethod": "APIHistoryApi.listApiEventsV2HistoryGet", + "implementationSha256": "68bc79172fc66698bbed92a4fdcc56f6ad0bcaf6a190f39ef8a5bf1c86bef3b2", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "method", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "path", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "success", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "statusCode", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "clientIp", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorType", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorDisplayName", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "projectId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "envId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "timestampFrom", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "timestampUntil", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "APIHistoryApiListApiEventsV2HistoryGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/history" + }, + "APIKeysApi.createApiKey": { + "body": "aPIKeyCreate", + "dispatchSha256": "6e926780ba38b357a0b2c61fc99f86aa605a9d190ef09a7dec0bb39300b9d219", + "generatedMethod": "APIKeysApi.createApiKey", + "implementationSha256": "0cec8a88c1144b22f3dcf73599492eb9033ac8a8f0a976374930e807b8e245a8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "aPIKeyCreate", + "optional": false, + "type": "APIKeyCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIKeysApiCreateApiKeyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key" + }, + "APIKeysApi.deleteApiKey": { + "body": null, + "dispatchSha256": "4176805d4571f19ec2a11fedb9e66209d3f42e4f3474de67d6188b83e2bfb253", + "generatedMethod": "APIKeysApi.deleteApiKey", + "implementationSha256": "153c8fa119c26e57d9fd2689acd7544b01b56ff894a8372d1cd17857c4854f9a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKeyId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIKeysApiDeleteApiKeyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key/{api_key_id}" + }, + "APIKeysApi.getApiKey": { + "body": null, + "dispatchSha256": "0a6f6a56f9fb0f32582c9d0248ece01f1eac9899b0e77a1de5ebb924f4b366d6", + "generatedMethod": "APIKeysApi.getApiKey", + "implementationSha256": "efc136d1cf09a67f5de4923e3542839b4b0fb978790d79c1c47664244baf24b5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKeyId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIKeysApiGetApiKeyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key/{api_key_id}" + }, + "APIKeysApi.getApiKeyScope": { + "body": null, + "dispatchSha256": "c77c4ee486b5d9a0ae6d1ffa871fd439523d8de145a3d91b02cb264a2c017195", + "generatedMethod": "APIKeysApi.getApiKeyScope", + "implementationSha256": "9d7c69026aa99f7e2ef6c271f3e0f56dd68bdf8464ec6d5095ddf40d841b92e4", + "input": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key/scope" + }, + "APIKeysApi.getEnvironmentApiKey": { + "body": null, + "dispatchSha256": "50dd505a2f1e5d807d9664d6378ea8656750e624956f4b2373d7590bdd52768a", + "generatedMethod": "APIKeysApi.getEnvironmentApiKey", + "implementationSha256": "de3ceb212b46b4c68f8353eabbba1cd8759c459b9dcd53149716d4c043c1b0da", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIKeysApiGetEnvironmentApiKeyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key/{proj_id}/{env_id}" + }, + "APIKeysApi.listApiKeys": { + "body": null, + "dispatchSha256": "1bbc7e8ac45ee1fd66867ebd38d259f1b6d75b20786495e88e514b3f6953f8ca", + "generatedMethod": "APIKeysApi.listApiKeys", + "implementationSha256": "3a3f1255f8a9b0b39b4c76f2bd9536bd3e09677427eeb1f9e59bbaca9b5a7cbf", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "objectType", + "optional": true, + "type": "MemberAccessObj" + }, + { + "initializer": null, + "name": "projId", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "APIKeysApiListApiKeysRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key" + }, + "APIKeysApi.rotateApiKey": { + "body": null, + "dispatchSha256": "2061602e2627dd461975120d6a542d15fbe52509d2dd99b339a06e8a523fdddc", + "generatedMethod": "APIKeysApi.rotateApiKey", + "implementationSha256": "aec7b0cff19a9acf56de30ce928e3ad61dc911075e3f0c8c724f2957b829f441", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKeyId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "APIKeysApiRotateApiKeyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/api-key/{api_key_id}/rotate-secret" + }, + "AccessRequestsEAPApi.approveAccessRequest": { + "body": "accessRequestReview", + "dispatchSha256": "65725c3ef43afaca34223c9e1449e2997f06d63550b4eb4d46309bbf4628ae4c", + "generatedMethod": "AccessRequestsEAPApi.approveAccessRequest", + "implementationSha256": "97fbb15b5d1bb7a3e46ce4de6fb72517f1ecaa94f08318d2840e64858c63a78d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestReview", + "optional": false, + "type": "AccessRequestReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiApproveAccessRequestRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/approve" + }, + "AccessRequestsEAPApi.approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut": { + "body": "accessRequestReview", + "dispatchSha256": "1215fa8baf54677e4afb638189e78754e3b6964094fbb0b622d11e41cb3a046a", + "generatedMethod": "AccessRequestsEAPApi.approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut", + "implementationSha256": "354f0370f8836f36c07f572ddaaf673a9df7a71e3d5961f6570217d3fbd275ae", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestReview", + "optional": false, + "type": "AccessRequestReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/approve" + }, + "AccessRequestsEAPApi.cancelAccessRequest": { + "body": null, + "dispatchSha256": "37349dc80f373607c28ffe73be88b6045007bbcfd70f30973d5f7ee9a80466ad", + "generatedMethod": "AccessRequestsEAPApi.cancelAccessRequest", + "implementationSha256": "1467fd1d1b52320e05e5686a50e7e0b8bd3d17a7748859b2261d7c49d8fc3a1d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiCancelAccessRequestRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/cancel" + }, + "AccessRequestsEAPApi.cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut": { + "body": null, + "dispatchSha256": "5a70179b06e61592c6c6c0a62c81018374d07dcd718a640f8f2cc61bedd688f1", + "generatedMethod": "AccessRequestsEAPApi.cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut", + "implementationSha256": "a9896804747092d7a2d11fccdb889fc91f5d3d26399973c944598b0b4b4952fa", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/cancel" + }, + "AccessRequestsEAPApi.createAccessRequest": { + "body": "accessRequestUserCreate", + "dispatchSha256": "a5d538fdf8ebed8e97f6a07f096de0b9ada17717264cd567a143cafa27ca1c35", + "generatedMethod": "AccessRequestsEAPApi.createAccessRequest", + "implementationSha256": "56f75c167267dfecb3a82a51b944c418cfcc4d5042c721b84c30c31320f05ebc", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestUserCreate", + "optional": false, + "type": "AccessRequestUserCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiCreateAccessRequestRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}" + }, + "AccessRequestsEAPApi.createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost": { + "body": "accessRequestUserCreate", + "dispatchSha256": "10e2bb13908afcf8eb557b9e6f2dd1bb729317aef0fb9a0e819f311eb8dba9d3", + "generatedMethod": "AccessRequestsEAPApi.createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost", + "implementationSha256": "5b47f49aaed35bfc5edfc36354b7751cad773de77988f1ea80c489bfeea1d21e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestUserCreate", + "optional": false, + "type": "AccessRequestUserCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests" + }, + "AccessRequestsEAPApi.denyAccessRequest": { + "body": "accessRequestReviewDeny", + "dispatchSha256": "5d638c2766b78742886689148dae96efe535697cb79c28a0d18347267408c084", + "generatedMethod": "AccessRequestsEAPApi.denyAccessRequest", + "implementationSha256": "49c09f0536e34d697fa235b255fd863f9a8b8235e0139e5c8a8a17498eadcc47", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestReviewDeny", + "optional": false, + "type": "AccessRequestReviewDeny" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiDenyAccessRequestRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/deny" + }, + "AccessRequestsEAPApi.denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut": { + "body": "accessRequestReviewDeny", + "dispatchSha256": "3344c080f8e085a7e83bcd11dd978e7ad30145ca09c1d871a6868a5ffe4afb4c", + "generatedMethod": "AccessRequestsEAPApi.denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut", + "implementationSha256": "9d09c6cf045ab8f5e143c2430410b01ce13d0e636b5b2a99ba7c884449c42ec5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestReviewDeny", + "optional": false, + "type": "AccessRequestReviewDeny" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/deny" + }, + "AccessRequestsEAPApi.getAccessRequest": { + "body": null, + "dispatchSha256": "4bfa30908115e552cceb7b85ba5f5ed62e8aefda1aa18f7f98c6187d58a20c3b", + "generatedMethod": "AccessRequestsEAPApi.getAccessRequest", + "implementationSha256": "41d8c61c76bccf87d7e8216b5509e83ff7c74afe350376047911e4804950e487", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiGetAccessRequestRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}" + }, + "AccessRequestsEAPApi.getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet": { + "body": null, + "dispatchSha256": "e71bc16a24e58f9b6f26a7dd246c3cbc8790852032d656f0332314153d6759b1", + "generatedMethod": "AccessRequestsEAPApi.getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet", + "implementationSha256": "3bcf66f591f9d757aa98cc7ca7b48f1fcc7624a8c7d3a2346c54f6402276cfc7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}" + }, + "AccessRequestsEAPApi.listAccessRequests": { + "body": null, + "dispatchSha256": "3b3f49ca5aa88e1e92d3b57ec8e59c15a14674ad0b1a0e23f1ecc36c86b97498", + "generatedMethod": "AccessRequestsEAPApi.listAccessRequests", + "implementationSha256": "527abd7d499ea6a0d640770bb7312458e691b933e9c9180d64761bd5ee381a02", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "status", + "optional": true, + "type": "RequestStatus" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiListAccessRequestsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}" + }, + "AccessRequestsEAPApi.listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet": { + "body": null, + "dispatchSha256": "9f0ff9e2a5b6cd746d191faf01a1c4509e568bca1f668b48072a5d8b6de9a1bc", + "generatedMethod": "AccessRequestsEAPApi.listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet", + "implementationSha256": "ca02a2e4705c724ba3d5c5a6893d941f0a9ead8957d84db09c3844a16b270416", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "status", + "optional": true, + "type": "RequestStatus" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests" + }, + "AccessRequestsEAPApi.updateAccessRequestReviewer": { + "body": "accessRequestReview", + "dispatchSha256": "326e37818a6f070b60bc27b0dc771013edebf79778c40178c9dea7363d8a8342", + "generatedMethod": "AccessRequestsEAPApi.updateAccessRequestReviewer", + "implementationSha256": "25b892e5607f83ef76abd1bbc1c15f4d96eedfcc1e6192b42bd22b58213c42e8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestReview", + "optional": false, + "type": "AccessRequestReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiUpdateAccessRequestReviewerRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/reviewer" + }, + "AccessRequestsEAPApi.updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch": { + "body": "accessRequestReview", + "dispatchSha256": "bfecf958add1cd430696fe223e7da403798a508005b7e3e7476ad3714b0e791e", + "generatedMethod": "AccessRequestsEAPApi.updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch", + "implementationSha256": "66de54ae0692f34fdfaa5066ba6aa85faecd8dd2f0099962d150800832131e39", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "accessRequestId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "accessRequestReview", + "optional": false, + "type": "AccessRequestReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/reviewer" + }, + "ActivityLogApi.listActivityEvents": { + "body": null, + "dispatchSha256": "9d05f2aedff4d3ecdfe88bb59b4235f0040debe282c2a139fe2f131178ef66a4", + "generatedMethod": "ActivityLogApi.listActivityEvents", + "implementationSha256": "60659d2d7c63a3b98665a13bdf76c8721b904ef471841de7f418513a84711456", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "actorId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorDisplayName", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "actorType", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "projectId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "envId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "timestampFrom", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "timestampUntil", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "ActivityLogApiListActivityEventsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/activity" + }, + "ActivityLogApi.listActivityTypes": { + "body": null, + "dispatchSha256": "4f0805b770cd8026529f430ee0347b51f23cd79a4fe3f016fb128a05ba52e516", + "generatedMethod": "ActivityLogApi.listActivityTypes", + "implementationSha256": "4c0638e48167ea511317789e32cd6fefc85336c8922408c8799af742375e205c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/activity/types" + }, + "AuditElementsDataApi.elementsListAuditLogs": { + "body": null, + "dispatchSha256": "43051a9d0087c6771b8e93b1cd2bb198ab8108697ac84ced3f6a91363c9e6a37", + "generatedMethod": "AuditElementsDataApi.elementsListAuditLogs", + "implementationSha256": "3798bcb637d3118646a0bdc414491419531e8dbe95a0a44abe0ab050d54cc500", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AuditElementsDataApiElementsListAuditLogsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/audit_logs" + }, + "AuditLogReplayApi.runAuditLogReplay": { + "body": "auditLogReplayRequest", + "dispatchSha256": "62d1fddca5528f94eb7f64c1de6c3156bf7df09435c2cce4344871b59ae3ec4f", + "generatedMethod": "AuditLogReplayApi.runAuditLogReplay", + "implementationSha256": "01457820aae79228e680538ce389d680516d622a8e853fc5789540e4b6494353", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "auditLogReplayRequest", + "optional": false, + "type": "AuditLogReplayRequest" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AuditLogReplayApiRunAuditLogReplayRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/audit-log-replay" + }, + "AuditLogsApi.getDetailedAuditLog": { + "body": null, + "dispatchSha256": "329a2424d72b0a3553621f3610d3b89e0353218cb89eb9c7509efd672dcb7fb4", + "generatedMethod": "AuditLogsApi.getDetailedAuditLog", + "implementationSha256": "1fe69edd79560adfc7cdbeb7d3ec3d6c8a78ae657046c92711828782a8d00575", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "logId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AuditLogsApiGetDetailedAuditLogRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}" + }, + "AuditLogsApi.listAuditLogs": { + "body": null, + "dispatchSha256": "d16298437f218942bc4b47a9285e8efa3bf433bc4783e0473af0ae2e455f4476", + "generatedMethod": "AuditLogsApi.listAuditLogs", + "implementationSha256": "e373ef1019cdcc78b25f9c7d7fd8049383b7c385e1e6898c30f8f95a17360a4b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pdpId", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "users", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "decision", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "resources", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "action", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "timestampFrom", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "timestampTo", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "sortBy", + "optional": true, + "type": "AuditLogSortKey" + }, + { + "initializer": null, + "name": "query", + "optional": true, + "type": "AuditLogQueryType" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AuditLogsApiListAuditLogsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/audit_logs" + }, + "AuthenticationApi.elementsLoginAs": { + "body": "userLoginRequestInput", + "dispatchSha256": "fad2643db21bb29ac39fd329d493ffeef11f730d12383e9fdaa44d6bc97b4d89", + "generatedMethod": "AuthenticationApi.elementsLoginAs", + "implementationSha256": "2370178bfe014fa2e8747ea198fd78752a7df09213c848af209d67a4c8bdaf33", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userLoginRequestInput", + "optional": false, + "type": "UserLoginRequestInput" + }, + { + "initializer": null, + "name": "permitSession", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "AuthenticationApiElementsLoginAsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/auth/elements_login_as" + }, + "BulkOperationsApi.bulkAssignRole": { + "body": "roleAssignmentCreate", + "dispatchSha256": "f699156c56f5d9e2f166255c19987edca73589be5a5a0f03f2c06dfc27cbacec", + "generatedMethod": "BulkOperationsApi.bulkAssignRole", + "implementationSha256": "b1e9e75ddafdae25fb41a3cb59585c2b8985fe8cfa66f0488656b808232b5ece", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleAssignmentCreate", + "optional": false, + "type": "Array" + }, + { + "initializer": null, + "name": "missingUserPolicy", + "optional": true, + "type": "MissingUserPolicy" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkAssignRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/bulk" + }, + "BulkOperationsApi.bulkCreateOrReplaceRoles": { + "body": "roleCreateBulkOperation", + "dispatchSha256": "e6f680df525c05b8505453840a125027262e00411fbda866851628f29fb9abd0", + "generatedMethod": "BulkOperationsApi.bulkCreateOrReplaceRoles", + "implementationSha256": "0d671456feab7e74884a6faea17107f5e87b64c87ec5ea4fb94c4148d5ef9a87", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleCreateBulkOperation", + "optional": false, + "type": "RoleCreateBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkCreateOrReplaceRolesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/bulk/roles" + }, + "BulkOperationsApi.bulkCreateTenants": { + "body": "tenantCreateBulkOperation", + "dispatchSha256": "e82d5aff6b07758475f05fa2ffb33086435f597b67c4d972d5e5de2aa1e7b31e", + "generatedMethod": "BulkOperationsApi.bulkCreateTenants", + "implementationSha256": "8cc4f2316f99178350f5d9c53324711b71c8410de9bcca773eee74f0ef74c78b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantCreateBulkOperation", + "optional": false, + "type": "TenantCreateBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkCreateTenantsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/tenants" + }, + "BulkOperationsApi.bulkCreateUsers": { + "body": "userCreateBulkOperation", + "dispatchSha256": "81e7185a467a49f2fc38acc01d2013eefc1ee57da2fabd37c0237aa6a7abfb4d", + "generatedMethod": "BulkOperationsApi.bulkCreateUsers", + "implementationSha256": "3a8da7b0c9282d25ec42a68b09d66c81ad0d0c9b83daa4e219c3acdc5191d021", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userCreateBulkOperation", + "optional": false, + "type": "UserCreateBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkCreateUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/users" + }, + "BulkOperationsApi.bulkDeleteResourceInstances": { + "body": "resourceInstanceDeleteBulkOperation", + "dispatchSha256": "9a54338d07deb9d70945d666059ccffec966f084c71783cf94c1a8f233815d45", + "generatedMethod": "BulkOperationsApi.bulkDeleteResourceInstances", + "implementationSha256": "5a9439842dc8f406fa53f8ad77b1e05747a9b5d55ed909319a603e8ecb7c8394", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstanceDeleteBulkOperation", + "optional": false, + "type": "ResourceInstanceDeleteBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkDeleteResourceInstancesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/resource_instances" + }, + "BulkOperationsApi.bulkDeleteTenants": { + "body": "tenantDeleteBulkOperation", + "dispatchSha256": "c1b3a7ccba3c99fe6fb890fc043bac97b5ecc7c0107475b7c52ad35ae4d83834", + "generatedMethod": "BulkOperationsApi.bulkDeleteTenants", + "implementationSha256": "6695934485f36490236458561a0fc8298147c46478755ec328578ca73832ba76", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantDeleteBulkOperation", + "optional": false, + "type": "TenantDeleteBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkDeleteTenantsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/tenants" + }, + "BulkOperationsApi.bulkDeleteUsers": { + "body": "userDeleteBulkOperation", + "dispatchSha256": "b1547618764c26dc30a6fb9f5b2fd444fbd8a6e05ddc878a151376f5f996b6ba", + "generatedMethod": "BulkOperationsApi.bulkDeleteUsers", + "implementationSha256": "8680a64b896f93b2043ef10f7a59a11e00f980cf6e46d8744388d2bd9e9acff1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userDeleteBulkOperation", + "optional": false, + "type": "UserDeleteBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkDeleteUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/users" + }, + "BulkOperationsApi.bulkReplaceResourceInstances": { + "body": "resourceInstanceCreateBulkOperation", + "dispatchSha256": "7884707a0a0fb504a4d70960fb1b03803c3a26d5a7118eb1e5c0a1abda6d7443", + "generatedMethod": "BulkOperationsApi.bulkReplaceResourceInstances", + "implementationSha256": "b6c0d05d9ae50463e208d55ec47a0134779e79f2843bc07abe497a02a2154b62", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstanceCreateBulkOperation", + "optional": false, + "type": "ResourceInstanceCreateBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkReplaceResourceInstancesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/resource_instances" + }, + "BulkOperationsApi.bulkReplaceUsers": { + "body": "userReplaceBulkOperation", + "dispatchSha256": "15e86398b955e4cc260e3ae64a7855fc24bef43ac3499560d79ef5f5e879b652", + "generatedMethod": "BulkOperationsApi.bulkReplaceUsers", + "implementationSha256": "9b6d2e3ed9b93e74d496401dd05802de2b715c8f515d541bf76e148fc62e2b97", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userReplaceBulkOperation", + "optional": false, + "type": "UserReplaceBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkReplaceUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/bulk/users" + }, + "BulkOperationsApi.bulkUnassignRole": { + "body": "roleAssignmentRemove", + "dispatchSha256": "24239f4782d17e8f377650758d58d48ef7673f221fbeeac049f5be6218855a5a", + "generatedMethod": "BulkOperationsApi.bulkUnassignRole", + "implementationSha256": "5770825d2b2f937432cd1562369d19174dd5b585891df96c770408a9ae5e3deb", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleAssignmentRemove", + "optional": false, + "type": "Array" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "BulkOperationsApiBulkUnassignRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/bulk" + }, + "ConditionSetRulesApi.assignSetPermissions": { + "body": "conditionSetRuleCreate", + "dispatchSha256": "3f1b4b8341096bb0f5af751cb073ea8a87a8fe5b5bbc12acb12bdaa7ae3495e6", + "generatedMethod": "ConditionSetRulesApi.assignSetPermissions", + "implementationSha256": "2235b586568e6e70d58a28fd2d358a0f40382aca536c96edcb2f095c2d262dc3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "conditionSetRuleCreate", + "optional": false, + "type": "ConditionSetRuleCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetRulesApiAssignSetPermissionsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/set_rules" + }, + "ConditionSetRulesApi.listSetPermissions": { + "body": null, + "dispatchSha256": "5438065cdcc7c9691dba75b0ff6c59eec29cf9f3bf6afd94eede7a06e84f6c37", + "generatedMethod": "ConditionSetRulesApi.listSetPermissions", + "implementationSha256": "f5bad4fba39298bf0923eb576b495093096d5f5f9c1c336c2f533ee42229d646", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userSet", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "permission", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resourceSet", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetRulesApiListSetPermissionsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/set_rules" + }, + "ConditionSetRulesApi.unassignSetPermissions": { + "body": "conditionSetRuleRemove", + "dispatchSha256": "ec055ccd5fdab58a973b59553a0c8b933d210954ad911b20c012dcdbc2eaa68c", + "generatedMethod": "ConditionSetRulesApi.unassignSetPermissions", + "implementationSha256": "d99bd51e9664f059771a9c801065686511f183b4057fbb52c2390c9f708df1a7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "conditionSetRuleRemove", + "optional": false, + "type": "ConditionSetRuleRemove" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetRulesApiUnassignSetPermissionsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/set_rules" + }, + "ConditionSetsApi.createConditionSet": { + "body": "conditionSetCreate", + "dispatchSha256": "48d2784c57e2bfb56ef64c9bbc86c922c68362890babddf11a5ed994154085f3", + "generatedMethod": "ConditionSetsApi.createConditionSet", + "implementationSha256": "31975f6ca30fa0373dfa1ae5fca8164af55c310d3094ca9fafd80ebb4814e80e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "conditionSetCreate", + "optional": false, + "type": "ConditionSetCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiCreateConditionSetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets" + }, + "ConditionSetsApi.deleteConditionSet": { + "body": null, + "dispatchSha256": "ba8d562ed870e0a6cf770f0dd4be8308a63e570eb2033cca113aa63e78b83085", + "generatedMethod": "ConditionSetsApi.deleteConditionSet", + "implementationSha256": "6ef1a7f7d4b89047957ed9b8812c065ed40b9dd38ffc879c5a41dcbbbbb14291", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiDeleteConditionSetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + }, + "ConditionSetsApi.getConditionSet": { + "body": null, + "dispatchSha256": "239e0dcb353073bb0f5095d09d1f9ca8f7484e176826a33b151634046b9bb03f", + "generatedMethod": "ConditionSetsApi.getConditionSet", + "implementationSha256": "682a4e9860f7e664e846ed7ecf33942b415ddcefce7703d12f77872c7392fef8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiGetConditionSetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + }, + "ConditionSetsApi.getConditionSetAncestors": { + "body": null, + "dispatchSha256": "bb45f8819f201fb3f9bfd57e8c2f3e49fe250f665f91a96946ca35e79a1f18a6", + "generatedMethod": "ConditionSetsApi.getConditionSetAncestors", + "implementationSha256": "a1f2f95042ba00a0b7662447d7d8b71083ee9a620e55ec929d0d01491932fc9e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiGetConditionSetAncestorsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/ancestors" + }, + "ConditionSetsApi.getConditionSetDescendants": { + "body": null, + "dispatchSha256": "a432e248e8dcfdd8284d8e553696c914973ab28108daafd4246ab82a4a8eaffc", + "generatedMethod": "ConditionSetsApi.getConditionSetDescendants", + "implementationSha256": "d0a108b1c2956f3f29e3adc07dda940f0f35c6d66365a447ce6576ca5eb4d3ba", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiGetConditionSetDescendantsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/descendants" + }, + "ConditionSetsApi.listConditionSets": { + "body": null, + "dispatchSha256": "cbba3b5293e4151b10addde8a074a8e1c84eb8840013aa97d67f903ac16c55de", + "generatedMethod": "ConditionSetsApi.listConditionSets", + "implementationSha256": "46f2f7f7002d65c5db4faeda3b128e4ed98f98bee745f98a7295dfe2ffe606dd", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "type", + "optional": true, + "type": "ConditionSetType" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiListConditionSetsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets" + }, + "ConditionSetsApi.updateConditionSet": { + "body": "conditionSetUpdate", + "dispatchSha256": "7d316e39c02fddffc5fea427a7dfd967efe87b3f0f222f67dff1d5bc799fb696", + "generatedMethod": "ConditionSetsApi.updateConditionSet", + "implementationSha256": "eb0c5772114736f94c04fc61c27dad6b12a8fe9a51098278c739c22efdc6ba63", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "conditionSetUpdate", + "optional": false, + "type": "ConditionSetUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ConditionSetsApiUpdateConditionSetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + }, + "DataExportApi.getOrganizationExport": { + "body": null, + "dispatchSha256": "1dff82c02168387244775ec11a93f713b0d8fdf1ab9349e4e288e2965588ef3b", + "generatedMethod": "DataExportApi.getOrganizationExport", + "implementationSha256": "fbce63e48b82e93edf7d86945a366cc2c4f271f7279a4d25dc85c7f3338728fb", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "taskId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "DataExportApiGetOrganizationExportRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/data-export/{task_id}" + }, + "DataExportApi.startOrganizationExport": { + "body": null, + "dispatchSha256": "1fd2d60b99f8ecaaa817022f34eff03a2f02955d823158e8818b0db5e148fa96", + "generatedMethod": "DataExportApi.startOrganizationExport", + "implementationSha256": "44c1494226d74422b2d7ba460a3d37c3661b704f2fec1cd7e4927cc12665d387", + "input": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/data-export" + }, + "DefaultApi.getApiEvent": { + "body": null, + "dispatchSha256": "503d972917421a6da8c24f1e6b55fa4793491fb149184b6f76f2c632f3dd8bde", + "generatedMethod": "DefaultApi.getApiEvent", + "implementationSha256": "5a3673e154d06b71fb48f2bef543c8186cff3a8d9e580d737a914d1ba6a6d770", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "eventId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "DefaultApiGetApiEventRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/deprecated/history/{event_id}" + }, + "DefaultApi.getRequestBody": { + "body": null, + "dispatchSha256": "7a978e40f6cf970e982a04b4f6184ce6c322e7faeb7547cb5edcc3a85c08425f", + "generatedMethod": "DefaultApi.getRequestBody", + "implementationSha256": "39cde3d24670f92f47fc6a256425a90f58bc9383cf8e7ce32aa6adc24c3739b8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "eventId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "DefaultApiGetRequestBodyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/deprecated/history/{event_id}/request" + }, + "DefaultApi.getResponseBody": { + "body": null, + "dispatchSha256": "c7ed5dce6923daba447402f7825f5519c744d130deeb54bf1eb085b86e1582bc", + "generatedMethod": "DefaultApi.getResponseBody", + "implementationSha256": "69365122816dd08c1838dfdfee339bf4ed45ae928e931977d6bdb47290fbb968", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "eventId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "DefaultApiGetResponseBodyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/deprecated/history/{event_id}/response" + }, + "DefaultApi.listActivityEventsV2DeprecatedActivityGet": { + "body": null, + "dispatchSha256": "f72b14d8b6b9418e2f687f2cf79df46cb91351df643ffbdce46e7ab3d33e3ce9", + "generatedMethod": "DefaultApi.listActivityEventsV2DeprecatedActivityGet", + "implementationSha256": "b0f9ad0d0302172040dc0e301c770a51025b7791831a02a6b742ae7a8d5d6340", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "actorId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorDisplayName", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "actorType", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "projectId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "envId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "timestampFrom", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "timestampUntil", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "DefaultApiListActivityEventsV2DeprecatedActivityGetRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/deprecated/activity" + }, + "DefaultApi.listActivityTypesV2DeprecatedActivityTypesGet": { + "body": null, + "dispatchSha256": "23f954c518cba56be920d89c266009438cc340bf194e45aca60a6ae918db8a65", + "generatedMethod": "DefaultApi.listActivityTypesV2DeprecatedActivityTypesGet", + "implementationSha256": "d7b9614b9b3b1575f32e774c414c9997adf4f526bc2dab7f1dc53072ae7b6b12", + "input": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/deprecated/activity/types" + }, + "DefaultApi.listApiEvents": { + "body": null, + "dispatchSha256": "50ea38804091143e38744fa74ccd4b638838cf2cb20553aaeb70ed612eb5c1f9", + "generatedMethod": "DefaultApi.listApiEvents", + "implementationSha256": "1bd31e83d98731055a10acc65e17bec35b20b5cfba1487ca8bc8d4fdddaa88bc", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "method", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "path", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "success", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "statusCode", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "clientIp", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorType", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "actorDisplayName", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "projectId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "envId", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "timestampFrom", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "timestampUntil", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "DefaultApiListApiEventsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/deprecated/history" + }, + "ElementsConfigsEAPApi.createElementsConfig": { + "body": "elementsConfigCreate", + "dispatchSha256": "db1c8147ca54363f962995542a75c09d2b3a2764232b1e0a0c36a5f922de387b", + "generatedMethod": "ElementsConfigsEAPApi.createElementsConfig", + "implementationSha256": "69a4b42ee112d6bf24fcec27b2c5bb6abbc69f985c3505504ededa16abafe07b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigCreate", + "optional": false, + "type": "ElementsConfigCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ElementsConfigsEAPApiCreateElementsConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config" + }, + "ElementsConfigsEAPApi.deleteElementsConfig": { + "body": null, + "dispatchSha256": "94da8615199dd2eec1e8e7c2e1203ed24d47772eadc7db19497283edff2849d5", + "generatedMethod": "ElementsConfigsEAPApi.deleteElementsConfig", + "implementationSha256": "8237b9ff77591b416e866986bd2e2c0b9f038c71acb8864847be8d2bf1b43d45", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ElementsConfigsEAPApiDeleteElementsConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/{elements_config_id}" + }, + "ElementsConfigsEAPApi.getElementsConfig": { + "body": null, + "dispatchSha256": "f916e2e58ea789a62ad0ca2a84524558cb40e49bf4fb077607b6a489ff98d1d2", + "generatedMethod": "ElementsConfigsEAPApi.getElementsConfig", + "implementationSha256": "1c8e74b8fc3f6f926602d51d051109ba0d2d974e1c47fc602351e85f81dd1b14", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ElementsConfigsEAPApiGetElementsConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}" + }, + "ElementsConfigsEAPApi.getElementsConfigRuntime": { + "body": null, + "dispatchSha256": "deffd6cf7990662b08086786f21c6a70456c48a052e367e69486843c8a56f905", + "generatedMethod": "ElementsConfigsEAPApi.getElementsConfigRuntime", + "implementationSha256": "ff007817ef876be9c62d6d4bfc8ab9e93880392e098c9cb54e0bd434a7794fec", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ElementsConfigsEAPApiGetElementsConfigRuntimeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/runtime" + }, + "ElementsConfigsEAPApi.listElementsConfigs": { + "body": null, + "dispatchSha256": "e9e9c8d1244f0f26178c48a9f42f306206c1c20e8686dc92474da2c611ad5dff", + "generatedMethod": "ElementsConfigsEAPApi.listElementsConfigs", + "implementationSha256": "e6fb5e51b0a88b7b32fc937ff5380d3e175f9480b607d2fd80c59ac4e40acbac", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ElementsConfigsEAPApiListElementsConfigsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config" + }, + "ElementsConfigsEAPApi.updateElementsConfig": { + "body": "elementsConfigUpdate", + "dispatchSha256": "3cb9747ebd3f1e979aa9d0d6adabb657466e7f903835d1f3cdaf4b14f02330bf", + "generatedMethod": "ElementsConfigsEAPApi.updateElementsConfig", + "implementationSha256": "2e8b8b6371fde7c3fa5aa41d4a10decc9c221ef86852d4d32be66c08eb82511e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigUpdate", + "optional": false, + "type": "ElementsConfigUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ElementsConfigsEAPApiUpdateElementsConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}" + }, + "EmailConfigurationsApi.createOrUpdateEmailConfiguration": { + "body": "emailConfigurationCreate", + "dispatchSha256": "63038fa47fe884848ed265ebba45a08cd5d4734f78f78f9af84b5d4851ceefed", + "generatedMethod": "EmailConfigurationsApi.createOrUpdateEmailConfiguration", + "implementationSha256": "610a8ec23ce8d905f09bdbdad1a5d641300a1483f7554da74360fea17e8c3680", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "emailConfigurationCreate", + "optional": false, + "type": "EmailConfigurationCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_configurations" + }, + "EmailConfigurationsApi.getEmailConfiguration": { + "body": null, + "dispatchSha256": "3fd99030ff80814df4b111365d18b754207b7b4d2850c55fb0e3a8ecc485e58f", + "generatedMethod": "EmailConfigurationsApi.getEmailConfiguration", + "implementationSha256": "11433412a06f6ee865b26a573d0e4030b85a0fecba93ee26e7b92a163c8396f5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailConfigurationsApiGetEmailConfigurationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_configurations" + }, + "EmailConfigurationsApi.sendTestEmail": { + "body": "emailConfigurationCreate", + "dispatchSha256": "c8cc807341c3e55f6fbcaefb83f9aec62071c69ab0e03687617d00c4d1b51d10", + "generatedMethod": "EmailConfigurationsApi.sendTestEmail", + "implementationSha256": "484e9926c669927a97f7140c0c24fa025db1e046db14ca0c3057956cd5015553", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "emailConfigurationCreate", + "optional": false, + "type": "EmailConfigurationCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailConfigurationsApiSendTestEmailRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_configurations/send_test_email" + }, + "EmailTemplatesApi.getTemplateByType": { + "body": null, + "dispatchSha256": "bb4d4c5de184202fb673407dc317787a7b9d3e368194c598d194f5d93c763433", + "generatedMethod": "EmailTemplatesApi.getTemplateByType", + "implementationSha256": "81716adb9c33d2ae0e54c37a77db307098c91cc7113c6130b041c538ad4ca6c0", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "templateType", + "optional": false, + "type": "EmailTemplateType" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailTemplatesApiGetTemplateByTypeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}" + }, + "EmailTemplatesApi.listTemplates": { + "body": null, + "dispatchSha256": "82e2f8154e015e4f50052e8eeeeda7841c9615646433ee71dbd7181bd7484ae1", + "generatedMethod": "EmailTemplatesApi.listTemplates", + "implementationSha256": "efece8b2063ddc542deca74ab401629f5319b8cb4c51359f73ae217a884ebfdb", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailTemplatesApiListTemplatesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_templates/" + }, + "EmailTemplatesApi.sendTestEmailByType": { + "body": "emailTemplateUpdate", + "dispatchSha256": "a1744b9cd4f9849372d8e8daf00c49d70aa71b2a85365ba153716d4cdfa2c652", + "generatedMethod": "EmailTemplatesApi.sendTestEmailByType", + "implementationSha256": "711d72857b89c9fc98f33c3649fef680e81e5b388a54628517252f5281a81900", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "templateType", + "optional": false, + "type": "EmailTemplateType" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "emailTemplateUpdate", + "optional": false, + "type": "EmailTemplateUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailTemplatesApiSendTestEmailByTypeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}/send_test_email" + }, + "EmailTemplatesApi.updateTemplateByType": { + "body": "emailTemplateUpdate", + "dispatchSha256": "518283a877c643f0bc520d10997a18de01434783189ff4dabac0b0b50449f8a1", + "generatedMethod": "EmailTemplatesApi.updateTemplateByType", + "implementationSha256": "0c7e8672d530fbefad68d00acf8c62cb385939dcae7925ed7bfe34814819632c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "templateType", + "optional": false, + "type": "EmailTemplateType" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "emailTemplateUpdate", + "optional": false, + "type": "EmailTemplateUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EmailTemplatesApiUpdateTemplateByTypeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}" + }, + "EnvironmentsApi.copyEnvironment": { + "body": "environmentCopy", + "dispatchSha256": "b7ab54ed3158e5fb2a01696da991864c0d4b64714767bcf0ff670e62c63d1866", + "generatedMethod": "EnvironmentsApi.copyEnvironment", + "implementationSha256": "9effdaf93e20006e3ef37ec27d5dc67c112eb69732943333af7019c37cff5ffc", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentCopy", + "optional": false, + "type": "EnvironmentCopy" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiCopyEnvironmentRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}/copy" + }, + "EnvironmentsApi.copyEnvironmentAsync": { + "body": "environmentCopy", + "dispatchSha256": "a35e08848110bb2fee5e1bded74924a058f2581b95d0393bf56ad92e324d8ea8", + "generatedMethod": "EnvironmentsApi.copyEnvironmentAsync", + "implementationSha256": "472bd92b1afd68085b779ffeab21b6a27e2912f28d758e60c07252da71ff4430", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentCopy", + "optional": false, + "type": "EnvironmentCopy" + }, + { + "initializer": null, + "name": "wait", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiCopyEnvironmentAsyncRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}/copy/async" + }, + "EnvironmentsApi.createEnvironment": { + "body": "environmentCreate", + "dispatchSha256": "f84e7728bd59cd5c11d434605fd5e402489a9c9a66a4fd43c5bec81c54f07059", + "generatedMethod": "EnvironmentsApi.createEnvironment", + "implementationSha256": "d3127475006b50b7d8f0d43e1732077aae2ac7168e50667a36643af420046030", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentCreate", + "optional": false, + "type": "EnvironmentCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiCreateEnvironmentRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs" + }, + "EnvironmentsApi.deleteEnvironment": { + "body": null, + "dispatchSha256": "17d16956e4800802d846609dc20d27fad390f7a12acb26e4f28b4ddaff78f01b", + "generatedMethod": "EnvironmentsApi.deleteEnvironment", + "implementationSha256": "78777dbb36c08723451b815a8217e6f3dd51e376cf040e62e2cc08b22a659c3d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiDeleteEnvironmentRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}" + }, + "EnvironmentsApi.getCopyEnvironmentAsyncResult": { + "body": null, + "dispatchSha256": "c1dcf67187c5fd7348dcebb8ba0c32e604ae75b6e1979f27af6c9dd1cef9636d", + "generatedMethod": "EnvironmentsApi.getCopyEnvironmentAsyncResult", + "implementationSha256": "43189910e190c01f2854faf47d7ba32a94d8a8eb4c4ee9b03b91bc8a188f756c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "taskId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "wait", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiGetCopyEnvironmentAsyncResultRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result" + }, + "EnvironmentsApi.getEnvironment": { + "body": null, + "dispatchSha256": "d1c9cb10f645dc03fb97ae813e02efd59330eb0fa15f381143f18c8c34bc941d", + "generatedMethod": "EnvironmentsApi.getEnvironment", + "implementationSha256": "a5bc742262c7a18446a20c8a6a1a6bc1f93704a1b09fa59a29a4efaeddb48451", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiGetEnvironmentRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}" + }, + "EnvironmentsApi.listEnvironments": { + "body": null, + "dispatchSha256": "64d2685184ad6b86d1456667573d0d623651ab2c1105e3ef339dff82fe76468a", + "generatedMethod": "EnvironmentsApi.listEnvironments", + "implementationSha256": "16ddc06f8984b5d2f487e75540d58a1342193149b1355b8337da1d2d42d66279", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiListEnvironmentsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs" + }, + "EnvironmentsApi.statsEnvironments": { + "body": null, + "dispatchSha256": "8db417d71fdf37fbbd77054f0ba381be4e069c11d532bb0c5f3bc046f52cac66", + "generatedMethod": "EnvironmentsApi.statsEnvironments", + "implementationSha256": "f071f6b8fee3d44a432e61764789a5adb847a90a3d9f1be281ee13e8d9482349", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiStatsEnvironmentsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}/stats" + }, + "EnvironmentsApi.testJwksByUrl": { + "body": null, + "dispatchSha256": "e22e07c39582882bf5749f972b998ee79d240cacec9580e76b938a608070efbc", + "generatedMethod": "EnvironmentsApi.testJwksByUrl", + "implementationSha256": "3cdc5c7e6e319122baa95b191e812679dd50a2eb7294b8091a84e72e54b31003", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "url", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiTestJwksByUrlRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}/test_jwks" + }, + "EnvironmentsApi.updateEnvironment": { + "body": "environmentUpdate", + "dispatchSha256": "f8ddd8e938f4e45332d728d158b052ed747d16a049d210f9d8a77620aa5356fe", + "generatedMethod": "EnvironmentsApi.updateEnvironment", + "implementationSha256": "393582aacedca3f197db9300300e6ff585595cd56a24f293659092f76e74a329", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentUpdate", + "optional": false, + "type": "EnvironmentUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "EnvironmentsApiUpdateEnvironmentRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/envs/{env_id}" + }, + "GroupsApi.assignGroupToGroup": { + "body": "groupAssignment", + "dispatchSha256": "57e26b2d5f9dc91b41e510ad4d2f13eac839a2eba506a6a06a186c375b4f58ea", + "generatedMethod": "GroupsApi.assignGroupToGroup", + "implementationSha256": "e07caac18e8edecef440980297287de66d55416f0ba0c8563e6de434f031e8cd", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupAssignment", + "optional": false, + "type": "GroupAssignment" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiAssignGroupToGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group" + }, + "GroupsApi.assignRoleToGroup": { + "body": "groupAddRole", + "dispatchSha256": "877b8ca49ac618d48c123669f0ef6b217b176c598c29ce1d0047d0a1e0bf0c1f", + "generatedMethod": "GroupsApi.assignRoleToGroup", + "implementationSha256": "9cda7b07f9f11592de5f427a5b852a039ae0ae227213b3ad982ad2f01eaf9964", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupAddRole", + "optional": false, + "type": "GroupAddRole" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiAssignRoleToGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + }, + "GroupsApi.assignUserToGroup": { + "body": "groupAssignUser", + "dispatchSha256": "e34b1a2988358ed299029c102621fc62bc4fc16c29d81f190af1752849bb5cc2", + "generatedMethod": "GroupsApi.assignUserToGroup", + "implementationSha256": "d88789d4f3a1f4547845d812d77fccd4fd9553716df9f7d31fc36a86cfe5a788", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupAssignUser", + "optional": false, + "type": "GroupAssignUser" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiAssignUserToGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}" + }, + "GroupsApi.createGroup": { + "body": "groupCreate", + "dispatchSha256": "98aa28b25871f837fb1590437d66d3d7435fa16ced0361071acd7220f6f7b17f", + "generatedMethod": "GroupsApi.createGroup", + "implementationSha256": "ae2358d84d94f531ba9e684b8b97069c54af59e95ef75ac2c44557cde8b432bf", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupCreate", + "optional": false, + "type": "GroupCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiCreateGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups" + }, + "GroupsApi.deleteGroup": { + "body": null, + "dispatchSha256": "402293235bacb00a269cab65ebf4325c2d483a3517f43d91e80884e5eb6fb821", + "generatedMethod": "GroupsApi.deleteGroup", + "implementationSha256": "b6f9bc62e745eabf605be073b9e8e9b3d5d6e3704554b212df48e11c143a02f9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiDeleteGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}" + }, + "GroupsApi.getDirectGroup": { + "body": null, + "dispatchSha256": "09fb5d4796dc91d36d38ee9f5e6e2530d740c61062cfdb595e21afc5f7a36d7f", + "generatedMethod": "GroupsApi.getDirectGroup", + "implementationSha256": "6849a33a73ec7317fad8cefaa1293475581c9e469388265f211515c71e87e1f9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiGetDirectGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}" + }, + "GroupsApi.getGroup": { + "body": null, + "dispatchSha256": "bf5cfa206438100884f67ed8cdaafe955b8fbf1a152853cc501c06ce86199c0a", + "generatedMethod": "GroupsApi.getGroup", + "implementationSha256": "03df8cd3ec71ac0033f7cc4fd750fd3610114c93fb08fa25fcaa4d61e0d11f9f", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiGetGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}" + }, + "GroupsApi.listDirectGroup": { + "body": null, + "dispatchSha256": "b2f42a72a776804a8047028c40e3b01032c0a07ad85cb76790cb747af2e41386", + "generatedMethod": "GroupsApi.listDirectGroup", + "implementationSha256": "a5cfccca53aaa4e6ccc0045655b014ee49f34c93a56369cea187eb4701fd3a18", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiListDirectGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/direct" + }, + "GroupsApi.listGroup": { + "body": null, + "dispatchSha256": "80c15c74ab2de66843d928e290b956f1d65a9419f58f05218cb5847a2cffe6f1", + "generatedMethod": "GroupsApi.listGroup", + "implementationSha256": "c56608a7fbc391ef7b9d3cdf247530885db4e66b9b30f70e4c94c1f43c78cfd6", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiListGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups" + }, + "GroupsApi.listGroupChildren": { + "body": null, + "dispatchSha256": "b04d8320a16858106a6bdce4e80ae1ee36a5d46c441e4b02e39d68ebde87f4ac", + "generatedMethod": "GroupsApi.listGroupChildren", + "implementationSha256": "c55043888c25fee0a3bc37729d1059a4ef6babb6aafdc86896f7e9c99b05bae9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiListGroupChildrenRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/children" + }, + "GroupsApi.listGroupParents": { + "body": null, + "dispatchSha256": "976b1d25ee3e076303c6acf3ecb96db44d142165161cc75cfcf33c502f2719b0", + "generatedMethod": "GroupsApi.listGroupParents", + "implementationSha256": "73b102c6893de4e9e813349806b5e188fe5dca4c52fe781e5f572f309a775f5b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiListGroupParentsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/parents" + }, + "GroupsApi.listGroupRoles": { + "body": null, + "dispatchSha256": "5a050c5ee7f06748f9066195110ab07fa585e91281e4316efe67641ceab3a230", + "generatedMethod": "GroupsApi.listGroupRoles", + "implementationSha256": "8cdcef71fbd2213e0e62f02e835d62666cfafdcc9f960e2b4213e12dc8bf55bc", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiListGroupRolesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + }, + "GroupsApi.listGroupUsers": { + "body": null, + "dispatchSha256": "de80dd860db21deff4de6413b4b9a17eb4dd6567eb7669758f9f204b0fcc56df", + "generatedMethod": "GroupsApi.listGroupUsers", + "implementationSha256": "90a05f50d6a4cd983bff777512dfcb5060061fadc6a96bb2eed4ced6a909e8c2", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiListGroupUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users" + }, + "GroupsApi.removeGroupFromGroup": { + "body": "groupAssignment", + "dispatchSha256": "93a9d13d2eab87eaf3745b8b169f496fdb0dddf9be6b535a79c195937f86cb85", + "generatedMethod": "GroupsApi.removeGroupFromGroup", + "implementationSha256": "dad6fbefab08066659ae15fc619a4095262ab23c2e6b7d44c71d79ae8b7b0b6c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupAssignment", + "optional": false, + "type": "GroupAssignment" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiRemoveGroupFromGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group" + }, + "GroupsApi.removeRoleFromGroup": { + "body": "groupAddRole", + "dispatchSha256": "af24bfcccd2e8d57cdc5981495d66c69ac4ce81ef1ac46e5365f91c0a0be8c15", + "generatedMethod": "GroupsApi.removeRoleFromGroup", + "implementationSha256": "5da5c6b44aff45834f4a5927b964053f8b32d47c564b0b32684f39586b0b7fb2", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupAddRole", + "optional": false, + "type": "GroupAddRole" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiRemoveRoleFromGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + }, + "GroupsApi.removeUserFromGroup": { + "body": "groupAssignUser", + "dispatchSha256": "2306ee5f1e4e8a2baa464def746d21ae28eb4c316ab1904a9f90e642083d7657", + "generatedMethod": "GroupsApi.removeUserFromGroup", + "implementationSha256": "1278c6d3f98380439f0d0c24487f8cf0bc47b299b4b0bf2ee5c2b4b4ed972f9d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupInstanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupAssignUser", + "optional": false, + "type": "GroupAssignUser" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "GroupsApiRemoveUserFromGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}" + }, + "ImplicitGrantsApi.createImplicitGrant": { + "body": "derivedRoleRuleCreate", + "dispatchSha256": "db00f3455fb3315f04deb9ee513b2a9234950724ef61c160772668252690a70d", + "generatedMethod": "ImplicitGrantsApi.createImplicitGrant", + "implementationSha256": "919dc598ea26fcf019f4b0119b016768c39585bba93b203c4bd2113f0efb2de9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "derivedRoleRuleCreate", + "optional": false, + "type": "DerivedRoleRuleCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ImplicitGrantsApiCreateImplicitGrantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants" + }, + "ImplicitGrantsApi.deleteImplicitGrant": { + "body": "derivedRoleRuleDelete", + "dispatchSha256": "883659ce8a0ead400b689097f844852b5946323ec5043390c5cd04b55e0c29ca", + "generatedMethod": "ImplicitGrantsApi.deleteImplicitGrant", + "implementationSha256": "d232682572fc56d21f9937f5bfb0f39399a7ade2dfb1e173076684c2cf128b14", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "derivedRoleRuleDelete", + "optional": false, + "type": "DerivedRoleRuleDelete" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ImplicitGrantsApiDeleteImplicitGrantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants" + }, + "ImplicitGrantsApi.updateImplicitGrantsConditions": { + "body": "permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings", + "dispatchSha256": "b6fa62cdf7386e9ccae9545fd9261903a36db4822b001f7c91271c35871590d1", + "generatedMethod": "ImplicitGrantsApi.updateImplicitGrantsConditions", + "implementationSha256": "179801a6c91cb8840116d19375a0f71c7758863fe0036a7e455ad41e8da11cb9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings", + "optional": false, + "type": "PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions" + }, + "InvitesApi.cancelInvite": { + "body": null, + "dispatchSha256": "db17c589864026b8b29aeb2a0a95d551d0a4545fd51ea9709cd27300037878c7", + "generatedMethod": "InvitesApi.cancelInvite", + "implementationSha256": "b61a52a05a6021181a6c6f69c3c7966455ccf744f9572a2715cc13317eb2912c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "inviteId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "InvitesApiCancelInviteRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}/invites/{invite_id}" + }, + "InvitesApi.inviteMembersToOrganization": { + "body": "inviteCreate", + "dispatchSha256": "1e17bc13273b41b5c25a78e4dfa7632817eab541f5ad9244767803f4cea26c0b", + "generatedMethod": "InvitesApi.inviteMembersToOrganization", + "implementationSha256": "4b237478a149b09b7f98f5167f5446a5a714db6e7afc2c7ce51bd2de4e89d97e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "inviteCreate", + "optional": false, + "type": "Array" + }, + { + "initializer": null, + "name": "inviterName", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "inviterEmail", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "InvitesApiInviteMembersToOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}/invites" + }, + "InvitesApi.listOrganizationInvites": { + "body": null, + "dispatchSha256": "e23e3607fb0265e68c1e92b9cbca768eb98fea236e0c2d9efa21bd614a12c12d", + "generatedMethod": "InvitesApi.listOrganizationInvites", + "implementationSha256": "d9de9f2970679e4b9f6469149ac863b09f7f0997967c8be3598e53264f82ac2b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "InvitesApiListOrganizationInvitesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}/invites" + }, + "MembersApi.createOrganizationMembers": { + "body": "orgMemberCreate", + "dispatchSha256": "ca6f5785207e33e3cd87c31e857584b90db9b130505b02d6234a65704c473e8f", + "generatedMethod": "MembersApi.createOrganizationMembers", + "implementationSha256": "26a9776dcc35e7fad8076f2ae6904191a5f19401186cb2d5ef174aad5d1054e9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgMemberCreate", + "optional": false, + "type": "OrgMemberCreate" + }, + { + "initializer": null, + "name": "inviterName", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "inviterEmail", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "MembersApiCreateOrganizationMembersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members" + }, + "MembersApi.deleteOrganizationMember": { + "body": null, + "dispatchSha256": "cc72bfceef97805674557df933e91edb85251d22a28dcaba01ae8de61540cabe", + "generatedMethod": "MembersApi.deleteOrganizationMember", + "implementationSha256": "3d2b5df9639f78f0422c95beabe085f7ccb5ef0a398a22a3106f157ec0ffe036", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "memberId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "MembersApiDeleteOrganizationMemberRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members/{member_id}" + }, + "MembersApi.deleteOrganizationPermissions": { + "body": "orgMemberRemovePermissions", + "dispatchSha256": "8f15943e1783d316b5ca3c72a5c2d55326f6623c293a4ece19ac82cec5a55604", + "generatedMethod": "MembersApi.deleteOrganizationPermissions", + "implementationSha256": "207df43c0792b7347c56a5fa744aeac4dc43d336526485290f385eaef6e51cdd", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgMemberRemovePermissions", + "optional": false, + "type": "OrgMemberRemovePermissions" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "MembersApiDeleteOrganizationPermissionsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members" + }, + "MembersApi.getAuthenticatedMember": { + "body": null, + "dispatchSha256": "108a8a829ec996b4205d5cbd2b0c36167d640618cace5ca72295e0782d637403", + "generatedMethod": "MembersApi.getAuthenticatedMember", + "implementationSha256": "6218c9d88aac19fb3268915986cc10acedc95fbceb0ced9cff4c79fe24e86653", + "input": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members/me" + }, + "MembersApi.getOrganizationMember": { + "body": null, + "dispatchSha256": "591f10e5e2505b5ec4a74ef24396b8e2c5bb13ebf4c951da961a30e2003117dc", + "generatedMethod": "MembersApi.getOrganizationMember", + "implementationSha256": "df7c295e0c3a12b3438f12befb3543aa7f81d7a3fb16fb6f5e96845e29a5d927", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "memberId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "MembersApiGetOrganizationMemberRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members/{member_id}" + }, + "MembersApi.listOrganizationMembers": { + "body": null, + "dispatchSha256": "9a820149c41f03a0fd2fa39b42689ecdf1456a35145b2dab40b612a014df85e0", + "generatedMethod": "MembersApi.listOrganizationMembers", + "implementationSha256": "04aa70258e9c0bce5e5686bd41769bfd46a9c489a9f212013e75227d26a4919a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectId", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "MembersApiListOrganizationMembersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members" + }, + "MembersApi.updateOrganizationMember": { + "body": "orgMemberUpdate", + "dispatchSha256": "4629de4aeb04a0962ae04e341fa736ae6e86efe0f3660137493474788d849845", + "generatedMethod": "MembersApi.updateOrganizationMember", + "implementationSha256": "07ef79d8e1696a448ee9d653be3e5f7f59afd47c36d5adb659d7aec3d2cd292d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "memberId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "orgMemberUpdate", + "optional": false, + "type": "OrgMemberUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "MembersApiUpdateOrganizationMemberRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/members/{member_id}" + }, + "OPALDataEAPApi.getAllData": { + "body": null, + "dispatchSha256": "47bc73260edf8ed9ab851fd93d229202a22812e2001a0b44b1132dd48cf21272", + "generatedMethod": "OPALDataEAPApi.getAllData", + "implementationSha256": "8729a2f352e194eec29575a86468a424a5273da4a0c31d13e97d77b3e0ab66c5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "timeout", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OPALDataEAPApiGetAllDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}" + }, + "OPALDataEAPApi.getAllDataOptimized": { + "body": null, + "dispatchSha256": "bbc09661c752b51350dcaf3c6c2e3a24b5ec44c4580008b4a4919922842b9f98", + "generatedMethod": "OPALDataEAPApi.getAllDataOptimized", + "implementationSha256": "2bd3b9310e4ad8419b60116da14f9b5f328d20349f073a657c20c38b8475b3d4", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OPALDataEAPApiGetAllDataOptimizedRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/optimized" + }, + "OPALDataEAPApi.getAllRelationshipsData": { + "body": null, + "dispatchSha256": "93ab0de521e7827ab4ca8c94ccc273b7fc04315b3e246c32aa82aed8fc332bee", + "generatedMethod": "OPALDataEAPApi.getAllRelationshipsData", + "implementationSha256": "525dbc47ec6629f5d454db64a671f21eaa7bcb493b995678b9841897866dcc85", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "timeout", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OPALDataEAPApiGetAllRelationshipsDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/relationships" + }, + "OPALDataEAPApi.getAllResourceInstancesData": { + "body": null, + "dispatchSha256": "8ac198b0e166f9ee9f686bec34c83c932346096f0f7aecde6571a1d64c2cc19f", + "generatedMethod": "OPALDataEAPApi.getAllResourceInstancesData", + "implementationSha256": "415ac8dee56dc0d4218967c2d5883a21b7d174c6823426611495003374bc74a3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "timeout", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OPALDataEAPApiGetAllResourceInstancesDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_instances" + }, + "OPALDataEAPApi.getAllRoleAssignmentsData": { + "body": null, + "dispatchSha256": "af84b621f5e36b82632c6277175c7d6bb2e3770e80780a9e99c5667be854b533", + "generatedMethod": "OPALDataEAPApi.getAllRoleAssignmentsData", + "implementationSha256": "11177931915b439f6bf7994b75c923fbe505a3bbe716a088a2117c6ab07a48fc", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "timeout", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OPALDataEAPApiGetAllRoleAssignmentsDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/role_assignments" + }, + "OPALDataEAPApi.getAllUsersData": { + "body": null, + "dispatchSha256": "dfe5877fb4d1d6df84a76031aedaa1bdd39e4ede8020e8c5c21639253597b503", + "generatedMethod": "OPALDataEAPApi.getAllUsersData", + "implementationSha256": "e207ee40532f67e84f4c2395a66f5da7c1f95efb31bd06ab581e1269c594b1c1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "timeout", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OPALDataEAPApiGetAllUsersDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users" + }, + "OperationApprovalEAPApi.approveOperationApproval": { + "body": "operationApprovalReview", + "dispatchSha256": "949e4bac4abbf58d660151001eb8e97e5a504142a39a3d1a9755775ae3740547", + "generatedMethod": "OperationApprovalEAPApi.approveOperationApproval", + "implementationSha256": "c41aa88f1618ebd75c23687ea88e512525e6d4252cb2753f8d7bdaeb83d2dbba", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "operationApprovalId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "operationApprovalReview", + "optional": false, + "type": "OperationApprovalReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiApproveOperationApprovalRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/approve" + }, + "OperationApprovalEAPApi.cancelOperationApproval": { + "body": null, + "dispatchSha256": "648db2562b00a75b52ec17a55a16780217bc9e104015f8723a42d223dd2ef755", + "generatedMethod": "OperationApprovalEAPApi.cancelOperationApproval", + "implementationSha256": "4cc0005b449caa4a9b9c5f1a6e0bf5af5520197a1f11ca9a7ce746167b756c8e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "operationApprovalId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiCancelOperationApprovalRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/cancel" + }, + "OperationApprovalEAPApi.createOperationApproval": { + "body": "operationApprovalUserCreate", + "dispatchSha256": "fac451bdb7e2bf4f31a3d3edbf7c2dd5182dafd4dd16bb6d6e1eeb1053cffd04", + "generatedMethod": "OperationApprovalEAPApi.createOperationApproval", + "implementationSha256": "1238d3082cebe8e25be40139fa1c304c689df819e809dc6b818efc98eafc24f7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "operationApprovalUserCreate", + "optional": false, + "type": "OperationApprovalUserCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiCreateOperationApprovalRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval" + }, + "OperationApprovalEAPApi.denyOperationApproval": { + "body": "operationApprovalReview", + "dispatchSha256": "85c1d7ddb432f3a7b45b550d2b45f6016be23b49f0ffd4ae3515edf20bfad952", + "generatedMethod": "OperationApprovalEAPApi.denyOperationApproval", + "implementationSha256": "bac6d6fc81a75ee38911bfe4868fcc0cf154b53e21110569200c234759b7b03d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "operationApprovalId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "operationApprovalReview", + "optional": false, + "type": "OperationApprovalReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiDenyOperationApprovalRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/deny" + }, + "OperationApprovalEAPApi.getOperationApproval": { + "body": null, + "dispatchSha256": "5baa217a13804ab3b4d1be2d1cf93dc74a619e2c3a2ac21f358bc24bdff2dc37", + "generatedMethod": "OperationApprovalEAPApi.getOperationApproval", + "implementationSha256": "6d250b9d2c426e2d78446818e4dfaa179932cd58b834381aaa94b66fe4ccf18c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "operationApprovalId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiGetOperationApprovalRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}" + }, + "OperationApprovalEAPApi.listOperationApprovals": { + "body": null, + "dispatchSha256": "5efb597e73e173f563f2a5f0a3f9cc03e7457b8319cdfa46abbbbc4be9a7717c", + "generatedMethod": "OperationApprovalEAPApi.listOperationApprovals", + "implementationSha256": "16331f66d9d822cb780bb5f38f2dd09b8498a040eac24d0777564e5c60aebd68", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "status", + "optional": true, + "type": "RequestStatus" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstance", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiListOperationApprovalsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval" + }, + "OperationApprovalEAPApi.updateOperationApprovalReviewer": { + "body": "operationApprovalReview", + "dispatchSha256": "6c41e5832cca26ad5169d83c01f8a9c439015e4feb12e02e6c02439cd26a6797", + "generatedMethod": "OperationApprovalEAPApi.updateOperationApprovalReviewer", + "implementationSha256": "c47cf282f79ef71f986fc6abee77d2281ae6d5e8871e66e4718a0bd0b4fa059a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "operationApprovalId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "operationApprovalReview", + "optional": false, + "type": "OperationApprovalReview" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/reviewer" + }, + "OrganizationsApi.createOrganization": { + "body": "organizationCreate", + "dispatchSha256": "9dbf13c1d0288bc522132dd4e5122de5693612d58b03455330b36d2c8d99daa3", + "generatedMethod": "OrganizationsApi.createOrganization", + "implementationSha256": "187be5f4919cd88d70442ed3f6fa1696829fa9bea962964132e15c356595b3cd", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "organizationCreate", + "optional": false, + "type": "OrganizationCreate" + }, + { + "initializer": null, + "name": "pageFullUrl", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OrganizationsApiCreateOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs" + }, + "OrganizationsApi.deleteOrganization": { + "body": null, + "dispatchSha256": "c92109c60e604c0bc1656b51b11b909e28217a7025a5de87f76fab38637b0b19", + "generatedMethod": "OrganizationsApi.deleteOrganization", + "implementationSha256": "e000f2361d7d7d719d55978a3d6dd8fd937c957fa2dbbf2c5c525933c1c6c917", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OrganizationsApiDeleteOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}" + }, + "OrganizationsApi.getActiveOrganization": { + "body": null, + "dispatchSha256": "69f502f878962b11162a6c2b0fed64f2f89761c4800dd3b691c311054dd493f9", + "generatedMethod": "OrganizationsApi.getActiveOrganization", + "implementationSha256": "d0d6a6bf2d19d312621f52af19f50cde7304d3a8f8eb5c644b0524d0149cfa65", + "input": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/active/org" + }, + "OrganizationsApi.getOrganization": { + "body": null, + "dispatchSha256": "71d7e2040ac8aedd1bb0de30916b0c7301d3e71269c73646c137e1f382c16ce5", + "generatedMethod": "OrganizationsApi.getOrganization", + "implementationSha256": "56f1271f74a0af580f33a4414fb0e0a8fdc038c8f826d105d544afc0533ea694", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OrganizationsApiGetOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}" + }, + "OrganizationsApi.listOrganizations": { + "body": null, + "dispatchSha256": "3cfe1271521b5bec7ebd5cbfddb2ed5059ee1e05e8a14eef6f8bbbf3e5228b0c", + "generatedMethod": "OrganizationsApi.listOrganizations", + "implementationSha256": "ea8904f24685b0ed717dd8cd1bdcb1a99864caa6f34c51ae455a0b17f2eaaf5f", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "search", + "optional": true, + "type": "Search" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "OrganizationsApiListOrganizationsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs" + }, + "OrganizationsApi.restoreOrganization": { + "body": null, + "dispatchSha256": "0c7de7ded517dbde5e026c292f592ce48774f83fb4c275179c311dd73bcd4361", + "generatedMethod": "OrganizationsApi.restoreOrganization", + "implementationSha256": "bfd2361e0926d20f8be81997a737a9f0738f772be1cb0a907404732d0769a14a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OrganizationsApiRestoreOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}/restore" + }, + "OrganizationsApi.statsOrganization": { + "body": null, + "dispatchSha256": "0dc36bf8a690b4d77762f7a975a845f57f6d617fdbd5812fd1c13c4b0c4b05bd", + "generatedMethod": "OrganizationsApi.statsOrganization", + "implementationSha256": "51b34a0b2242c011e3ed4950a4f7399b6b56c07992a00871b5ea2e9d2308d3f5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OrganizationsApiStatsOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}/stats" + }, + "OrganizationsApi.updateOrganization": { + "body": "organizationUpdate", + "dispatchSha256": "13402d72082d3989d3e5026744261b05c5211e53c4c830bf8ede331656cce549", + "generatedMethod": "OrganizationsApi.updateOrganization", + "implementationSha256": "4797557cbea93db0cce82286110d4c397be6e5bc2763755b20634f33eee638f6", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "orgId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "organizationUpdate", + "optional": false, + "type": "OrganizationUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "OrganizationsApiUpdateOrganizationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/orgs/{org_id}" + }, + "PolicyDecisionPointsApi.disableDebugAuditLogs": { + "body": null, + "dispatchSha256": "f65e3c390bb48dfcdfbe17a87bd72b1c61773fcccf5af9de7a2837d06e230337", + "generatedMethod": "PolicyDecisionPointsApi.disableDebugAuditLogs", + "implementationSha256": "88da8ead232e71c7f73bf57768296a2209e1b86db2ec7a99134df55fca6ced4f", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pdpId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiDisableDebugAuditLogsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/disable" + }, + "PolicyDecisionPointsApi.enableDebugAuditLogs": { + "body": null, + "dispatchSha256": "777257f66cee03dec146546e2fdc486cde629a46ff0eec84777124edb97496b1", + "generatedMethod": "PolicyDecisionPointsApi.enableDebugAuditLogs", + "implementationSha256": "f80362fdf2ed25431de4822b1e3afa93f25fe20254677a827f22934bc2a819bd", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pdpId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiEnableDebugAuditLogsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/enable" + }, + "PolicyDecisionPointsApi.getPdpConfigValues": { + "body": null, + "dispatchSha256": "74e4a3a0b1ea6d1af778dd2a597ce240e6ade51dab614b950c70dfd3951f0004", + "generatedMethod": "PolicyDecisionPointsApi.getPdpConfigValues", + "implementationSha256": "6558a3230ddf7ad5f903597e9e1cee2ca964467b57053de390c18ecb3cb56c7f", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pdpId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "xShardID", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiGetPdpConfigValuesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/values" + }, + "PolicyDecisionPointsApi.listPdpConfigs": { + "body": null, + "dispatchSha256": "b6be94025e7b165a5c93a097331ed734b5dc2e634cb41b7727c64a07ebc0b3fc", + "generatedMethod": "PolicyDecisionPointsApi.listPdpConfigs", + "implementationSha256": "167fd2ee85e77499b20a60f23d5eac7e9b9881a0e56a5c9cdb4dd90b58cfe7b1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiListPdpConfigsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs" + }, + "PolicyDecisionPointsApi.migrateShards": { + "body": "pDPShardMigration", + "dispatchSha256": "65e10f9c65caddd57c4bd7c6f42fd9e8689c0d870836db67338ea9c2204daf96", + "generatedMethod": "PolicyDecisionPointsApi.migrateShards", + "implementationSha256": "3f9c3a188fa9a5a00bfa750dabb9a86cb4bf4acf374e9aa1ee1cc0f4632873b0", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pDPShardMigration", + "optional": false, + "type": "PDPShardMigration" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiMigrateShardsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/migrate-shards" + }, + "PolicyDecisionPointsApi.refreshEnvironmentPdpData": { + "body": "pDPDataRefreshRequest", + "dispatchSha256": "71e003e3287f5bbdebf33daad205ff5661e349df1ad7549cd473588bd7744dd8", + "generatedMethod": "PolicyDecisionPointsApi.refreshEnvironmentPdpData", + "implementationSha256": "da8fdb057210f41dcd1bcda002406b2123529395704a92554774eee5a9470e43", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pDPDataRefreshRequest", + "optional": true, + "type": "PDPDataRefreshRequest" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/refresh" + }, + "PolicyDecisionPointsApi.refreshPdpData": { + "body": "pDPDataRefreshRequest", + "dispatchSha256": "165e54a8855fe06b23426868105d471d5bfcd51bdef5cd5d4c24572547675f15", + "generatedMethod": "PolicyDecisionPointsApi.refreshPdpData", + "implementationSha256": "af4dd7f4633ce76ad7252b82e390c701380564fee620a766e431fbda6f5e47e9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pdpId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pDPDataRefreshRequest", + "optional": true, + "type": "PDPDataRefreshRequest" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiRefreshPdpDataRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/refresh" + }, + "PolicyDecisionPointsApi.rotatePdpApiKey": { + "body": null, + "dispatchSha256": "400214c54f97e79d55aec581f89c0e3714213020b8059a27744501dda42d3e68", + "generatedMethod": "PolicyDecisionPointsApi.rotatePdpApiKey", + "implementationSha256": "303ac07b69c2fbd7445b04c647a8a646579fc6c0f00b08d9b6f7d146d3dff298", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "pdpId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyDecisionPointsApiRotatePdpApiKeyRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/rotate-api-key" + }, + "PolicyGitRepositoriesApi.activatePolicyRepo": { + "body": null, + "dispatchSha256": "e21d12fc6dcff4a3b0e571184a511133dd1141d1244734e20913c260dc3767ab", + "generatedMethod": "PolicyGitRepositoriesApi.activatePolicyRepo", + "implementationSha256": "fc1b9885755b35a4d45701f62f8d8bf84371539ab38cec5e692e98de5bb5d375", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "repoId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiActivatePolicyRepoRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos/{repo_id}/activate" + }, + "PolicyGitRepositoriesApi.createPolicyRepo": { + "body": "policyRepoCreate", + "dispatchSha256": "87ef01068c8081f83ff91bc4e33d84906693edf753b3883a596e20744bb2c71e", + "generatedMethod": "PolicyGitRepositoriesApi.createPolicyRepo", + "implementationSha256": "5acc38fdc485c3ddc5d8fe2370b8f279df65a9e1fbfe912584751550c4a011a1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "policyRepoCreate", + "optional": false, + "type": "PolicyRepoCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiCreatePolicyRepoRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos" + }, + "PolicyGitRepositoriesApi.deletePolicyRepo": { + "body": null, + "dispatchSha256": "054009271f4381826b6eab2285119b7683c8d492144520ba30855eeb90c7dfe6", + "generatedMethod": "PolicyGitRepositoriesApi.deletePolicyRepo", + "implementationSha256": "00f3c671837afcdf15ba19d49564a2b01e76eb2cbbb1ac960af9af776ffc96e1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "repoId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiDeletePolicyRepoRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos/{repo_id}" + }, + "PolicyGitRepositoriesApi.disableActivePolicyRepo": { + "body": null, + "dispatchSha256": "f16d57016df812c16ae4a0089a3b17a117060f5b55d237f2ed86d1d6458050bb", + "generatedMethod": "PolicyGitRepositoriesApi.disableActivePolicyRepo", + "implementationSha256": "08f08f862a24a0ccd7cd0aa6d5c755cfcc20978b8658b58c059c8f9cc4390d31", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiDisableActivePolicyRepoRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos/disable" + }, + "PolicyGitRepositoriesApi.getActivePolicyRepo": { + "body": null, + "dispatchSha256": "17a5303fcaa167b6c69ca660e0f3e775ddc3cc0b26074279d28f32356cd1581f", + "generatedMethod": "PolicyGitRepositoriesApi.getActivePolicyRepo", + "implementationSha256": "bed020777921fe270d8126bc9778582f1c88b1fc5599cd2589a5a1e4d578ea12", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiGetActivePolicyRepoRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos/active" + }, + "PolicyGitRepositoriesApi.getPolicyRepo": { + "body": null, + "dispatchSha256": "7bca9a7f66ece601a293ee7e629dcd78eb4c6053943ac9104e04df11f349e62f", + "generatedMethod": "PolicyGitRepositoriesApi.getPolicyRepo", + "implementationSha256": "9458ec1bc27e8c95cb15136a6c02c04fef304673270e8c98ad163ae20bf9d3ae", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "repoId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiGetPolicyRepoRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos/{repo_id}" + }, + "PolicyGitRepositoriesApi.listPolicyRepos": { + "body": null, + "dispatchSha256": "84970a565d9a534cc28ec7473ba11f468ced587211125109eec517ad8431c7ca", + "generatedMethod": "PolicyGitRepositoriesApi.listPolicyRepos", + "implementationSha256": "99b0338ff6752788eb1c9e245a39d3145d02b29dcd628eba5fa571a5b078cbf8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGitRepositoriesApiListPolicyReposRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/repos" + }, + "PolicyGuardsEAPApi.associatePolicyGuardScope": { + "body": "policyGuardScopeAssociate", + "dispatchSha256": "f9f4455b616c537ee890519179df90f207533b5e27974c193eda02645231334b", + "generatedMethod": "PolicyGuardsEAPApi.associatePolicyGuardScope", + "implementationSha256": "c542ae5e045474b392636039ade14c3acde148785b954f31c3cefa5234d33148", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "policyGuardScopeAssociate", + "optional": false, + "type": "PolicyGuardScopeAssociate" + }, + { + "initializer": null, + "name": "wait", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}/associate" + }, + "PolicyGuardsEAPApi.createPolicyGuardRule": { + "body": "policyGuardRuleCreate", + "dispatchSha256": "ca8001a5a80b898f8f1a53579965cfc2261f0338b9e3f044da466ff3b65d4bf9", + "generatedMethod": "PolicyGuardsEAPApi.createPolicyGuardRule", + "implementationSha256": "423994f375a181579d9378d7f4e9a59822f007b7d1e3944e3b360dd5dc93a75e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "policyGuardRuleCreate", + "optional": false, + "type": "PolicyGuardRuleCreate" + }, + { + "initializer": null, + "name": "wait", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiCreatePolicyGuardRuleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}/rules" + }, + "PolicyGuardsEAPApi.createPolicyGuardScope": { + "body": "policyGuardScopeCreate", + "dispatchSha256": "40ac6d32df6e94f91e9e90602cfe0a428b97d5f8f39531d6fbb2c6dfa5806b67", + "generatedMethod": "PolicyGuardsEAPApi.createPolicyGuardScope", + "implementationSha256": "3ed2ec888880724c275d87b9d4e1e7608dd92ed8e48436b70322a1bcd2971755", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeCreate", + "optional": false, + "type": "PolicyGuardScopeCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiCreatePolicyGuardScopeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes" + }, + "PolicyGuardsEAPApi.deletePolicyGuardRule": { + "body": "policyGuardRuleItem", + "dispatchSha256": "3bd0695704f121644bfbc6680c387b5845e84e9e9e13f01a15c797b78f18b6bd", + "generatedMethod": "PolicyGuardsEAPApi.deletePolicyGuardRule", + "implementationSha256": "499e9f992f19094f28e5500ed51335f8ee5713f20d385deff7883a2b08148436", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "policyGuardRuleItem", + "optional": false, + "type": "PolicyGuardRuleItem" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiDeletePolicyGuardRuleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}/rules" + }, + "PolicyGuardsEAPApi.deletePolicyGuardScope": { + "body": null, + "dispatchSha256": "6e1f2f6463daa29bc9cd5614a940d5023b81d90dde3934689767a192096d8e98", + "generatedMethod": "PolicyGuardsEAPApi.deletePolicyGuardScope", + "implementationSha256": "fdb4bc775b131f95b47d148af309f26a9b4e73db9c724f5c28a05145188c1d49", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiDeletePolicyGuardScopeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}" + }, + "PolicyGuardsEAPApi.disassociatePolicyGuardScope": { + "body": "policyGuardScopeAssociate", + "dispatchSha256": "22ea37ce94d9d1e6a5ed3187c72bc59102f920f02f9df484b17d6450e6e7a389", + "generatedMethod": "PolicyGuardsEAPApi.disassociatePolicyGuardScope", + "implementationSha256": "6e8c3090ca0441b1a81d0b50d896836c76c57ebc2e95b14edea129b42dd56a3d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "policyGuardScopeAssociate", + "optional": false, + "type": "PolicyGuardScopeAssociate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}/disassociate" + }, + "PolicyGuardsEAPApi.getPolicyGuardScope": { + "body": null, + "dispatchSha256": "1143be2cd2ea06009b72b4472df69ce3bc726e6aeb76ab26a05b9979534b6e21", + "generatedMethod": "PolicyGuardsEAPApi.getPolicyGuardScope", + "implementationSha256": "065539c554e7dfffe7dea42a6281454354bbd7b1e56e54f780bd0a75b0ab1a21", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiGetPolicyGuardScopeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}" + }, + "PolicyGuardsEAPApi.listPolicyGuardRules": { + "body": null, + "dispatchSha256": "60aafbc2fb528a5c71061276762fbf97c7764274852029739c9a1ece35a94607", + "generatedMethod": "PolicyGuardsEAPApi.listPolicyGuardRules", + "implementationSha256": "4d03b7d9c110dafe73f7adf62a87906d35b20369cd3929f864e9aa8163ad5d72", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "policyGuardScopeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "PolicyGuardsEAPApiListPolicyGuardRulesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes/{policy_guard_scope_id}/rules" + }, + "PolicyGuardsEAPApi.listPolicyGuardScopes": { + "body": null, + "dispatchSha256": "56ff89299a36328c9be0f6487af1ac85ec1b01515f32a8d84f24430dbe066dda", + "generatedMethod": "PolicyGuardsEAPApi.listPolicyGuardScopes", + "implementationSha256": "63a23e7b7787f5b6b05414cffd536da6bc213b37d8eb742c382d865248908eb3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "PolicyGuardsEAPApiListPolicyGuardScopesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/policy_guards/scopes" + }, + "ProjectsApi.createProject": { + "body": "projectCreate", + "dispatchSha256": "4932a1ee7ba04fc458771e4754b8a7cdf5c1572e1effed47cfcb8bf1886d09bd", + "generatedMethod": "ProjectsApi.createProject", + "implementationSha256": "69610d3d415b73e089f44ac01a1960684383d0fb6d9cdba8e065cac7d21bb513", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectCreate", + "optional": false, + "type": "ProjectCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProjectsApiCreateProjectRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects" + }, + "ProjectsApi.deleteProject": { + "body": null, + "dispatchSha256": "d675be36c8c5a3726657722820f80c3dc8ad6467e74608acfbf591cd7e8f7877", + "generatedMethod": "ProjectsApi.deleteProject", + "implementationSha256": "43e042e540f6e7758448ef89252882d224a0d956e5a297fcf3eef97fe7da5b2b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProjectsApiDeleteProjectRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}" + }, + "ProjectsApi.getProject": { + "body": null, + "dispatchSha256": "d7bf1b31315530175bdf28d785b840ee88d39f001c158f14dc2c392203b92b82", + "generatedMethod": "ProjectsApi.getProject", + "implementationSha256": "468ab83a11e64a562db8bfc9b214ed27430c8f175d52045bcab1873a564842ea", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProjectsApiGetProjectRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}" + }, + "ProjectsApi.listProjects": { + "body": null, + "dispatchSha256": "e47ba9cfeaa5185780b8a8a25fb85c5aefcb7e222386676802b9aa26a2816e45", + "generatedMethod": "ProjectsApi.listProjects", + "implementationSha256": "a636836c837847cff2a1876ba7ef3a1e910309d4fb7c8e9643fa457daf6f119c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "requestParameters", + "optional": true, + "type": "ProjectsApiListProjectsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects" + }, + "ProjectsApi.updateProject": { + "body": "projectUpdate", + "dispatchSha256": "0c74bee5db065a1b6219de8dd84d517ea0d6a222f1df5d0955b70d1ba261146c", + "generatedMethod": "ProjectsApi.updateProject", + "implementationSha256": "e04c8e5034b37289cb2105ee7c8ead7cea6716ad9a083e8f862419137827b115", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projectUpdate", + "optional": false, + "type": "ProjectUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProjectsApiUpdateProjectRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}" + }, + "ProxyConfigApi.createProxyConfig": { + "body": "proxyConfigCreate", + "dispatchSha256": "dfdad91d09501a94134131b3c241545ebe09a5054c95e659426702693c879b71", + "generatedMethod": "ProxyConfigApi.createProxyConfig", + "implementationSha256": "0f24460f2c0fa9a2aca7fcec21472b6a43e72f27f706358ab2f29f1f40e59ca7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "proxyConfigCreate", + "optional": false, + "type": "ProxyConfigCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProxyConfigApiCreateProxyConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs" + }, + "ProxyConfigApi.deleteProxyConfig": { + "body": null, + "dispatchSha256": "ce6a2cfcf106a94e401f4c16bbc03088adf61076b73bfa2ac93ca859759bc153", + "generatedMethod": "ProxyConfigApi.deleteProxyConfig", + "implementationSha256": "8043d9c55c9386fb077582e1da3dd81ff52b6068906b1c5323feddfe11846ca3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProxyConfigApiDeleteProxyConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + }, + "ProxyConfigApi.getProxyConfig": { + "body": null, + "dispatchSha256": "894b1b3b745f29f1a742b6590fc5ffa5dcb22a8aca08d0204be6e21a3363908f", + "generatedMethod": "ProxyConfigApi.getProxyConfig", + "implementationSha256": "58d2ff34e602244f40d3817cec7f49506d3b7dc53697949e63a0877e46e81445", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProxyConfigApiGetProxyConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + }, + "ProxyConfigApi.listProxyConfigs": { + "body": null, + "dispatchSha256": "162edc5a61d1ad41b04e8f295f851d76111c413077922cb37cf8eaddb3d10bd5", + "generatedMethod": "ProxyConfigApi.listProxyConfigs", + "implementationSha256": "f4923f75829956f319903b97a2740693ba01d125a782eef0ea21b1cda0c70a12", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProxyConfigApiListProxyConfigsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs" + }, + "ProxyConfigApi.updateProxyConfig": { + "body": "proxyConfigUpdate", + "dispatchSha256": "5faf79e7a5b297d3468abaaa3b8749f85c4833b285bba25cb697a1720ecb8033", + "generatedMethod": "ProxyConfigApi.updateProxyConfig", + "implementationSha256": "b21a158d2550cf845b3898c6e839a6511dc22fbfac75cc737317436afc04ad73", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "proxyConfigUpdate", + "optional": false, + "type": "ProxyConfigUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ProxyConfigApiUpdateProxyConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + }, + "RelationshipTuplesApi.bulkCreateRelationshipTuples": { + "body": "relationshipTupleCreateBulkOperation", + "dispatchSha256": "7b3db0c72638dd4334ca9ae7021b8d87825470e078d358d18534524c17d507cc", + "generatedMethod": "RelationshipTuplesApi.bulkCreateRelationshipTuples", + "implementationSha256": "36da5b8828f76c4310ef343a78dfafc96eebfcd6a1fec0941ad4c5914318156b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationshipTupleCreateBulkOperation", + "optional": false, + "type": "RelationshipTupleCreateBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RelationshipTuplesApiBulkCreateRelationshipTuplesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk" + }, + "RelationshipTuplesApi.bulkDeleteRelationshipTuples": { + "body": "relationshipTupleDeleteBulkOperation", + "dispatchSha256": "96a50342a68f6f5c06d80b0642b9b7f7355cb3eef27af320a827dbed7e3f1003", + "generatedMethod": "RelationshipTuplesApi.bulkDeleteRelationshipTuples", + "implementationSha256": "793020beffa1d890b007f67eb6231c28c15e08e224f088cfccde9adafdd1430a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationshipTupleDeleteBulkOperation", + "optional": false, + "type": "RelationshipTupleDeleteBulkOperation" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk" + }, + "RelationshipTuplesApi.createRelationshipTuple": { + "body": "relationshipTupleCreate", + "dispatchSha256": "29db79fe3b1406c319886e93126593b640828c7dcd1273b376e3f349500ae4f1", + "generatedMethod": "RelationshipTuplesApi.createRelationshipTuple", + "implementationSha256": "c67cccec91a46ee15221736f42a70d2bf6b6491c997426f2004a7e4ecd09fb14", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationshipTupleCreate", + "optional": false, + "type": "RelationshipTupleCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RelationshipTuplesApiCreateRelationshipTupleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples" + }, + "RelationshipTuplesApi.deleteRelationshipTuple": { + "body": "relationshipTupleDelete", + "dispatchSha256": "8334acedb1c23e563cb30cd236509ce1888c690387cdd0c3da95c504bbfd6794", + "generatedMethod": "RelationshipTuplesApi.deleteRelationshipTuple", + "implementationSha256": "9efa606363bab1e41dec7246fdc87ec6761642fab5d297051ba40ea2819ce65b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationshipTupleDelete", + "optional": false, + "type": "RelationshipTupleDelete" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RelationshipTuplesApiDeleteRelationshipTupleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples" + }, + "RelationshipTuplesApi.listRelationshipTuples": { + "body": null, + "dispatchSha256": "6a74f3009151130f30f657460d65687505926aa04e0fb029bbf9503b40d8b320", + "generatedMethod": "RelationshipTuplesApi.listRelationshipTuples", + "implementationSha256": "cc3114baa484f69a6854b047f98f2b874767006e57ab04da9a6800e58777525c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "detailed", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "subject", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "relation", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "object", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "objectType", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "subjectType", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RelationshipTuplesApiListRelationshipTuplesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples" + }, + "RelationshipTuplesApi.listRelationshipTuplesDetailed": { + "body": null, + "dispatchSha256": "06256a1cf3c71d41f4dbcfc94cafbeb39efff19fec470c206556f3d5dc52ff71", + "generatedMethod": "RelationshipTuplesApi.listRelationshipTuplesDetailed", + "implementationSha256": "54220907dbfe3937c7c8e559c4fc36f652a788405dcdfd484e52ae7b23f250e4", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "subject", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "relation", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "object", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "objectType", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "subjectType", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RelationshipTuplesApiListRelationshipTuplesDetailedRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed" + }, + "ResourceActionGroupsApi.createResourceActionGroup": { + "body": "resourceActionGroupCreate", + "dispatchSha256": "2734aae023652dfd5e3729a12bfc15ab7baf9f427673a653304eac75c1eb33b4", + "generatedMethod": "ResourceActionGroupsApi.createResourceActionGroup", + "implementationSha256": "65ce7d8448068d02d4ce611e085a5f22f8d799e12bc7e78a21254f927e86359b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceActionGroupCreate", + "optional": false, + "type": "ResourceActionGroupCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionGroupsApiCreateResourceActionGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups" + }, + "ResourceActionGroupsApi.deleteResourceActionGroup": { + "body": null, + "dispatchSha256": "146c202ce711acfaefc2130e241e78322ba7a35ed0323f74a11d93e9d5072d42", + "generatedMethod": "ResourceActionGroupsApi.deleteResourceActionGroup", + "implementationSha256": "174246dca3a11aea5ca87bd5822a6733a6630fd99e539e1eba851d5d4fc0732c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionGroupId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionGroupsApiDeleteResourceActionGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + }, + "ResourceActionGroupsApi.getResourceActionGroup": { + "body": null, + "dispatchSha256": "1e0300297b7dddffb19a8fed2b94be012ef3e534d211149878c593f21ab968c3", + "generatedMethod": "ResourceActionGroupsApi.getResourceActionGroup", + "implementationSha256": "5bc0c3ed32afb9a14129bcd12d99bb9dcb937d616ce4a694f5c5acd3b1b62add", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionGroupId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionGroupsApiGetResourceActionGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + }, + "ResourceActionGroupsApi.listResourceActionGroups": { + "body": null, + "dispatchSha256": "129a6be0aa3cb6aa94c63839306a25b5e51eac7a3dd27fc6faae0366b463e3da", + "generatedMethod": "ResourceActionGroupsApi.listResourceActionGroups", + "implementationSha256": "9215b33d2bde53a445893933af73dc9091a0e67a98d3dbe3f8844a5a546d55f3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionGroupsApiListResourceActionGroupsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups" + }, + "ResourceActionGroupsApi.updateResourceActionGroup": { + "body": "resourceActionGroupUpdate", + "dispatchSha256": "0e91e351dc5becf5a0f9a3f545a0add3452b8e2f97fafd8052573524c5e2bb5f", + "generatedMethod": "ResourceActionGroupsApi.updateResourceActionGroup", + "implementationSha256": "7005c66da05a59975369949e82eda0346dcb83737ca87897a98bcbe789ea0b8e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionGroupId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceActionGroupUpdate", + "optional": false, + "type": "ResourceActionGroupUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionGroupsApiUpdateResourceActionGroupRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + }, + "ResourceActionsApi.createResourceAction": { + "body": "resourceActionCreate", + "dispatchSha256": "b08858c8423bcabf846864e8db3094fcff8b41ce5817f1985c88479ba6e8a71d", + "generatedMethod": "ResourceActionsApi.createResourceAction", + "implementationSha256": "83b73c8c52ab6f3c8dc9f6ac6a65f74d59297b7ca408d4902ec7eaccc160d381", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceActionCreate", + "optional": false, + "type": "ResourceActionCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionsApiCreateResourceActionRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions" + }, + "ResourceActionsApi.deleteResourceAction": { + "body": null, + "dispatchSha256": "2f4f8ef642bf2d2f4fc1ab283a29c133302eda86de6a69089bd5aa8588b27ab7", + "generatedMethod": "ResourceActionsApi.deleteResourceAction", + "implementationSha256": "5a63400e5e80547e8dcc827f989bd35d7d6c0e1b5b9bca5d97e512082885310f", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionsApiDeleteResourceActionRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + }, + "ResourceActionsApi.getResourceAction": { + "body": null, + "dispatchSha256": "7e6a6b89c83d01b92afdd3f74418a673b78dcd9538c986ecf8e77850e1553f5c", + "generatedMethod": "ResourceActionsApi.getResourceAction", + "implementationSha256": "7a71ecc73feba3ebed11c81d581a510b6d5e313cf174bf346bba42d164e5998c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionsApiGetResourceActionRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + }, + "ResourceActionsApi.listResourceActions": { + "body": null, + "dispatchSha256": "bcbd01e03f06ccb1ba236ef121292eb0213cad7311f8e7abb87cf20902c02b07", + "generatedMethod": "ResourceActionsApi.listResourceActions", + "implementationSha256": "6b9e03873969cc2a5726b72805f7dae5d3d0e91678c0c1cfa1499985274373a2", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionsApiListResourceActionsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions" + }, + "ResourceActionsApi.updateResourceAction": { + "body": "resourceActionUpdate", + "dispatchSha256": "fc4df1036427b79a94f3c1c73b655b37cab43c7f9ca0e3f06193a694b99b8d19", + "generatedMethod": "ResourceActionsApi.updateResourceAction", + "implementationSha256": "b7e9c2f1aa129af241b18e920d5d0a3f399308ace0ee51e93f87677d6451b8d7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceActionUpdate", + "optional": false, + "type": "ResourceActionUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceActionsApiUpdateResourceActionRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + }, + "ResourceAttributesApi.createResourceAttribute": { + "body": "resourceAttributeCreate", + "dispatchSha256": "7b21c1ecaf15fa7b6cb049c23d5761632d5b542fd7e5a93c6aff2253aeda1636", + "generatedMethod": "ResourceAttributesApi.createResourceAttribute", + "implementationSha256": "e9b85b72fcf773dbc481f9dbc6d3b6338204b7e6df06b846d5c98d8fde0d903e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceAttributeCreate", + "optional": false, + "type": "ResourceAttributeCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceAttributesApiCreateResourceAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes" + }, + "ResourceAttributesApi.deleteResourceAttribute": { + "body": null, + "dispatchSha256": "1c56d483c5ad7077dcf925288414e75ba00e612e412e011aac2aa04746c0f188", + "generatedMethod": "ResourceAttributesApi.deleteResourceAttribute", + "implementationSha256": "55ab754211ca251784f36e45c4fb1ce64bbb85cfd17747f29af6a07ad504d616", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceAttributesApiDeleteResourceAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + }, + "ResourceAttributesApi.getResourceAttribute": { + "body": null, + "dispatchSha256": "ecf5bc47f0d5651fb4fc6d7c6ac8279a37b43fe6c24170d038880d76812822be", + "generatedMethod": "ResourceAttributesApi.getResourceAttribute", + "implementationSha256": "ec43c0879ae737c75ba0db9157c1201b5140d290675b25e92ee50cb240824219", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceAttributesApiGetResourceAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + }, + "ResourceAttributesApi.listResourceAttributes": { + "body": null, + "dispatchSha256": "08290d3a844ab408ae65aa1ce45bb6808a765416cd4b8045abf2d8ef872fd02c", + "generatedMethod": "ResourceAttributesApi.listResourceAttributes", + "implementationSha256": "4f9fd33fdabf32770a1c91c8d63bf858f8558e18e0674da64ed4309db90948ad", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceAttributesApiListResourceAttributesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes" + }, + "ResourceAttributesApi.updateResourceAttribute": { + "body": "resourceAttributeUpdate", + "dispatchSha256": "fd657487c00c876971f0431226dd471ef22079c4504e675c76d6b9f7397e6f67", + "generatedMethod": "ResourceAttributesApi.updateResourceAttribute", + "implementationSha256": "45302e0d9a78bcd15994468116af0543d5bf34356ba35291a0f12ac6276b6f64", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceAttributeUpdate", + "optional": false, + "type": "ResourceAttributeUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceAttributesApiUpdateResourceAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + }, + "ResourceInstancesApi.createResourceInstance": { + "body": "resourceInstanceCreate", + "dispatchSha256": "3911b7b0ab30c12d25825f286271e01f621d3f49aa224751b3c6aa86b1528589", + "generatedMethod": "ResourceInstancesApi.createResourceInstance", + "implementationSha256": "4c43993adc9fd8fdc0e1609e965ab6ece29cc5f18b1cefd0936791c9fa17eef2", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstanceCreate", + "optional": false, + "type": "ResourceInstanceCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceInstancesApiCreateResourceInstanceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances" + }, + "ResourceInstancesApi.deleteResourceInstance": { + "body": null, + "dispatchSha256": "f4804073d474d7e049cb50b81853416617b4956320ede4747fd6daedf650209c", + "generatedMethod": "ResourceInstancesApi.deleteResourceInstance", + "implementationSha256": "ca53dce7bde43209079840e7bfcea5e073185b71ac5373ba361cf0e36cf36ab9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "instanceId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceInstancesApiDeleteResourceInstanceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + }, + "ResourceInstancesApi.getResourceInstance": { + "body": null, + "dispatchSha256": "18814dbcfb542c70a445c0f9a25fc464a7b46ef8cc31f1c7ed9c7ecfccbb5dac", + "generatedMethod": "ResourceInstancesApi.getResourceInstance", + "implementationSha256": "99436ddd9bdced7a91653ad6d94fecb3955e1f46eefb4749e9760477c57290f8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "instanceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "detailed", + "optional": true, + "type": "boolean" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceInstancesApiGetResourceInstanceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + }, + "ResourceInstancesApi.listResourceInstances": { + "body": null, + "dispatchSha256": "76f4334ec55203d05776b3b688feaecb36034efe6981726e4d0b56f163dda74e", + "generatedMethod": "ResourceInstancesApi.listResourceInstances", + "implementationSha256": "fe53386905e382e3ba3dda989bad24d893f7f83a7852d6571b30cc7978280103", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "detailed", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceInstancesApiListResourceInstancesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances" + }, + "ResourceInstancesApi.listResourceInstancesDetailed": { + "body": null, + "dispatchSha256": "5e0d0d8f26442ea21abc1d32c11a09241ad79b196cbc499bd01994eb62acba3c", + "generatedMethod": "ResourceInstancesApi.listResourceInstancesDetailed", + "implementationSha256": "4512f5425bfcb308f1110d78a019b55b6fb7c79839090e83eb78725736c97ecf", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceInstancesApiListResourceInstancesDetailedRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/detailed" + }, + "ResourceInstancesApi.updateResourceInstance": { + "body": "resourceInstanceUpdate", + "dispatchSha256": "7a57f484ad44927f7a839d770c4158b715ba08808682c5eabc129c95ec2f959d", + "generatedMethod": "ResourceInstancesApi.updateResourceInstance", + "implementationSha256": "a6d53c4723f5fa9248402219ed4d09e711c0d08086a30994e36cfa72d3cd4814", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "instanceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstanceUpdate", + "optional": false, + "type": "ResourceInstanceUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceInstancesApiUpdateResourceInstanceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + }, + "ResourceRelationsApi.createResourceRelation": { + "body": "relationCreate", + "dispatchSha256": "7ec3cb3caa9c95391826c55496f0c4f8dafb3c5bbfe9b2f04636f4370fd96dca", + "generatedMethod": "ResourceRelationsApi.createResourceRelation", + "implementationSha256": "d8b0bbc06062f6e8ab0743e5e25fcb757f91d048f6562cba439a439c2be25901", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationCreate", + "optional": false, + "type": "RelationCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRelationsApiCreateResourceRelationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations" + }, + "ResourceRelationsApi.deleteResourceRelation": { + "body": null, + "dispatchSha256": "7c8d97f5fb1eac0ebcee7350565c7afb9cae4388307a83eb96f70d655560f44d", + "generatedMethod": "ResourceRelationsApi.deleteResourceRelation", + "implementationSha256": "95335ee64e68949976141f094a036ead267de5112ebe955494f68f9ae1582ce1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRelationsApiDeleteResourceRelationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + }, + "ResourceRelationsApi.getResourceRelation": { + "body": null, + "dispatchSha256": "93b5f0e3826130efce8f1a24fb61f1bc532503c272ec07760afcf3574e3a22c7", + "generatedMethod": "ResourceRelationsApi.getResourceRelation", + "implementationSha256": "48777f3b9e62298bb0a74b84cbb2d574f4679fb71d457b9b44fd5db92f81e9b9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRelationsApiGetResourceRelationRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + }, + "ResourceRelationsApi.listResourceRelations": { + "body": null, + "dispatchSha256": "2aa2d19eaa9aa55b8570b8d463a9dfef7f33f96c71e11194176a6268d564961a", + "generatedMethod": "ResourceRelationsApi.listResourceRelations", + "implementationSha256": "1b4dca8e3ab0518d5d547f32396f4b083c07ead413999528acbddc2f6ad7fd3a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRelationsApiListResourceRelationsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations" + }, + "ResourceRolesApi.assignPermissionsToResourceRole": { + "body": "addRolePermissions", + "dispatchSha256": "a6e73638ce3105154bd0688d77f70c5718a7f4bf36ff59acb6f9e5f6e8099502", + "generatedMethod": "ResourceRolesApi.assignPermissionsToResourceRole", + "implementationSha256": "4b5d8acb063d1a3894ae4904d708c5f7aa203ad676554eeab672ba4441df23c2", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "addRolePermissions", + "optional": false, + "type": "AddRolePermissions" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiAssignPermissionsToResourceRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions" + }, + "ResourceRolesApi.createResourceRole": { + "body": "resourceRoleCreate", + "dispatchSha256": "fbe318d9e7b3f6e592a1ddc6a4a6437e50a618351afa29a887906c74aeb94fac", + "generatedMethod": "ResourceRolesApi.createResourceRole", + "implementationSha256": "fd6ff99aa58f552d11a32ecdc10ce9cb8b522a2e8e9aad0d8288638ab843508b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceRoleCreate", + "optional": false, + "type": "ResourceRoleCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiCreateResourceRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles" + }, + "ResourceRolesApi.deleteResourceRole": { + "body": null, + "dispatchSha256": "4a922a0da96508e45bddcc5c6a72732953dcb51c8b910afc9a9e857162627319", + "generatedMethod": "ResourceRolesApi.deleteResourceRole", + "implementationSha256": "f7aa2e50cd0eb6e4f911404d2324b3f4950046d7943965df1431510e4b738ffd", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiDeleteResourceRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + }, + "ResourceRolesApi.getResourceRole": { + "body": null, + "dispatchSha256": "df3288fbcd05b6424c9cf8def792bbb65b638659a9718073984029042e604c9c", + "generatedMethod": "ResourceRolesApi.getResourceRole", + "implementationSha256": "fcb087491d5cbf838c5358aa6f1982a75c14f232af65335633087ff129344041", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiGetResourceRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + }, + "ResourceRolesApi.getResourceRoleAncestors": { + "body": null, + "dispatchSha256": "8b8d4c7b2a54bc590360b3f787617af708b868eecaecdbdc43c5b8ac3972170c", + "generatedMethod": "ResourceRolesApi.getResourceRoleAncestors", + "implementationSha256": "88244a651e7da24b77950b60631db70590b74acd3b8ba05eba0b813d5f4765c5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiGetResourceRoleAncestorsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/ancestors" + }, + "ResourceRolesApi.getResourceRoleDescendants": { + "body": null, + "dispatchSha256": "a315006a80c4fbe8f716c3c0150bc5d99970a05824cfbbe5ece45b87fc870682", + "generatedMethod": "ResourceRolesApi.getResourceRoleDescendants", + "implementationSha256": "d7cccae911e9ac72180e9eb8f097b7f08a65b6c3ad8d712ab8fa61cb4ecf4c0d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiGetResourceRoleDescendantsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/descendants" + }, + "ResourceRolesApi.listResourceRoles": { + "body": null, + "dispatchSha256": "d3bed7885bacdd4ff62bbd787884c528b51cef56ea3c6497fbca0fcc7e02705d", + "generatedMethod": "ResourceRolesApi.listResourceRoles", + "implementationSha256": "4c11f9d605f54b7b74073877654b51d709cac41c8bea1e82db63f4bc73b52e3a", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiListResourceRolesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles" + }, + "ResourceRolesApi.removePermissionsFromResourceRole": { + "body": "removeRolePermissions", + "dispatchSha256": "39556cb01c2c3e27fe18e8c56cace339711944c5b89a3bd8cd212860a73033bf", + "generatedMethod": "ResourceRolesApi.removePermissionsFromResourceRole", + "implementationSha256": "ecd93d3687ee78b2abbd05358b143cae5289b9c929de4a090520a6779486cefc", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "removeRolePermissions", + "optional": false, + "type": "RemoveRolePermissions" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiRemovePermissionsFromResourceRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions" + }, + "ResourceRolesApi.updateResourceRole": { + "body": "resourceRoleUpdate", + "dispatchSha256": "03de4e3182b65a763e4888a95f35f1043ff502e219870ac078a7bd63715dfe11", + "generatedMethod": "ResourceRolesApi.updateResourceRole", + "implementationSha256": "e1a520c795c03ead3ef4da76c078181eea2154d7fad253ab225106b804d3c3f3", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceRoleUpdate", + "optional": false, + "type": "ResourceRoleUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourceRolesApiUpdateResourceRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + }, + "ResourcesApi.createResource": { + "body": "resourceCreate", + "dispatchSha256": "280512e6ea8bd0b0f128fda32807d1b5c7dccf1340b1fada6959a33c1f2a9b3d", + "generatedMethod": "ResourcesApi.createResource", + "implementationSha256": "f33cac07be3e9db181937fa722bf486489b4ccf846d9028cc6b05283778d6f00", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceCreate", + "optional": false, + "type": "ResourceCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourcesApiCreateResourceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources" + }, + "ResourcesApi.deleteResource": { + "body": null, + "dispatchSha256": "b05224d7de4deed43529c6b9ffb5fc4be26fbcb0bce7fc11c0affd971b13508b", + "generatedMethod": "ResourcesApi.deleteResource", + "implementationSha256": "98683c6d94b4651a92a919847618f3166a5120a132d8ce95d350f55b4ee20fb9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourcesApiDeleteResourceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}" + }, + "ResourcesApi.getResource": { + "body": null, + "dispatchSha256": "40cedc737d4cc306ef4e0455fee6512711fc130eaaa32f7ffeb59951568942e7", + "generatedMethod": "ResourcesApi.getResource", + "implementationSha256": "7e6240148a2fded7d0b12aeb9b0b37e35e74a2accbd76f3c40e4ab18711260e9", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourcesApiGetResourceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}" + }, + "ResourcesApi.listResources": { + "body": null, + "dispatchSha256": "513b9972a3c68290b028854fda09f3aa902acbb335bb6eec83f0174c2dd98950", + "generatedMethod": "ResourcesApi.listResources", + "implementationSha256": "9da5faf8b1079c98834345e5f9f0453c8883577898609ecc4bbae503e09784ba", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "includeBuiltIn", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourcesApiListResourcesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources" + }, + "ResourcesApi.replaceResource": { + "body": "resourceReplace", + "dispatchSha256": "14a0ef5e05d7352177fc2c7ec10b26b1c04f600cd2024d4455f7f5137323414d", + "generatedMethod": "ResourcesApi.replaceResource", + "implementationSha256": "91945a8be57d20895a740659b183584601d7cc449a3e56882e5235b28648ab3d", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceReplace", + "optional": false, + "type": "ResourceReplace" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourcesApiReplaceResourceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}" + }, + "ResourcesApi.updateResource": { + "body": "resourceUpdate", + "dispatchSha256": "2279260d863589fa6d6e03cff8b42695dfe25e0989a88991a46b3cee5e20fe41", + "generatedMethod": "ResourcesApi.updateResource", + "implementationSha256": "c48a9776ea04c40be5912294dc6cfe0ae44e63b1cfc424023931c38143bf0ce5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceUpdate", + "optional": false, + "type": "ResourceUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ResourcesApiUpdateResourceRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}" + }, + "RoleAssignmentsApi.assignRole": { + "body": "roleAssignmentCreate", + "dispatchSha256": "a550beaf49d8073daa5e22c6d7ba747e13953068cf0a093d0987e09519bc45ac", + "generatedMethod": "RoleAssignmentsApi.assignRole", + "implementationSha256": "289fb7cd637e103ca2f44385a99621f752fbd7ef87550e4a4d07e445f7072f29", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleAssignmentCreate", + "optional": false, + "type": "RoleAssignmentCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RoleAssignmentsApiAssignRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments" + }, + "RoleAssignmentsApi.bulkAssignRole": { + "body": "roleAssignmentCreate", + "dispatchSha256": "e689803dd50bad7b324a17387af3eb9da1b37af763dd0fb522989d1aa6ab357a", + "generatedMethod": "RoleAssignmentsApi.bulkAssignRole", + "implementationSha256": "b1e9e75ddafdae25fb41a3cb59585c2b8985fe8cfa66f0488656b808232b5ece", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleAssignmentCreate", + "optional": false, + "type": "Array" + }, + { + "initializer": null, + "name": "missingUserPolicy", + "optional": true, + "type": "MissingUserPolicy" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RoleAssignmentsApiBulkAssignRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/bulk" + }, + "RoleAssignmentsApi.bulkUnassignRole": { + "body": "roleAssignmentRemove", + "dispatchSha256": "867eb121b906312dafe7a1012d1b1dbe721f4b99f949ebf5adb0fdbbf3d3a719", + "generatedMethod": "RoleAssignmentsApi.bulkUnassignRole", + "implementationSha256": "5770825d2b2f937432cd1562369d19174dd5b585891df96c770408a9ae5e3deb", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleAssignmentRemove", + "optional": false, + "type": "Array" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RoleAssignmentsApiBulkUnassignRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/bulk" + }, + "RoleAssignmentsApi.listRoleAssignments": { + "body": null, + "dispatchSha256": "b75d6cfc9331c58f0bd7411e9f04f3b173f7a92906c9ea96e0623c2f38438e6e", + "generatedMethod": "RoleAssignmentsApi.listRoleAssignments", + "implementationSha256": "46f546008c5faf76ef91b9b19a5dbc4a4566b1d2e32d4088a52686940435fbc6", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "user", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstance", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "detailed", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RoleAssignmentsApiListRoleAssignmentsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments" + }, + "RoleAssignmentsApi.listRoleAssignmentsDetailed": { + "body": null, + "dispatchSha256": "a0c27405ae8ec0f2e9b4f9ec4187adae44d9f2f23352c79297a0a0676b35ee9e", + "generatedMethod": "RoleAssignmentsApi.listRoleAssignmentsDetailed", + "implementationSha256": "a4240a8240e3eeb47ca893a4fac799e24210316439f6739e7a2a9a4fecbb4024", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "user", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "Array" + }, + { + "initializer": null, + "name": "resource", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstance", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RoleAssignmentsApiListRoleAssignmentsDetailedRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/detailed" + }, + "RoleAssignmentsApi.unassignRole": { + "body": "roleAssignmentRemove", + "dispatchSha256": "fcbf2b2cd1c080c3451f5e2c8112abf29da7751e8f8134532312301cfe2f4990", + "generatedMethod": "RoleAssignmentsApi.unassignRole", + "implementationSha256": "53ed8bb421e07ac263db313d0974346fe8f696956ceab788f9bf37f50cc13b61", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleAssignmentRemove", + "optional": false, + "type": "RoleAssignmentRemove" + }, + { + "initializer": null, + "name": "returnDeleted", + "optional": true, + "type": "boolean" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RoleAssignmentsApiUnassignRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments" + }, + "RolesApi.assignPermissionsToRole": { + "body": "addRolePermissions", + "dispatchSha256": "7678f8bb2f32d5e4313c50307a88bc1240c9ea3faee77d88dc36c22472d55cbe", + "generatedMethod": "RolesApi.assignPermissionsToRole", + "implementationSha256": "e7b66c8894a52e99fba389579b918d45e68764644896e20d39f3b1c2673e14a5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "addRolePermissions", + "optional": false, + "type": "AddRolePermissions" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiAssignPermissionsToRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions" + }, + "RolesApi.createRole": { + "body": "roleCreate", + "dispatchSha256": "dd31934761564cce248403f9860b908bd7d6323eff34b29b2e75d6fed16944f6", + "generatedMethod": "RolesApi.createRole", + "implementationSha256": "69f22ae59ea9ee1d1234d65b6565ac8fc8bdf3b4533d31ac31fd03aff9876971", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleCreate", + "optional": false, + "type": "RoleCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiCreateRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles" + }, + "RolesApi.deleteRole": { + "body": null, + "dispatchSha256": "9a697a1d81f439420fe18442df0ddd19909919097ad34f2d6c4069c511db8ac1", + "generatedMethod": "RolesApi.deleteRole", + "implementationSha256": "d554dbf5dd57363f7febf16702b09637d1eead9ba482fc01af233d1313e3acc4", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiDeleteRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}" + }, + "RolesApi.getRole": { + "body": null, + "dispatchSha256": "85311d4155ef0e219a28c53de6af83d0889aff8c2df4d0a85562202fff880d92", + "generatedMethod": "RolesApi.getRole", + "implementationSha256": "4a49fe73b2a1fbb55178d819853e416d1c28a8b46ba371c33af464f50c2784d1", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiGetRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}" + }, + "RolesApi.getRoleAncestors": { + "body": null, + "dispatchSha256": "c24d42e631ae44c12534965cd97049a667a5dda0cf4f18c7ed167dccb04e2a48", + "generatedMethod": "RolesApi.getRoleAncestors", + "implementationSha256": "687f000d876c9867d0fedbc9adee33a0bbf55aace3d2dc20be2954700d73bb66", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiGetRoleAncestorsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}/ancestors" + }, + "RolesApi.getRoleDescendants": { + "body": null, + "dispatchSha256": "64d882c880e4bd719b89987f01be166a1130714a0e8d7fb947474211207aee23", + "generatedMethod": "RolesApi.getRoleDescendants", + "implementationSha256": "032a7195a013e07db10c49459dc15b30827d00b9e30c6e9fdc412affbc5fcb16", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiGetRoleDescendantsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}/descendants" + }, + "RolesApi.listRoles": { + "body": null, + "dispatchSha256": "22fd48353fb59e318bb1eebd3b3885b317b453af487420b35a88f725e8003df0", + "generatedMethod": "RolesApi.listRoles", + "implementationSha256": "b1eda7863717140e5cfc541957e5f79923d08708c0405f86d1e02760047e2616", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiListRolesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles" + }, + "RolesApi.removePermissionsFromRole": { + "body": "removeRolePermissions", + "dispatchSha256": "28823016cc31a76a830228dfe651a1307cbb26c6b63326de2b11f303aceacbbe", + "generatedMethod": "RolesApi.removePermissionsFromRole", + "implementationSha256": "c4a6ded6b68b01831aa9cb0c5ddd51540e327538e508887b549fa4466bae16e7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "removeRolePermissions", + "optional": false, + "type": "RemoveRolePermissions" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiRemovePermissionsFromRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions" + }, + "RolesApi.updateRole": { + "body": "roleUpdate", + "dispatchSha256": "18c037f24241388727eb5ccca344cf0bf5db1b8058a519445799c3970eb312d2", + "generatedMethod": "RolesApi.updateRole", + "implementationSha256": "7ed4354652b9f76982bbdec631a8df2bf00784b38e194b5711760ce7c7a92b2c", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleUpdate", + "optional": false, + "type": "RoleUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "RolesApiUpdateRoleRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}" + }, + "ScopeConfigurationsApi.getScopeConfig": { + "body": null, + "dispatchSha256": "6a9ceccb7388981e3a017773e30472936078efc28eb3eefcbb06089f815e96d2", + "generatedMethod": "ScopeConfigurationsApi.getScopeConfig", + "implementationSha256": "e02b5e946b057c0c77997c9e021778d0ff3beac4a679a7d64e51b869b0df4021", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ScopeConfigurationsApiGetScopeConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/{env_id}/opal_scope" + }, + "ScopeConfigurationsApi.resetScopeConfig": { + "body": null, + "dispatchSha256": "b1cbc81b1d3a0e41283189d7cc17f776507db2aa3bc9625ebd54349995fc5109", + "generatedMethod": "ScopeConfigurationsApi.resetScopeConfig", + "implementationSha256": "50ffac4b87389a5a5a99104c0baf93e7535885c7f0a1d14655555f318e1f0b27", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ScopeConfigurationsApiResetScopeConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/{env_id}/opal_scope" + }, + "ScopeConfigurationsApi.setScopeConfig": { + "body": "scopeConfigSet", + "dispatchSha256": "ff23cc5936962e93d51a17a3e68778ad7d1966caf4d77d1560674397391739ee", + "generatedMethod": "ScopeConfigurationsApi.setScopeConfig", + "implementationSha256": "70e51d8c77be171f23dfead7ebb45075f9b06d09c0aa3d7b5b17268f51eb534e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "scopeConfigSet", + "optional": false, + "type": "ScopeConfigSet" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "ScopeConfigurationsApiSetScopeConfigRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/projects/{proj_id}/{env_id}/opal_scope" + }, + "TenantsApi.addUserToTenant": { + "body": "userCreate", + "dispatchSha256": "2af33cfac083bdd0860d4b7ab05bf732ae095ac236381997d7923489840179a3", + "generatedMethod": "TenantsApi.addUserToTenant", + "implementationSha256": "ed9ba01b35fb650ef949c37dc2434d3e35e7d481f951da8fce0db470d551e164", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userCreate", + "optional": false, + "type": "UserCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiAddUserToTenantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users" + }, + "TenantsApi.createTenant": { + "body": "tenantCreate", + "dispatchSha256": "95b4f57c8ccb994b063fe455e5fa5387ea83b24590d3d29c86f5a0c5d03fcd75", + "generatedMethod": "TenantsApi.createTenant", + "implementationSha256": "9504cc9fa694e2e045e7c9a5dc025387ff07bff140d03d4afa431471d7268baf", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantCreate", + "optional": false, + "type": "TenantCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiCreateTenantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants" + }, + "TenantsApi.deleteTenant": { + "body": null, + "dispatchSha256": "5eb8a2f51dbd9f7e3d7d354145e6275ff6a3dcc15831dff4d44c807186569484", + "generatedMethod": "TenantsApi.deleteTenant", + "implementationSha256": "94beffb2da9bf677c2b5805d415c45821eba1fb7c6775ceff10867fd0a056ac7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiDeleteTenantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}" + }, + "TenantsApi.deleteTenantUser": { + "body": null, + "dispatchSha256": "db0d97c467a3598fb11657267435072d8a26198cc6e4a6ccec6b38a6679309a7", + "generatedMethod": "TenantsApi.deleteTenantUser", + "implementationSha256": "ba97c79a6140895dfb8bbc4c9770d4a85bcddeccd13c6fc3a5c0d09aa5f0b0a8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiDeleteTenantUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}" + }, + "TenantsApi.getTenant": { + "body": null, + "dispatchSha256": "276f377b3d155623e7b7768e973795d28bc2e67ec7eb971a19e444a8963a4957", + "generatedMethod": "TenantsApi.getTenant", + "implementationSha256": "8f2ff995fde7d87ce531a894c3a786e86cf71d17dc254571ef894f506989c971", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiGetTenantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}" + }, + "TenantsApi.listTenantUsers": { + "body": null, + "dispatchSha256": "8a1c6d1bc8b69150168093f564d9156dfc5faeace69159731a073c36eee829bf", + "generatedMethod": "TenantsApi.listTenantUsers", + "implementationSha256": "5c11e0b203359d33da2921197cf1e04ce5a704a632a67e8bbb2a0e86101b20b0", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "includeResourceInstanceRoles", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiListTenantUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users" + }, + "TenantsApi.listTenants": { + "body": null, + "dispatchSha256": "8ef974ba844f3aac0b2245ba3ce6324bd42422d38df7bac69f6ffe60208e36f8", + "generatedMethod": "TenantsApi.listTenants", + "implementationSha256": "6cb40d507b7ea15cd9bd5469bd07efe80fbb0301320481c29d6c82a9b944e9c8", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "includeTotalCount", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiListTenantsRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants" + }, + "TenantsApi.updateTenant": { + "body": "tenantUpdate", + "dispatchSha256": "c33ccbb8120ff4c5799594df0ddb6dc7cc4fecbaa05cee9e5c00ce0a3312982f", + "generatedMethod": "TenantsApi.updateTenant", + "implementationSha256": "1a97a1a2711bafe6cdbb93cabd5029fea648419f8848533e5443b26b72457ecf", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantUpdate", + "optional": false, + "type": "TenantUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "TenantsApiUpdateTenantRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}" + }, + "UserAttributesApi.createUserAttribute": { + "body": "resourceAttributeCreate", + "dispatchSha256": "b04d3f8c2684efcb5f0af7598e0fd7888d6d926cf64cf7c7b13bcb4b49a74799", + "generatedMethod": "UserAttributesApi.createUserAttribute", + "implementationSha256": "d66e268a8f85ba136a1d14d49dc1835930d7e9a7c1c8871b6342e282f9728d75", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceAttributeCreate", + "optional": false, + "type": "ResourceAttributeCreate" + }, + { + "initializer": null, + "name": "resourceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserAttributesApiCreateUserAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes" + }, + "UserAttributesApi.deleteUserAttribute": { + "body": null, + "dispatchSha256": "b7bfe76f184fc24dab08cb584b0f56131930d89ee93e38ff01281df8c903102f", + "generatedMethod": "UserAttributesApi.deleteUserAttribute", + "implementationSha256": "417c28250bd4ad4a43b87e75ff7a78535d1568b9ecceb331587835f06cb46ee4", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceId", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserAttributesApiDeleteUserAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + }, + "UserAttributesApi.getUserAttribute": { + "body": null, + "dispatchSha256": "21cb845459ca11eb3b2870f4e05ff1363421b62fbd9273384efcbced81d40dce", + "generatedMethod": "UserAttributesApi.getUserAttribute", + "implementationSha256": "03d6d2bfbdb7550f414a77ccae521a0d45bb266595bf056869b4cb609a225965", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserAttributesApiGetUserAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + }, + "UserAttributesApi.listUserAttributes": { + "body": null, + "dispatchSha256": "6e98a8a46b2cb91b93113440e7a8c501eb4725d01c61567b5ab7d15a5ac970dd", + "generatedMethod": "UserAttributesApi.listUserAttributes", + "implementationSha256": "6987c02b92c325d8b90a18afcadc207e309a3c37bc876fa0920ee6b30095435e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceId", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserAttributesApiListUserAttributesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes" + }, + "UserAttributesApi.updateUserAttribute": { + "body": "resourceAttributeUpdate", + "dispatchSha256": "8b6a3a3d65070b7495af086f0d7370abfff27b9d58495665855f3d7e9f0c9aa5", + "generatedMethod": "UserAttributesApi.updateUserAttribute", + "implementationSha256": "55c4654de50ec6b507082758e8a1d96fa7a3202f685db25332b59a014e69ea2e", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceAttributeUpdate", + "optional": false, + "type": "ResourceAttributeUpdate" + }, + { + "initializer": null, + "name": "resourceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserAttributesApiUpdateUserAttributeRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + }, + "UserInvitesApi.approveUserInvite": { + "body": "elementsUserInviteApprove", + "dispatchSha256": "e915b89ed9995945a0d7d35188e5411fd8344114e6d17e5a5c57d0735e25aab1", + "generatedMethod": "UserInvitesApi.approveUserInvite", + "implementationSha256": "397cb7a864ca5969dbb69ef3de878128fb42fcaa3dd0db40b332ee531d1f1657", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsUserInviteApprove", + "optional": false, + "type": "ElementsUserInviteApprove" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserInvitesApiApproveUserInviteRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve" + }, + "UserInvitesApi.createUserInvite": { + "body": "elementsUserInviteCreate", + "dispatchSha256": "15ab659aa6291f67ee0b4158a1644e83f84e2388d54214076b9b8dce2bf5ef79", + "generatedMethod": "UserInvitesApi.createUserInvite", + "implementationSha256": "45ba77354b34c95e2aa887c2affdd0dec6a40de1dbf1ab2c0d7fa94dc1b99ed6", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsUserInviteCreate", + "optional": false, + "type": "ElementsUserInviteCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserInvitesApiCreateUserInviteRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/user_invites" + }, + "UserInvitesApi.deleteUserInvite": { + "body": null, + "dispatchSha256": "d4f638a9b37fcb970e281809adfbab70f19f7b1f068e4a5af52295861a23d586", + "generatedMethod": "UserInvitesApi.deleteUserInvite", + "implementationSha256": "8f22b8f72a2be991ea4769d9f5bc76e31a4fef9c18b847680ca7e74bc67a3c65", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserInvitesApiDeleteUserInviteRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + }, + "UserInvitesApi.getUserInvite": { + "body": null, + "dispatchSha256": "4c6b89f2c673d4d4c4e2af71ec58ed31001e0087be83a1e5230787e19cf6a495", + "generatedMethod": "UserInvitesApi.getUserInvite", + "implementationSha256": "109411e616af87eaea09af748a954129d06b7dae631e1bacbd8c42a109b09581", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserInvitesApiGetUserInviteRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + }, + "UserInvitesApi.listUserInvites": { + "body": null, + "dispatchSha256": "426b013090387ea57499fc40ddf92fd2a1eca464699ea3cb033a2d2d0a1a384f", + "generatedMethod": "UserInvitesApi.listUserInvites", + "implementationSha256": "3246033002b893d951e688e6c14ef078cd282f70eb76852033493f96aba9dbe6", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "tenant", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserInvitesApiListUserInvitesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/user_invites" + }, + "UserInvitesApi.updateUserInvite": { + "body": "elementsUserInviteUpdate", + "dispatchSha256": "07ba17bc5612d568ee2bf4dc4b73e8c2d70b1c82393a41bdef4fa169a97888d1", + "generatedMethod": "UserInvitesApi.updateUserInvite", + "implementationSha256": "aac5d7c28656dbc58596046360f63d54e9e88043ed0f535414b045e99a3f5f01", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsUserInviteUpdate", + "optional": false, + "type": "ElementsUserInviteUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UserInvitesApiUpdateUserInviteRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + }, + "UsersApi.assignRoleToUser": { + "body": "userRoleCreate", + "dispatchSha256": "194846685174b9b688d502d5ec703cfda5a0e99fc05360ec989d5e979e2e6bb9", + "generatedMethod": "UsersApi.assignRoleToUser", + "implementationSha256": "c823f0837233f8e256b464866e426af3df92860a1ff37753b82aa84eb7be6d1f", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userRoleCreate", + "optional": false, + "type": "UserRoleCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiAssignRoleToUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}/roles" + }, + "UsersApi.createUser": { + "body": "userCreate", + "dispatchSha256": "d2863b46cd88cfd810df67e6ec44b28cc2396ba269bced99c0088fabea79708f", + "generatedMethod": "UsersApi.createUser", + "implementationSha256": "d6c0c64ef75c7f2de4b8935f5ec729e4f796ffc6735b36ac6ab84aef4f1dd5ec", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userCreate", + "optional": false, + "type": "UserCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiCreateUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users" + }, + "UsersApi.deleteUser": { + "body": null, + "dispatchSha256": "711c05e9c471d253ac21f248515cf6eb6f35d2c5c88d99871dec959c7bc8bf1e", + "generatedMethod": "UsersApi.deleteUser", + "implementationSha256": "a781a58d1fe13e72c4f6323de17b799c3217d69bdacd1bc54373c55c3ae9e1a4", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiDeleteUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}" + }, + "UsersApi.getUser": { + "body": null, + "dispatchSha256": "12aed0d4b2ddfb6dd84675f698b5e53ab673156aa0f5e0088c330bdd457639ea", + "generatedMethod": "UsersApi.getUser", + "implementationSha256": "1ea22abf960f4b7d3a6164fe4720def9257b4df1efadd0b2566d0831f73af3a7", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiGetUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}" + }, + "UsersApi.listUsers": { + "body": null, + "dispatchSha256": "7e67ada6bd64b833d195a56b9a3ba97de0d65f0d0448c213dbdc541faf4fc94c", + "generatedMethod": "UsersApi.listUsers", + "implementationSha256": "bb354256ce987b1b8796d73734857e5f9f8c9ce19da26ccaab94e6668840d018", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "searchOperator", + "optional": true, + "type": "SearchOperator" + }, + { + "initializer": null, + "name": "role", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "includeResourceInstanceRoles", + "optional": true, + "type": "boolean" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiListUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users" + }, + "UsersApi.replaceUser": { + "body": "userCreate", + "dispatchSha256": "99f2199f34a584f32fede501f7fc7e510e550984f6f0330c852b98db73f9c8aa", + "generatedMethod": "UsersApi.replaceUser", + "implementationSha256": "fa870333af4d711bdadbc6a3d7cb1d9528e6e5c4746e603a7eaa319342821156", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userCreate", + "optional": false, + "type": "UserCreate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PUT", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiReplaceUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}" + }, + "UsersApi.unassignRoleFromUser": { + "body": "userRoleRemove", + "dispatchSha256": "2172bee1ae4f5b22a368c8383d383f5e391cb50e8b5ffb4487bd843f8ab47940", + "generatedMethod": "UsersApi.unassignRoleFromUser", + "implementationSha256": "4e31e76c7409c5a7bfe3da32b85c54ddd7c1037fd5c83fdb1a45802d7c7b5ea5", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userRoleRemove", + "optional": false, + "type": "UserRoleRemove" + }, + { + "initializer": null, + "name": "returnDeleted", + "optional": true, + "type": "boolean" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiUnassignRoleFromUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}/roles" + }, + "UsersApi.updateUser": { + "body": "userUpdate", + "dispatchSha256": "e0674829cacbadaab8dfabec049453890075473d05e912fb3d7aa3a84468f2e7", + "generatedMethod": "UsersApi.updateUser", + "implementationSha256": "60eb480b0ddb98bfd034d907bfe0e4dd3e442cf0757821d59353f4beeefc04eb", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userUpdate", + "optional": false, + "type": "UserUpdate" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "PATCH", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersApiUpdateUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}" + }, + "UsersElementsDataApi.elementsAssignRoleToUser": { + "body": "elementsUserRoleCreate", + "dispatchSha256": "123659841ad68afc5b1cf40856ae68120b7d8d8035f8fa294f5dc12189ff79d3", + "generatedMethod": "UsersElementsDataApi.elementsAssignRoleToUser", + "implementationSha256": "0c19f6473e787690dd9bc92f3b38c99033d4170642bbc1d80470a88dd1470a94", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsUserRoleCreate", + "optional": false, + "type": "ElementsUserRoleCreate" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiElementsAssignRoleToUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles" + }, + "UsersElementsDataApi.elementsCreateUser": { + "body": "elementsUserCreate", + "dispatchSha256": "216c0a208af19a85f005ff8c5983274a2b6f5abdbd402673c1e7af9bdc1d372f", + "generatedMethod": "UsersElementsDataApi.elementsCreateUser", + "implementationSha256": "89ab2f7351d9f232edb872d2ceb6331b70c5ef68155d22f4b786f4f55aa073cf", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsUserCreate", + "optional": false, + "type": "ElementsUserCreate" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiElementsCreateUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users" + }, + "UsersElementsDataApi.elementsDeleteUser": { + "body": null, + "dispatchSha256": "37ed6467e8c3889cb63f6c6322dfc858e28d850faaa79d7ea25a91f24104a40e", + "generatedMethod": "UsersElementsDataApi.elementsDeleteUser", + "implementationSha256": "2ecfdc73451183ba17147cd785497570d293c10ea7b08949ac0726cf23469944", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiElementsDeleteUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}" + }, + "UsersElementsDataApi.elementsListRoles": { + "body": null, + "dispatchSha256": "d0876fc211471f42285793cdaf820c5939a164bd8588ef52015d94b881b2dcf5", + "generatedMethod": "UsersElementsDataApi.elementsListRoles", + "implementationSha256": "9e911b48cadaf24b94b56112652d6b8f314bdf00660b8f8a73082373624645da", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiElementsListRolesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/roles" + }, + "UsersElementsDataApi.elementsListUsers": { + "body": null, + "dispatchSha256": "ddcf436189d6f9e5a6281863f1f4551938696536c33db9b94bdfff8669a94062", + "generatedMethod": "UsersElementsDataApi.elementsListUsers", + "implementationSha256": "2512e5895555a40246a104a19a9a230d6c0d1fb7d655bede318b00478ab25377", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiElementsListUsersRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users" + }, + "UsersElementsDataApi.elementsUnassignRoleFromUser": { + "body": "elementsUserRoleRemove", + "dispatchSha256": "315482f51a9fe3af2546f0242681487e0bc2ae637531271e06dbf29335c15fe8", + "generatedMethod": "UsersElementsDataApi.elementsUnassignRoleFromUser", + "implementationSha256": "faab59dd616b506e0c61512844d2e369993114d8e37b9893bace9f4bb2ae1a84", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "elementsUserRoleRemove", + "optional": false, + "type": "ElementsUserRoleRemove" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "DELETE", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiElementsUnassignRoleFromUserRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles" + }, + "UsersElementsDataApi.listElementsUserInvites": { + "body": null, + "dispatchSha256": "6fef62777ca1e726792271bd5dbdfafddccba89eca727979b42f39b9f4d36fd1", + "generatedMethod": "UsersElementsDataApi.listElementsUserInvites", + "implementationSha256": "dd8d12387d7dbb9db7b1e6a3fdfe2d76430dbbdb4589a7a548d2b28a47886501", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "search", + "optional": true, + "type": "string" + }, + { + "initializer": null, + "name": "status", + "optional": true, + "type": "UserInviteStatus" + }, + { + "initializer": null, + "name": "page", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "perPage", + "optional": true, + "type": "number" + }, + { + "initializer": null, + "name": "resourceInstanceId", + "optional": true, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "GET", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiListElementsUserInvitesRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/user-invites" + }, + "UsersElementsDataApi.setConfigActive": { + "body": null, + "dispatchSha256": "054bd862ca704f61df59f1385755f7ca35cd963ad337d05de6b42e56632057b8", + "generatedMethod": "UsersElementsDataApi.setConfigActive", + "implementationSha256": "840355c99c2c05325b4d776534c430dbaad448a7973209caa3f9aa2c2e87190b", + "input": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "elementsConfigId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "envId", + "optional": false, + "type": "string" + }, + { + "initializer": "{}", + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise" + }, + "method": "POST", + "output": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requestParameters", + "optional": false, + "type": "UsersElementsDataApiSetConfigActiveRequest" + }, + { + "initializer": null, + "name": "options", + "optional": true, + "type": "RawAxiosRequestConfig" + } + ], + "returns": "Promise>" + }, + "path": "/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/active" + } + }, + "generatedRequestShapes": { + "APIHistoryApiGetApiEventV2HistoryEventIdGetRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly eventId: string;"] + }, + "APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly eventId: string;"] + }, + "APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly eventId: string;"] + }, + "APIHistoryApiListApiEventsV2HistoryGetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actorDisplayName?: string;", + "readonly actorId?: Array;", + "readonly actorType?: Array;", + "readonly clientIp?: Array;", + "readonly envId?: Array;", + "readonly method?: Array;", + "readonly page?: number;", + "readonly path?: Array;", + "readonly perPage?: number;", + "readonly projectId?: Array;", + "readonly statusCode?: Array;", + "readonly success?: boolean;", + "readonly timestampFrom?: number;", + "readonly timestampUntil?: number;" + ] + }, + "APIKeysApiCreateApiKeyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly aPIKeyCreate: APIKeyCreate;"] + }, + "APIKeysApiDeleteApiKeyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly apiKeyId: string;"] + }, + "APIKeysApiGetApiKeyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly apiKeyId: string;"] + }, + "APIKeysApiGetEnvironmentApiKeyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "APIKeysApiListApiKeysRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly objectType?: MemberAccessObj;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId?: string;" + ] + }, + "APIKeysApiRotateApiKeyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly apiKeyId: string;"] + }, + "AccessRequestsEAPApiApproveAccessRequestRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly accessRequestReview: AccessRequestReview;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly accessRequestReview: AccessRequestReview;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "AccessRequestsEAPApiCancelAccessRequestRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "AccessRequestsEAPApiCreateAccessRequestRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestUserCreate: AccessRequestUserCreate;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestUserCreate: AccessRequestUserCreate;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "AccessRequestsEAPApiDenyAccessRequestRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly accessRequestReviewDeny: AccessRequestReviewDeny;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly accessRequestReviewDeny: AccessRequestReviewDeny;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "AccessRequestsEAPApiGetAccessRequestRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "AccessRequestsEAPApiListAccessRequestsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly resourceInstanceId?: string;", + "readonly role?: string;", + "readonly status?: RequestStatus;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly resourceInstanceId?: string;", + "readonly role?: string;", + "readonly status?: RequestStatus;", + "readonly tenant?: string;" + ] + }, + "AccessRequestsEAPApiUpdateAccessRequestReviewerRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly accessRequestReview: AccessRequestReview;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly accessRequestId: string;", + "readonly accessRequestReview: AccessRequestReview;", + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ActivityLogApiListActivityEventsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actorDisplayName?: string;", + "readonly actorId?: Array;", + "readonly actorType?: Array;", + "readonly envId?: Array;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projectId?: Array;", + "readonly timestampFrom?: number;", + "readonly timestampUntil?: number;" + ] + }, + "AuditElementsDataApiElementsListAuditLogsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly search?: string;" + ] + }, + "AuditLogReplayApiRunAuditLogReplayRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly auditLogReplayRequest: AuditLogReplayRequest;"] + }, + "AuditLogsApiGetDetailedAuditLogRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly logId: string;", + "readonly projId: string;" + ] + }, + "AuditLogsApiListAuditLogsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly action?: string;", + "readonly decision?: boolean;", + "readonly envId: string;", + "readonly page?: number;", + "readonly pdpId?: string;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly query?: AuditLogQueryType;", + "readonly resources?: Array;", + "readonly sortBy?: AuditLogSortKey;", + "readonly tenant?: string;", + "readonly timestampFrom?: number;", + "readonly timestampTo?: number;", + "readonly users?: Array;" + ] + }, + "AuthenticationApiElementsLoginAsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly permitSession?: string;", + "readonly userLoginRequestInput: UserLoginRequestInput;" + ] + }, + "BulkOperationsApiBulkAssignRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly missingUserPolicy?: MissingUserPolicy;", + "readonly projId: string;", + "readonly roleAssignmentCreate: Array;" + ] + }, + "BulkOperationsApiBulkCreateOrReplaceRolesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleCreateBulkOperation: RoleCreateBulkOperation;" + ] + }, + "BulkOperationsApiBulkCreateTenantsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantCreateBulkOperation: TenantCreateBulkOperation;" + ] + }, + "BulkOperationsApiBulkCreateUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userCreateBulkOperation: UserCreateBulkOperation;" + ] + }, + "BulkOperationsApiBulkDeleteResourceInstancesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceDeleteBulkOperation: ResourceInstanceDeleteBulkOperation;" + ] + }, + "BulkOperationsApiBulkDeleteTenantsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantDeleteBulkOperation: TenantDeleteBulkOperation;" + ] + }, + "BulkOperationsApiBulkDeleteUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userDeleteBulkOperation: UserDeleteBulkOperation;" + ] + }, + "BulkOperationsApiBulkReplaceResourceInstancesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceCreateBulkOperation: ResourceInstanceCreateBulkOperation;" + ] + }, + "BulkOperationsApiBulkReplaceUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userReplaceBulkOperation: UserReplaceBulkOperation;" + ] + }, + "BulkOperationsApiBulkUnassignRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleAssignmentRemove: Array;" + ] + }, + "ConditionSetRulesApiAssignSetPermissionsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetRuleCreate: ConditionSetRuleCreate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ConditionSetRulesApiListSetPermissionsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly permission?: string;", + "readonly projId: string;", + "readonly resourceSet?: string;", + "readonly userSet?: string;" + ] + }, + "ConditionSetRulesApiUnassignSetPermissionsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetRuleRemove: ConditionSetRuleRemove;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ConditionSetsApiCreateConditionSetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetCreate: ConditionSetCreate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ConditionSetsApiDeleteConditionSetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ConditionSetsApiGetConditionSetAncestorsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "ConditionSetsApiGetConditionSetDescendantsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "ConditionSetsApiGetConditionSetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ConditionSetsApiListConditionSetsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly search?: string;", + "readonly type?: ConditionSetType;" + ] + }, + "ConditionSetsApiUpdateConditionSetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly conditionSetId: string;", + "readonly conditionSetUpdate: ConditionSetUpdate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "DataExportApiGetOrganizationExportRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly taskId: string;"] + }, + "DefaultApiGetApiEventRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly eventId: string;"] + }, + "DefaultApiGetRequestBodyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly eventId: string;"] + }, + "DefaultApiGetResponseBodyRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly eventId: string;"] + }, + "DefaultApiListActivityEventsV2DeprecatedActivityGetRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actorDisplayName?: string;", + "readonly actorId?: Array;", + "readonly actorType?: Array;", + "readonly envId?: Array;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projectId?: Array;", + "readonly timestampFrom?: number;", + "readonly timestampUntil?: number;" + ] + }, + "DefaultApiListApiEventsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actorDisplayName?: string;", + "readonly actorId?: Array;", + "readonly actorType?: Array;", + "readonly clientIp?: Array;", + "readonly envId?: Array;", + "readonly method?: Array;", + "readonly page?: number;", + "readonly path?: Array;", + "readonly perPage?: number;", + "readonly projectId?: Array;", + "readonly statusCode?: Array;", + "readonly success?: boolean;", + "readonly timestampFrom?: number;", + "readonly timestampUntil?: number;" + ] + }, + "ElementsConfigsEAPApiCreateElementsConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigCreate: ElementsConfigCreate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ElementsConfigsEAPApiDeleteElementsConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ElementsConfigsEAPApiGetElementsConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "ElementsConfigsEAPApiGetElementsConfigRuntimeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;" + ] + }, + "ElementsConfigsEAPApiListElementsConfigsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "ElementsConfigsEAPApiUpdateElementsConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly elementsConfigUpdate: ElementsConfigUpdate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly emailConfigurationCreate: EmailConfigurationCreate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "EmailConfigurationsApiGetEmailConfigurationRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "EmailConfigurationsApiSendTestEmailRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly emailConfigurationCreate: EmailConfigurationCreate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "EmailTemplatesApiGetTemplateByTypeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly templateType: EmailTemplateType;" + ] + }, + "EmailTemplatesApiListTemplatesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "EmailTemplatesApiSendTestEmailByTypeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly emailTemplateUpdate: EmailTemplateUpdate;", + "readonly envId: string;", + "readonly projId: string;", + "readonly templateType: EmailTemplateType;" + ] + }, + "EmailTemplatesApiUpdateTemplateByTypeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly emailTemplateUpdate: EmailTemplateUpdate;", + "readonly envId: string;", + "readonly projId: string;", + "readonly templateType: EmailTemplateType;" + ] + }, + "EnvironmentsApiCopyEnvironmentAsyncRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly environmentCopy: EnvironmentCopy;", + "readonly projId: string;", + "readonly wait?: number;" + ] + }, + "EnvironmentsApiCopyEnvironmentRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly environmentCopy: EnvironmentCopy;", + "readonly projId: string;" + ] + }, + "EnvironmentsApiCreateEnvironmentRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly environmentCreate: EnvironmentCreate;", "readonly projId: string;"] + }, + "EnvironmentsApiDeleteEnvironmentRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "EnvironmentsApiGetCopyEnvironmentAsyncResultRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly taskId: string;", + "readonly wait?: number;" + ] + }, + "EnvironmentsApiGetEnvironmentRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "EnvironmentsApiListEnvironmentsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "EnvironmentsApiStatsEnvironmentsRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "EnvironmentsApiTestJwksByUrlRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;", "readonly url?: string;"] + }, + "EnvironmentsApiUpdateEnvironmentRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly environmentUpdate: EnvironmentUpdate;", + "readonly projId: string;" + ] + }, + "GroupsApiAssignGroupToGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupAssignment: GroupAssignment;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiAssignRoleToGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupAddRole: GroupAddRole;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiAssignUserToGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupAssignUser: GroupAssignUser;", + "readonly groupInstanceKey: string;", + "readonly projId: string;", + "readonly userId: string;" + ] + }, + "GroupsApiCreateGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupCreate: GroupCreate;", + "readonly projId: string;" + ] + }, + "GroupsApiDeleteGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiGetDirectGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiGetGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiListDirectGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly search?: string;", + "readonly tenant?: string;" + ] + }, + "GroupsApiListGroupChildrenRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "GroupsApiListGroupParentsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "GroupsApiListGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly search?: string;", + "readonly tenant?: string;" + ] + }, + "GroupsApiListGroupRolesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "GroupsApiListGroupUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupInstanceKey: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "GroupsApiRemoveGroupFromGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupAssignment: GroupAssignment;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiRemoveRoleFromGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupAddRole: GroupAddRole;", + "readonly groupInstanceKey: string;", + "readonly projId: string;" + ] + }, + "GroupsApiRemoveUserFromGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly groupAssignUser: GroupAssignUser;", + "readonly groupInstanceKey: string;", + "readonly projId: string;", + "readonly userId: string;" + ] + }, + "ImplicitGrantsApiCreateImplicitGrantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly derivedRoleRuleCreate: DerivedRoleRuleCreate;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ImplicitGrantsApiDeleteImplicitGrantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly derivedRoleRuleDelete: DerivedRoleRuleDelete;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "InvitesApiCancelInviteRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly inviteId: string;", "readonly orgId: string;"] + }, + "InvitesApiInviteMembersToOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly inviteCreate: Array;", + "readonly inviterEmail?: string;", + "readonly inviterName?: string;", + "readonly orgId: string;" + ] + }, + "InvitesApiListOrganizationInvitesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly orgId: string;", + "readonly page?: number;", + "readonly perPage?: number;" + ] + }, + "MembersApiCreateOrganizationMembersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly inviterEmail?: string;", + "readonly inviterName?: string;", + "readonly orgMemberCreate: OrgMemberCreate;" + ] + }, + "MembersApiDeleteOrganizationMemberRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly memberId: string;"] + }, + "MembersApiDeleteOrganizationPermissionsRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly orgMemberRemovePermissions: OrgMemberRemovePermissions;"] + }, + "MembersApiGetOrganizationMemberRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly memberId: string;"] + }, + "MembersApiListOrganizationMembersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId?: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projectId?: string;" + ] + }, + "MembersApiUpdateOrganizationMemberRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly memberId: string;", "readonly orgMemberUpdate: OrgMemberUpdate;"] + }, + "OPALDataEAPApiGetAllDataOptimizedRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly orgId: string;", + "readonly projId: string;", + "readonly xShardID?: number;" + ] + }, + "OPALDataEAPApiGetAllDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly orgId: string;", + "readonly projId: string;", + "readonly timeout?: number;", + "readonly xShardID?: number;" + ] + }, + "OPALDataEAPApiGetAllRelationshipsDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly orgId: string;", + "readonly projId: string;", + "readonly timeout?: number;", + "readonly xShardID?: number;" + ] + }, + "OPALDataEAPApiGetAllResourceInstancesDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly orgId: string;", + "readonly projId: string;", + "readonly timeout?: number;", + "readonly xShardID?: number;" + ] + }, + "OPALDataEAPApiGetAllRoleAssignmentsDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly orgId: string;", + "readonly projId: string;", + "readonly timeout?: number;", + "readonly xShardID?: number;" + ] + }, + "OPALDataEAPApiGetAllUsersDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly orgId: string;", + "readonly projId: string;", + "readonly timeout?: number;", + "readonly xShardID?: number;" + ] + }, + "OperationApprovalEAPApiApproveOperationApprovalRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly operationApprovalId: string;", + "readonly operationApprovalReview: OperationApprovalReview;", + "readonly projId: string;" + ] + }, + "OperationApprovalEAPApiCancelOperationApprovalRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly operationApprovalId: string;", + "readonly projId: string;" + ] + }, + "OperationApprovalEAPApiCreateOperationApprovalRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly operationApprovalUserCreate: OperationApprovalUserCreate;", + "readonly projId: string;" + ] + }, + "OperationApprovalEAPApiDenyOperationApprovalRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly operationApprovalId: string;", + "readonly operationApprovalReview: OperationApprovalReview;", + "readonly projId: string;" + ] + }, + "OperationApprovalEAPApiGetOperationApprovalRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly operationApprovalId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "OperationApprovalEAPApiListOperationApprovalsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly resourceInstance?: string;", + "readonly status?: RequestStatus;" + ] + }, + "OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly operationApprovalId: string;", + "readonly operationApprovalReview: OperationApprovalReview;", + "readonly projId: string;" + ] + }, + "OrganizationsApiCreateOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly organizationCreate: OrganizationCreate;", + "readonly pageFullUrl?: string;" + ] + }, + "OrganizationsApiDeleteOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly orgId: string;"] + }, + "OrganizationsApiGetOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly orgId: string;"] + }, + "OrganizationsApiListOrganizationsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly page?: number;", + "readonly perPage?: number;", + "readonly search?: Search;" + ] + }, + "OrganizationsApiRestoreOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly orgId: string;"] + }, + "OrganizationsApiStatsOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly orgId: string;"] + }, + "OrganizationsApiUpdateOrganizationRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly orgId: string;", "readonly organizationUpdate: OrganizationUpdate;"] + }, + "PolicyDecisionPointsApiDisableDebugAuditLogsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pdpId: string;", + "readonly projId: string;" + ] + }, + "PolicyDecisionPointsApiEnableDebugAuditLogsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pdpId: string;", + "readonly projId: string;" + ] + }, + "PolicyDecisionPointsApiGetPdpConfigValuesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pdpId: string;", + "readonly projId: string;", + "readonly xShardID?: number;" + ] + }, + "PolicyDecisionPointsApiListPdpConfigsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "PolicyDecisionPointsApiMigrateShardsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pDPShardMigration: PDPShardMigration;", + "readonly projId: string;" + ] + }, + "PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pDPDataRefreshRequest?: PDPDataRefreshRequest;", + "readonly projId: string;" + ] + }, + "PolicyDecisionPointsApiRefreshPdpDataRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pDPDataRefreshRequest?: PDPDataRefreshRequest;", + "readonly pdpId: string;", + "readonly projId: string;" + ] + }, + "PolicyDecisionPointsApiRotatePdpApiKeyRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly pdpId: string;", + "readonly projId: string;" + ] + }, + "PolicyGitRepositoriesApiActivatePolicyRepoRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;", "readonly repoId: string;"] + }, + "PolicyGitRepositoriesApiCreatePolicyRepoRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly policyRepoCreate: PolicyRepoCreate;", "readonly projId: string;"] + }, + "PolicyGitRepositoriesApiDeletePolicyRepoRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;", "readonly repoId: string;"] + }, + "PolicyGitRepositoriesApiDisableActivePolicyRepoRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;"] + }, + "PolicyGitRepositoriesApiGetActivePolicyRepoRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;"] + }, + "PolicyGitRepositoriesApiGetPolicyRepoRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;", "readonly repoId: string;"] + }, + "PolicyGitRepositoriesApiListPolicyReposRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly policyGuardScopeAssociate: PolicyGuardScopeAssociate;", + "readonly policyGuardScopeId: string;", + "readonly wait?: number;" + ] + }, + "PolicyGuardsEAPApiCreatePolicyGuardRuleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly policyGuardRuleCreate: PolicyGuardRuleCreate;", + "readonly policyGuardScopeId: string;", + "readonly wait?: number;" + ] + }, + "PolicyGuardsEAPApiCreatePolicyGuardScopeRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly policyGuardScopeCreate: PolicyGuardScopeCreate;"] + }, + "PolicyGuardsEAPApiDeletePolicyGuardRuleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly policyGuardRuleItem: PolicyGuardRuleItem;", + "readonly policyGuardScopeId: string;" + ] + }, + "PolicyGuardsEAPApiDeletePolicyGuardScopeRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly policyGuardScopeId: string;"] + }, + "PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly policyGuardScopeAssociate: PolicyGuardScopeAssociate;", + "readonly policyGuardScopeId: string;" + ] + }, + "PolicyGuardsEAPApiGetPolicyGuardScopeRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly policyGuardScopeId: string;"] + }, + "PolicyGuardsEAPApiListPolicyGuardRulesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly page?: number;", + "readonly perPage?: number;", + "readonly policyGuardScopeId: string;" + ] + }, + "PolicyGuardsEAPApiListPolicyGuardScopesRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly page?: number;", "readonly perPage?: number;"] + }, + "ProjectsApiCreateProjectRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projectCreate: ProjectCreate;"] + }, + "ProjectsApiDeleteProjectRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;"] + }, + "ProjectsApiGetProjectRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;"] + }, + "ProjectsApiListProjectsRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly page?: number;", "readonly perPage?: number;"] + }, + "ProjectsApiUpdateProjectRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly projId: string;", "readonly projectUpdate: ProjectUpdate;"] + }, + "ProxyConfigApiCreateProxyConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly proxyConfigCreate: ProxyConfigCreate;" + ] + }, + "ProxyConfigApiDeleteProxyConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly proxyConfigId: string;" + ] + }, + "ProxyConfigApiGetProxyConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly proxyConfigId: string;" + ] + }, + "ProxyConfigApiListProxyConfigsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;" + ] + }, + "ProxyConfigApiUpdateProxyConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly proxyConfigId: string;", + "readonly proxyConfigUpdate: ProxyConfigUpdate;" + ] + }, + "RelationshipTuplesApiBulkCreateRelationshipTuplesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationshipTupleCreateBulkOperation: RelationshipTupleCreateBulkOperation;" + ] + }, + "RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationshipTupleDeleteBulkOperation: RelationshipTupleDeleteBulkOperation;" + ] + }, + "RelationshipTuplesApiCreateRelationshipTupleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationshipTupleCreate: RelationshipTupleCreate;" + ] + }, + "RelationshipTuplesApiDeleteRelationshipTupleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationshipTupleDelete: RelationshipTupleDelete;" + ] + }, + "RelationshipTuplesApiListRelationshipTuplesDetailedRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly object?: string;", + "readonly objectType?: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly relation?: string;", + "readonly subject?: string;", + "readonly subjectType?: string;", + "readonly tenant?: string;" + ] + }, + "RelationshipTuplesApiListRelationshipTuplesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly detailed?: boolean;", + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly object?: string;", + "readonly objectType?: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly relation?: string;", + "readonly subject?: string;", + "readonly subjectType?: string;", + "readonly tenant?: string;" + ] + }, + "ResourceActionGroupsApiCreateResourceActionGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceActionGroupCreate: ResourceActionGroupCreate;", + "readonly resourceId: string;" + ] + }, + "ResourceActionGroupsApiDeleteResourceActionGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actionGroupId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceActionGroupsApiGetResourceActionGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actionGroupId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceActionGroupsApiListResourceActionGroupsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceActionGroupsApiUpdateResourceActionGroupRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actionGroupId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceActionGroupUpdate: ResourceActionGroupUpdate;", + "readonly resourceId: string;" + ] + }, + "ResourceActionsApiCreateResourceActionRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceActionCreate: ResourceActionCreate;", + "readonly resourceId: string;" + ] + }, + "ResourceActionsApiDeleteResourceActionRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actionId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceActionsApiGetResourceActionRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actionId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceActionsApiListResourceActionsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceActionsApiUpdateResourceActionRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly actionId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceActionUpdate: ResourceActionUpdate;", + "readonly resourceId: string;" + ] + }, + "ResourceAttributesApiCreateResourceAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceAttributeCreate: ResourceAttributeCreate;", + "readonly resourceId: string;" + ] + }, + "ResourceAttributesApiDeleteResourceAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly attributeId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceAttributesApiGetResourceAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly attributeId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceAttributesApiListResourceAttributesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceAttributesApiUpdateResourceAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly attributeId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceAttributeUpdate: ResourceAttributeUpdate;", + "readonly resourceId: string;" + ] + }, + "ResourceInstancesApiCreateResourceInstanceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceCreate: ResourceInstanceCreate;" + ] + }, + "ResourceInstancesApiDeleteResourceInstanceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly instanceId: string;", + "readonly projId: string;" + ] + }, + "ResourceInstancesApiGetResourceInstanceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly detailed?: boolean;", + "readonly envId: string;", + "readonly instanceId: string;", + "readonly projId: string;" + ] + }, + "ResourceInstancesApiListResourceInstancesDetailedRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly search?: Array;", + "readonly tenant?: string;" + ] + }, + "ResourceInstancesApiListResourceInstancesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly detailed?: boolean;", + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly search?: Array;", + "readonly tenant?: string;" + ] + }, + "ResourceInstancesApiUpdateResourceInstanceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly instanceId: string;", + "readonly projId: string;", + "readonly resourceInstanceUpdate: ResourceInstanceUpdate;" + ] + }, + "ResourceRelationsApiCreateResourceRelationRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationCreate: RelationCreate;", + "readonly resourceId: string;" + ] + }, + "ResourceRelationsApiDeleteResourceRelationRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceRelationsApiGetResourceRelationRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly relationId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceRelationsApiListResourceRelationsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceRolesApiAssignPermissionsToResourceRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly addRolePermissions: AddRolePermissions;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ResourceRolesApiCreateResourceRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly resourceRoleCreate: ResourceRoleCreate;" + ] + }, + "ResourceRolesApiDeleteResourceRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ResourceRolesApiGetResourceRoleAncestorsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ResourceRolesApiGetResourceRoleDescendantsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ResourceRolesApiGetResourceRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ResourceRolesApiListResourceRolesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourceRolesApiRemovePermissionsFromResourceRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly removeRolePermissions: RemoveRolePermissions;", + "readonly resourceId: string;", + "readonly roleId: string;" + ] + }, + "ResourceRolesApiUpdateResourceRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly resourceRoleUpdate: ResourceRoleUpdate;", + "readonly roleId: string;" + ] + }, + "ResourcesApiCreateResourceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceCreate: ResourceCreate;" + ] + }, + "ResourcesApiDeleteResourceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourcesApiGetResourceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;" + ] + }, + "ResourcesApiListResourcesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeBuiltIn?: boolean;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly search?: string;" + ] + }, + "ResourcesApiReplaceResourceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly resourceReplace: ResourceReplace;" + ] + }, + "ResourcesApiUpdateResourceRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId: string;", + "readonly resourceUpdate: ResourceUpdate;" + ] + }, + "RoleAssignmentsApiAssignRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleAssignmentCreate: RoleAssignmentCreate;" + ] + }, + "RoleAssignmentsApiBulkAssignRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly missingUserPolicy?: MissingUserPolicy;", + "readonly projId: string;", + "readonly roleAssignmentCreate: Array;" + ] + }, + "RoleAssignmentsApiBulkUnassignRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleAssignmentRemove: Array;" + ] + }, + "RoleAssignmentsApiListRoleAssignmentsDetailedRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly resourceInstance?: string;", + "readonly role?: Array;", + "readonly tenant?: Array;", + "readonly user?: Array;" + ] + }, + "RoleAssignmentsApiListRoleAssignmentsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly detailed?: boolean;", + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resource?: string;", + "readonly resourceInstance?: string;", + "readonly role?: Array;", + "readonly tenant?: Array;", + "readonly user?: Array;" + ] + }, + "RoleAssignmentsApiUnassignRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly returnDeleted?: boolean;", + "readonly roleAssignmentRemove: RoleAssignmentRemove;" + ] + }, + "RolesApiAssignPermissionsToRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly addRolePermissions: AddRolePermissions;", + "readonly envId: string;", + "readonly projId: string;", + "readonly roleId: string;" + ] + }, + "RolesApiCreateRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleCreate: RoleCreate;" + ] + }, + "RolesApiDeleteRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleId: string;" + ] + }, + "RolesApiGetRoleAncestorsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleId: string;" + ] + }, + "RolesApiGetRoleDescendantsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleId: string;" + ] + }, + "RolesApiGetRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleId: string;" + ] + }, + "RolesApiListRolesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly search?: string;" + ] + }, + "RolesApiRemovePermissionsFromRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly removeRolePermissions: RemoveRolePermissions;", + "readonly roleId: string;" + ] + }, + "RolesApiUpdateRoleRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly roleId: string;", + "readonly roleUpdate: RoleUpdate;" + ] + }, + "ScopeConfigurationsApiGetScopeConfigRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "ScopeConfigurationsApiResetScopeConfigRequest": { + "extends": [], + "kind": "interface", + "members": ["readonly envId: string;", "readonly projId: string;"] + }, + "ScopeConfigurationsApiSetScopeConfigRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly scopeConfigSet: ScopeConfigSet;" + ] + }, + "TenantsApiAddUserToTenantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userCreate: UserCreate;" + ] + }, + "TenantsApiCreateTenantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantCreate: TenantCreate;" + ] + }, + "TenantsApiDeleteTenantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;" + ] + }, + "TenantsApiDeleteTenantUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly userId: string;" + ] + }, + "TenantsApiGetTenantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;" + ] + }, + "TenantsApiListTenantUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeResourceInstanceRoles?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly role?: string;", + "readonly search?: string;", + "readonly tenantId: string;" + ] + }, + "TenantsApiListTenantsRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeTotalCount?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly search?: string;" + ] + }, + "TenantsApiUpdateTenantRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly tenantId: string;", + "readonly tenantUpdate: TenantUpdate;" + ] + }, + "UserAttributesApiCreateUserAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceAttributeCreate: ResourceAttributeCreate;", + "readonly resourceId?: string;" + ] + }, + "UserAttributesApiDeleteUserAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly attributeId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId?: string;" + ] + }, + "UserAttributesApiGetUserAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly attributeId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceId?: string;" + ] + }, + "UserAttributesApiListUserAttributesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceId?: string;" + ] + }, + "UserAttributesApiUpdateUserAttributeRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly attributeId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceAttributeUpdate: ResourceAttributeUpdate;", + "readonly resourceId?: string;" + ] + }, + "UserInvitesApiApproveUserInviteRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsUserInviteApprove: ElementsUserInviteApprove;", + "readonly envId: string;", + "readonly projId: string;", + "readonly userInviteId: string;" + ] + }, + "UserInvitesApiCreateUserInviteRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsUserInviteCreate: ElementsUserInviteCreate;", + "readonly envId: string;", + "readonly projId: string;" + ] + }, + "UserInvitesApiDeleteUserInviteRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userInviteId: string;" + ] + }, + "UserInvitesApiGetUserInviteRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userInviteId: string;" + ] + }, + "UserInvitesApiListUserInvitesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly role?: string;", + "readonly search?: string;", + "readonly tenant?: string;" + ] + }, + "UserInvitesApiUpdateUserInviteRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsUserInviteUpdate: ElementsUserInviteUpdate;", + "readonly envId: string;", + "readonly projId: string;", + "readonly userInviteId: string;" + ] + }, + "UsersApiAssignRoleToUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userId: string;", + "readonly userRoleCreate: UserRoleCreate;" + ] + }, + "UsersApiCreateUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userCreate: UserCreate;" + ] + }, + "UsersApiDeleteUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userId: string;" + ] + }, + "UsersApiGetUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userId: string;" + ] + }, + "UsersApiListUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly includeResourceInstanceRoles?: boolean;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly role?: string;", + "readonly search?: string;", + "readonly searchOperator?: SearchOperator;" + ] + }, + "UsersApiReplaceUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userCreate: UserCreate;", + "readonly userId: string;" + ] + }, + "UsersApiUnassignRoleFromUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly returnDeleted?: boolean;", + "readonly userId: string;", + "readonly userRoleRemove: UserRoleRemove;" + ] + }, + "UsersApiUpdateUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly envId: string;", + "readonly projId: string;", + "readonly userId: string;", + "readonly userUpdate: UserUpdate;" + ] + }, + "UsersElementsDataApiElementsAssignRoleToUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly elementsUserRoleCreate: ElementsUserRoleCreate;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;", + "readonly userId: string;" + ] + }, + "UsersElementsDataApiElementsCreateUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly elementsUserCreate: ElementsUserCreate;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;" + ] + }, + "UsersElementsDataApiElementsDeleteUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;", + "readonly userId: string;" + ] + }, + "UsersElementsDataApiElementsListRolesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;", + "readonly search?: string;" + ] + }, + "UsersElementsDataApiElementsListUsersRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;", + "readonly search?: string;" + ] + }, + "UsersElementsDataApiElementsUnassignRoleFromUserRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly elementsUserRoleRemove: ElementsUserRoleRemove;", + "readonly envId: string;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;", + "readonly userId: string;" + ] + }, + "UsersElementsDataApiListElementsUserInvitesRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly page?: number;", + "readonly perPage?: number;", + "readonly projId: string;", + "readonly resourceInstanceId?: string;", + "readonly search?: string;", + "readonly status?: UserInviteStatus;" + ] + }, + "UsersElementsDataApiSetConfigActiveRequest": { + "extends": [], + "kind": "interface", + "members": [ + "readonly elementsConfigId: string;", + "readonly envId: string;", + "readonly projId: string;" + ] + } + }, + "generatedSupportShapes": { + "src/openapi/api.ts": "a2687910e78687fe42d6788d99ba806144e97a8852b29aa037dc2db6784ecc8a", + "src/openapi/base.ts": "79fb806cdaf7078d005caaf73a8407ae739ed2701b83ee86175c125f531040dd", + "src/openapi/common.ts": "e05998698c2858d293596a8fc61a5dce864f0767e7eb2db32e0cf5ce01288d81", + "src/openapi/configuration.ts": "cba6596389bacca665348cc17a8daec9270ffc91238e142521b8c5392f0e0967", + "src/openapi/index.ts": "98471e02cfe26a2700ae09063879ca6cd10204f31fd06c85ffbc8b665d357330" + }, + "implementationShapes": { + "src/api/api-keys.ts:ApiKeysApi.create": "c5e8ed8c20b9b5f445b76bee84806184373e859006ffccc375fac8eaf8a27e4c", + "src/api/api-keys.ts:ApiKeysApi.delete": "cb7ee0ab006f85108cd57894dc46cf0a9f71167317ae50556f6ce167cfc71083", + "src/api/api-keys.ts:ApiKeysApi.get": "18c40439c4384653e5d33584754ce910e341d7a3398fb78fb163fac48143a4fa", + "src/api/api-keys.ts:ApiKeysApi.getScope": "dd2ee0b0329eaba95a0091797b48e831486f6f894795dcf63ff2e0f5844e0c8e", + "src/api/api-keys.ts:ApiKeysApi.list": "f401eeef4714fed0dd05610e6c04a81c80324fcf268a73896a4f3b2bf9374408", + "src/api/api-keys.ts:ApiKeysApi.rotate": "61ad1fce0ad7fd0cc6a3312ee97ea4a375a3fbc5d1c6182cbca0fc2c9777d81e", + "src/api/audit-logs.ts:AuditLogsApi.get": "c1d457319bd266529ec199d1c639d267286516dc6cd6ef15d19e5a3e34ab03ed", + "src/api/audit-logs.ts:AuditLogsApi.list": "96029df0d060a3c38d3a4ebbd75e28cfe022776fb5e42302b5dfca228e93339d", + "src/api/base.ts:BaseFactsPermitAPI.clone": "3b46132f3c954b259f0d3cbabd8ae38817c138bd74aeb5d79989f741b0f5bd8b", + "src/api/base.ts:BaseFactsPermitAPI.waitForSync": "4f08c3142f6705f377fc984d78458f5fd80c2fc4b7fb797bbe825f1e56513c40", + "src/api/base.ts:BasePermitApi.ensureAccessLevel": "7b0488016a2275b9add93fc8baafa74ddff925a21fcdd9d0595c5bca1c9a39ff", + "src/api/base.ts:BasePermitApi.ensureContext": "2465fd5a22bccde88c89dfcc89e7ae34fb49320a0ca4f8d72f99a3005242e24f", + "src/api/base.ts:BasePermitApi.handleApiError": "58501b704693ecae08925b33b916da536a247e34f9c221f1f5108fe53fbeccc2", + "src/api/base.ts:BasePermitApi.setContextFromApiKey": "9e0cc84d2162182c6c42f755630089f40fdecc38eedc9b6a3bd547ec348df444", + "src/api/condition-set-rules.ts:ConditionSetRulesApi.create": "53b02a01d173d53c35606e2ce84bd2cb39ed93e14235f877f8b94466e6eb13f0", + "src/api/condition-set-rules.ts:ConditionSetRulesApi.delete": "9960408bab5c7e0df21d584b9e5c386ccdde20e023fda2447b03a05c783d9f8f", + "src/api/condition-set-rules.ts:ConditionSetRulesApi.list": "714fc9487f2353aeb378e8347eea03b92dd3ea3532d28d276023c659c115fa4c", + "src/api/condition-sets.ts:ConditionSetsApi.create": "634a995b6efb97e29b6cc5e3a5eff466cdd923cbb592041a865ecbd7a5f3aa5d", + "src/api/condition-sets.ts:ConditionSetsApi.delete": "5916376dad102a0cfacaf642170696efa7fedc0f47a64c1aceea6236ba63a224", + "src/api/condition-sets.ts:ConditionSetsApi.get": "009ed146683135ab82254146049d85e59321f8e846f6bd6ff19cc7e972a3fc68", + "src/api/condition-sets.ts:ConditionSetsApi.getById": "dcbcd00110908b5a00ce0bdb6e7023e88e3af17d245c35f892782464c8453d32", + "src/api/condition-sets.ts:ConditionSetsApi.getByKey": "91635673a69169b2fd6f10d0a7be607ab8a11a533de2a980bb4c6c6101ba9de0", + "src/api/condition-sets.ts:ConditionSetsApi.list": "8f7efa7e7777e77f7ccf37b33f445ff2bfc7f1e566a89644a65693862bb0e021", + "src/api/condition-sets.ts:ConditionSetsApi.update": "415779433421771ac33aa62bf046eaaeda535114945d66ce59baeb436025cf2e", + "src/api/context.ts:.defaultSelection": "ab80fdb9caa873e95c125e14288fe9e0dd3b1b9d54a21a555709c227685e1b52", + "src/api/context.ts:.identifier": "e57a1a001d56c8488d75f0bf7e71faccf3af76a301dd98d5bce7d909f31ab40f", + "src/api/context.ts:.initializeApiContext": "f153e4b03e6d90c30d797c4dcafe51b94d62382d5e30d8f2b304891134c7b7a7", + "src/api/context.ts:.parseScope": "457f59b9729498d92b5019b11f4d5fa48409479799a117a53b1847c7007c9326", + "src/api/context.ts:.stateOf": "4711b172517c99a05d4919f90d475b9139ff2c0ba62a12cbbee06e47c91f2a84", + "src/api/elements.ts:ElementsClient.loginAs": "3efbdf39bab053e511dfd2fde512c431310ed675fd7ded69a1a9888258d2852d", + "src/api/environments.ts:EnvironmentsApi.copy": "6519b8d09579eac752575c60f0a19b69190980012371e711dcc1e45ce8b97d98", + "src/api/environments.ts:EnvironmentsApi.copyAsync": "5754cc392161a7ee2cdf149b0ccbf62e5d3476b9a3b2e09696d2e2cda42f47f0", + "src/api/environments.ts:EnvironmentsApi.create": "b64b4374a61662177122ddc9d4474692e54cecf608e45ff46d59df8be2201589", + "src/api/environments.ts:EnvironmentsApi.delete": "5baece8a473ee28a1db88471cc6f8be440a5ff38de7197f566c71218675c859f", + "src/api/environments.ts:EnvironmentsApi.get": "0074e3a621a5f9764eead8c15841e93a97f4ec376dc4ce730b2c18cf5bd6d163", + "src/api/environments.ts:EnvironmentsApi.getApiKey": "cfecc6c896bec44207e3e67126282207d33081c5f17253308d324b57a8189ee6", + "src/api/environments.ts:EnvironmentsApi.getById": "658d3d51f81f60fc5247f8551191e7871869f305683c28f7f64cc983ddbe4159", + "src/api/environments.ts:EnvironmentsApi.getByKey": "07c30e1ac48454b55af44a5a5e3b6bee15a1a5d3627a6c46cf100c7d543be870", + "src/api/environments.ts:EnvironmentsApi.getCopyResult": "f7fc38145d02a5e3646a03458289cfb311a55460bae4b751cca429cffd60379e", + "src/api/environments.ts:EnvironmentsApi.getStats": "229276989397998a57aa326fe39b77419955a1e219ec8d4c3c854847e4825f19", + "src/api/environments.ts:EnvironmentsApi.list": "e4c2966344c73da509933e552f34e80d56036dba85339a6382338911c9e63d44", + "src/api/environments.ts:EnvironmentsApi.update": "ca53dce1644f9d25819c009a4d195991bdde1b864fe934cdcb5e2125240853c5", + "src/api/environments.ts:EnvironmentsApi.validateCopyWait": "2b95057e953b8031502c2fef1d2dd2c5e47c382a1f1c9744cac69eafa318afe4", + "src/api/groups.ts:GroupsApi.assignRole": "4699e6a2e173a84d023d6d6b35fd5a4fc79c2099314d2e1c2296813c87713b03", + "src/api/groups.ts:GroupsApi.assignUser": "0ae2d94d4975c4a617c24626ca6e686c11bfd0d8b90982626dc59b44ab459588", + "src/api/groups.ts:GroupsApi.create": "53e869985f197804f878ad0fc59a4a3d08c39b49e0080fc6f35e33c5c246083e", + "src/api/groups.ts:GroupsApi.delete": "157cdca04570dc57018dc39b857b4cbe3d6934539954cc0a63eb8d67b026e5e5", + "src/api/groups.ts:GroupsApi.get": "560af1158e7de6f47b9614dd95bd90008f2409fd98fe6d1093bbb87cafebcf1d", + "src/api/groups.ts:GroupsApi.list": "90edb2587388c936b70c4f08cfe756d0e63dc130ff658bea7f0247d984fecab3", + "src/api/groups.ts:GroupsApi.removeRole": "967397c1d2dbc236d242b3652723294a6b46e8b399dfb25f9ea6e47bca8c90c5", + "src/api/groups.ts:GroupsApi.removeUser": "2789785bec9e7639814f6cda00c87c6c30d79494927d71a5f9aeafa98827077f", + "src/api/pdps.ts:PdpsApi.refresh": "a5c232311113da170c1c905875e1a43f1c4bd7c5ca4fb06bccfe8ee3a6bc4315", + "src/api/projects.ts:ProjectsApi.create": "e12da966e3bcfbc3bcc5f85eba44a431fe576530be64bb794df647a343f9f3d8", + "src/api/projects.ts:ProjectsApi.delete": "b26013dff0f6e535ed825f7ecddf6014349ca6fad09adba56c44c4054fde4848", + "src/api/projects.ts:ProjectsApi.get": "643d3d9e8924bc89d6fa54aaf55f91b45c4c2cd0e18c772fcb01d8e810e551d9", + "src/api/projects.ts:ProjectsApi.getById": "9862681531bb667a98d5688fc09c702935c6f032faeea4246d785adaabf56748", + "src/api/projects.ts:ProjectsApi.getByKey": "f9a61792bfad0fb155eb7cd32f6d09775e7ce4eb9ecbbd79166dfda4890d8f91", + "src/api/projects.ts:ProjectsApi.list": "2473141f5a3c3b8acc0598ddc70aa4764349ea9f07d95313aacacef7bb79415f", + "src/api/projects.ts:ProjectsApi.update": "3ca164d1758849477f84854c0646ec8933472d7bcc16b9fc4aa6dcd816295fa2", + "src/api/proxy-configs.ts:ProxyConfigsApi.create": "90488cd1d4f6e393e5eae28300fb2b646d7a772e60c02d029fa4491fa11ca345", + "src/api/proxy-configs.ts:ProxyConfigsApi.delete": "ddd97fd1c3ed483973b73e5e36fe3aa3912b1a0197b76342920aea42a533a190", + "src/api/proxy-configs.ts:ProxyConfigsApi.get": "18d52c95e0ed573ed44c6e2fd153ebed441635277d2d643115957dfc1fb415ba", + "src/api/proxy-configs.ts:ProxyConfigsApi.list": "77f248c6467d8b43b5d3280fcfb91b5d77c04953cdaa955e02bece982efc7a0f", + "src/api/proxy-configs.ts:ProxyConfigsApi.update": "efbac53c50f5d5dbd1c2c637027965bb2a44176d329647dac079807989c4a7c6", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.bulkRelationshipTuples": "3f67eb5dffbd5d55c48d176d9fd788184d41949424c18989e49a2c21d5184c4e", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.bulkUnRelationshipTuples": "6ec1992d989f3d9168bacf5886037d38a8c46032930af1af4d0eec6e3939fdbc", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.create": "55e771b38c0fe9f1f7d1da723f71e5e1cd35df8c7ddc854dc56f6a911f9414d7", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.delete": "393f12ebc32d57c34156326cd4db2cec45cc29657c706a8f6b557465251a50c5", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.list": "8c16dc57c39a3846cb6640d2b5ebc81928e3b08fb76f6e8d3e4e73960c02af71", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.listDetailed": "4e845baceee7a2a0ff3fc96e661fd572039fcde7a6d358161390dfdc2e25e833", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.create": "7d936f3c1589adda9ef3606270c6f1767db8553d03fee20c18a8ca088b7f6d15", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.delete": "d40fd5a06bd47ae221867787d5574c5d4dde8840183ba13058b051b7b812aeb6", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.get": "bb3d4e0ef0fbd1da6a3e8b033378e4afff50fd2f712ded5d11729b8eada66214", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.getById": "36a03ec97259757b4eff68807ed30018923d8c4bbf145f45064aa78f048b15cd", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.getByKey": "a3e39e02624f073c27675cbdfccdff22e71075ab28435bd1bd55b98f53d9b72a", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.list": "df024ac5a3906018e56140dab2e9e2aae82dbfe9a8cc257261b9579a8e27ce39", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.update": "b90198271d4e9919054e90aa5ed4e3388ebc646fc88020edfbc97bc2a57be504", + "src/api/resource-actions.ts:ResourceActionsApi.create": "c0df3a5f1d89726e50185cc27438a626c2335a61331c7b72d7393b254a855201", + "src/api/resource-actions.ts:ResourceActionsApi.delete": "041607d8dcc68350e2ddd8d7708976bdd46f4705d08996fd0ea19797543796d5", + "src/api/resource-actions.ts:ResourceActionsApi.get": "824360d742fcdc4360c5d84498f3b927f48f7f6c9fd045c8710879ae3eff33d7", + "src/api/resource-actions.ts:ResourceActionsApi.getById": "394d128680877f532e674c6d10be968ac5b8eaa2427cf56540187192c309f8c9", + "src/api/resource-actions.ts:ResourceActionsApi.getByKey": "75ddde49fd267d0f1b3fbab1c5c3189b65932fd9b21412f7175a643467f58b84", + "src/api/resource-actions.ts:ResourceActionsApi.list": "547304c102eca583af4d7cad15632b600baebff8dfbb45f202841e5e1c94e0dc", + "src/api/resource-actions.ts:ResourceActionsApi.update": "bb97f50cd063181b9c1046d269ce7ca629a89b895b9b5a96e9a75ea4cd4c2099", + "src/api/resource-attributes.ts:ResourceAttributesApi.create": "7c489a76ca8dc4813da959d9c7b274ad97e4eac8bba97e6752a545dadf1b3673", + "src/api/resource-attributes.ts:ResourceAttributesApi.delete": "3b4dcae3781c2b530f8a1e6f799860a1bd73fe59e45f655a34e79508e25bfce8", + "src/api/resource-attributes.ts:ResourceAttributesApi.get": "5fce94c978a99c24217945941429c7375b8aea84dcd271dd475dd6aeb4533306", + "src/api/resource-attributes.ts:ResourceAttributesApi.getById": "9df5203f216247703fa4ae16767d39056376e46991f01f52551c8a76924dda10", + "src/api/resource-attributes.ts:ResourceAttributesApi.getByKey": "27909f16d6162aadad8a39e0d58e1131b254f0bf75fde089cf0af0306f9036a1", + "src/api/resource-attributes.ts:ResourceAttributesApi.list": "4f9f0cea3e90692aa0b6870397599920df89149dd2e500c15ba176698437e588", + "src/api/resource-attributes.ts:ResourceAttributesApi.update": "cff60cdc6d3c3b638e9323c67b29a9c1140a9df9ccb037c298578802ca2267a3", + "src/api/resource-instances.ts:ResourceInstancesApi.create": "7f8bf0777ec8444b91620f0c7bfb767962e6fca99fc35c892344c1cefaf4b1e3", + "src/api/resource-instances.ts:ResourceInstancesApi.delete": "d204495555c2b70a8d85a95221fe331746b6f844068a5b29dd90a1b25dbba0cc", + "src/api/resource-instances.ts:ResourceInstancesApi.get": "ac499824752e0af91597616a7b02a7699bd65c70c8dd38f194b12a1b24915177", + "src/api/resource-instances.ts:ResourceInstancesApi.getById": "98ec3006093dcad5008aaed9bf622b2f55415f090a6552638718b0571c1e3227", + "src/api/resource-instances.ts:ResourceInstancesApi.getByKey": "ee191491e083070238bd3a076acffc69f25815a0becb5ac19688d5b52c1b712a", + "src/api/resource-instances.ts:ResourceInstancesApi.list": "554efa93d8af1b4dbd41eb136f495430b37fefddeec18a20b04d1904f743b9e6", + "src/api/resource-instances.ts:ResourceInstancesApi.listDetailed": "751b263e706a811cc1ca40affbb8628d3be3d62dfcdf716e6689507172e594ac", + "src/api/resource-instances.ts:ResourceInstancesApi.update": "ac6c4da46ba29de478cc21196ecc28311c82a630050ed5ce49fff550c43dff77", + "src/api/resource-relations.ts:ResourceRelationsApi.create": "89de09c7ab730db2e3dfae909a2f8e1c4b3f3145cfe62b003e6b76c572663678", + "src/api/resource-relations.ts:ResourceRelationsApi.delete": "dd4e8f220230055dcd2eb1a79af4c156ed0b311fce52d3a474af11ef3ce55d64", + "src/api/resource-relations.ts:ResourceRelationsApi.get": "d8931ab3bf4b8614e6e49077c126d7a95de2bc062c6ce1bd8439e7853788fda2", + "src/api/resource-relations.ts:ResourceRelationsApi.getById": "8594518272b896c1602dd2c6acaffcd8cf012874d4f0e71fcb457e5f4c7ec703", + "src/api/resource-relations.ts:ResourceRelationsApi.getByKey": "a196452fc1073294aee244d39f81da750d87f93020b0c0d960a1a75570e43e42", + "src/api/resource-relations.ts:ResourceRelationsApi.list": "29f5ea420816784a1ee897c73e9917462e7a6655dde2742dd4641665bfac264c", + "src/api/resource-roles.ts:ResourceRolesApi.assignPermissions": "d0c6226b74e27f4a1f135bd62dc8b225eca2b1f325ed899a7ea636842e09698e", + "src/api/resource-roles.ts:ResourceRolesApi.create": "4b0e897fcb94704381114ee2b77af5d64555ab0e4d7e92fdd401dbd6ab03245d", + "src/api/resource-roles.ts:ResourceRolesApi.createRoleDerivation": "f069e2a2e24e6141be38f6f1570902fe30fe0845ada5294ef6da4c9963bf33d3", + "src/api/resource-roles.ts:ResourceRolesApi.delete": "8cc1d6d98bddeb5976df2eabbf788a5e638b8cc75e0da93709dd5ae96846f5a4", + "src/api/resource-roles.ts:ResourceRolesApi.deleteRoleDerivation": "dbecb95fe3a3c66fa34e8d2c73948bc2613e75f2b4e4ae6c932fee7bf9fa1dd9", + "src/api/resource-roles.ts:ResourceRolesApi.get": "74eaa95e661325b87320c2d7810ce8c3d2f319ce17ab8e4acdf43a95fbd8ce7b", + "src/api/resource-roles.ts:ResourceRolesApi.getById": "a0b450c4ad421f23f7bbe82c5e0ab8980040a726d90f094559eebdab1208c4e1", + "src/api/resource-roles.ts:ResourceRolesApi.getByKey": "856025ef3a1fdc7558213bf05d1e0966138e7db117bd1b4bbc061dd1626ad865", + "src/api/resource-roles.ts:ResourceRolesApi.list": "fa1b3c5257d55fb32475254f4a6570f38e296ecf0db16a47f2d3234477617c0a", + "src/api/resource-roles.ts:ResourceRolesApi.removePermissions": "a5a62cec9448ccaff0525271f6b5c3f965576d84b9786018dfc31e61345405b7", + "src/api/resource-roles.ts:ResourceRolesApi.update": "f6d1d029e8fcb44ea4c8f6a7082380a8fd38c16d6bf672e53b55de46f47dff94", + "src/api/resource-roles.ts:ResourceRolesApi.updateRoleDerivationConditions": "0d2c55588e1506779f7b35858cf49eef8aa27a23b87ccf367ed0f659424d8682", + "src/api/resources.ts:ResourcesApi.create": "d0e2d2e8dfff0b79ea1c4c53435b02a2b7aef44bfcc98025d02ff10a54290c4f", + "src/api/resources.ts:ResourcesApi.delete": "db6d020096b35c888f1c855ee8ea7e1157a93d3b757ab63c40e9ae8f3ae3f38a", + "src/api/resources.ts:ResourcesApi.get": "cb2053ec93b1e1130b90769280f40f59ecc29728b126dc39d52f2cc0fbbde117", + "src/api/resources.ts:ResourcesApi.getById": "5ac00e46c9275b37cada323e503caa3ba338518f9f7a462610828ca254d400bf", + "src/api/resources.ts:ResourcesApi.getByKey": "22e2b0ba0c857a889307af951e75ce5c5c7b3188eaa142f64ee9a605af8e4b03", + "src/api/resources.ts:ResourcesApi.list": "e507669e8d066223d8975e1cec07e2a147868f684651dea4c54e4bbe3b519e85", + "src/api/resources.ts:ResourcesApi.replace": "3c6580c33cd972272ee142b1608e1a7cec4eaebd94552a65bd8e60cafc96a897", + "src/api/resources.ts:ResourcesApi.update": "01c42298f434ea2e297fdc0a2d12acbd48dd8c931534caa957a55b7c86de36f7", + "src/api/role-assignments.ts:RoleAssignmentsApi.assign": "dc9b87dcccb9ee457e4104e10d9f1560c9eede4b844093d89a0f02f10ae63108", + "src/api/role-assignments.ts:RoleAssignmentsApi.bulkAssign": "fe4039a39735432a2ffe80630090c04f9472d946685d86bcfec80ea06d2534b8", + "src/api/role-assignments.ts:RoleAssignmentsApi.bulkUnassign": "47b78d6cdcc164315138e66964b494efb1fc0be7995418f4be9a29e03201dfaf", + "src/api/role-assignments.ts:RoleAssignmentsApi.list": "88d878a038a159f39d2693f70b73af073ba4f266fce31d21414e1585eeda4f06", + "src/api/role-assignments.ts:RoleAssignmentsApi.listDetailed": "a11f1f0341d774ff45a0bf4de145a57ac2d659504f1341fb164d306919b0f47a", + "src/api/role-assignments.ts:RoleAssignmentsApi.unassign": "29397e52cb1adb12448dba63f958577df8d2045ea3d0c866308871a6116978e0", + "src/api/roles.ts:RolesApi.assignPermissions": "6808f3d8d599f608b4fdb7584b81a6e177d7d257a5d418299a4a11067d3c85bc", + "src/api/roles.ts:RolesApi.bulkCreateOrReplace": "5c74bd2cf0e33f847df0259a332d317d1167aedaa9d5ab387f08f917965dd13f", + "src/api/roles.ts:RolesApi.create": "4b2190be260277358718a0b627b2ce1c98db970ba29121d287e34cb1d56d9947", + "src/api/roles.ts:RolesApi.delete": "d68128a6a59723948ba3732e4903667e3d4772225dfe7db11ad4961be5543848", + "src/api/roles.ts:RolesApi.get": "ba891beb68a146bf3c2340502f235ea654a2ece4a796096e5d7df2aa1a150deb", + "src/api/roles.ts:RolesApi.getById": "4525a9b7f43c325ab7fed10dcf1dd60616ac8817e41e3e5fe9057a48a4959821", + "src/api/roles.ts:RolesApi.getByKey": "c5a68ad0f5f0ac7aee1790910eb43683b5e9834b7ccd489d64a6ff00972de21d", + "src/api/roles.ts:RolesApi.list": "d3ad168ffff67101fe58667a2a23689630af511c163ef07981db047cdd5638ff", + "src/api/roles.ts:RolesApi.removePermissions": "620a066bd6eb73957e9cde8d07320f504be9b603e9096c0cb0a1a160b817f244", + "src/api/roles.ts:RolesApi.update": "7dd573d9a6cf9900ed189b42b367dbf99c22942c7900ad977b2a8096ee105c6e", + "src/api/tenants.ts:TenantsApi.addUser": "ecff88f623de612a8b3bd257fedce76712a45ad6ef89c8bca71f9e6a43aed937", + "src/api/tenants.ts:TenantsApi.create": "1cb4dff05b7f1f44f132931a171e1caefa9c27446d7a6195cb6d4cf178253ae3", + "src/api/tenants.ts:TenantsApi.delete": "9a59f2662ab337d53ee430f75cee589600fb8c39d31877f02143748f4ff5dd30", + "src/api/tenants.ts:TenantsApi.deleteTenantUser": "fa3905b051f461c3d23033e8cf9e922a41075d1d9b57560c975f59c924b300df", + "src/api/tenants.ts:TenantsApi.get": "dbe6a53fefc4119a694869f154ea32ca1dc21dcb0247ab32594ec4efdc998be1", + "src/api/tenants.ts:TenantsApi.getById": "eb5535113531bbd7e116607840e3876da89654290262105b4bd3b5847a45f4de", + "src/api/tenants.ts:TenantsApi.getByKey": "7be9cebc6011a2c544a2c84653b33bda71b30c2b4f014cacc83f51add60e6658", + "src/api/tenants.ts:TenantsApi.list": "d73563fa6af5fa334a3ca279858d3ef1be75f93c59e3602f61709858a6bd936d", + "src/api/tenants.ts:TenantsApi.listTenantUsers": "b8d46dd85f47691c41684a7348a5012bf2269f23d34142defa38d2ca61be6d38", + "src/api/tenants.ts:TenantsApi.update": "227c4505187e9a97ebfb47c0dd668f7865d97b673f9814c11159d8db3772fecb", + "src/api/user-attributes.ts:UserAttributesApi.create": "932b48ff594da0fbe79e465f4b787085c948657f72ee8e3100ff792df814ce42", + "src/api/user-attributes.ts:UserAttributesApi.delete": "a332fc1121104734f296009a0d782b0da06cbb7402d05645b8108a2e858e17c3", + "src/api/user-attributes.ts:UserAttributesApi.get": "95744ba805a98a960632aec84bf17cb1bbe34794885e39dd52ff4d5a5ffa3b55", + "src/api/user-attributes.ts:UserAttributesApi.list": "626569a539505be09d371461a7a86eac7480497635036e16b6d0558df3275af6", + "src/api/user-attributes.ts:UserAttributesApi.update": "ea1f3b00a579d0c2d1e94ff3c61698baea9c6d06575c2be5a4e595e8e169b0cc", + "src/api/user-invites.ts:UserInvitesApi.approve": "b660cedcb8e9efd26553f43945a97b24a76edf3b3234c48ae62439a050959f1b", + "src/api/user-invites.ts:UserInvitesApi.create": "c4ede7cfbdab26f3a09e41f3aad61a29ab4797ca0232b018a2a7bb9a0b5ecf69", + "src/api/user-invites.ts:UserInvitesApi.delete": "ad56a9a6b942fa63d6619976e4d81f4cb14d4a3eae6136b28e49abee273a4671", + "src/api/user-invites.ts:UserInvitesApi.get": "acc754cd28ab05516cedd14a6162e4177ac22e678c2e92e0e4ab5a7a41f32b50", + "src/api/user-invites.ts:UserInvitesApi.list": "ca5409501df6a941ee5cf4f4f2518aca9782511f126c40093e7dbf13e9a8b510", + "src/api/user-invites.ts:UserInvitesApi.update": "c9d4db7a02c52d85c61882232e6ccfc5c5c7b871206124891feeff9b8ee2f22b", + "src/api/users.ts:UsersApi.assignRole": "c5f25fbc4d157e56149a554b98127d83b3cce7c6f13b7da8ca0302cd4b59ef0d", + "src/api/users.ts:UsersApi.bulkUserCreate": "35c763b8cf33dadea4a7a1ca70eea387252f49704a3ca2c96d1342f8434bea2f", + "src/api/users.ts:UsersApi.bulkUserDelete": "d3c10d77fdfd11f69e3aa33019d4adfbc471d14f8930bb845c56ffb6125b3063", + "src/api/users.ts:UsersApi.bulkUserReplace": "d6616290b2817ea399e94e8077aac47a53d95c39a1658715bb7e3e15134ec642", + "src/api/users.ts:UsersApi.create": "cf38087aec68b84261b9ac946b4f6b8ca56500f3b991b87b5f6a630003aa19a1", + "src/api/users.ts:UsersApi.delete": "c22fbda0d611e1be785fb8e2febeb21002f042464e65796b34ba84b3dea2423b", + "src/api/users.ts:UsersApi.get": "23add46b198325257d1dcd7ede788f4a045f7a1115114bcd9b56d637afcebfb5", + "src/api/users.ts:UsersApi.getAssignedRoles": "187438aa7778392f767f54e884d19d2c7774a9351c321837f784547d839fa4a6", + "src/api/users.ts:UsersApi.getById": "89fea1104904f87ff35cf56726963288de0d4ea47b425454026140e0bca9dde6", + "src/api/users.ts:UsersApi.getByKey": "3a7c29764360f841ccea9f9845b8813b259404180f704615184cfc9daa22b3e2", + "src/api/users.ts:UsersApi.list": "ec3763c9a28333c92c620053bb25c890eefdf51609d4b2de03b412a6f90e67fc", + "src/api/users.ts:UsersApi.sync": "43059d47516ffa3f49e462687516356fdc5abac7cca71c6394e0e0896319da2f", + "src/api/users.ts:UsersApi.unassignRole": "10c70ca8cf7256fdf92be249de1f35ff0ff246b75d5c44eb121026ff64f79814", + "src/api/users.ts:UsersApi.update": "a14a9d18eaafdf987355da4699e9197ac1b608a931d84ef2faefdb07496153d2", + "src/enforcement/enforcer.ts:.isString": "6809b400b07b7344d876bfa38d90a150c171ad47969b53e4014dd01a607b81e4", + "src/enforcement/enforcer.ts:Enforcer.buildCheckInput": "0efb94d0ecaf599f8f17da7a6e205414703e1a99c74dc87f616de239b849a4c5", + "src/enforcement/enforcer.ts:Enforcer.buildCheckUrlInput": "c9f8b97da6b1c10cf73a2ad63ed42c1393736b8855ee024c3c307b8f169b694c", + "src/enforcement/enforcer.ts:Enforcer.buildLocalRoleAssignmentsQuery": "aa53215610785d4706537c56358d387487d0d078eec151648f053067ecaa15fd", + "src/enforcement/enforcer.ts:Enforcer.bulkCheck": "4f6aa0b3ea11aa46b60f46bf87454e822bf07b6072f65d4b5e2ae1f353f5cdf6", + "src/enforcement/enforcer.ts:Enforcer.bulkCheckWithExceptions": "ce5417cfc7b224ef982df888ad24b381b24dab8218fc1ace3686aaf1c014c3f3", + "src/enforcement/enforcer.ts:Enforcer.check": "fe2aadd9ee38992788a98629a092000ef302c6a1e37025395447804ee499af39", + "src/enforcement/enforcer.ts:Enforcer.checkAllTenants": "aade4c8b413526c58d096401f27bb1b5ad34901ab9c4ff55896cf00eca4e8aee", + "src/enforcement/enforcer.ts:Enforcer.checkAllTenantsWithExceptions": "13d4497c3bf0269461a6ada2160503cf5110d72b6ed5336ef7120a70a0a2016f", + "src/enforcement/enforcer.ts:Enforcer.checkUrl": "30be35cf9d91585d3a9dc090ce16249246f659870ab3e41c0c7da921a8b84c27", + "src/enforcement/enforcer.ts:Enforcer.checkUrlWithExceptions": "f328efa9780095dedaf6ab5165c7edcbe72e6d98532f6ef1a9c2bb4810470f2d", + "src/enforcement/enforcer.ts:Enforcer.checkWithExceptions": "4ddb948f534525d6cac7e8575d9851f3e27d44b4e8e289e707665d84040381c8", + "src/enforcement/enforcer.ts:Enforcer.filterObjects": "285f705d1fdee426fd673ce214362ddeccf6f04e75fb4f7e8e4d96c106cdc98d", + "src/enforcement/enforcer.ts:Enforcer.getAuthorizedUsers": "db7b2035003c51858f61300726d007521efa459eaf8ca3c10e0e0781d8165a92", + "src/enforcement/enforcer.ts:Enforcer.getAuthorizedUsersWithExceptions": "a5d75fbda4e7fadcefa14a9a20793bcceb6c83153c357560bf328389392c4de5", + "src/enforcement/enforcer.ts:Enforcer.getLocalRoleAssignments": "0d715704d42f64b29e70e97654b4fc118a4dcf3348ecaa1d58951e207c5ca0c7", + "src/enforcement/enforcer.ts:Enforcer.getUserPermissions": "8486e109b4f2866f7f33948a26951520e5edb2e36ec547540ed27e11f8aa3e36", + "src/enforcement/enforcer.ts:Enforcer.getUserPermissionsWithExceptions": "b088d13931a7c1cd2ea8e275a38f781708af5896ef02d50f90e38ab01b681959", + "src/enforcement/enforcer.ts:Enforcer.getUserTenants": "3e94f803def7e980bbc686cb3eb3391f274c9e61f2b3ab5f99c36a8f2526897f", + "src/enforcement/enforcer.ts:Enforcer.getUserTenantsWithExceptions": "d5cdf4d301aba94dc14de9502aea88bfe74caaec0570ce1d4afbf536c9227c9a", + "src/enforcement/enforcer.ts:Enforcer.handlePDPError": "f131004953b9e0d9f2f0dd2b1e34bbdb3f2616bc1ede2572f1dae228f191073e", + "src/enforcement/enforcer.ts:Enforcer.normalizeResource": "01287f313beea5f524091e1f6462e791cc06224b846aa0ce026bbfd5b7fd2a40", + "src/enforcement/enforcer.ts:Enforcer.parsePdpResponse": "d695d7623e025411e93099861e180269dc692911469b815e5ccd9b2fd3bfc487", + "src/enforcement/enforcer.ts:Enforcer.pdpStatusError": "995a87e540e4bc0a5c4ce35be9b69c49a3edc5f3d37317453b2dd6c7a0550b39", + "src/enforcement/enforcer.ts:Enforcer.resourceFromString": "bedfdd6f1cbbdddd3d36a37b68a7478aa88774614a7185c87e909374431c3c56", + "src/enforcement/enforcer.ts:Enforcer.serializeInput": "ef1bbe63a7be82da81078edd3c35a3e70b9df21fac896512398a399cb0a0e86f", + "src/enforcement/responses.ts:.decisionEnvelope": "6102ee1ffde5f29db96bfcc06678ff799cd30d20b4e6a7ff341b03356e520d2c", + "src/enforcement/responses.ts:.isRecord": "0cb132a41683f4fccd5a1b31dd4e808fc6892dcd2792d6776a4e2cce9fda60bf", + "src/enforcement/responses.ts:.parseBulkResponse": "7728a06debe7bd59d1cd82f82d34d6cde3433f3bde7e6d3a6224e7ef15eb3deb", + "src/index.ts:Permit.bulkCheck": "f01262c79c16daaab9de2fcbf0d0877bbbe51539a800011631bde13af6b479b2", + "src/index.ts:Permit.check": "5e33e78fc4f7cdbc61985edeb49407c06b1e9456aae74d3fdc1fa4a31c8e249d", + "src/index.ts:Permit.checkAllTenants": "5c0d483d3923ba989988d38630f60352b279cc8d11301bb99983b4a8a99186c3", + "src/index.ts:Permit.checkUrl": "06c9fe488593e8488b18bfec0759988daf35529ea36cf8f1252e497255fe1048", + "src/index.ts:Permit.filterObjects": "40a1dced3ad7041b12a88dddbe97131313eab52164b60698799ce17a591e7b8c", + "src/index.ts:Permit.getAuthorizedUsers": "b02e7d92f880af4f933f70d73f1eaa356a513b566f1ffbebb07c91090b0daf03", + "src/index.ts:Permit.getLocalRoleAssignments": "f2fc420336885e4cf0e4cc5b033d140b643ac835dfcbf69c856b2efaa6304399", + "src/index.ts:Permit.getUserPermissions": "561f30ed436101ac0cc9ed0a564ecda55aae4acb218849179b69d73cca5ebc4a", + "src/index.ts:Permit.getUserTenants": "7afb862bc0123cd6e54c5e4c265ddd93d0212bfa146e80ce54f2cafdbd0e3669", + "src/utils/context.ts:ContextStore.getDerivedContext": "f01adc283f3dc4a6c1fa5457f4a2044d7b22572f36640ef4ea22eb8bede62760", + "src/utils/diagnostics.ts:.collect": "9bfdaac8b88e391f04c4478dee31d3138e8c47dc860dd04ba831e923be02e2c0", + "src/utils/diagnostics.ts:.collectOmitted": "56ddecf948bfb70552e13916457756e51a1db8297d6fc7c8fb5b0838f08d1d64", + "src/utils/diagnostics.ts:.diagnosticAxiosError": "0eb0ad7f6e1f31661e05ac0295981b5861536adb057c961540f146e82eb45588", + "src/utils/diagnostics.ts:.diagnosticBody": "8ef8c820bac67ec0d3cdd751167f1130ccd04b216b9a612741d0a94fbf815bf0", + "src/utils/diagnostics.ts:.diagnosticCause": "bb5795dc71ec4a4b6901868286cf502e4daeae04f3f5a3af93b1934c174b7770", + "src/utils/diagnostics.ts:.diagnosticErrorSecrets": "3cc5649307ba8c3570816716d09bbc012201cebeeb19f4b1aed33eebc535dd55", + "src/utils/diagnostics.ts:.diagnosticMessage": "e57beb1ed6d83714325aae856052a18fc2bdff7c0b2a05d3d7c14c41935cbe36", + "src/utils/diagnostics.ts:.diagnosticMetadata": "b9dbdd375488d63ebaf91388344d9c843fd4dd0f90c9eb7672490814c2c89679", + "src/utils/diagnostics.ts:.diagnosticRequestSecrets": "88ee9a42c7c8a2decc77512dd0b11694f1199579ca4f392e9a0d6a6e96af624e", + "src/utils/diagnostics.ts:.diagnosticSecrets": "2c21e19d4fad24aa01ac7dfcdfbb4ceb2a4dc69eac0136450748ca67de35568b", + "src/utils/diagnostics.ts:.diagnosticStatus": "97b6f29383823549b819c45a4e304ec8f082d191f13c695f2cb489333c680122", + "src/utils/diagnostics.ts:.diagnosticText": "1a57977142ac798fda682db0f80a55c6c95adafbab651491abea4669f3a16092", + "src/utils/diagnostics.ts:.diagnosticUrl": "78d8cf425e1b44fa3a56ce2e68e303ed30eb6e701070898090d540fdebff02e7", + "src/utils/diagnostics.ts:.mergeDiagnosticSecrets": "d4baa0c988a992fee9f6c35b91ed0a53cff4105b1d7acc1c6465643cc3596e81", + "src/utils/diagnostics.ts:.message": "bbf7417c49d38fc88c0da86cd23c7d7f32c88bc7d4aba7b8b10fada989deefb0", + "src/utils/diagnostics.ts:.omittedResponseSecrets": "c36148e43fee8d7fbff3590b93b02be799b1daa47de053b30ce77b02095b956e", + "src/utils/diagnostics.ts:.redactPrivateValues": "2845c5c8ab8d26308fec121a6d98fca804194dabbac636eb4dd41a1cd2eef259", + "src/utils/diagnostics.ts:.visit": "df37b433c55e9eb2529dae6ffbcedc3329fdf8e01a379c33030fcb81f63d0873" + }, + "initializationShapes": { + "src/api/api-client.ts:ApiClient.constructor": "4f138b7d207032a9d67b2cbb1512e9345daee21a1e9af590a5215acac2c691ae", + "src/api/api-keys.ts:ApiKeysApi.constructor": "9fc07806f1fd9b01e15ce74ae4f3fa383842077545c86cf17f0a577339681004", + "src/api/audit-logs.ts:AuditLogsApi.constructor": "a7a55498c8c53b1bddcdfde2a1ebfce0aaf61a5d4340744f980eab643607c9a3", + "src/api/base.ts:BaseFactsPermitAPI.constructor": "6e36d36e49b99ff53949668d767e5dc630e0f849e693aa48b8b6d75ecdaacad1", + "src/api/base.ts:BasePermitApi.constructor": "7c4a19909cf67f1c91b5086d603edae3a11f9f8599babb2f7f0418e9c1473353", + "src/api/base.ts:PermitApiError.constructor": "2ca0da89f1fe278121953aab7b5adf980a90905b1dfde38c413a0191b56f9436", + "src/api/condition-set-rules.ts:ConditionSetRulesApi.constructor": "f00624544d62ec2c914a3bb190f6b07cd27306c96e3a4866d6e34dab7f86c759", + "src/api/condition-sets.ts:ConditionSetsApi.constructor": "0f2d9665eda7fba31431d66eb565dbfe8156ef5afe695f3d2274e0aa26a37bdb", + "src/api/context.ts:API_ACCESS_LEVELS": "252537edf5df47179c48b09090b7e517bfb580e1aa61a9f2575f7c36353b8083", + "src/api/context.ts:ApiContext.constructor": "0c1f27842955389007952d2436efa52f52cc501f4941d2135deca70b9eba6276", + "src/api/context.ts:PermitContextChangeError.constructor": "d0e25c04f783cf14e7619f87fc30393763ec61d95a65face17526c17884e7839", + "src/api/context.ts:PermitContextError.constructor": "a706dcced4af88547845dde252e43c3a615254d6789d05b01eb606f05c8a46d6", + "src/api/context.ts:contextSnapshotKey": "b262fad27c623a907f6d94c663100e84620052a8f407d907b91d0b42ef143a58", + "src/api/context.ts:contextStates": "2821f80bb3678f5a2d01ce1cd7dce9377d9d2bdf7c8a6c8f8982f6fb17b90aa5", + "src/api/elements.ts:ElementsClient.constructor": "cd8ddb0a63855e3a5629ce08ef6af0dc5b2ebab73475bbdb02bd268040d3e91e", + "src/api/environments.ts:EnvironmentsApi.constructor": "146ac7603e7e33db85e1410da47a387f1cf27b6c6f6878b04d7d8cc4e861bf9f", + "src/api/groups.ts:GroupsApi.constructor": "e09bac9a6d0ce4d7d8ee8180ee5346ecab40197aa50a2d78d8852b8ca8344d95", + "src/api/pdps.ts:PdpsApi.constructor": "36d4fbcd74f7a7bdbabd64ddd3120c972aeb022350161fcd7dbdf6b71bc24515", + "src/api/projects.ts:ProjectsApi.constructor": "b45a7ef29f86ff5ae56ed928934ce538ac06a36ac6b32c689ec1a66b3faa2156", + "src/api/proxy-configs.ts:ProxyConfigsApi.constructor": "a1100d72b3c6fec0b420a692d37dfc1174eefa989ca4635c13ba5b1121f1dee5", + "src/api/relationship-tuples.ts:RelationshipTuplesApi.constructor": "8ba333e5f23a9048a00198da14d8db7b739a8ad959c3dc9e8488ba8814d53c8d", + "src/api/resource-action-groups.ts:ResourceActionGroupsApi.constructor": "46e8644f311c6f9951ffe60cf6336ea948fc6bdd4b0773befa0a46045cb1b3b2", + "src/api/resource-actions.ts:ResourceActionsApi.constructor": "dc9f80ab3f4d3e9b740860f404e2c2ffe61fe0875455a77b0fc7336e4be797e8", + "src/api/resource-attributes.ts:ResourceAttributesApi.constructor": "5f36c88616959e0babf9e813eea37f0a9b501b894c5cdd0c7de54fdff41ddf42", + "src/api/resource-instances.ts:ResourceInstancesApi.constructor": "fd61f7c37465e3dedb1cda677cee6d445cbc36a2e6ba10d5f8f481b54b1aa820", + "src/api/resource-relations.ts:ResourceRelationsApi.constructor": "5ec452fbc267f2d375279e914488587a5cb69c767913e269e3e97c1b4d13f4ba", + "src/api/resource-roles.ts:ResourceRolesApi.constructor": "4e3e46b06c9871c197e01c4043d092cecde8a7f2768c54c1af2d29ba83a127bb", + "src/api/resources.ts:ResourcesApi.constructor": "e8cbda0ccfb439c4b1229f93250e5c5d3001b21089f65249d7d93239dd19448d", + "src/api/role-assignments.ts:RoleAssignmentsApi.constructor": "6b97701130a940e825f879d7815bca3b46712e0dd6159e29bde8269d87b70ce5", + "src/api/roles.ts:RolesApi.constructor": "82dccad0baded1f1f9807e4941c2afc1dbdd2bf61ad3f036360cb2e50d0ad30f", + "src/api/tenants.ts:TenantsApi.constructor": "8d6f8741c4b964c78d7ec07ac7e92c6b5b761b6317ce656afc099f64f9bba747", + "src/api/user-attributes.ts:UserAttributesApi.constructor": "9df99cd50dfd82a45b3f497d9888e06f489097b81de4a68018270e3845eefa73", + "src/api/user-invites.ts:UserInvitesApi.constructor": "b7d9171211725879e89c774ff6da0010d46415896fde5e569ce82ba4a15d4861", + "src/api/users.ts:UsersApi.constructor": "c3f53ff93453caac14ceb493c097cdf551654434a54b8c4ebea2ed01db1d620f", + "src/enforcement/enforcer.ts:Enforcer.constructor": "c061950b57df51721ae75d0599581a771771e9124f64c6bb39ccccd743ada33f", + "src/enforcement/enforcer.ts:PermitConnectionError.constructor": "b281f839d10bd89f178407d6e5d76256d0bd614f4655d75632ef416d4e269042", + "src/enforcement/enforcer.ts:PermitError.constructor": "a8d51a5d6e781bfaf7dfadcafcd82b022e184ae22cb292b7f348b17813484b39", + "src/enforcement/enforcer.ts:PermitPDPStatusError.constructor": "ce81b6aa208ad9ce0f3d6a6f4387135ac18dcd04f718163f6d119f990058f54f", + "src/enforcement/enforcer.ts:RESOURCE_DELIMITER": "84621939eae999affeb1c6c48d23371c99a953b6c56aa67ebd94e3b541a3cfd1", + "src/index.ts:Permit.constructor": "50052de96c1d823858b5560c18c8f87e9fcddd9c8ce2b23fb1a37c179b01e626", + "src/utils/context.ts:ContextStore.baseContext": "e55a3d84c22b3b144eb4ab9b68731dd74c2e3e92b54db022740dfdcfd3c5cd96", + "src/utils/diagnostics.ts:BODY_FIELDS": "8533027b452b98b0291789bf46f339c6f5859afb5ac9677d9972407b2cc19a15", + "src/utils/diagnostics.ts:MAX_ITEMS": "398841861d5adf4b8d8506135b8c3a6c12f0d8c0eae339acda51987a25e19973", + "src/utils/diagnostics.ts:MAX_TEXT": "d2b99e5d79584fb70f0ff4109296d92e10dd1cf4f0239bcb02221d2977d81ec4", + "src/utils/diagnostics.ts:REDACTED": "cbc83d74db05dc5da1d6bdfb77e4df00b57567f6272844f3f5efe0b7afd50d73", + "src/utils/diagnostics.ts:REQUEST_HEADERS": "e9b84eec43ed1026803dc038026ea5403c5359e1dfce03b6c26b865fa308c6b6", + "src/utils/diagnostics.ts:RESPONSE_HEADERS": "b3505ed26eade60624be8c3291885d7cc37cf4afb297e257cdf98bb526ae2b05", + "src/utils/diagnostics.ts:failurePrivacy": "68f72d0f4506fc0e6571c58e563f506403dd27896e8f9a8963f90d4abc4f1464", + "src/utils/diagnostics.ts:failurePrivacyKey": "98c132a2ec6bf02f3b491cbc63f995da0b4783423b00c31b883e3886c24cdc0c", + "src/utils/retry.ts:DEFAULT_RETRY_CONFIG": "a124e39640a8af9b5972e0913062592cd4e8c5b4d370c343476c0f43fef9e4ac", + "src/utils/retry.ts:DEFAULT_RETRY_METHODS": "493ceb034dd8e692cfd6136eb9d1ef03f4195b1354581c363782866f7e32ec86", + "src/utils/retry.ts:RETRYABLE_STATUS_CODES": "37cecf83a25d09b0bdab97d5d6901aab85f871cf9ada5fe25a76f3bf6b8424f8", + "src/utils/retry.ts:httpMethods": "cf801f911dbcd4d7e2853f05305e186b097e789a3c14440623c13047ec72a00b", + "src/utils/retry.ts:maximumTimerDelay": "4947b585ee731c61bd9a008ba1016e23c06be3ad1aa5770f561ab23aab338e66", + "src/utils/retry.ts:permanentErrorCodes": "ce4cccfdfe51f554290c473da0979da371faa4bdc8f4b10dbee66c878d759ced", + "src/utils/retry.ts:transientNetworkCodes": "2cdb83120b7946d946f283ace219d13f1001bd369c5062fa8bf7032f9c8bee1c" + }, + "methods": { + "permit.api.actionGroups.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, groupData: ResourceActionGroupCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionGroupsApi.createResourceActionGroup", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupData", + "optional": false, + "type": "ResourceActionGroupCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.actionGroups.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, groupKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourceActionGroupsApi.deleteResourceActionGroup", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.actionGroups.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, groupKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionGroupsApi.getResourceActionGroup", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.actionGroups.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceId: string, groupId: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionGroupsApi.getResourceActionGroup", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.actionGroups.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, groupKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionGroupsApi.getResourceActionGroup", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.actionGroups.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params: IListActionGroups): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionGroupsApi.listResourceActionGroups", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListActionGroups" + } + ], + "returns": "Promise" + } + }, + "permit.api.actionGroups.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, groupKey: string, groupData: ResourceActionGroupUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionGroupsApi.updateResourceActionGroup", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "groupData", + "optional": false, + "type": "ResourceActionGroupUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.apiKeys.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(apiKey: APIKeyCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.createApiKey", + "method": "POST", + "path": "/v2/api-key", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKey", + "optional": false, + "type": "APIKeyCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.apiKeys.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(apiKeyId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.deleteApiKey", + "method": "DELETE", + "path": "/v2/api-key/{api_key_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKeyId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.apiKeys.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(apiKeyId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKey", + "method": "GET", + "path": "/v2/api-key/{api_key_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKeyId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.apiKeys.getScope": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [], + "returns": "Promise" + } + }, + "permit.api.apiKeys.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListApiKeys | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.listApiKeys", + "method": "GET", + "path": "/v2/api-key", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IListApiKeys" + } + ], + "returns": "Promise" + } + }, + "permit.api.apiKeys.rotate": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(apiKeyId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.rotateApiKey", + "method": "POST", + "path": "/v2/api-key/{api_key_id}/rotate-secret", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "apiKeyId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.auditLogs.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(logId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "AuditLogsApi.getDetailedAuditLog", + "method": "GET", + "path": "/v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "logId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.auditLogs.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListAuditLogs | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "AuditLogsApi.listAuditLogs", + "method": "GET", + "path": "/v2/pdps/{proj_id}/{env_id}/audit_logs", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IListAuditLogs" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSetRules.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(rule: ConditionSetRuleCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetRulesApi.assignSetPermissions", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/set_rules", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "rule", + "optional": false, + "type": "ConditionSetRuleCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSetRules.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(rule: ConditionSetRuleRemove): Promise"], + "routes": [ + { + "generatedMethod": "ConditionSetRulesApi.unassignSetPermissions", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/set_rules", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "rule", + "optional": false, + "type": "ConditionSetRuleRemove" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSetRules.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListConditionSetRules | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetRulesApi.listSetPermissions", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/set_rules", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": true, + "type": "IListConditionSetRules" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(conditionSetData: ConditionSetCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetsApi.createConditionSet", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetData", + "optional": false, + "type": "ConditionSetCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(conditionSetKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ConditionSetsApi.deleteConditionSet", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(conditionSetKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetsApi.getConditionSet", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(conditionSetId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetsApi.getConditionSet", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(conditionSetKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetsApi.getConditionSet", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListConditionSets | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetsApi.listConditionSets", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": true, + "type": "IListConditionSets" + } + ], + "returns": "Promise" + } + }, + "permit.api.conditionSets.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(conditionSetKey: string, conditionSetData: ConditionSetUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ConditionSetsApi.updateConditionSet", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "conditionSetKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "conditionSetData", + "optional": false, + "type": "ConditionSetUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.ensureAccessLevel": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(requiredAccessLevel: ApiKeyLevel): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requiredAccessLevel", + "optional": false, + "type": "ApiKeyLevel" + } + ], + "returns": "Promise" + } + }, + "permit.api.ensureContext": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(requiredContext: ApiContextLevel): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "requiredContext", + "optional": false, + "type": "ApiContextLevel" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.copy": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string, copyParams: EnvironmentCopy): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.copyEnvironment", + "method": "POST", + "path": "/v2/projects/{proj_id}/envs/{env_id}/copy", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "copyParams", + "optional": false, + "type": "EnvironmentCopy" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.copyAsync": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string, copyParams: EnvironmentCopy, wait?: number | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.copyEnvironmentAsync", + "method": "POST", + "path": "/v2/projects/{proj_id}/envs/{env_id}/copy/async", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "copyParams", + "optional": false, + "type": "EnvironmentCopy" + }, + { + "initializer": null, + "name": "wait", + "optional": true, + "type": "number" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentData: EnvironmentCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.createEnvironment", + "method": "POST", + "path": "/v2/projects/{proj_id}/envs", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentData", + "optional": false, + "type": "EnvironmentCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectKey: string, environmentKey: string): Promise"], + "routes": [ + { + "generatedMethod": "EnvironmentsApi.deleteEnvironment", + "method": "DELETE", + "path": "/v2/projects/{proj_id}/envs/{env_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.getEnvironment", + "method": "GET", + "path": "/v2/projects/{proj_id}/envs/{env_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.getApiKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectKey: string, environmentKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "APIKeysApi.getEnvironmentApiKey", + "method": "GET", + "path": "/v2/api-key/{proj_id}/{env_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectId: string, environmentId: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.getEnvironment", + "method": "GET", + "path": "/v2/projects/{proj_id}/envs/{env_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.getEnvironment", + "method": "GET", + "path": "/v2/projects/{proj_id}/envs/{env_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.getCopyResult": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string, taskId: string, wait?: number | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.getCopyEnvironmentAsyncResult", + "method": "GET", + "path": "/v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "taskId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "wait", + "optional": true, + "type": "number" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.getStats": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.statsEnvironments", + "method": "GET", + "path": "/v2/projects/{proj_id}/envs/{env_id}/stats", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params: IListEnvironments): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.listEnvironments", + "method": "GET", + "path": "/v2/projects/{proj_id}/envs", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListEnvironments" + } + ], + "returns": "Promise" + } + }, + "permit.api.environments.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, environmentKey: string, environmentData: EnvironmentUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "EnvironmentsApi.updateEnvironment", + "method": "PATCH", + "path": "/v2/projects/{proj_id}/envs/{env_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "environmentData", + "optional": false, + "type": "EnvironmentUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.assignRole": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(groupKeyOrId: string, assignment: GroupAddRole): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "GroupsApi.assignRoleToGroup", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "groupKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "assignment", + "optional": false, + "type": "GroupAddRole" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.assignUser": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(groupKeyOrId: string, userKeyOrId: string, assignment: GroupAssignUser): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "GroupsApi.assignUserToGroup", + "method": "PUT", + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "groupKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "assignment", + "optional": false, + "type": "GroupAssignUser" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(group: GroupCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "GroupsApi.createGroup", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/groups", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "group", + "optional": false, + "type": "GroupCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(groupKeyOrId: string): Promise"], + "routes": [ + { + "generatedMethod": "GroupsApi.deleteGroup", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "groupKeyOrId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(groupKeyOrId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "GroupsApi.getDirectGroup", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "groupKeyOrId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListGroups | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "GroupsApi.listDirectGroup", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/groups/direct", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IListGroups" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.removeRole": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(groupKeyOrId: string, assignment: GroupAddRole): Promise"], + "routes": [ + { + "generatedMethod": "GroupsApi.removeRoleFromGroup", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "groupKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "assignment", + "optional": false, + "type": "GroupAddRole" + } + ], + "returns": "Promise" + } + }, + "permit.api.groups.removeUser": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(groupKeyOrId: string, userKeyOrId: string, assignment: GroupAssignUser): Promise" + ], + "routes": [ + { + "generatedMethod": "GroupsApi.removeUserFromGroup", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "groupKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "assignment", + "optional": false, + "type": "GroupAssignUser" + } + ], + "returns": "Promise" + } + }, + "permit.api.pdps.refresh": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(request?: IEnvironmentPdpDataRefreshRequest | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "PolicyDecisionPointsApi.refreshEnvironmentPdpData", + "method": "POST", + "path": "/v2/pdps/{proj_id}/{env_id}/configs/refresh", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "request", + "optional": true, + "type": "IEnvironmentPdpDataRefreshRequest" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectData: ProjectCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProjectsApi.createProject", + "method": "POST", + "path": "/v2/projects", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectData", + "optional": false, + "type": "ProjectCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ProjectsApi.deleteProject", + "method": "DELETE", + "path": "/v2/projects/{proj_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProjectsApi.getProject", + "method": "GET", + "path": "/v2/projects/{proj_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProjectsApi.getProject", + "method": "GET", + "path": "/v2/projects/{proj_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(projectKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProjectsApi.getProject", + "method": "GET", + "path": "/v2/projects/{proj_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(pagination?: IPagination | undefined): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProjectsApi.listProjects", + "method": "GET", + "path": "/v2/projects", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "pagination", + "optional": true, + "type": "IPagination" + } + ], + "returns": "Promise" + } + }, + "permit.api.projects.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(projectKey: string, projectData: ProjectUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProjectsApi.updateProject", + "method": "PATCH", + "path": "/v2/projects/{proj_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "projectKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "projectData", + "optional": false, + "type": "ProjectUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.proxyConfigs.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(proxyConfig: ProxyConfigCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProxyConfigApi.createProxyConfig", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfig", + "optional": false, + "type": "ProxyConfigCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.proxyConfigs.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(proxyConfigKeyOrId: string): Promise"], + "routes": [ + { + "generatedMethod": "ProxyConfigApi.deleteProxyConfig", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfigKeyOrId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.proxyConfigs.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(proxyConfigKeyOrId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProxyConfigApi.getProxyConfig", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfigKeyOrId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.proxyConfigs.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params?: IPagination | undefined): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProxyConfigApi.listProxyConfigs", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IPagination" + } + ], + "returns": "Promise" + } + }, + "permit.api.proxyConfigs.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(proxyConfigKeyOrId: string, proxyConfig: ProxyConfigUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ProxyConfigApi.updateProxyConfig", + "method": "PATCH", + "path": "/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "proxyConfigKeyOrId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "proxyConfig", + "optional": false, + "type": "ProxyConfigUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.bulkRelationshipTuples": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(tuples: RelationshipTupleCreate[]): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RelationshipTuplesApi.bulkCreateRelationshipTuples", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tuples", + "optional": false, + "type": "RelationshipTupleCreate[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.bulkUnRelationshipTuples": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(tuples: RelationshipTupleDelete[]): Promise"], + "routes": [ + { + "generatedMethod": "RelationshipTuplesApi.bulkDeleteRelationshipTuples", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tuples", + "optional": false, + "type": "RelationshipTupleDelete[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.create": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(tuple: RelationshipTupleCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RelationshipTuplesApi.createRelationshipTuple", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tuple", + "optional": false, + "type": "RelationshipTupleCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.delete": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(tuple: RelationshipTupleDelete): Promise"], + "routes": [ + { + "generatedMethod": "RelationshipTuplesApi.deleteRelationshipTuple", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tuple", + "optional": false, + "type": "RelationshipTupleDelete" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.list": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(params: IListRelationshipTuples): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RelationshipTuplesApi.listRelationshipTuples", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListRelationshipTuples" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.listDetailed": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListRelationshipTuples | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RelationshipTuplesApi.listRelationshipTuplesDetailed", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "{ page = 1, perPage = 100, ...params }", + "optional": true, + "type": "IListRelationshipTuples" + } + ], + "returns": "Promise" + } + }, + "permit.api.relationshipTuples.waitForSync": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(timeout: number | null, policy?: FactsSyncTimeoutPolicy | undefined): IRelationshipTuplesApi" + ], + "routes": [], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "timeout", + "optional": false, + "type": "number | null" + }, + { + "initializer": null, + "name": "policy", + "optional": true, + "type": "FactsSyncTimeoutPolicy" + } + ], + "returns": "this" + } + }, + "permit.api.resourceActions.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, actionData: ResourceActionCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionsApi.createResourceAction", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionData", + "optional": false, + "type": "ResourceActionCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceActions.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, actionKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourceActionsApi.deleteResourceAction", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceActions.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, actionKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionsApi.getResourceAction", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceActions.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceId: string, actionId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionsApi.getResourceAction", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceActions.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, actionKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionsApi.getResourceAction", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceActions.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params: IListActions): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionsApi.listResourceActions", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListActions" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceActions.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, actionKey: string, actionData: ResourceActionUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceActionsApi.updateResourceAction", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "actionData", + "optional": false, + "type": "ResourceActionUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, attributeData: ResourceAttributeCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceAttributesApi.createResourceAttribute", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeData", + "optional": false, + "type": "ResourceAttributeCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, attributeKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourceAttributesApi.deleteResourceAttribute", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, attributeKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceAttributesApi.getResourceAttribute", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceId: string, attributeId: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceAttributesApi.getResourceAttribute", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, attributeKey: string): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceAttributesApi.getResourceAttribute", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params: IListAttributes): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceAttributesApi.listResourceAttributes", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListAttributes" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceAttributes.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, attributeKey: string, attributeData: ResourceAttributeUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceAttributesApi.updateResourceAttribute", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attributeData", + "optional": false, + "type": "ResourceAttributeUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceInstances.create": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(instanceData: ResourceInstanceCreate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.createResourceInstance", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "instanceData", + "optional": false, + "type": "ResourceInstanceCreate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.resourceInstances.delete": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(instanceKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourceInstancesApi.deleteResourceInstance", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "instanceKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceInstances.get": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(instanceKey: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.getResourceInstance", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "instanceKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.resourceInstances.getById": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(instanceId: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.getResourceInstance", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "instanceId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.resourceInstances.getByKey": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(instanceKey: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.getResourceInstance", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "instanceKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.resourceInstances.list": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(params?: IListResourceInstanceParams | undefined): Promise[]>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.listResourceInstances", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": true, + "type": "IListResourceInstanceParams" + } + ], + "returns": "Promise[]>" + } + }, + "permit.api.resourceInstances.listDetailed": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListResourceInstanceDetailedParams | undefined): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.listResourceInstancesDetailed", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/detailed", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IListResourceInstanceDetailedParams" + } + ], + "returns": "Promise>" + } + }, + "permit.api.resourceInstances.update": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(instanceKey: string, instanceData: ResourceInstanceUpdate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceInstancesApi.updateResourceInstance", + "method": "PATCH", + "path": "/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "instanceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "instanceData", + "optional": false, + "type": "ResourceInstanceUpdate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.resourceInstances.waitForSync": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(timeout: number | null, policy?: FactsSyncTimeoutPolicy | undefined): IResourceInstancesApi" + ], + "routes": [], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "timeout", + "optional": false, + "type": "number | null" + }, + { + "initializer": null, + "name": "policy", + "optional": true, + "type": "FactsSyncTimeoutPolicy" + } + ], + "returns": "this" + } + }, + "permit.api.resourceRelations.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, RelationData: RelationCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRelationsApi.createResourceRelation", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "RelationData", + "optional": false, + "type": "RelationCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRelations.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, relationKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourceRelationsApi.deleteResourceRelation", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRelations.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, relationKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRelationsApi.getResourceRelation", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRelations.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceId: string, relationId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRelationsApi.getResourceRelation", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRelations.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, relationKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRelationsApi.getResourceRelation", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "relationKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRelations.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params: IListRelations): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRelationsApi.listResourceRelations", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListRelations" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.assignPermissions": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleKey: string, permissions: string[]): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.assignPermissionsToResourceRole", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "permissions", + "optional": false, + "type": "string[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleData: ResourceRoleCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.createResourceRole", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleData", + "optional": false, + "type": "ResourceRoleCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.createRoleDerivation": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleKey: string, derivationData: DerivedRoleRuleCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ImplicitGrantsApi.createImplicitGrant", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "derivationRule", + "optional": false, + "type": "DerivedRoleRuleCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, roleKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourceRolesApi.deleteResourceRole", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.deleteRoleDerivation": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleKey: string, derivationRule: DerivedRoleRuleDelete): Promise" + ], + "routes": [ + { + "generatedMethod": "ImplicitGrantsApi.deleteImplicitGrant", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "derivationRule", + "optional": false, + "type": "DerivedRoleRuleDelete" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, roleKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.getResourceRole", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceId: string, roleId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.getResourceRole", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string, roleKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.getResourceRole", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(params: IListResourceRoles): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.listResourceRoles", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListResourceRoles" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.removePermissions": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleKey: string, permissions: string[]): Promise" + ], + "routes": [ + { + "generatedMethod": "ResourceRolesApi.removePermissionsFromResourceRole", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "permissions", + "optional": false, + "type": "string[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleKey: string, roleData: ResourceRoleUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourceRolesApi.updateResourceRole", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleData", + "optional": false, + "type": "ResourceRoleUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resourceRoles.updateRoleDerivationConditions": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, roleKey: string, conditions: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ImplicitGrantsApi.updateImplicitGrantsConditions", + "method": "PUT", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "conditions", + "optional": false, + "type": "PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceData: ResourceCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.createResource", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/resources", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceData", + "optional": false, + "type": "ResourceCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string): Promise"], + "routes": [ + { + "generatedMethod": "ResourcesApi.deleteResource", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.getResource", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.getResource", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(resourceKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.getResource", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(): Promise", + "(pagination?: T | undefined): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.listResources", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/resources", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "pagination", + "optional": true, + "type": "IPaginationExtended" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.replace": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, resourceData: ResourceReplace): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.replaceResource", + "method": "PUT", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceData", + "optional": false, + "type": "ResourceReplace" + } + ], + "returns": "Promise" + } + }, + "permit.api.resources.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(resourceKey: string, resourceData: ResourceUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "ResourcesApi.updateResource", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/resources/{resource_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "resourceKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resourceData", + "optional": false, + "type": "ResourceUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.roleAssignments.assign": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(assignment: RoleAssignmentCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RoleAssignmentsApi.assignRole", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "assignment", + "optional": false, + "type": "RoleAssignmentCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.roleAssignments.bulkAssign": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(assignments: RoleAssignmentCreate[]): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RoleAssignmentsApi.bulkAssignRole", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/bulk", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "assignments", + "optional": false, + "type": "RoleAssignmentCreate[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.roleAssignments.bulkUnassign": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(unassignments: RoleAssignmentRemove[]): Promise" + ], + "routes": [ + { + "generatedMethod": "RoleAssignmentsApi.bulkUnassignRole", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/bulk", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "unassignments", + "optional": false, + "type": "RoleAssignmentRemove[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.roleAssignments.list": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(params: T): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RoleAssignmentsApi.listRoleAssignments", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": false, + "type": "IListRoleAssignments" + } + ], + "returns": "Promise | Array | PaginatedResultRoleAssignmentRead | PaginatedResultRoleAssignmentDetailedRead>" + } + }, + "permit.api.roleAssignments.listDetailed": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListRoleAssignmentsDetailed | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RoleAssignmentsApi.listRoleAssignmentsDetailed", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments/detailed", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "{ user, tenant, role, resource, resourceInstance, page = 1, perPage = 100, }", + "optional": true, + "type": "IListRoleAssignmentsDetailed" + } + ], + "returns": "Promise" + } + }, + "permit.api.roleAssignments.unassign": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(unassignment: RoleAssignmentRemove): Promise"], + "routes": [ + { + "generatedMethod": "RoleAssignmentsApi.unassignRole", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "unassignment", + "optional": false, + "type": "RoleAssignmentRemove" + } + ], + "returns": "Promise" + } + }, + "permit.api.roleAssignments.waitForSync": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(timeout: number | null, policy?: FactsSyncTimeoutPolicy | undefined): IRoleAssignmentsApi" + ], + "routes": [], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "timeout", + "optional": false, + "type": "number | null" + }, + { + "initializer": null, + "name": "policy", + "optional": true, + "type": "FactsSyncTimeoutPolicy" + } + ], + "returns": "this" + } + }, + "permit.api.roles.assignPermissions": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleKey: string, permissions: string[]): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.assignPermissionsToRole", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "permissions", + "optional": false, + "type": "string[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.bulkCreateOrReplace": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roles: RoleCreateBulk[]): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "BulkOperationsApi.bulkCreateOrReplaceRoles", + "method": "PUT", + "path": "/v2/schema/{proj_id}/{env_id}/bulk/roles", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roles", + "optional": false, + "type": "RoleCreateBulk[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleData: RoleCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.createRole", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/roles", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleData", + "optional": false, + "type": "RoleCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleKey: string): Promise"], + "routes": [ + { + "generatedMethod": "RolesApi.deleteRole", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.getRole", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.getById": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.getRole", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.getByKey": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.getRole", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(): Promise", + "(pagination?: T | undefined): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.listRoles", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/roles", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "pagination", + "optional": true, + "type": "IPaginationExtended" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.removePermissions": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleKey: string, permissions: string[]): Promise"], + "routes": [ + { + "generatedMethod": "RolesApi.removePermissionsFromRole", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "permissions", + "optional": false, + "type": "string[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.roles.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(roleKey: string, roleData: RoleUpdate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RolesApi.updateRole", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/roles/{role_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "roleKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "roleData", + "optional": false, + "type": "RoleUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.tenants.addUser": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(tenantKey: string, userData: UserCreate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.addUserToTenant", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "tenantKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userData", + "optional": false, + "type": "UserCreate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.create": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(tenantData: TenantCreate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.createTenant", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/tenants", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "tenantData", + "optional": false, + "type": "TenantCreate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.delete": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(tenantKey: string): Promise"], + "routes": [ + { + "generatedMethod": "TenantsApi.deleteTenant", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.tenants.deleteTenantUser": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(tenantKey: string, userKey: string): Promise"], + "routes": [ + { + "generatedMethod": "TenantsApi.deleteTenantUser", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "tenantKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.tenants.get": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(tenantKey: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.getTenant", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "tenantKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.getById": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(tenantId: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.getTenant", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "tenantId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.getByKey": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(tenantKey: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.getTenant", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "tenantKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.list": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(params: IListTenantsParams & { includeTotalCount: true; }): Promise>", + "(params?: (IListTenantsParams & { includeTotalCount?: false; }) | undefined): Promise[]>", + "(params?: IListTenantsParams | undefined): Promise[] | PaginatedResultTenantRead>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.listTenants", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/tenants", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": true, + "type": "IListTenantsParams" + } + ], + "returns": "Promise[] | PaginatedResultTenantRead>" + } + }, + "permit.api.tenants.listTenantUsers": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(params: IListTenantUsers): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.listTenantUsers", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "{ tenantKey, ...params }", + "optional": false, + "type": "IListTenantUsers" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.update": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(tenantKey: string, tenantData: TenantUpdate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "TenantsApi.updateTenant", + "method": "PATCH", + "path": "/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "tenantKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "tenantData", + "optional": false, + "type": "TenantUpdate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.tenants.waitForSync": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(timeout: number | null, policy?: FactsSyncTimeoutPolicy | undefined): ITenantsApi" + ], + "routes": [], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "timeout", + "optional": false, + "type": "number | null" + }, + { + "initializer": null, + "name": "policy", + "optional": true, + "type": "FactsSyncTimeoutPolicy" + } + ], + "returns": "this" + } + }, + "permit.api.userAttributes.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(attribute: ResourceAttributeCreate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserAttributesApi.createUserAttribute", + "method": "POST", + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attribute", + "optional": false, + "type": "ResourceAttributeCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.userAttributes.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(attributeKey: string): Promise"], + "routes": [ + { + "generatedMethod": "UserAttributesApi.deleteUserAttribute", + "method": "DELETE", + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.userAttributes.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(attributeKey: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserAttributesApi.getUserAttribute", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.userAttributes.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IPagination | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserAttributesApi.listUserAttributes", + "method": "GET", + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IPagination" + } + ], + "returns": "Promise" + } + }, + "permit.api.userAttributes.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(attributeKey: string, attribute: ResourceAttributeUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserAttributesApi.updateUserAttribute", + "method": "PATCH", + "path": "/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "attributeKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "attribute", + "optional": false, + "type": "ResourceAttributeUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.userInvites.approve": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(userInviteId: string, approval: ElementsUserInviteApprove): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserInvitesApi.approveUserInvite", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "approval", + "optional": false, + "type": "ElementsUserInviteApprove" + } + ], + "returns": "Promise>" + } + }, + "permit.api.userInvites.create": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(invite: ElementsUserInviteCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserInvitesApi.createUserInvite", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/user_invites", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "invite", + "optional": false, + "type": "ElementsUserInviteCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.userInvites.delete": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(userInviteId: string): Promise"], + "routes": [ + { + "generatedMethod": "UserInvitesApi.deleteUserInvite", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.userInvites.get": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": ["(userInviteId: string): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserInvitesApi.getUserInvite", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.userInvites.list": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(params?: IListUserInvites | undefined): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserInvitesApi.listUserInvites", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/user_invites", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": "{}", + "name": "params", + "optional": true, + "type": "IListUserInvites" + } + ], + "returns": "Promise" + } + }, + "permit.api.userInvites.update": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(userInviteId: string, invite: ElementsUserInviteUpdate): Promise" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UserInvitesApi.updateUserInvite", + "method": "PATCH", + "path": "/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userInviteId", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "invite", + "optional": false, + "type": "ElementsUserInviteUpdate" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.assignRole": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(assignment: RoleAssignmentCreate): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RoleAssignmentsApi.assignRole", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "assignment", + "optional": false, + "type": "RoleAssignmentCreate" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.bulkUserCreate": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(users: UserCreate[]): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "BulkOperationsApi.bulkCreateUsers", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/bulk/users", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "users", + "optional": false, + "type": "UserCreate[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.bulkUserDelete": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(userKeys: string[]): Promise"], + "routes": [ + { + "generatedMethod": "BulkOperationsApi.bulkDeleteUsers", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/bulk/users", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userKeys", + "optional": false, + "type": "string[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.bulkUserReplace": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(users: UserCreate[]): Promise"], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "BulkOperationsApi.bulkReplaceUsers", + "method": "PUT", + "path": "/v2/facts/{proj_id}/{env_id}/bulk/users", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "users", + "optional": false, + "type": "UserCreate[]" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.create": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(userData: UserCreate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.createUser", + "method": "POST", + "path": "/v2/facts/{proj_id}/{env_id}/users", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userData", + "optional": false, + "type": "UserCreate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.delete": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(userKey: string): Promise"], + "routes": [ + { + "generatedMethod": "UsersApi.deleteUser", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "userKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.get": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(userKey: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.getUser", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.getAssignedRoles": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(params: T): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "RoleAssignmentsApi.listRoleAssignments", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "{ user, tenant, page = 1, perPage = 100, detailed = false, includeTotalCount = false, }", + "optional": false, + "type": "IGetUserRoles" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.getById": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(userId: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.getUser", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userId", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.getByKey": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(userKey: string): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.getUser", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userKey", + "optional": false, + "type": "string" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.list": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(params?: IUsersListParams | undefined): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.listUsers", + "method": "GET", + "path": "/v2/facts/{proj_id}/{env_id}/users", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "params", + "optional": true, + "type": "IUsersListParams" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.sync": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(userData: UserCreate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.replaceUser", + "method": "PUT", + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userData", + "optional": false, + "type": "UserCreate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.unassignRole": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": ["(unassignment: RoleAssignmentRemove): Promise"], + "routes": [ + { + "generatedMethod": "RoleAssignmentsApi.unassignRole", + "method": "DELETE", + "path": "/v2/facts/{proj_id}/{env_id}/role_assignments", + "supporting": false + }, + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "unassignment", + "optional": false, + "type": "RoleAssignmentRemove" + } + ], + "returns": "Promise" + } + }, + "permit.api.users.update": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(userKey: string, userData: UserUpdate): Promise>" + ], + "routes": [ + { + "generatedMethod": "APIKeysApi.getApiKeyScope", + "method": "GET", + "path": "/v2/api-key/scope", + "supporting": true + }, + { + "generatedMethod": "UsersApi.updateUser", + "method": "PATCH", + "path": "/v2/facts/{proj_id}/{env_id}/users/{user_id}", + "supporting": false + } + ], + "signature": { + "generics": ["Attributes extends object = object"], + "parameters": [ + { + "initializer": null, + "name": "userKey", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "userData", + "optional": false, + "type": "UserUpdate" + } + ], + "returns": "Promise>" + } + }, + "permit.api.users.waitForSync": { + "deprecated": false, + "factsProxy": true, + "publicSignatures": [ + "(timeout: number | null, policy?: FactsSyncTimeoutPolicy | undefined): IUsersApi" + ], + "routes": [], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "timeout", + "optional": false, + "type": "number | null" + }, + { + "initializer": null, + "name": "policy", + "optional": true, + "type": "FactsSyncTimeoutPolicy" + } + ], + "returns": "this" + } + }, + "permit.bulkCheck": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(checks: ICheckQuery[], context?: Context | undefined, config?: CheckConfig | undefined): Promise" + ], + "routes": [ + { + "body": "inputs", + "conditions": {}, + "method": "POST", + "path": "/allowed/bulk", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "checks", + "optional": false, + "type": "Array" + }, + { + "initializer": null, + "name": "context", + "optional": true, + "type": "Context | undefined" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckConfig | undefined" + } + ], + "returns": "Promise>" + } + }, + "permit.check": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(user: string | IUser, action: string, resource: string | IResource, context?: Context | undefined, config?: CheckConfig | undefined): Promise" + ], + "routes": [ + { + "body": "input", + "conditions": { + "config?.useOpa": false + }, + "method": "POST", + "path": "/allowed", + "response": ["unknown"], + "target": "pdp" + }, + { + "body": "input", + "conditions": { + "config?.useOpa": true + }, + "method": "POST", + "path": "/root", + "response": ["unknown"], + "target": "opa" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "user", + "optional": false, + "type": "string | IUser" + }, + { + "initializer": null, + "name": "action", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": false, + "type": "string | IResource" + }, + { + "initializer": null, + "name": "context", + "optional": true, + "type": "Context | undefined" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckConfig | undefined" + } + ], + "returns": "Promise" + } + }, + "permit.checkAllTenants": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(user: string | IUser, action: string, resource: string | IResource, context?: Context | undefined, sdk?: string | undefined): Promise" + ], + "routes": [ + { + "body": "input", + "conditions": {}, + "method": "POST", + "path": "/allowed/all-tenants", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "user", + "optional": false, + "type": "IUser | string" + }, + { + "initializer": null, + "name": "action", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": false, + "type": "IResource | string" + }, + { + "initializer": null, + "name": "context", + "optional": true, + "type": "Context | undefined" + }, + { + "initializer": null, + "name": "sdk", + "optional": true, + "type": "string | undefined" + } + ], + "returns": "Promise" + } + }, + "permit.checkUrl": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(user: string | IUser, httpMethod: string, url: string, config?: CheckUrlConfig | undefined): Promise" + ], + "routes": [ + { + "body": "input", + "conditions": {}, + "method": "POST", + "path": "/allowed_url", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "user", + "optional": false, + "type": "IUser | string" + }, + { + "initializer": null, + "name": "httpMethod", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "url", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckUrlConfig" + } + ], + "returns": "Promise" + } + }, + "permit.elements.loginAs": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "({ userId, tenantId }: loginAsSchema): Promise" + ], + "routes": [ + { + "generatedMethod": "AuthenticationApi.elementsLoginAs", + "method": "POST", + "path": "/v2/auth/elements_login_as", + "supporting": false + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "{ userId, tenantId, }", + "optional": false, + "type": "loginAsSchema" + } + ], + "returns": "Promise" + } + }, + "permit.filterObjects": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(user: string | IUser, action: string, objects: readonly T[], context?: Context | undefined, config?: CheckConfig | undefined): Promise" + ], + "routes": [ + { + "body": "inputs", + "conditions": {}, + "method": "POST", + "path": "/allowed/bulk", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": ["T extends IFilterObject"], + "parameters": [ + { + "initializer": null, + "name": "user", + "optional": false, + "type": "IUser | string" + }, + { + "initializer": null, + "name": "action", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "objects", + "optional": false, + "type": "readonly T[]" + }, + { + "initializer": null, + "name": "context", + "optional": true, + "type": "Context" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckConfig" + } + ], + "returns": "Promise" + } + }, + "permit.getAuthorizedUsers": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(action: string, resource: string | IResource, context?: Context | undefined, config?: CheckConfig | undefined): Promise" + ], + "routes": [ + { + "body": "input", + "conditions": {}, + "method": "POST", + "path": "/authorized_users", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "action", + "optional": false, + "type": "string" + }, + { + "initializer": null, + "name": "resource", + "optional": false, + "type": "IResource | string" + }, + { + "initializer": null, + "name": "context", + "optional": true, + "type": "Context" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckConfig" + } + ], + "returns": "Promise" + } + }, + "permit.getLocalRoleAssignments": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(query?: ILocalRoleAssignmentsQuery | undefined, config?: CheckConfig | undefined): Promise" + ], + "routes": [ + { + "body": null, + "conditions": {}, + "method": "GET", + "path": "/local/role_assignments", + "query": "params", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "query", + "optional": true, + "type": "ILocalRoleAssignmentsQuery" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckConfig" + } + ], + "returns": "Promise" + } + }, + "permit.getUserPermissions": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(user: string | IUser, tenants?: string[] | undefined, resources?: string[] | undefined, resource_types?: string[] | undefined, config?: GetUserPermissionsConfig | undefined): Promise" + ], + "routes": [ + { + "body": "input", + "conditions": {}, + "method": "POST", + "path": "/user-permissions", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "user", + "optional": false, + "type": "IUser | string" + }, + { + "initializer": null, + "name": "tenants", + "optional": true, + "type": "string[]" + }, + { + "initializer": null, + "name": "resources", + "optional": true, + "type": "string[]" + }, + { + "initializer": null, + "name": "resource_types", + "optional": true, + "type": "string[]" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "GetUserPermissionsConfig" + } + ], + "returns": "Promise" + } + }, + "permit.getUserTenants": { + "deprecated": false, + "factsProxy": false, + "publicSignatures": [ + "(user: string | IUser, context?: Context | undefined, config?: CheckConfig | undefined): Promise" + ], + "routes": [ + { + "body": "input", + "conditions": {}, + "method": "POST", + "path": "/user-tenants", + "response": ["unknown"], + "target": "pdp" + } + ], + "signature": { + "generics": [], + "parameters": [ + { + "initializer": null, + "name": "user", + "optional": false, + "type": "IUser | string" + }, + { + "initializer": null, + "name": "context", + "optional": true, + "type": "Context" + }, + { + "initializer": null, + "name": "config", + "optional": true, + "type": "CheckConfig" + } + ], + "returns": "Promise" + } + } + }, + "modelShapes": { + "APIHistoryEventFullRead": { + "extends": [], + "kind": "interface", + "members": [ + "actor_display_name?: string;", + "actor_id: string;", + "actor_type: string;", + "client_ip: string;", + "env_id?: string;", + "env_key?: string;", + "id: string;", + "method: string;", + "org_id?: string;", + "path: string;", + "project_id?: string;", + "project_key?: string;", + "request_body?: File;", + "request_id?: string;", + "response_body?: File;", + "status: number;", + "success: boolean;", + "timestamp: string;", + "timestamp_utc?: string;" + ] + }, + "APIHistoryEventRead": { + "extends": [], + "kind": "interface", + "members": [ + "actor_display_name?: string;", + "actor_id: string;", + "actor_type: string;", + "client_ip: string;", + "env_id?: string;", + "env_key?: string;", + "id: string;", + "method: string;", + "org_id?: string;", + "path: string;", + "project_id?: string;", + "project_key?: string;", + "request_id?: string;", + "status: number;", + "success: boolean;", + "timestamp: string;", + "timestamp_utc?: string;" + ] + }, + "APIKeyCreate": { + "extends": [], + "kind": "interface", + "members": [ + "access_level?: MemberAccessLevel;", + "environment_id?: string;", + "name?: string;", + "object_type?: MemberAccessObj;", + "organization_id: string;", + "owner_type?: APIKeyOwnerType;", + "project_id?: string;" + ] + }, + "APIKeyOwnerType": { + "kind": "type", + "type": "(typeof APIKeyOwnerType)[keyof typeof APIKeyOwnerType]" + }, + "APIKeyRead": { + "extends": [], + "kind": "interface", + "members": [ + "access_level?: MemberAccessLevel | null;", + "created_at: string;", + "created_by_member?: OrgMemberRead | null;", + "env?: EnvironmentRead | null;", + "environment_id?: string | null;", + "id: string;", + "last_used_at?: string | null;", + "name?: string | null;", + "object_type?: MemberAccessObj | null;", + "organization_id: string;", + "owner_type: APIKeyOwnerType;", + "project?: ProjectRead | null;", + "project_id?: string | null;", + "secret?: string | null;" + ] + }, + "APIKeyScopeRead": { + "extends": [], + "kind": "interface", + "members": [ + "environment_id?: string | null;", + "organization_id: string;", + "project_id?: string | null;" + ] + }, + "AVPEngineDecisionLog": { + "extends": [], + "kind": "interface", + "members": [ + "engine?: AVPEngineDecisionLogEngineEnum | null;", + "input: object;", + "process_time_ms?: number | null;", + "result: object;", + "tenant: string;", + "timestamp: string;" + ] + }, + "AVPEngineDecisionLogEngineEnum": { + "kind": "type", + "type": "(typeof AVPEngineDecisionLogEngineEnum)[keyof typeof AVPEngineDecisionLogEngineEnum]" + }, + "AccessRequestApproved": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: AccessRequestDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id?: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "AccessRequestCanceled": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: AccessRequestDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id?: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "AccessRequestCreateDetails": { + "extends": [], + "kind": "interface", + "members": [ + "resource?: string;", + "resource_instance?: string;", + "role: string;", + "tenant: string;" + ] + }, + "AccessRequestDenied": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: AccessRequestDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id?: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "AccessRequestDetails": { + "extends": [], + "kind": "interface", + "members": [ + "element_config_id?: string;", + "resource: string;", + "resource_instance?: string;", + "role: string;", + "tenant: string;" + ] + }, + "AccessRequestList": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: AccessRequestDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_email?: string;", + "requesting_user_first_name?: string;", + "requesting_user_id?: string;", + "requesting_user_last_name?: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "AccessRequestRead": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: AccessRequestDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id?: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "AccessRequestReview": { + "extends": [], + "kind": "interface", + "members": ["reviewer_comment?: string;", "role?: string;"] + }, + "AccessRequestReviewDeny": { + "extends": [], + "kind": "interface", + "members": ["reviewer_comment?: string;"] + }, + "AccessRequestUserCreate": { + "extends": [], + "kind": "interface", + "members": ["access_request_details: AccessRequestCreateDetails;", "reason?: string;"] + }, + "ActionBlockEditable": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "name?: string;", + "v1compat_name?: string;", + "v1compat_path?: string;" + ] + }, + "ActionBlockRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "id: string;", + "key?: string;", + "name?: string;", + "v1compat_name?: string;", + "v1compat_path?: string;" + ] + }, + "ActionObj": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "id: string;", + "key: string;", + "name?: string | null;", + "updated_at: string;" + ] + }, + "ActivityDetailsList": { + "extends": [], + "kind": "interface", + "members": [ + "items: Array;", + "kind?: ActivityDetailsListKindEnum;", + "type: string;" + ] + }, + "ActivityDetailsListKindEnum": { + "kind": "type", + "type": "(typeof ActivityDetailsListKindEnum)[keyof typeof ActivityDetailsListKindEnum]" + }, + "ActivityDetailsObject": { + "extends": [], + "kind": "interface", + "members": [ + "id?: string;", + "key?: string;", + "kind?: ActivityDetailsObjectKindEnum;", + "type: string;" + ] + }, + "ActivityDetailsObjectData": { + "extends": [], + "kind": "interface", + "members": ["id?: string;", "key?: string;"] + }, + "ActivityDetailsObjectKindEnum": { + "kind": "type", + "type": "(typeof ActivityDetailsObjectKindEnum)[keyof typeof ActivityDetailsObjectKindEnum]" + }, + "ActivityDetailsValue": { + "kind": "type", + "type": "({\n kind: 'list';\n} & ActivityDetailsList) | ({\n kind: 'object';\n} & ActivityDetailsObject)" + }, + "ActivityLogEventRead": { + "extends": [], + "kind": "interface", + "members": [ + "activity_description?: string;", + "activity_details?: {\n [key: string]: ActivityDetailsValue;\n};", + "activity_id?: string;", + "actor_display_name?: string;", + "actor_id: string;", + "actor_type: string;", + "client_ip: string;", + "env_id?: string;", + "env_key?: string;", + "id: string;", + "org_id?: string;", + "project_id?: string;", + "project_key?: string;", + "timestamp: string;" + ] + }, + "AddRolePermissions": { + "extends": [], + "kind": "interface", + "members": ["permissions: Array;"] + }, + "ApproveMessage": { + "extends": [], + "kind": "interface", + "members": ["message: string;"] + }, + "AttributeBlockEditable": { + "extends": [], + "kind": "interface", + "members": ["description?: string;", "type: AttributeType;"] + }, + "AttributeBlockRead": { + "extends": [], + "kind": "interface", + "members": ["description?: string;", "id: string;", "key?: string;", "type: AttributeType;"] + }, + "AttributeType": { + "kind": "type", + "type": "(typeof AttributeType)[keyof typeof AttributeType]" + }, + "AuditLogModel": { + "extends": [], + "kind": "interface", + "members": [ + "action?: string | null;", + "context?: any;", + "created_at?: string | null;", + "decision?: boolean | null;", + "env_id: string;", + "id: string;", + "input?: any;", + "org_id: string;", + "pdp_config_id?: string | null;", + "project_id: string;", + "query?: string | null;", + "raw_data?: RawData | null;", + "reason?: string | null;", + "resource_type?: string | null;", + "result?: any;", + "tenant?: string | null;", + "timestamp: string;", + "user_email?: string | null;", + "user_key?: string | null;", + "user_name?: string | null;" + ] + }, + "AuditLogObjectsModel": { + "extends": [], + "kind": "interface", + "members": [ + "action_object?: ActionObj | null;", + "created_at?: string | null;", + "environment_object?: EnvironmentObject | null;", + "id?: string | null;", + "organization_object?: OrganizationObject | null;", + "pdp_config_object?: PdpConfigObject | null;", + "project_object?: ProjectObject | null;", + "resource_type_object?: ResourceTypeObj | null;", + "tenant_object?: TenantObj | null;", + "user_object?: UserObj | null;" + ] + }, + "AuditLogQueryType": { + "kind": "type", + "type": "(typeof AuditLogQueryType)[keyof typeof AuditLogQueryType]" + }, + "AuditLogReplayRequest": { + "extends": [], + "kind": "interface", + "members": [ + "concurrency_limit?: number;", + "end_time?: number;", + "graceful_shutdown_s?: number;", + "pdp_url: string;", + "start_time?: number;" + ] + }, + "AuditLogReplayResponse": { + "extends": [], + "kind": "interface", + "members": ["document_count: number;", "message: string;"] + }, + "AuditLogSortKey": { + "kind": "type", + "type": "(typeof AuditLogSortKey)[keyof typeof AuditLogSortKey]" + }, + "AuthMechanism": { + "kind": "type", + "type": "(typeof AuthMechanism)[keyof typeof AuthMechanism]" + }, + "BillingTierType": { + "kind": "type", + "type": "(typeof BillingTierType)[keyof typeof BillingTierType]" + }, + "BulkRoleAssignmentReport": { + "extends": [], + "kind": "interface", + "members": ["assignments_created?: number;"] + }, + "BulkRoleUnAssignmentReport": { + "extends": [], + "kind": "interface", + "members": ["assignments_removed?: number;"] + }, + "CallbacksInner": { + "kind": "type", + "type": "string | [\n string,\n OPALHttpFetcherConfig\n]" + }, + "ConditionSet": { + "extends": [], + "kind": "interface", + "members": ["attribute: string;", "key: string;", "operator: string;", "value: string;"] + }, + "ConditionSetCreate": { + "extends": [], + "kind": "interface", + "members": [ + "autogenerated?: boolean;", + "conditions?: object;", + "description?: string;", + "key: string;", + "name: string;", + "parent_id?: ParentId;", + "resource_id?: ResourceId;", + "type?: ConditionSetType;" + ] + }, + "ConditionSetRead": { + "extends": [], + "kind": "interface", + "members": [ + "autogenerated?: boolean;", + "conditions?: object;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "parent_id?: ParentId;", + "project_id: string;", + "resource?: ResourceRead;", + "resource_id?: ResourceId;", + "type?: ConditionSetType;", + "updated_at: string;" + ] + }, + "ConditionSetRuleCreate": { + "extends": [], + "kind": "interface", + "members": [ + "is_resource?: boolean;", + "is_role?: boolean;", + "permission: string;", + "resource_set: string;", + "user_set: string;" + ] + }, + "ConditionSetRuleRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "organization_id: string;", + "permission: string;", + "project_id: string;", + "resource_set: string;", + "updated_at: string;", + "user_set: string;" + ] + }, + "ConditionSetRuleRemove": { + "extends": [], + "kind": "interface", + "members": [ + "is_resource?: boolean;", + "is_role?: boolean;", + "permission: string;", + "resource_set: string;", + "user_set: string;" + ] + }, + "ConditionSetType": { + "kind": "type", + "type": "(typeof ConditionSetType)[keyof typeof ConditionSetType]" + }, + "ConditionSetUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "conditions?: object;", + "description?: string;", + "name?: string;", + "parent_id?: ParentId;" + ] + }, + "Data": { + "kind": "type", + "type": "Array | Array | object" + }, + "DataGeneratorLibSchemasSchemaOpalDataConditionSetData": { + "extends": [], + "kind": "interface", + "members": ["key: string;", "type: ConditionSetType;"] + }, + "DataGeneratorLibSchemasSchemaOpalDataDerivationSettings": { + "extends": [], + "kind": "interface", + "members": ["superseded_by_direct_role?: boolean;"] + }, + "DataGeneratorLibSchemasSchemaOpalDataDerivedRole": { + "extends": [], + "kind": "interface", + "members": [ + "conditions?: string;", + "rules: Array;", + "settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings;" + ] + }, + "DataGeneratorLibSchemasSchemaOpalDataDerivedRoleRule": { + "extends": [], + "kind": "interface", + "members": [ + "related_resource: string;", + "related_role: string;", + "relation: string;", + "settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings;" + ] + }, + "DataGeneratorLibSchemasSchemaOpalDataFullData": { + "extends": [], + "kind": "interface", + "members": [ + "condition_set_rules: {\n [key: string]: {\n [key: string]: {\n [key: string]: Array;\n };\n };\n};", + "condition_set_rules_expand?: {\n [key: string]: {\n [key: string]: {\n [key: string]: Array;\n };\n };\n};", + "condition_sets: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataConditionSetData;\n};", + "mapping_rules?: {\n [key: string]: Array<{\n [key: string]: LocationInner;\n }>;\n};", + "relationships: {\n [key: string]: {\n [key: string]: {\n [key: string]: Array;\n };\n };\n};", + "resource_instances?: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData;\n};", + "resource_types: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceTypeData;\n};", + "role_assignments: {\n [key: string]: {\n [key: string]: Array;\n };\n};", + "role_permissions: {\n [key: string]: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData;\n };\n};", + "roles: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData;\n};", + "tenants: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataTenantData;\n};", + "use_debugger?: boolean;", + "users: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataUserData;\n};" + ] + }, + "DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "tenant?: string;"] + }, + "DataGeneratorLibSchemasSchemaOpalDataResourceTypeData": { + "extends": [], + "kind": "interface", + "members": [ + "actions: Array;", + "derived_roles: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataDerivedRole;\n};" + ] + }, + "DataGeneratorLibSchemasSchemaOpalDataRoleData": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "grants: {\n [key: string]: Array;\n};"] + }, + "DataGeneratorLibSchemasSchemaOpalDataTenantData": { + "extends": [], + "kind": "interface", + "members": [ + "attributes: object;", + "roleAssignments?: {\n [key: string]: Array;\n};" + ] + }, + "DataGeneratorLibSchemasSchemaOpalDataUserData": { + "extends": [], + "kind": "interface", + "members": [ + "attributes: object;", + "roleAssignments: {\n [key: string]: Array;\n};" + ] + }, + "DataSourceConfig": { + "extends": [], + "kind": "interface", + "members": ["entries?: Array;"] + }, + "DataSourceEntryWithPollingInterval": { + "extends": [], + "kind": "interface", + "members": [ + "config?: object;", + "data?: Data;", + "dst_path?: string;", + "periodic_update_interval?: number;", + "save_method?: string;", + "topics?: Array;", + "url: string;" + ] + }, + "DerivedRoleBlockEdit": { + "extends": [], + "kind": "interface", + "members": [ + "users_with_role?: Array;", + "when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;" + ] + }, + "DerivedRoleBlockRead": { + "extends": [], + "kind": "interface", + "members": [ + "id: string;", + "users_with_role?: Array;", + "when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;" + ] + }, + "DerivedRoleRuleCreate": { + "extends": [], + "kind": "interface", + "members": [ + "linked_by_relation: string;", + "on_resource: string;", + "role: string;", + "when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;" + ] + }, + "DerivedRoleRuleDelete": { + "extends": [], + "kind": "interface", + "members": [ + "linked_by_relation: string;", + "on_resource: string;", + "role: string;", + "when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;" + ] + }, + "DerivedRoleRuleRead": { + "extends": [], + "kind": "interface", + "members": [ + "linked_by_relation: string;", + "on_resource: string;", + "relation_id: string;", + "resource_id: string;", + "role: string;", + "role_id: string;", + "when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;" + ] + }, + "DetailedAuditLogModel": { + "extends": [], + "kind": "interface", + "members": [ + "action?: string | null;", + "context?: any;", + "created_at?: string | null;", + "decision?: boolean | null;", + "env_id: string;", + "id: string;", + "input?: any;", + "objects?: AuditLogObjectsModel | null;", + "org_id: string;", + "pdp_config_id?: string | null;", + "project_id: string;", + "query?: string | null;", + "raw_data: RawData1;", + "reason?: string | null;", + "resource_type?: string | null;", + "result?: any;", + "tenant?: string | null;", + "timestamp: string;", + "user_email?: string | null;", + "user_key?: string | null;", + "user_name?: string | null;" + ] + }, + "DummyEngineModel": { + "extends": [], + "kind": "interface", + "members": ["engine?: Engine | null;", "timestamp?: string | null;"] + }, + "ElementsConfigCreate": { + "extends": [], + "kind": "interface", + "members": [ + "elements_type: ElementsType;", + "email_notifications?: boolean;", + "key: string;", + "name: string;", + "roles_to_levels: {\n [key: string]: Array;\n};", + "settings: {\n [key: string]: SettingsValue;\n};", + "webhook?: WebhookCreateWithElements;" + ] + }, + "ElementsConfigRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "elements_type: ElementsType;", + "email_notifications?: boolean;", + "environment_id: string;", + "id: string;", + "is_active: boolean;", + "key: string;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "roles_to_levels: {\n [key: string]: Array;\n};", + "settings: {\n [key: string]: SettingsValue;\n};", + "updated_at: string;", + "webhook?: WebhookRead;" + ] + }, + "ElementsConfigRuntimeRead": { + "extends": [], + "kind": "interface", + "members": [ + "config: ElementsConfigRead;", + "current_permission_level: ElementsPermissionLevel;" + ] + }, + "ElementsConfigUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "elements_type?: ElementsType;", + "email_notifications?: boolean;", + "name?: string;", + "roles_to_levels: {\n [key: string]: Array;\n};", + "settings?: {\n [key: string]: SettingsValue;\n};", + "webhook?: WebhookUpdate;" + ] + }, + "ElementsPermissionLevel": { + "kind": "type", + "type": "(typeof ElementsPermissionLevel)[keyof typeof ElementsPermissionLevel]" + }, + "ElementsRoleRead": { + "extends": [], + "kind": "interface", + "members": [ + "id: string;", + "key: string;", + "name: string;", + "permission_level: ElementsPermissionLevel;" + ] + }, + "ElementsType": { + "kind": "type", + "type": "(typeof ElementsType)[keyof typeof ElementsType]" + }, + "ElementsUserCreate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "email?: string;", + "first_name?: string;", + "key: string;", + "last_name?: string;", + "role?: string;", + "role_assignments?: Array;" + ] + }, + "ElementsUserInviteApprove": { + "extends": [], + "kind": "interface", + "members": ["attributes: object;", "email: string;", "key: string;"] + }, + "ElementsUserInviteCreate": { + "extends": [], + "kind": "interface", + "members": [ + "email: string;", + "first_name: string;", + "key: string;", + "last_name: string;", + "resource_instance_id: string;", + "role_id: string;", + "status: UserInviteStatus;", + "tenant_id: string;" + ] + }, + "ElementsUserInviteRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "email: string;", + "environment_id: string;", + "first_name: string;", + "id: string;", + "key: string;", + "last_name: string;", + "organization_id: string;", + "project_id: string;", + "resource_instance_id: string;", + "role_id: string;", + "status: UserInviteStatus;", + "tenant_id: string;", + "updated_at: string;" + ] + }, + "ElementsUserInviteUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "email: string;", + "first_name: string;", + "key: string;", + "last_name: string;", + "resource_instance_id: string;", + "role_id: string;", + "status: UserInviteStatus;", + "tenant_id: string;" + ] + }, + "ElementsUserRoleCreate": { + "extends": [], + "kind": "interface", + "members": ["role: string;"] + }, + "ElementsUserRoleRemove": { + "extends": [], + "kind": "interface", + "members": ["role: string;"] + }, + "EmailConfigurationCreate": { + "kind": "type", + "type": "({\n email_provider_type: 'mailgun';\n} & MailgunEmailConfigurationCreate) | ({\n email_provider_type: 'smtp';\n} & SMTPEmailConfigurationCreate)" + }, + "EmailConfigurationRead": { + "kind": "type", + "type": "({\n email_provider_type: 'mailgun';\n} & MailgunEmailConfigurationRead) | ({\n email_provider_type: 'smtp';\n} & SMTPEmailConfigurationRead)" + }, + "EmailMessageKeys": { + "kind": "type", + "type": "(typeof EmailMessageKeys)[keyof typeof EmailMessageKeys]" + }, + "EmailTemplateMessage": { + "extends": [], + "kind": "interface", + "members": ["message_content: string;", "message_type: EmailMessageKeys;"] + }, + "EmailTemplateRead": { + "extends": [], + "kind": "interface", + "members": [ + "environment_id: string;", + "from_address: string;", + "id: string;", + "messages: Array;", + "organization_id: string;", + "project_id: string;", + "redirect_to: string;", + "subject: string;", + "template_type: EmailTemplateType;", + "url_ttl: string;" + ] + }, + "EmailTemplateType": { + "kind": "type", + "type": "(typeof EmailTemplateType)[keyof typeof EmailTemplateType]" + }, + "EmailTemplateUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "from_address: string;", + "messages: Array;", + "redirect_to: string;", + "subject: string;", + "url_ttl: string;" + ] + }, + "EmbeddedLoginRequestOutput": { + "extends": [], + "kind": "interface", + "members": [ + "element_bearer_token?: string;", + "error?: string;", + "error_code?: number;", + "extra?: string;", + "redirect_url: string;", + "token?: string;" + ] + }, + "Engine": { + "kind": "type", + "type": "(typeof Engine)[keyof typeof Engine]" + }, + "EnvironmentCopy": { + "extends": [], + "kind": "interface", + "members": [ + "conflict_strategy?: EnvironmentCopyConflictStrategy;", + "scope?: EnvironmentCopyScope;", + "target_env: EnvironmentCopyTarget;" + ] + }, + "EnvironmentCopyConflictStrategy": { + "kind": "type", + "type": "(typeof EnvironmentCopyConflictStrategy)[keyof typeof EnvironmentCopyConflictStrategy]" + }, + "EnvironmentCopyScope": { + "extends": [], + "kind": "interface", + "members": [ + "custom_policies?: EnvironmentCopyScopeFilters;", + "resource_sets?: EnvironmentCopyScopeFilters;", + "resources?: EnvironmentCopyScopeFilters;", + "roles?: EnvironmentCopyScopeFilters;", + "user_sets?: EnvironmentCopyScopeFilters;" + ] + }, + "EnvironmentCopyScopeFilters": { + "extends": [], + "kind": "interface", + "members": ["exclude?: Array;", "include?: Array;"] + }, + "EnvironmentCopyTarget": { + "extends": [], + "kind": "interface", + "members": ["existing?: string;", "new?: EnvironmentCreate;"] + }, + "EnvironmentCreate": { + "extends": [], + "kind": "interface", + "members": [ + "custom_branch_name?: string;", + "description?: string;", + "jwks?: JwksConfig;", + "key: string;", + "name: string;", + "settings?: object;" + ] + }, + "EnvironmentObj": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "id: string;", + "key: string;", + "name?: string | null;", + "updated_at: string;" + ] + }, + "EnvironmentObject": { + "kind": "type", + "type": "EnvironmentObj | object" + }, + "EnvironmentRead": { + "extends": [], + "kind": "interface", + "members": [ + "avp_policy_store_id?: string;", + "created_at: string;", + "custom_branch_name?: string;", + "description?: string;", + "id: string;", + "jwks?: JwksConfig;", + "key: string;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "settings?: object;", + "updated_at: string;" + ] + }, + "EnvironmentReadWithEmailConfig": { + "extends": [], + "kind": "interface", + "members": [ + "avp_policy_store_id?: string;", + "created_at: string;", + "custom_branch_name?: string;", + "description?: string;", + "email_configuration: string;", + "id: string;", + "jwks?: JwksConfig;", + "key: string;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "settings?: object;", + "updated_at: string;" + ] + }, + "EnvironmentStatistics": { + "extends": [], + "kind": "interface", + "members": [ + "has_decision_logs: boolean;", + "mau: number;", + "members: Array;", + "policies: number;", + "resources: number;", + "roles: number;", + "tenants: number;", + "users: number;" + ] + }, + "EnvironmentStats": { + "extends": [], + "kind": "interface", + "members": [ + "avp_policy_store_id?: string;", + "created_at: string;", + "custom_branch_name?: string;", + "description?: string;", + "id: string;", + "jwks?: JwksConfig;", + "key: string;", + "name: string;", + "organization_id: string;", + "pdp_configs: Array;", + "project_id: string;", + "settings?: object;", + "stats: EnvironmentStatistics;", + "updated_at: string;" + ] + }, + "EnvironmentUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "custom_branch_name?: string;", + "description?: string;", + "jwks?: JwksConfig;", + "name?: string;", + "settings?: object;" + ] + }, + "ErrorCode": { + "kind": "type", + "type": "(typeof ErrorCode)[keyof typeof ErrorCode]" + }, + "ErrorDetails": { + "extends": [], + "kind": "interface", + "members": [ + "additional_info?: any;", + "error_code: ErrorCode;", + "id: string;", + "message?: string;", + "support_link?: string;", + "title: string;" + ] + }, + "FailedInvite": { + "extends": [], + "kind": "interface", + "members": ["email: string;", "reason: string;"] + }, + "GenericEngineDecisionLog": { + "extends": [], + "kind": "interface", + "members": [ + "action?: string | null;", + "context?: any;", + "decision: boolean;", + "decision_id?: string | null;", + "engine?: GenericEngineDecisionLogEngineEnum | null;", + "input?: any;", + "process_time_ms?: number | null;", + "query?: string | null;", + "resource_type?: string | null;", + "result?: any;", + "tenant?: string | null;", + "timestamp: string;", + "user_email?: string | null;", + "user_key?: string | null;", + "user_name?: string | null;" + ] + }, + "GenericEngineDecisionLogEngineEnum": { + "kind": "type", + "type": "(typeof GenericEngineDecisionLogEngineEnum)[keyof typeof GenericEngineDecisionLogEngineEnum]" + }, + "GroupAddRole": { + "extends": [], + "kind": "interface", + "members": [ + "resource: string;", + "resource_instance: string;", + "role: string;", + "tenant: string;" + ] + }, + "GroupAssignUser": { + "extends": [], + "kind": "interface", + "members": ["tenant: string;"] + }, + "GroupAssignment": { + "extends": [], + "kind": "interface", + "members": ["group_instance_key: string;"] + }, + "GroupCreate": { + "extends": [], + "kind": "interface", + "members": [ + "group_instance_key: string;", + "group_resource_type_key?: string;", + "group_tenant: string;" + ] + }, + "GroupRead": { + "extends": [], + "kind": "interface", + "members": [ + "assigned_roles?: Array;", + "group_instance_key: string;", + "group_resource_type_key?: string;", + "group_tenant: string;", + "users?: Array;" + ] + }, + "GroupReadSchema": { + "extends": [], + "kind": "interface", + "members": [ + "group_instance_key: string;", + "group_resource_type_key?: string;", + "group_tenant: string;", + "id: string;" + ] + }, + "GroupRoleReadSchema": { + "extends": [], + "kind": "interface", + "members": [ + "key: string;", + "resource: GroupRoleResourceReadOnly;", + "resource_instance: GroupRoleResourceReadOnly;" + ] + }, + "GroupRoleResourceReadOnly": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "key: string;"] + }, + "GroupUserReadSchema": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "key: string;"] + }, + "HTTPValidationError": { + "extends": [], + "kind": "interface", + "members": ["detail?: Array;"] + }, + "HistoricalUsage": { + "extends": [], + "kind": "interface", + "members": [ + "current_month?: MonthlyUsage;", + "previous_month?: MonthlyUsage;", + "two_months_ago?: MonthlyUsage;" + ] + }, + "HttpMethods": { + "kind": "type", + "type": "(typeof HttpMethods)[keyof typeof HttpMethods]" + }, + "IdentityRead": { + "extends": [], + "kind": "interface", + "members": [ + "auth0_info: object;", + "email: string;", + "email_verified: boolean;", + "provider: string;", + "sub: string;", + "user_id: string;" + ] + }, + "InviteCreate": { + "extends": [], + "kind": "interface", + "members": ["email: string;", "member_id?: string;", "role?: MemberAccessLevel;"] + }, + "InviteRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "email: string;", + "failed_reason?: string;", + "id: string;", + "invite_code: string;", + "member_id?: string;", + "organization_id: string;", + "role?: MemberAccessLevel;", + "status: InviteStatus;" + ] + }, + "InviteStatus": { + "kind": "type", + "type": "(typeof InviteStatus)[keyof typeof InviteStatus]" + }, + "JSONPatchAction": { + "extends": [], + "kind": "interface", + "members": ["from?: string;", "op: string;", "path: string;", "value?: any;"] + }, + "JwksConfig": { + "extends": [], + "kind": "interface", + "members": ["jwks?: JwksObj;", "ttl?: number;", "url?: string;"] + }, + "JwksObj": { + "extends": [], + "kind": "interface", + "members": ["keys: Array;"] + }, + "LimitedPaginatedResultAPIHistoryEventRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "pagination_count: number;", + "total_count: number;" + ] + }, + "LimitedPaginatedResultActivityLogEventRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "pagination_count: number;", + "total_count: number;" + ] + }, + "LimitedPaginatedResultAuditLogModel": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number | null;", + "pagination_count: number;", + "total_count: number;" + ] + }, + "LocationInner": { + "kind": "type", + "type": "number | string" + }, + "MailgunEmailConfigurationCreate": { + "extends": [], + "kind": "interface", + "members": [ + "api_key: string;", + "domain: string;", + "email_provider_type?: MailgunEmailConfigurationCreateEmailProviderTypeEnum;", + "from_address: string;", + "region: string;" + ] + }, + "MailgunEmailConfigurationCreateEmailProviderTypeEnum": { + "kind": "type", + "type": "(typeof MailgunEmailConfigurationCreateEmailProviderTypeEnum)[keyof typeof MailgunEmailConfigurationCreateEmailProviderTypeEnum]" + }, + "MailgunEmailConfigurationRead": { + "extends": [], + "kind": "interface", + "members": [ + "api_key: string;", + "domain: string;", + "email_provider_type?: MailgunEmailConfigurationReadEmailProviderTypeEnum;", + "environment_id: string;", + "from_address: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "region: string;" + ] + }, + "MailgunEmailConfigurationReadEmailProviderTypeEnum": { + "kind": "type", + "type": "(typeof MailgunEmailConfigurationReadEmailProviderTypeEnum)[keyof typeof MailgunEmailConfigurationReadEmailProviderTypeEnum]" + }, + "MappingRule": { + "extends": [], + "kind": "interface", + "members": [ + "action?: string;", + "headers?: {\n [key: string]: string;\n};", + "http_method: Methods;", + "priority?: number;", + "resource: string;", + "url: string;", + "url_type?: MappingRuleUrlTypeEnum;" + ] + }, + "MappingRuleUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "action?: string;", + "headers?: {\n [key: string]: string;\n};", + "http_method: Methods;", + "priority?: number;", + "resource: string;", + "should_delete?: boolean;", + "url: string;", + "url_type?: MappingRuleUpdateUrlTypeEnum;" + ] + }, + "MappingRuleUpdateUrlTypeEnum": { + "kind": "type", + "type": "(typeof MappingRuleUpdateUrlTypeEnum)[keyof typeof MappingRuleUpdateUrlTypeEnum]" + }, + "MappingRuleUrlTypeEnum": { + "kind": "type", + "type": "(typeof MappingRuleUrlTypeEnum)[keyof typeof MappingRuleUrlTypeEnum]" + }, + "MemberAccessLevel": { + "kind": "type", + "type": "(typeof MemberAccessLevel)[keyof typeof MemberAccessLevel]" + }, + "MemberAccessObj": { + "kind": "type", + "type": "(typeof MemberAccessObj)[keyof typeof MemberAccessObj]" + }, + "Methods": { + "kind": "type", + "type": "(typeof Methods)[keyof typeof Methods]" + }, + "MissingUserPolicy": { + "kind": "type", + "type": "(typeof MissingUserPolicy)[keyof typeof MissingUserPolicy]" + }, + "MonthlyUsage": { + "extends": [], + "kind": "interface", + "members": [ + "mau?: number;", + "month?: number;", + "monthly_tenants?: Array;", + "tenants?: number;", + "year?: number;" + ] + }, + "MultiInviteResult": { + "extends": [], + "kind": "interface", + "members": ["failed?: Array;", "success: Array;"] + }, + "OPAEngineDecisionLog": { + "extends": [], + "kind": "interface", + "members": [ + "decision_id: string;", + "engine?: OPAEngineDecisionLogEngineEnum | null;", + "input?: any;", + "labels: OPALabels;", + "metrics: OPAMetrics;", + "path: string;", + "result?: any;", + "timestamp: string;" + ] + }, + "OPAEngineDecisionLogEngineEnum": { + "kind": "type", + "type": "(typeof OPAEngineDecisionLogEngineEnum)[keyof typeof OPAEngineDecisionLogEngineEnum]" + }, + "OPALClient": { + "extends": [], + "kind": "interface", + "members": [ + "CLIENT_TOKEN: string;", + "DATA_TOPICS: Array;", + "DEFAULT_DATA_SOURCES_CONFIG_URL: string;", + "DEFAULT_UPDATE_CALLBACKS?: OPALUpdateCallback;", + "DEFAULT_UPDATE_CALLBACK_CONFIG?: OPALHttpFetcherConfig;", + "SCOPE_ID?: string;", + "SERVER_PUBSUB_URL: string;", + "SERVER_URL: string;", + "SERVER_WS_URL: string;", + "SHOULD_REPORT_ON_DATA_UPDATES?: boolean;" + ] + }, + "OPALCommon": { + "extends": [], + "kind": "interface", + "members": ["AUTH_PUBLIC_KEY: string;", "FETCHING_CALLBACK_TIMEOUT?: number;"] + }, + "OPALHttpFetcherConfig": { + "extends": [], + "kind": "interface", + "members": [ + "data?: any;", + "fetcher?: string;", + "headers?: {\n [key: string]: string;\n};", + "is_json?: boolean;", + "method?: HttpMethods;", + "process_data?: boolean;" + ] + }, + "OPALUpdateCallback": { + "extends": [], + "kind": "interface", + "members": ["callbacks: Array;"] + }, + "OPALabels": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "version: string;"] + }, + "OPAMetrics": { + "extends": [], + "kind": "interface", + "members": [ + "timer_rego_input_parse_ns?: number | null;", + "timer_rego_module_compile_ns?: number | null;", + "timer_rego_module_parse_ns?: number | null;", + "timer_rego_query_compile_ns?: number | null;", + "timer_rego_query_eval_ns?: number | null;", + "timer_rego_query_parse_ns?: number | null;", + "timer_server_handler_ns?: number | null;" + ] + }, + "OnboardingStep": { + "kind": "type", + "type": "(typeof OnboardingStep)[keyof typeof OnboardingStep]" + }, + "OperationApprovalApproved": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: OperationApprovalDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "OperationApprovalCanceled": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: OperationApprovalDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "OperationApprovalCreateDetails": { + "extends": [], + "kind": "interface", + "members": ["resource: string;", "resource_instance?: string;", "tenant: string;"] + }, + "OperationApprovalDenied": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: OperationApprovalDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "OperationApprovalDetails": { + "extends": [], + "kind": "interface", + "members": [ + "element_config_id?: string;", + "resource: string;", + "resource_instance: string;", + "tenant: string;" + ] + }, + "OperationApprovalList": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: OperationApprovalDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_email?: string;", + "requesting_user_first_name?: string;", + "requesting_user_id: string;", + "requesting_user_last_name?: string;", + "resource_instance_key?: string;", + "resource_key?: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "OperationApprovalRead": { + "extends": [], + "kind": "interface", + "members": [ + "access_request_details: OperationApprovalDetails;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "reason?: string;", + "requesting_user_id: string;", + "reviewed_at?: string;", + "reviewer_comment?: string;", + "reviewer_user_id?: string;", + "status: RequestStatus;", + "type?: RequestType;", + "updated_at: string;" + ] + }, + "OperationApprovalReview": { + "extends": [], + "kind": "interface", + "members": ["reviewer_comment?: string;"] + }, + "OperationApprovalUserCreate": { + "extends": [], + "kind": "interface", + "members": ["access_request_details: OperationApprovalCreateDetails;", "reason?: string;"] + }, + "OrgExportResult": { + "extends": [], + "kind": "interface", + "members": [ + "download_url: string;", + "expires_in_seconds: number;", + "filename: string;", + "size_bytes: number;" + ] + }, + "OrgMemberCreate": { + "extends": [], + "kind": "interface", + "members": ["email?: string;", "id?: string;", "permissions: Array;"] + }, + "OrgMemberRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "email: string;", + "email_verified: boolean;", + "family_name?: string;", + "given_name?: string;", + "id: string;", + "identities: Array;", + "invite?: InviteRead;", + "is_onboarding: boolean;", + "is_superuser: boolean;", + "last_ip?: string;", + "last_login?: string;", + "logins_count?: number;", + "name?: string;", + "onboarding_step: OnboardingStep;", + "picture?: string;", + "settings: object;" + ] + }, + "OrgMemberReadWithGrants": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "email: string;", + "email_verified: boolean;", + "family_name?: string;", + "given_name?: string;", + "grants: Array;", + "id: string;", + "identities: Array;", + "invite?: InviteRead;", + "is_onboarding: boolean;", + "is_superuser: boolean;", + "last_ip?: string;", + "last_login?: string;", + "logins_count?: number;", + "name?: string;", + "onboarding_step: OnboardingStep;", + "picture?: string;", + "settings: object;" + ] + }, + "OrgMemberRemovePermissions": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "permissions: Array;"] + }, + "OrgMemberUpdate": { + "extends": [], + "kind": "interface", + "members": ["onboarding_step?: OnboardingStep;", "settings?: object;"] + }, + "OrganizationCreate": { + "extends": [], + "kind": "interface", + "members": ["key: string;", "name: string;", "settings?: object;"] + }, + "OrganizationObj": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "id: string;", + "key: string;", + "name?: string | null;", + "updated_at: string;" + ] + }, + "OrganizationObject": { + "kind": "type", + "type": "OrganizationObj | object" + }, + "OrganizationRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "id: string;", + "is_enterprise: boolean;", + "key: string;", + "name: string;", + "settings?: object;", + "updated_at: string;", + "usage_limits?: UsageLimits;" + ] + }, + "OrganizationReadWithAPIKey": { + "extends": [], + "kind": "interface", + "members": [ + "api_key_id?: string;", + "api_key_secret?: string;", + "created_at: string;", + "id: string;", + "is_enterprise: boolean;", + "key: string;", + "name: string;", + "settings?: object;", + "updated_at: string;", + "usage_limits?: UsageLimits;" + ] + }, + "OrganizationScheduleDeleteResponse": { + "extends": [], + "kind": "interface", + "members": [ + "delete_after: string;", + "deleted_at: string;", + "status?: OrganizationScheduleDeleteResponseStatusEnum;" + ] + }, + "OrganizationScheduleDeleteResponseStatusEnum": { + "kind": "type", + "type": "(typeof OrganizationScheduleDeleteResponseStatusEnum)[keyof typeof OrganizationScheduleDeleteResponseStatusEnum]" + }, + "OrganizationStatistics": { + "extends": [], + "kind": "interface", + "members": ["environments: number;", "projects: number;", "users: number;"] + }, + "OrganizationStats": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "historical_usage: HistoricalUsage;", + "id: string;", + "is_enterprise: boolean;", + "key: string;", + "name: string;", + "settings?: object;", + "stats: OrganizationStatistics;", + "updated_at: string;", + "usage_limits?: UsageLimits;" + ] + }, + "OrganizationUpdate": { + "extends": [], + "kind": "interface", + "members": ["name?: string;", "settings?: object;"] + }, + "PDPConfigRead": { + "extends": [], + "kind": "interface", + "members": [ + "client_secret: string;", + "debug_audit_logs?: boolean;", + "environment_id: string;", + "id: string;", + "min_pdp_version?: string;", + "name?: string;", + "num_shards?: number;", + "opal_server_access_token?: string;", + "organization_id: string;", + "project_id: string;" + ] + }, + "PDPContext": { + "extends": [], + "kind": "interface", + "members": [ + "backend_tier: string;", + "client_id: string;", + "component?: string;", + "customer_id: string;", + "env_id: string;", + "org_id: string;", + "project_id: string;" + ] + }, + "PDPDataRefreshRequest": { + "extends": [], + "kind": "interface", + "members": ["reason?: string;", "shard_id?: number;"] + }, + "PDPDataRefreshResponse": { + "extends": [], + "kind": "interface", + "members": ["pdp_ids: Array;", "update_id: string;"] + }, + "PDPShardMigration": { + "extends": [], + "kind": "interface", + "members": ["num_shards: number;"] + }, + "PaginatedResultAPIHistoryEventRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultAPIKeyRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number | null;", + "total_count: number;" + ] + }, + "PaginatedResultAccessRequestList": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultActivityLogEventRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultConditionSetRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultElementsConfigRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultElementsUserInviteRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultGroupReadSchema": { + "extends": [], + "kind": "interface", + "members": ["data: Array;", "page_count?: number;", "total_count: number;"] + }, + "PaginatedResultGroupRoleReadSchema": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultGroupUserReadSchema": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultOperationApprovalList": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultRelationRead": { + "extends": [], + "kind": "interface", + "members": ["data: Array;", "page_count?: number;", "total_count: number;"] + }, + "PaginatedResultRelationshipTupleDetailedRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultRelationshipTupleRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultResourceInstanceDetailedRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultResourceInstanceRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultResourceRead": { + "extends": [], + "kind": "interface", + "members": ["data: Array;", "page_count?: number;", "total_count: number;"] + }, + "PaginatedResultResourceRoleRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultRoleAssignmentDetailedRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultRoleAssignmentRead": { + "extends": [], + "kind": "interface", + "members": [ + "data: Array;", + "page_count?: number;", + "total_count: number;" + ] + }, + "PaginatedResultRoleRead": { + "extends": [], + "kind": "interface", + "members": ["data: Array;", "page_count?: number;", "total_count: number;"] + }, + "PaginatedResultTenantRead": { + "extends": [], + "kind": "interface", + "members": ["data: Array;", "page_count?: number;", "total_count: number;"] + }, + "PaginatedResultUserRead": { + "extends": [], + "kind": "interface", + "members": ["data: Array;", "page_count?: number;", "total_count: number;"] + }, + "ParentId": { + "kind": "type", + "type": "string" + }, + "PdpConfigObj": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "name: string;"] + }, + "PdpConfigObject": { + "kind": "type", + "type": "PdpConfigObj | object" + }, + "PdpValues": { + "extends": [], + "kind": "interface", + "members": [ + "BACKEND_SERVICE_URL: string;", + "CONTROL_PLANE_PDP_DELTAS_API: string;", + "CONTROL_PLANE_RELAY_API: string;", + "CONTROL_PLANE_RELAY_JWT_TIER: string;", + "FACTDB_BACKUP_SERVER_URL: string;", + "FACTDB_ENABLED?: boolean;", + "OPA_DECISION_LOG_ENABLED: boolean;", + "OPA_DECISION_LOG_INGRESS_BACKEND_TIER_URL: string;", + "OPA_DECISION_LOG_INGRESS_ROUTE: string;" + ] + }, + "Permission": { + "extends": [], + "kind": "interface", + "members": [ + "access_level: MemberAccessLevel;", + "environment_id?: string;", + "environment_key?: string;", + "environment_name?: string;", + "object_type: MemberAccessObj;", + "organization_id: string;", + "organization_key?: string;", + "organization_name?: string;", + "project_id?: string;", + "project_key?: string;", + "project_name?: string;" + ] + }, + "PermissionLevelRoleRead": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "key: string;", "name: string;", "resource_id: string;"] + }, + "PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings": { + "extends": [], + "kind": "interface", + "members": ["no_direct_roles_on_object?: boolean;"] + }, + "PermitBackendSchemasSchemaOpalDataDerivedRole": { + "extends": [], + "kind": "interface", + "members": [ + "conditions?: string;", + "rules: Array;", + "settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings;" + ] + }, + "PermitBackendSchemasSchemaOpalDataDerivedRoleRule": { + "extends": [], + "kind": "interface", + "members": [ + "related_resource: string;", + "related_role: string;", + "relation: string;", + "settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings;" + ] + }, + "PermitBackendSchemasSchemaOpalDataFullData": { + "extends": [], + "kind": "interface", + "members": [ + "condition_set_rules: {\n [key: string]: {\n [key: string]: {\n [key: string]: Array;\n };\n };\n};", + "condition_set_rules_expand?: {\n [key: string]: {\n [key: string]: {\n [key: string]: Array;\n };\n };\n};", + "condition_sets: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataConditionSetData;\n};", + "mapping_rules?: {\n [key: string]: Array<{\n [key: string]: LocationInner;\n }>;\n};", + "relationships: {\n [key: string]: {\n [key: string]: {\n [key: string]: Array;\n };\n };\n};", + "resource_instances?: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData;\n};", + "resource_types: {\n [key: string]: PermitBackendSchemasSchemaOpalDataResourceTypeData;\n};", + "role_assignments: {\n [key: string]: {\n [key: string]: Array;\n };\n};", + "role_permissions: {\n [key: string]: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData;\n };\n};", + "roles: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData;\n};", + "tenants: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataTenantData;\n};", + "use_debugger?: boolean;", + "users: {\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataUserData;\n};" + ] + }, + "PermitBackendSchemasSchemaOpalDataResourceTypeData": { + "extends": [], + "kind": "interface", + "members": [ + "actions: Array;", + "derived_roles: {\n [key: string]: PermitBackendSchemasSchemaOpalDataDerivedRole;\n};" + ] + }, + "PolicyGuardRuleCreate": { + "extends": [], + "kind": "interface", + "members": [ + "action_key: string;", + "is_allowed: boolean;", + "resource_key: string;", + "resource_set?: ConditionSet;", + "role_key?: string;", + "user_set?: ConditionSet;" + ] + }, + "PolicyGuardRuleItem": { + "extends": [], + "kind": "interface", + "members": [ + "action_key: string;", + "resource_key: string;", + "resource_set?: ConditionSet;", + "role_key?: string;", + "user_set?: ConditionSet;" + ] + }, + "PolicyGuardRuleRead": { + "extends": [], + "kind": "interface", + "members": [ + "action_key: string;", + "id: string;", + "is_allowed: boolean;", + "organization_id: string;", + "resource_key: string;", + "resource_set?: ConditionSet;", + "role_key?: string;", + "scope_id: string;", + "user_set?: ConditionSet;" + ] + }, + "PolicyGuardScopeAssociate": { + "extends": [], + "kind": "interface", + "members": ["project_id: string;"] + }, + "PolicyGuardScopeCreate": { + "extends": [], + "kind": "interface", + "members": [ + "key: string;", + "policy_guard_scope_details?: Array;" + ] + }, + "PolicyGuardScopeDetail": { + "extends": [], + "kind": "interface", + "members": ["project_id: string;"] + }, + "PolicyGuardScopeDetailCreate": { + "extends": [], + "kind": "interface", + "members": ["project_id: string;"] + }, + "PolicyGuardScopeRead": { + "extends": [], + "kind": "interface", + "members": [ + "id: string;", + "key: string;", + "organization_id: string;", + "policy_guard_scope_details?: Array;" + ] + }, + "PolicyRepoCreate": { + "extends": [], + "kind": "interface", + "members": [ + "activate_when_validated?: boolean;", + "credentials: SSHAuthData;", + "key: string;", + "main_branch_name?: string;", + "url: string;" + ] + }, + "PolicyRepoRead": { + "extends": [], + "kind": "interface", + "members": [ + "activate_when_validated?: boolean;", + "credentials: SSHAuthDataRead;", + "id: string;", + "key: string;", + "main_branch_name?: string;", + "status: PolicyRepoStatus;", + "url: string;" + ] + }, + "PolicyRepoStatus": { + "kind": "type", + "type": "(typeof PolicyRepoStatus)[keyof typeof PolicyRepoStatus]" + }, + "ProjectCreate": { + "extends": [], + "kind": "interface", + "members": [ + "active_policy_repo_id?: string;", + "description?: string;", + "initial_environments?: Array;", + "key: string;", + "name: string;", + "settings?: object;", + "urn_namespace?: string;" + ] + }, + "ProjectObj": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "id: string;", + "key: string;", + "name?: string | null;", + "updated_at: string;" + ] + }, + "ProjectObject": { + "kind": "type", + "type": "ProjectObj | object" + }, + "ProjectRead": { + "extends": [], + "kind": "interface", + "members": [ + "active_policy_repo_id?: string;", + "created_at: string;", + "description?: string;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "settings?: object;", + "updated_at: string;", + "urn_namespace?: string;" + ] + }, + "ProjectUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "active_policy_repo_id?: string;", + "description?: string;", + "name?: string;", + "settings?: object;" + ] + }, + "ProxyConfigCreate": { + "extends": [], + "kind": "interface", + "members": [ + "auth_mechanism?: AuthMechanism;", + "key: string;", + "mapping_rules?: Array;", + "name: string;", + "secret: Secret;" + ] + }, + "ProxyConfigRead": { + "extends": [], + "kind": "interface", + "members": [ + "auth_mechanism?: AuthMechanism;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "mapping_rules?: Array;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "secret: Secret;", + "updated_at: string;" + ] + }, + "ProxyConfigUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "auth_mechanism?: AuthMechanism;", + "mapping_rules?: Array;", + "name?: string;", + "secret?: Secret;" + ] + }, + "RawData": { + "kind": "type", + "type": "AVPEngineDecisionLog | DummyEngineModel | GenericEngineDecisionLog | OPAEngineDecisionLog" + }, + "RawData1": { + "kind": "type", + "type": "AVPEngineDecisionLog | DummyEngineModel | GenericEngineDecisionLog | OPAEngineDecisionLog" + }, + "RelationBlockRead": { + "extends": [], + "kind": "interface", + "members": [ + "description?: string;", + "relation_name?: string;", + "resource: string;", + "resource_id: string;" + ] + }, + "RelationCreate": { + "extends": [], + "kind": "interface", + "members": [ + "description?: string;", + "key: string;", + "name: string;", + "subject_resource: string;" + ] + }, + "RelationRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "name: string;", + "object_resource: string;", + "object_resource_id: string;", + "organization_id: string;", + "project_id: string;", + "subject_resource: string;", + "subject_resource_id: string;", + "updated_at: string;" + ] + }, + "RelationshipTupleBlockRead": { + "extends": [], + "kind": "interface", + "members": ["object: string;", "relation: string;", "subject: string;"] + }, + "RelationshipTupleCreate": { + "extends": [], + "kind": "interface", + "members": ["object: string;", "relation: string;", "subject: string;", "tenant?: string;"] + }, + "RelationshipTupleCreateBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["operations: Array;"] + }, + "RelationshipTupleDelete": { + "extends": [], + "kind": "interface", + "members": ["object: string;", "relation: string;", "subject: string;"] + }, + "RelationshipTupleDeleteBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["idents: Array;"] + }, + "RelationshipTupleDetailedRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "environment_id: string;", + "id: string;", + "object: string;", + "object_details?: ResourceInstanceBlockRead;", + "object_id?: string;", + "organization_id: string;", + "project_id: string;", + "relation: string;", + "relation_details?: StrippedRelationBlockRead;", + "relation_id: string;", + "subject: string;", + "subject_details?: ResourceInstanceBlockRead;", + "subject_id: string;", + "tenant: string;", + "tenant_details?: TenantBlockRead;", + "tenant_id: string;", + "updated_at: string;" + ] + }, + "RelationshipTupleObj": { + "extends": [], + "kind": "interface", + "members": ["object_str: string;", "relation_str: string;", "subject_str: string;"] + }, + "RelationshipTupleRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "environment_id: string;", + "id: string;", + "object: string;", + "object_details?: ResourceInstanceBlockRead;", + "object_id?: string;", + "organization_id: string;", + "project_id: string;", + "relation: string;", + "relation_details?: StrippedRelationBlockRead;", + "relation_id: string;", + "subject: string;", + "subject_details?: ResourceInstanceBlockRead;", + "subject_id: string;", + "tenant: string;", + "tenant_details?: TenantBlockRead;", + "tenant_id: string;", + "updated_at: string;" + ] + }, + "RemoteConfig": { + "extends": [], + "kind": "interface", + "members": [ + "context: PDPContext;", + "opal_client: OPALClient;", + "opal_common: OPALCommon;", + "pdp?: PdpValues;" + ] + }, + "RemoveRolePermissions": { + "extends": [], + "kind": "interface", + "members": ["permissions: Array;"] + }, + "RequestStatus": { + "kind": "type", + "type": "(typeof RequestStatus)[keyof typeof RequestStatus]" + }, + "RequestType": { + "kind": "type", + "type": "(typeof RequestType)[keyof typeof RequestType]" + }, + "ResourceActionCreate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "key: string;", + "name: string;", + "v1compat_is_built_in?: boolean;", + "v1compat_name?: string;", + "v1compat_path?: string;" + ] + }, + "ResourceActionGroupCreate": { + "extends": [], + "kind": "interface", + "members": [ + "actions?: Array;", + "attributes?: object;", + "description?: string;", + "key: string;", + "name: string;" + ] + }, + "ResourceActionGroupRead": { + "extends": [], + "kind": "interface", + "members": [ + "actions?: Array;", + "attributes?: object;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "resource_id: string;", + "updated_at: string;" + ] + }, + "ResourceActionGroupUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "actions?: Array;", + "attributes?: object;", + "description?: string;", + "name?: string;" + ] + }, + "ResourceActionRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "permission_name: string;", + "project_id: string;", + "resource_id: string;", + "updated_at: string;", + "v1compat_is_built_in?: boolean;", + "v1compat_name?: string;", + "v1compat_path?: string;" + ] + }, + "ResourceActionUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "name?: string;", + "v1compat_is_built_in?: boolean;", + "v1compat_name?: string;", + "v1compat_path?: string;" + ] + }, + "ResourceAttributeCreate": { + "extends": [], + "kind": "interface", + "members": ["description?: string;", "key: string;", "type: AttributeType;"] + }, + "ResourceAttributeRead": { + "extends": [], + "kind": "interface", + "members": [ + "built_in: boolean;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "organization_id: string;", + "project_id: string;", + "resource_id: string;", + "resource_key: string;", + "type: AttributeType;", + "updated_at: string;" + ] + }, + "ResourceAttributeUpdate": { + "extends": [], + "kind": "interface", + "members": ["description?: string;", "type?: AttributeType;"] + }, + "ResourceAttributes": { + "extends": [], + "kind": "interface", + "members": ["key: string;", "type: AttributeType;"] + }, + "ResourceCreate": { + "extends": [], + "kind": "interface", + "members": [ + "actions: {\n [key: string]: ActionBlockEditable;\n};", + "attributes?: {\n [key: string]: AttributeBlockEditable;\n};", + "description?: string;", + "key: string;", + "name: string;", + "relations?: {\n [key: string]: string;\n};", + "roles?: {\n [key: string]: RoleBlockEditable;\n};", + "type_attributes?: object;", + "urn?: string;", + "v1compat_name?: string;", + "v1compat_path?: string;", + "v1compat_type?: string;" + ] + }, + "ResourceId": { + "kind": "type", + "type": "string" + }, + "ResourceInstanceBlockRead": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "key: string;", "resource: string;", "tenant: string;"] + }, + "ResourceInstanceCreate": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "key: string;", "resource: string;", "tenant: string;"] + }, + "ResourceInstanceCreateBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["operations: Array;"] + }, + "ResourceInstanceDeleteBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["idents: Array;"] + }, + "ResourceInstanceDetailedRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "organization_id: string;", + "project_id: string;", + "relationships: Array;", + "resource: string;", + "resource_id: string;", + "tenant: string;", + "tenant_id: string;", + "updated_at: string;" + ] + }, + "ResourceInstanceRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "created_at: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "organization_id: string;", + "project_id: string;", + "relationships?: Array;", + "resource: string;", + "resource_id: string;", + "tenant: string;", + "tenant_id: string;", + "updated_at: string;" + ] + }, + "ResourceInstanceUpdate": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;"] + }, + "ResourceRead": { + "extends": [], + "kind": "interface", + "members": [ + "action_groups?: {\n [key: string]: Array;\n};", + "actions?: {\n [key: string]: ActionBlockRead;\n};", + "attributes?: {\n [key: string]: AttributeBlockRead;\n};", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "relations?: {\n [key: string]: RelationBlockRead;\n};", + "roles?: {\n [key: string]: ResourceRoleRead;\n};", + "type_attributes?: object;", + "updated_at: string;", + "urn?: string;", + "v1compat_name?: string;", + "v1compat_path?: string;", + "v1compat_type?: string;" + ] + }, + "ResourceReplace": { + "extends": [], + "kind": "interface", + "members": [ + "actions: {\n [key: string]: ActionBlockEditable;\n};", + "attributes?: {\n [key: string]: AttributeBlockEditable;\n};", + "description?: string;", + "name: string;", + "relations?: {\n [key: string]: string;\n};", + "roles?: {\n [key: string]: RoleBlockEditable;\n};", + "type_attributes?: object;", + "urn?: string;", + "v1compat_name?: string;", + "v1compat_path?: string;", + "v1compat_type?: string;" + ] + }, + "ResourceRoleCreate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockEdit;", + "key: string;", + "name: string;", + "permissions?: Array;", + "v1compat_attributes?: object;", + "v1compat_settings?: object;" + ] + }, + "ResourceRoleList": { + "extends": [], + "kind": "interface", + "members": ["roles: Roles;"] + }, + "ResourceRoleRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockRead;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "permissions?: Array;", + "project_id: string;", + "resource: string;", + "resource_id: string;", + "updated_at: string;" + ] + }, + "ResourceRoleUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockEdit;", + "name?: string;", + "permissions?: Array;" + ] + }, + "ResourceTypeObj": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: Array | null;", + "created_at: string;", + "id: string;", + "key: string;", + "name?: string | null;", + "updated_at: string;" + ] + }, + "ResourceUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "actions?: {\n [key: string]: ActionBlockEditable;\n};", + "attributes?: {\n [key: string]: AttributeBlockEditable;\n};", + "description?: string;", + "name?: string;", + "relations?: {\n [key: string]: string;\n};", + "roles?: {\n [key: string]: RoleBlockEditable;\n};", + "type_attributes?: object;", + "urn?: string;", + "v1compat_name?: string;", + "v1compat_path?: string;", + "v1compat_type?: string;" + ] + }, + "ResponseElementsCreateUserV2ElementsProjIdEnvIdConfigElementsConfigIdDataUsersPost": { + "kind": "type", + "type": "ElementsUserInviteRead | UserRead" + }, + "ResponseGetAllDataV2InternalOpalDataOrgIdProjIdEnvIdGet": { + "kind": "type", + "type": "DataGeneratorLibSchemasSchemaOpalDataFullData | PermitBackendSchemasSchemaOpalDataFullData" + }, + "ResponseGetAllResourceInstancesDataV2InternalOpalDataOrgIdProjIdEnvIdResourceInstancesGet": { + "kind": "type", + "type": "{\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData;\n}" + }, + "ResponseGetAllUsersDataV2InternalOpalDataOrgIdProjIdEnvIdUsersGet": { + "kind": "type", + "type": "{\n [key: string]: DataGeneratorLibSchemasSchemaOpalDataUserData;\n}" + }, + "ResponseListConditionSetsV2SchemaProjIdEnvIdConditionSetsGet": { + "kind": "type", + "type": "Array | PaginatedResultConditionSetRead" + }, + "ResponseListElementsConfigsV2ElementsProjIdEnvIdConfigGet": { + "kind": "type", + "type": "Array | PaginatedResultElementsConfigRead" + }, + "ResponseListRelationshipTuplesV2FactsProjIdEnvIdRelationshipTuplesGet": { + "kind": "type", + "type": "Array | PaginatedResultRelationshipTupleRead" + }, + "ResponseListResourceInstancesV2FactsProjIdEnvIdResourceInstancesGet": { + "kind": "type", + "type": "Array | PaginatedResultResourceInstanceRead" + }, + "ResponseListResourcesV2SchemaProjIdEnvIdResourcesGet": { + "kind": "type", + "type": "Array | PaginatedResultResourceRead" + }, + "ResponseListRoleAssignmentsV2FactsProjIdEnvIdRoleAssignmentsGet": { + "kind": "type", + "type": "Array | Array | PaginatedResultRoleAssignmentDetailedRead | PaginatedResultRoleAssignmentRead" + }, + "ResponseListRolesV2SchemaProjIdEnvIdRolesGet": { + "kind": "type", + "type": "Array | PaginatedResultRoleRead" + }, + "ResponseListTenantsV2FactsProjIdEnvIdTenantsGet": { + "kind": "type", + "type": "Array | PaginatedResultTenantRead" + }, + "RoleAssignmentCreate": { + "extends": [], + "kind": "interface", + "members": [ + "resource_instance?: string;", + "role: string;", + "tenant?: string;", + "user: string;" + ] + }, + "RoleAssignmentDetailedRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "resource_instance?: RoleAssignmentResourceInstance;", + "role: RoleAssignmentRole;", + "tenant: RoleAssignmentTenant;", + "user: RoleAssignmentUser;" + ] + }, + "RoleAssignmentRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "resource_instance?: string;", + "resource_instance_id?: string;", + "role: string;", + "role_id: string;", + "tenant?: string;", + "tenant_id: string;", + "user: string;", + "user_id: string;" + ] + }, + "RoleAssignmentRemove": { + "extends": [], + "kind": "interface", + "members": [ + "resource_instance?: string;", + "role: string;", + "tenant: string;", + "user: string;" + ] + }, + "RoleAssignmentResourceInstance": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "id: string;", "key: string;", "resource: string;"] + }, + "RoleAssignmentRole": { + "extends": [], + "kind": "interface", + "members": ["id: string;", "key: string;", "name: string;", "permissions?: Array;"] + }, + "RoleAssignmentTenant": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "id: string;", "key: string;", "name: string;"] + }, + "RoleAssignmentUser": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "email?: string;", + "first_name?: string;", + "id: string;", + "key: string;", + "last_name?: string;" + ] + }, + "RoleBlockEditable": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockEdit;", + "name: string;", + "permissions?: Array;", + "v1compat_attributes?: object;", + "v1compat_settings?: object;" + ] + }, + "RoleCreate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockEdit;", + "key: string;", + "name: string;", + "permissions?: Array;", + "v1compat_attributes?: object;", + "v1compat_is_built_in?: boolean;", + "v1compat_settings?: object;" + ] + }, + "RoleCreateBulk": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockEdit;", + "key: string;", + "name: string;", + "permissions?: Array;", + "resource?: string;", + "v1compat_attributes?: object;", + "v1compat_settings?: object;" + ] + }, + "RoleCreateBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["operations: Array;"] + }, + "RoleCreateBulkOperationResult": { + "extends": [], + "kind": "interface", + "members": ["created: Array;", "updated: Array;"] + }, + "RoleList": { + "extends": [], + "kind": "interface", + "members": ["roles: Roles1;"] + }, + "RoleRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockRead;", + "id: string;", + "key: string;", + "name: string;", + "organization_id: string;", + "permissions?: Array;", + "project_id: string;", + "updated_at: string;", + "v1compat_attributes?: object;", + "v1compat_settings?: object;" + ] + }, + "RoleUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "extends?: Array;", + "granted_to?: DerivedRoleBlockEdit;", + "name?: string;", + "permissions?: Array;", + "v1compat_attributes?: object;", + "v1compat_settings?: object;" + ] + }, + "Roles": { + "kind": "type", + "type": "Array | PaginatedResultResourceRoleRead" + }, + "Roles1": { + "kind": "type", + "type": "Array | PaginatedResultRoleRead" + }, + "SMTPEmailConfigurationCreate": { + "extends": [], + "kind": "interface", + "members": [ + "email_provider_type?: SMTPEmailConfigurationCreateEmailProviderTypeEnum;", + "from_address: string;", + "host: string;", + "password: string;", + "port: number;", + "username: string;" + ] + }, + "SMTPEmailConfigurationCreateEmailProviderTypeEnum": { + "kind": "type", + "type": "(typeof SMTPEmailConfigurationCreateEmailProviderTypeEnum)[keyof typeof SMTPEmailConfigurationCreateEmailProviderTypeEnum]" + }, + "SMTPEmailConfigurationRead": { + "extends": [], + "kind": "interface", + "members": [ + "email_provider_type?: SMTPEmailConfigurationReadEmailProviderTypeEnum;", + "environment_id: string;", + "from_address: string;", + "host: string;", + "id: string;", + "organization_id: string;", + "password: string;", + "port: number;", + "project_id: string;", + "username: string;" + ] + }, + "SMTPEmailConfigurationReadEmailProviderTypeEnum": { + "kind": "type", + "type": "(typeof SMTPEmailConfigurationReadEmailProviderTypeEnum)[keyof typeof SMTPEmailConfigurationReadEmailProviderTypeEnum]" + }, + "SSHAuthData": { + "extends": [], + "kind": "interface", + "members": [ + "auth_type?: SSHAuthDataAuthTypeEnum;", + "private_key: string;", + "public_key?: string;", + "username: string;" + ] + }, + "SSHAuthDataAuthTypeEnum": { + "kind": "type", + "type": "(typeof SSHAuthDataAuthTypeEnum)[keyof typeof SSHAuthDataAuthTypeEnum]" + }, + "SSHAuthDataRead": { + "extends": [], + "kind": "interface", + "members": [ + "auth_type?: SSHAuthDataReadAuthTypeEnum;", + "private_key: string;", + "public_key?: string;", + "username: string;" + ] + }, + "SSHAuthDataReadAuthTypeEnum": { + "kind": "type", + "type": "(typeof SSHAuthDataReadAuthTypeEnum)[keyof typeof SSHAuthDataReadAuthTypeEnum]" + }, + "ScopeConfigRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "data?: DataSourceConfig;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "updated_at: string;" + ] + }, + "ScopeConfigSet": { + "extends": [], + "kind": "interface", + "members": ["data?: DataSourceConfig;"] + }, + "Search": { + "kind": "type", + "type": "string" + }, + "SearchOperator": { + "kind": "type", + "type": "(typeof SearchOperator)[keyof typeof SearchOperator]" + }, + "Secret": { + "kind": "type", + "type": "string | {\n [key: string]: string;\n}" + }, + "SettingsValue": { + "kind": "type", + "type": "boolean | number | string" + }, + "StrippedRelationBlockRead": { + "extends": [], + "kind": "interface", + "members": ["description?: string;", "key: string;", "name: string;"] + }, + "TaskResultEnvironmentRead": { + "extends": [], + "kind": "interface", + "members": [ + "error?: ErrorDetails | null;", + "result?: EnvironmentRead | null;", + "status: TaskStatus;", + "task_id: string;" + ] + }, + "TaskResultOrgExportResult": { + "extends": [], + "kind": "interface", + "members": [ + "error?: ErrorDetails;", + "result?: OrgExportResult;", + "status: TaskStatus;", + "task_id: string;" + ] + }, + "TaskResultPolicyGuardScopeRead": { + "extends": [], + "kind": "interface", + "members": [ + "error?: ErrorDetails;", + "result?: PolicyGuardScopeRead;", + "status: TaskStatus;", + "task_id: string;" + ] + }, + "TaskStatus": { + "kind": "type", + "type": "(typeof TaskStatus)[keyof typeof TaskStatus]" + }, + "TenantBlockRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "key: string;", + "name: string;" + ] + }, + "TenantCreate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "description?: string;", + "key: string;", + "name: string;" + ] + }, + "TenantCreateBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["operations: Array;"] + }, + "TenantDeleteBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["idents: Array;"] + }, + "TenantObj": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object | null;", + "created_at: string;", + "id: string;", + "key: string;", + "name?: string | null;", + "updated_at: string;" + ] + }, + "TenantRead": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "created_at: string;", + "description?: string;", + "environment_id: string;", + "id: string;", + "key: string;", + "last_action_at: string;", + "name: string;", + "organization_id: string;", + "project_id: string;", + "updated_at: string;" + ] + }, + "TenantUpdate": { + "extends": [], + "kind": "interface", + "members": ["attributes?: object;", "description?: string;", "name?: string;"] + }, + "UsageLimits": { + "extends": [], + "kind": "interface", + "members": ["billing_tier?: BillingTierType;", "mau?: number;", "tenants?: number;"] + }, + "UserCreate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "email?: string;", + "first_name?: string;", + "key: string;", + "last_name?: string;", + "role_assignments?: Array;" + ] + }, + "UserCreateBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["operations: Array;"] + }, + "UserDeleteBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["idents: Array;"] + }, + "UserInTenant": { + "extends": [], + "kind": "interface", + "members": [ + "resource_instance_roles?: Array;", + "roles: Array;", + "status: UserStatus;", + "tenant: string;" + ] + }, + "UserInviteStatus": { + "kind": "type", + "type": "(typeof UserInviteStatus)[keyof typeof UserInviteStatus]" + }, + "UserLoginRequestInput": { + "extends": [], + "kind": "interface", + "members": ["tenant_id: string;", "user_id: string;"] + }, + "UserObj": { + "extends": [], + "kind": "interface", + "members": [ + "assigned_roles?: Array | null;", + "attributes?: object | null;", + "created_at: string;", + "email?: string | null;", + "first_name?: string | null;", + "id: string;", + "key: string;", + "last_name?: string | null;", + "roles?: Array | null;", + "updated_at: string;" + ] + }, + "UserRead": { + "extends": [], + "kind": "interface", + "members": [ + "associated_tenants?: Array;", + "attributes?: object;", + "created_at: string;", + "email?: string;", + "environment_id: string;", + "first_name?: string;", + "id: string;", + "key: string;", + "last_name?: string;", + "organization_id: string;", + "project_id: string;", + "roles?: Array;", + "updated_at: string;" + ] + }, + "UserReplaceBulkOperation": { + "extends": [], + "kind": "interface", + "members": ["operations: Array;"] + }, + "UserResourceInstanceRole": { + "extends": [], + "kind": "interface", + "members": ["resource: string;", "resource_instance: string;", "role: string;"] + }, + "UserRole": { + "extends": [], + "kind": "interface", + "members": ["role: string;", "tenant: string;"] + }, + "UserRoleCreate": { + "extends": [], + "kind": "interface", + "members": ["resource_instance?: string;", "role: string;", "tenant?: string;"] + }, + "UserRoleRemove": { + "extends": [], + "kind": "interface", + "members": ["resource_instance?: string;", "role: string;", "tenant: string;"] + }, + "UserStatus": { + "kind": "type", + "type": "(typeof UserStatus)[keyof typeof UserStatus]" + }, + "UserUpdate": { + "extends": [], + "kind": "interface", + "members": [ + "attributes?: object;", + "email?: string;", + "first_name?: string;", + "last_name?: string;" + ] + }, + "ValidationError": { + "extends": [], + "kind": "interface", + "members": ["loc: Array;", "msg: string;", "type: string;"] + }, + "WebhookCreateWithElements": { + "extends": [], + "kind": "interface", + "members": [ + "bearer_token?: string;", + "type?: WebhookCreateWithElementsTypeEnum;", + "url: string;" + ] + }, + "WebhookCreateWithElementsTypeEnum": { + "kind": "type", + "type": "(typeof WebhookCreateWithElementsTypeEnum)[keyof typeof WebhookCreateWithElementsTypeEnum]" + }, + "WebhookRead": { + "extends": [], + "kind": "interface", + "members": [ + "created_at: string;", + "environment_id: string;", + "id: string;", + "organization_id: string;", + "project_id: string;", + "type: WebhookType;", + "updated_at: string;", + "url: string;" + ] + }, + "WebhookType": { + "kind": "type", + "type": "(typeof WebhookType)[keyof typeof WebhookType]" + }, + "WebhookUpdate": { + "extends": [], + "kind": "interface", + "members": ["bearer_token?: string;", "url?: string;"] + }, + "value:APIKeyOwnerType": "{\n PdpConfig: 'pdp_config',\n Member: 'member',\n Elements: 'elements',\n NatsPdpConfig: 'nats_pdp_config',\n} as const", + "value:AVPEngineDecisionLogEngineEnum": "{\n Avp: 'AVP',\n} as const", + "value:ActivityDetailsListKindEnum": "{\n List: 'list',\n} as const", + "value:ActivityDetailsObjectKindEnum": "{\n Object: 'object',\n} as const", + "value:AttributeType": "{\n Bool: 'bool',\n Number: 'number',\n String: 'string',\n Time: 'time',\n Array: 'array',\n Json: 'json',\n Object: 'object',\n ObjectArray: 'object_array',\n} as const", + "value:AuditLogQueryType": "{\n Check: 'check',\n GetUserPermissions: 'get_user_permissions',\n GetAuthorizedUsers: 'get_authorized_users',\n None: 'none',\n} as const", + "value:AuditLogSortKey": "{\n None: 'None',\n Timestamp: 'timestamp',\n} as const", + "value:AuthMechanism": "{\n Bearer: 'Bearer',\n Basic: 'Basic',\n Headers: 'Headers',\n} as const", + "value:BillingTierType": "{\n Free: 'free',\n Startup: 'startup',\n Pro: 'pro',\n Enterprise: 'enterprise',\n Internal: 'internal',\n Trial: 'trial',\n} as const", + "value:ConditionSetType": "{\n Userset: 'userset',\n Resourceset: 'resourceset',\n} as const", + "value:ElementsPermissionLevel": "{\n Level1: 'LEVEL_1',\n Level2: 'LEVEL_2',\n Level3: 'LEVEL_3',\n Level4: 'LEVEL_4',\n Hidden: 'HIDDEN',\n Unconfigured: 'UNCONFIGURED',\n} as const", + "value:ElementsType": "{\n UserManagement: 'user_management',\n AuditLog: 'audit_log',\n ApprovalFlow: 'approval_flow',\n OperationApproval: 'operation_approval',\n ApprovalManagement: 'approval_management',\n} as const", + "value:EmailMessageKeys": "{\n ApprovalFlowsDeny: 'approval_flows_deny',\n UserManagementInvite: 'user_management_invite',\n ApprovalFlowsApprove: 'approval_flows_approve',\n ApprovalFlowsRequest: 'approval_flows_request',\n TestEmail: 'test_email',\n} as const", + "value:EmailTemplateType": "{\n ApprovalFlows: 'approval_flows',\n UserManagement: 'user_management',\n TestEmail: 'test_email',\n} as const", + "value:Engine": "{\n Opa: 'OPA',\n Avp: 'AVP',\n Generic: 'GENERIC',\n} as const", + "value:EnvironmentCopyConflictStrategy": "{\n Fail: 'fail',\n Overwrite: 'overwrite',\n} as const", + "value:ErrorCode": "{\n InvalidInput: 'INVALID_INPUT',\n InvalidJwksConfiguration: 'INVALID_JWKS_CONFIGURATION',\n UnexpectedError: 'UNEXPECTED_ERROR',\n NotFound: 'NOT_FOUND',\n DuplicateEntity: 'DUPLICATE_ENTITY',\n EmptyDecisionLogs: 'EMPTY_DECISION_LOGS',\n MissingRequestAttribute: 'MISSING_REQUEST_ATTRIBUTE',\n ForbiddenAccess: 'FORBIDDEN_ACCESS',\n InvalidPermissionFormat: 'INVALID_PERMISSION_FORMAT',\n MissingPermissions: 'MISSING_PERMISSIONS',\n UnsupportedAttributeType: 'UNSUPPORTED_ATTRIBUTE_TYPE',\n MissingResourceAttribute: 'MISSING_RESOURCE_ATTRIBUTE',\n MismatchAttributesTypes: 'MISMATCH_ATTRIBUTES_TYPES',\n InvalidPolicyRepoStatus: 'INVALID_POLICY_REPO_STATUS',\n InvalidSmtpConfiguration: 'INVALID_SMTP_CONFIGURATION',\n MismatchResourceInstancesTenants: 'MISMATCH_RESOURCE_INSTANCES_TENANTS',\n PaginationSizeOverreached: 'PAGINATION_SIZE_OVERREACHED',\n MismatchRelationType: 'MISMATCH_RELATION_TYPE',\n ConcurrentOperationDisallowed: 'CONCURRENT_OPERATION_DISALLOWED',\n Unauthorized: 'UNAUTHORIZED',\n} as const", + "value:GenericEngineDecisionLogEngineEnum": "{\n Generic: 'GENERIC',\n} as const", + "value:HttpMethods": "{\n Get: 'get',\n Post: 'post',\n Put: 'put',\n Patch: 'patch',\n Head: 'head',\n Delete: 'delete',\n} as const", + "value:InviteStatus": "{\n Pending: 'pending',\n Accepted: 'accepted',\n Failed: 'failed',\n Canceled: 'canceled',\n} as const", + "value:MailgunEmailConfigurationCreateEmailProviderTypeEnum": "{\n Mailgun: 'mailgun',\n} as const", + "value:MailgunEmailConfigurationReadEmailProviderTypeEnum": "{\n Mailgun: 'mailgun',\n} as const", + "value:MappingRuleUpdateUrlTypeEnum": "{\n Regex: 'regex',\n} as const", + "value:MappingRuleUrlTypeEnum": "{\n Regex: 'regex',\n} as const", + "value:MemberAccessLevel": "{\n Admin: 'admin',\n Write: 'write',\n Read: 'read',\n NoAccess: 'no_access',\n} as const", + "value:MemberAccessObj": "{\n Org: 'org',\n Project: 'project',\n Env: 'env',\n} as const", + "value:Methods": "{\n Get: 'get',\n Post: 'post',\n Put: 'put',\n Patch: 'patch',\n Delete: 'delete',\n Head: 'head',\n Options: 'options',\n} as const", + "value:MissingUserPolicy": "{\n Fail: 'fail',\n Ignore: 'ignore',\n Create: 'create',\n} as const", + "value:OPAEngineDecisionLogEngineEnum": "{\n Opa: 'OPA',\n} as const", + "value:OnboardingStep": "{\n CreateOrganization: 'create_organization',\n CreateProject: 'create_project',\n CreateResource: 'create_resource',\n CreateActions: 'create_actions',\n AssignPermissions: 'assign_permissions',\n AssignUserRoles: 'assign_user_roles',\n ConnectSdk: 'connect_sdk',\n Done: 'done',\n} as const", + "value:OrganizationScheduleDeleteResponseStatusEnum": "{\n Scheduled: 'scheduled',\n} as const", + "value:PolicyRepoStatus": "{\n Invalid: 'invalid',\n Pending: 'pending',\n Valid: 'valid',\n} as const", + "value:RequestStatus": "{\n Pending: 'pending',\n Approved: 'approved',\n Denied: 'denied',\n Canceled: 'canceled',\n} as const", + "value:RequestType": "{\n AccessRequest: 'access_request',\n OperationApproval: 'operation_approval',\n} as const", + "value:SMTPEmailConfigurationCreateEmailProviderTypeEnum": "{\n Smtp: 'smtp',\n} as const", + "value:SMTPEmailConfigurationReadEmailProviderTypeEnum": "{\n Smtp: 'smtp',\n} as const", + "value:SSHAuthDataAuthTypeEnum": "{\n Ssh: 'ssh',\n} as const", + "value:SSHAuthDataReadAuthTypeEnum": "{\n Ssh: 'ssh',\n} as const", + "value:SearchOperator": "{\n Startswith: 'startswith',\n Endswith: 'endswith',\n Contains: 'contains',\n} as const", + "value:TaskStatus": "{\n Processing: 'processing',\n Success: 'success',\n Failure: 'failure',\n Cancelled: 'cancelled',\n} as const", + "value:UserInviteStatus": "{\n Pending: 'pending',\n Approved: 'approved',\n} as const", + "value:UserStatus": "{\n Active: 'active',\n Pending: 'pending',\n} as const", + "value:WebhookCreateWithElementsTypeEnum": "{\n Elements: 'elements',\n} as const", + "value:WebhookType": "{\n Elements: 'elements',\n PdpSyncError: 'pdp_sync_error',\n} as const" + }, + "transports": { + "BaseFactsPermitAPI.basePath": "`${this.config.pdp}`", + "BasePermitApi.basePath": "`${this.config.apiUrl}`", + "Enforcer.client": "`${this.config.pdp}/`", + "Enforcer.opaClient": "buildOpaBaseUrl(this.config.pdp)", + "RelationshipTuplesApi.basePath": "this.config.apiUrl", + "ResourceInstancesApi.basePath": "this.config.apiUrl", + "RoleAssignmentsApi.basePath": "this.config.apiUrl", + "TenantsApi.basePath": "this.config.apiUrl", + "opaBaseUrl": "{\n let opaBaseUrl: URL;\n try {\n opaBaseUrl = new URL(pdp);\n }\n catch {\n throw new PermitError('Invalid PDP URL in the \"pdp\" option: expected an absolute http(s) URL, ' +\n 'e.g. \"http://localhost:7766\".');\n }\n opaBaseUrl.port = '8181';\n opaBaseUrl.pathname = `${opaBaseUrl.pathname}v1/data/permit/`;\n return opaBaseUrl.toString();\n}" + } + } +} diff --git a/api-coverage/decisions.json b/api-coverage/decisions.json new file mode 100644 index 00000000..b2bfa615 --- /dev/null +++ b/api-coverage/decisions.json @@ -0,0 +1,2284 @@ +{ + "scope": "Node-local evidence; not the unpublished shared parity target", + "reviewedAt": "2026-10-08", + "operations": { + "control-plane DELETE /v2/api-key/{api_key_id}": { + "action": "add", + "owner": "PER-16949", + "reason": "Expose the existing typed API-key management contract through the direct control-plane client.", + "source": "https://linear.app/permit/issue/PER-16949", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/elements/{proj_id}/{env_id}/{elements_config_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP Elements setup is outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane DELETE /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/bulk/resource_instances": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No adopted shared decision or approved Node feature owner resolves this omission.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/bulk/tenants": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No adopted shared decision or approved Node feature owner resolves this omission.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/bulk/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}": { + "action": "add", + "owner": "PER-16947", + "reason": "The proxyConfigs facade exposes the five published direct control-plane operations with complete existing DTOs, selected environment scope and preserved response secrets; no PDP synchronization contract is added.", + "source": "https://linear.app/permit/issue/PER-16947", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments/bulk": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/set_rules": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}": { + "action": "add", + "owner": "PER-12882", + "reason": "Approved API-key facts invite operation; direct selected-environment routing, required nullable DTOs and no mail-delivery or PDP synchronization promise.", + "source": "https://linear.app/permit/issue/PER-12882", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id}/roles": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No adopted shared decision or approved Node feature owner resolves this omission.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/members": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/members/{member_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/orgs/{org_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/orgs/{org_id}/invites/{invite_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization invites belong to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/policy_guards/scopes/{policy_guard_scope_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane DELETE /v2/policy_guards/scopes/{policy_guard_scope_id}/disassociate": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane DELETE /v2/policy_guards/scopes/{policy_guard_scope_id}/rules": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane DELETE /v2/projects/{proj_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/projects/{proj_id}/{env_id}/opal_scope": { + "action": "exclude", + "owner": "PER-16345", + "reason": "OPAL scope setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/projects/{proj_id}/envs/{env_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/projects/{proj_id}/repos/{repo_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group": { + "action": "defer", + "owner": "PER-16566", + "reason": "Group-to-group membership is P2 for a later 3.x release in PER-16337 and is explicitly outside the eight GA core operations approved for PER-16566.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}": { + "action": "add", + "owner": "PER-16942", + "reason": "Dedicated userAttributes facade exposes this user schema operation with the existing ResourceAttribute models, environment scope and full responses; no resource selector or user-value API is added.", + "source": "https://linear.app/permit/issue/PER-16942", + "lifecycle": "GA" + }, + "control-plane GET /v2/activity": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Activity history is a dashboard/admin capability.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/activity/types": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Activity history is a dashboard/admin capability.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/api-key": { + "action": "add", + "owner": "PER-16949", + "reason": "Expose the existing typed API-key management contract through the direct control-plane client.", + "source": "https://linear.app/permit/issue/PER-16949", + "lifecycle": "GA" + }, + "control-plane GET /v2/api-key/{api_key_id}": { + "action": "add", + "owner": "PER-16949", + "reason": "Expose the existing typed API-key management contract through the direct control-plane client.", + "source": "https://linear.app/permit/issue/PER-16949", + "lifecycle": "GA" + }, + "control-plane GET /v2/api-key/{proj_id}/{env_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/api-key/scope": { + "action": "add", + "owner": "PER-16949", + "reason": "Expose the existing typed API-key management contract through the direct control-plane client.", + "source": "https://linear.app/permit/issue/PER-16949", + "lifecycle": "GA" + }, + "control-plane GET /v2/data-export/{task_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization exports are administrative and may expose plaintext secrets.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/deprecated/activity": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/deprecated/activity/types": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/deprecated/history": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/deprecated/history/{event_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/deprecated/history/{event_id}/request": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/deprecated/history/{event_id}/response": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP Elements setup is outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP Elements setup is outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/audit_logs": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/roles": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/user-invites": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/runtime": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP Elements setup is outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/email_configurations": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/email_templates/": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/email_templates/{template_type}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs": { + "action": "add", + "owner": "PER-16947", + "reason": "The proxyConfigs facade exposes the five published direct control-plane operations with complete existing DTOs, selected environment scope and preserved response secrets; no PDP synchronization contract is added.", + "source": "https://linear.app/permit/issue/PER-16947", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}": { + "action": "add", + "owner": "PER-16947", + "reason": "The proxyConfigs facade exposes the five published direct control-plane operations with complete existing DTOs, selected environment scope and preserved response secrets; no PDP synchronization contract is added.", + "source": "https://linear.app/permit/issue/PER-16947", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/relationship_tuples": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed": { + "action": "add", + "owner": "PER-16567", + "reason": "Approved P1 GA operation verified against the generated contract and exposed by the typed tenant-membership, dedicated detailed-list, or environment-refresh method.", + "source": "https://linear.app/permit/issue/PER-16567", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/detailed": { + "action": "add", + "owner": "PER-16567", + "reason": "Approved P1 GA operation verified against the generated contract and exposed by the typed tenant-membership, dedicated detailed-list, or environment-refresh method.", + "source": "https://linear.app/permit/issue/PER-16567", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments/detailed": { + "action": "add", + "owner": "PER-16567", + "reason": "Approved P1 GA operation verified against the generated contract and exposed by the typed tenant-membership, dedicated detailed-list, or environment-refresh method.", + "source": "https://linear.app/permit/issue/PER-16567", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/set_rules": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/tenants": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites": { + "action": "add", + "owner": "PER-12882", + "reason": "Approved API-key facts invite operation; direct selected-environment routing, required nullable DTOs and no mail-delivery or PDP synchronization promise.", + "source": "https://linear.app/permit/issue/PER-12882", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}": { + "action": "add", + "owner": "PER-12882", + "reason": "Approved API-key facts invite operation; direct selected-environment routing, required nullable DTOs and no mail-delivery or PDP synchronization promise.", + "source": "https://linear.app/permit/issue/PER-12882", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/history": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Request history is a dashboard/admin capability.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/history/{event_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Request history is a dashboard/admin capability.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/history/{event_id}/request": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Request history is a dashboard/admin capability.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/history/{event_id}/response": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Request history is a dashboard/admin capability.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Internal OPAL data endpoints are infrastructure contracts.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/optimized": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Internal OPAL data endpoints are infrastructure contracts.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/relationships": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Internal OPAL data endpoints are infrastructure contracts.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_instances": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Internal OPAL data endpoints are infrastructure contracts.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/role_assignments": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Internal OPAL data endpoints are infrastructure contracts.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Internal OPAL data endpoints are infrastructure contracts.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/members": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/members/{member_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/members/me": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/orgs": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/orgs/{org_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/orgs/{org_id}/invites": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization invites belong to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/orgs/{org_id}/stats": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/orgs/active/org": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs": { + "action": "add", + "owner": "PER-16950", + "reason": "The auditLogs facade exposes the two published direct control-plane read operations with complete existing envelopes and raw-data unions, selected environment scope and finite copied filters.", + "source": "https://linear.app/permit/issue/PER-16950", + "lifecycle": "GA" + }, + "control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}": { + "action": "add", + "owner": "PER-16950", + "reason": "The auditLogs facade exposes the two published direct control-plane read operations with complete existing envelopes and raw-data unions, selected environment scope and finite copied filters.", + "source": "https://linear.app/permit/issue/PER-16950", + "lifecycle": "GA" + }, + "control-plane GET /v2/pdps/{proj_id}/{env_id}/configs": { + "action": "defer", + "owner": "PER-14243", + "reason": "Adoption depends on the PDP-config security issue being resolved and reviewed.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/values": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Operator/debug/sharding/key-rotation APIs belong to operational tooling.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/policy_guards/scopes": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/policy_guards/scopes/{policy_guard_scope_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/policy_guards/scopes/{policy_guard_scope_id}/rules": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/projects": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/{env_id}/opal_scope": { + "action": "exclude", + "owner": "PER-16345", + "reason": "OPAL scope setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/envs": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result": { + "action": "add", + "owner": "PER-16951", + "reason": "The environments.getCopyResult facade exposes the published direct control-plane async copy operation with explicit source paths and complete nullable task responses.", + "source": "https://linear.app/permit/issue/PER-16951", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}/stats": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/repos": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/repos/{repo_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/projects/{proj_id}/repos/active": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/ancestors": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Hierarchy traversal is a UI helper outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/descendants": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Hierarchy traversal is a UI helper outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Deprecated operation is not a new SDK target; use its supported replacement.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/children": { + "action": "defer", + "owner": "PER-16345", + "reason": "Summary advertises EAP while the tag is GA; product must resolve lifecycle before adoption.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/parents": { + "action": "defer", + "owner": "PER-16345", + "reason": "Summary advertises EAP while the tag is GA; product must resolve lifecycle before adoption.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles": { + "action": "defer", + "owner": "PER-16345", + "reason": "Summary advertises EAP while the tag is GA; product must resolve lifecycle before adoption.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users": { + "action": "defer", + "owner": "PER-16345", + "reason": "Summary advertises EAP while the tag is GA; product must resolve lifecycle before adoption.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/direct": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/ancestors": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Hierarchy traversal is a UI helper outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/descendants": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Hierarchy traversal is a UI helper outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/roles": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}/ancestors": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Hierarchy traversal is a UI helper outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}/descendants": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Hierarchy traversal is a UI helper outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes": { + "action": "add", + "owner": "PER-16942", + "reason": "Dedicated userAttributes facade exposes this user schema operation with the existing ResourceAttribute models, environment scope and full responses; no resource selector or user-value API is added.", + "source": "https://linear.app/permit/issue/PER-16942", + "lifecycle": "GA" + }, + "control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}": { + "action": "add", + "owner": "PER-16942", + "reason": "Dedicated userAttributes facade exposes this user schema operation with the existing ResourceAttribute models, environment scope and full responses; no resource selector or user-value API is added.", + "source": "https://linear.app/permit/issue/PER-16942", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP Elements setup is outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PATCH /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/reviewer": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PATCH /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/reviewer": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/reviewer": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}": { + "action": "add", + "owner": "PER-16947", + "reason": "The proxyConfigs facade exposes the five published direct control-plane operations with complete existing DTOs, selected environment scope and preserved response secrets; no PDP synchronization contract is added.", + "source": "https://linear.app/permit/issue/PER-16947", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}": { + "action": "add", + "owner": "PER-12882", + "reason": "Approved API-key facts invite operation; direct selected-environment routing, required nullable DTOs and no mail-delivery or PDP synchronization promise.", + "source": "https://linear.app/permit/issue/PER-12882", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/members/{member_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/orgs/{org_id}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/projects/{proj_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/projects/{proj_id}/envs/{env_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/roles/{role_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}": { + "action": "add", + "owner": "PER-16942", + "reason": "Dedicated userAttributes facade exposes this user schema operation with the existing ResourceAttribute models, environment scope and full responses; no resource selector or user-value API is added.", + "source": "https://linear.app/permit/issue/PER-16942", + "lifecycle": "GA" + }, + "control-plane POST /v2/api-key": { + "action": "add", + "owner": "PER-16949", + "reason": "Expose the existing typed API-key management contract through the direct control-plane client.", + "source": "https://linear.app/permit/issue/PER-16949", + "lifecycle": "GA" + }, + "control-plane POST /v2/api-key/{api_key_id}/rotate-secret": { + "action": "add", + "owner": "PER-16949", + "reason": "Expose the existing typed API-key management contract through the direct control-plane client.", + "source": "https://linear.app/permit/issue/PER-16949", + "lifecycle": "GA" + }, + "control-plane POST /v2/audit-log-replay": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Replay is restricted diagnostic/test functionality.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/data-export": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization exports are administrative and may expose plaintext secrets.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/elements/{proj_id}/{env_id}/config": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP Elements setup is outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/active": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements end-user session endpoints are outside the backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/bulk/tenants": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No adopted shared decision or approved Node feature owner resolves this omission.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/bulk/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/email_configurations": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/email_configurations/send_test_email": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/email_templates/{template_type}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/email_templates/{template_type}/send_test_email": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Email setup belongs to administrative workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/proxy_configs": { + "action": "add", + "owner": "PER-16947", + "reason": "The proxyConfigs facade exposes the five published direct control-plane operations with complete existing DTOs, selected environment scope and preserved response secrets; no PDP synchronization contract is added.", + "source": "https://linear.app/permit/issue/PER-16947", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/relationship_tuples": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/resource_instances": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments/bulk": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/set_rules": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/tenants": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users": { + "action": "add", + "owner": "PER-16567", + "reason": "Approved P1 GA operation verified against the generated contract and exposed by the typed tenant-membership, dedicated detailed-list, or environment-refresh method.", + "source": "https://linear.app/permit/issue/PER-16567", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites": { + "action": "add", + "owner": "PER-12882", + "reason": "Approved API-key facts invite operation; direct selected-environment routing, required nullable DTOs and no mail-delivery or PDP synchronization promise.", + "source": "https://linear.app/permit/issue/PER-12882", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve": { + "action": "add", + "owner": "PER-12882", + "reason": "Approved API-key facts invite operation; direct selected-environment routing, required nullable DTOs and no mail-delivery or PDP synchronization promise.", + "source": "https://linear.app/permit/issue/PER-12882", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/facts/{proj_id}/{env_id}/users/{user_id}/roles": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No adopted shared decision or approved Node feature owner resolves this omission.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "control-plane POST /v2/members": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization membership belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/orgs": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/orgs/{org_id}/invites": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization invites belong to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/orgs/{org_id}/restore": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Organization administration belongs to dashboard/admin workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/refresh": { + "action": "defer", + "owner": "PER-16337", + "reason": "Individual-PDP data refresh is P2 for a later 3.x release; only environment-wide refresh is approved for PER-16567.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/rotate-api-key": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Operator/debug/sharding/key-rotation APIs belong to operational tooling.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/pdps/{proj_id}/{env_id}/configs/migrate-shards": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Operator/debug/sharding/key-rotation APIs belong to operational tooling.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/pdps/{proj_id}/{env_id}/configs/refresh": { + "action": "add", + "owner": "PER-16567", + "reason": "Approved P1 GA operation verified against the generated contract and exposed by the typed tenant-membership, dedicated detailed-list, or environment-refresh method.", + "source": "https://linear.app/permit/issue/PER-16567", + "lifecycle": "GA" + }, + "control-plane POST /v2/policy_guards/scopes": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/policy_guards/scopes/{policy_guard_scope_id}/associate": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/policy_guards/scopes/{policy_guard_scope_id}/rules": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP policy guards are outside the approved backend SDK target.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane POST /v2/projects": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/projects/{proj_id}/envs": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy/async": { + "action": "add", + "owner": "PER-16951", + "reason": "The environments.copyAsync facade exposes the published direct control-plane async copy operation with explicit source paths and complete nullable task responses.", + "source": "https://linear.app/permit/issue/PER-16951", + "lifecycle": "GA" + }, + "control-plane POST /v2/projects/{proj_id}/envs/{env_id}/test_jwks": { + "action": "exclude", + "owner": "PER-16345", + "reason": "JWKS URL testing is a setup diagnostic.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/projects/{proj_id}/repos": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/condition_sets": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/groups": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/roles": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane POST /v2/schema/{proj_id}/{env_id}/users/attributes": { + "action": "add", + "owner": "PER-16942", + "reason": "Dedicated userAttributes facade exposes this user schema operation with the existing ResourceAttribute models, environment scope and full responses; no resource selector or user-value API is added.", + "source": "https://linear.app/permit/issue/PER-16942", + "lifecycle": "GA" + }, + "control-plane PUT /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/approve": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/cancel": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/deny": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Elements Access Requests require end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/approve": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/cancel": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/deny": { + "action": "exclude", + "owner": "PER-16345", + "reason": "EAP operation approval requires Elements end-user sessions.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/approve": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/cancel": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/deny": { + "action": "defer", + "owner": "PER-16345", + "reason": "Facts Access Requests are deferred until GA.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "EAP" + }, + "control-plane PUT /v2/facts/{proj_id}/{env_id}/bulk/resource_instances": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No adopted shared decision or approved Node feature owner resolves this omission.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "control-plane PUT /v2/facts/{proj_id}/{env_id}/bulk/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PUT /v2/facts/{proj_id}/{env_id}/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PUT /v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/disable": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Operator/debug/sharding/key-rotation APIs belong to operational tooling.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PUT /v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/enable": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Operator/debug/sharding/key-rotation APIs belong to operational tooling.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PUT /v2/projects/{proj_id}/{env_id}/opal_scope": { + "action": "exclude", + "owner": "PER-16345", + "reason": "OPAL scope setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PUT /v2/projects/{proj_id}/repos/{repo_id}/activate": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PUT /v2/projects/{proj_id}/repos/disable": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Policy repository setup belongs to CLI/Terraform workflows.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "control-plane PUT /v2/schema/{proj_id}/{env_id}/bulk/roles": { + "action": "add", + "owner": "PER-16948", + "reason": "Expose the existing typed bulk role create-or-replace contract for tenant and resource roles, preserving both result arrays.", + "source": "https://linear.app/permit/issue/PER-16948", + "lifecycle": "GA" + }, + "control-plane PUT /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group": { + "action": "defer", + "owner": "PER-16566", + "reason": "Group-to-group membership is P2 for a later 3.x release in PER-16337 and is explicitly outside the eight GA core operations approved for PER-16566.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane PUT /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}": { + "action": "add", + "owner": "PER-16566", + "reason": "Approved Groups work includes direct reads and group/user/role membership; contract and key/id issues must be verified.", + "source": "https://linear.app/permit/issue/PER-16566", + "lifecycle": "GA" + }, + "control-plane PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "control-plane PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container DELETE /callbacks/{key}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container DELETE /facts/role_assignments": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container DELETE /facts/users/{user_id}/roles": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No exposed matching typed method or adopted target decision for this PDP-local facts route.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "pdp-container GET /callbacks": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container GET /callbacks/{key}": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container GET /healthchecks/opa/healthy": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container GET /healthchecks/opa/ready": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container GET /healthchecks/opa/system": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container GET /local/role_assignments": { + "action": "add", + "owner": "PER-16946", + "reason": "Expose the published container local role-assignment GET with dedicated key-based rows, complete page validation and REST pagination.", + "source": "https://linear.app/permit/issue/PER-16946", + "lifecycle": "GA" + }, + "pdp-container GET /opal-server/connectivity": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container GET /policy-store/config": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "deprecated" + }, + "pdp-container PATCH /facts/resource_instances/{instance_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container PATCH /facts/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /allowed": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /allowed_url": { + "action": "add", + "owner": "PER-16945", + "reason": "Expose the adopted container URL check with typed tenant/context options, direct boolean decisions and visible malformed or unavailable endpoint failures.", + "source": "https://linear.app/permit/issue/PER-16945", + "lifecycle": "GA" + }, + "pdp-container POST /allowed/all-tenants": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /allowed/bulk": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /authorized_users": { + "action": "add", + "owner": "PER-16568", + "reason": "Approved complete authorized-user discovery: the pinned container and cloud contracts publish action/resource/request context and the full assignment envelope. Local evidence is recorded separately; no cloud runtime claim.", + "source": "https://linear.app/permit/issue/PER-16568", + "lifecycle": "GA" + }, + "pdp-container POST /callbacks": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /data-updater/trigger": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /facts/relationship_tuples": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /facts/resource_instances": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /facts/role_assignments": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /facts/tenants": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /facts/users": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-container POST /facts/users/{user_id}/roles": { + "action": "undecided", + "owner": "PER-16345", + "reason": "No exposed matching typed method or adopted target decision for this PDP-local facts route.", + "source": "https://linear.app/permit/issue/PER-16345", + "lifecycle": "GA" + }, + "pdp-container POST /kong": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /nginx_allowed": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /opal-server/connectivity/disable": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /opal-server/connectivity/enable": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /policy-updater/trigger": { + "action": "exclude", + "owner": "PER-16345", + "reason": "Callback, updater, health, gateway or policy-store operations are PDP infrastructure/operator APIs.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-container POST /user-permissions": { + "action": "retain", + "owner": "PER-16568", + "reason": "Retain the existing permission query and add request context in its fifth config argument, preserving global then request precedence. Route exposure alone does not establish real backend behavior.", + "source": "https://linear.app/permit/issue/PER-16568", + "lifecycle": "GA" + }, + "pdp-container POST /user-tenants": { + "action": "add", + "owner": "PER-16568", + "reason": "Approved container-only role-derived tenant discovery with request context and validated tenant details. The cloud contract omits this route; an unavailable endpoint raises an actionable capability error regardless of deny fallback.", + "source": "https://linear.app/permit/issue/PER-16568", + "lifecycle": "GA" + }, + "pdp-container PUT /facts/users/{user_id}": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-cloud GET /.well-known/authzen-configuration": { + "action": "defer", + "owner": "PER-16345", + "reason": "AuthZEN adoption awaits the product decision and search-pagination contract.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-cloud POST /access/v1/evaluation": { + "action": "defer", + "owner": "PER-16345", + "reason": "AuthZEN adoption awaits the product decision and search-pagination contract.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-cloud POST /access/v1/evaluations": { + "action": "defer", + "owner": "PER-16345", + "reason": "AuthZEN adoption awaits the product decision and search-pagination contract.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-cloud POST /access/v1/search/action": { + "action": "defer", + "owner": "PER-16345", + "reason": "AuthZEN adoption awaits the product decision and search-pagination contract.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-cloud POST /access/v1/search/resource": { + "action": "defer", + "owner": "PER-16345", + "reason": "AuthZEN adoption awaits the product decision and search-pagination contract.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-cloud POST /access/v1/search/subject": { + "action": "defer", + "owner": "PER-16345", + "reason": "AuthZEN adoption awaits the product decision and search-pagination contract.", + "source": "https://linear.app/permit/issue/PER-16337", + "lifecycle": "GA" + }, + "pdp-cloud POST /allowed": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-cloud POST /allowed/bulk": { + "action": "retain", + "owner": "PER-16561", + "reason": "An existing public SDK method reaches this operation; route presence does not prove complete parameters, response fidelity, or backend success.", + "source": "https://linear.app/permit/issue/PER-16561", + "lifecycle": "GA" + }, + "pdp-cloud POST /authorized_users": { + "action": "add", + "owner": "PER-16568", + "reason": "Approved complete authorized-user discovery: the pinned container and cloud contracts publish action/resource/request context and the full assignment envelope. Local evidence is recorded separately; no cloud runtime claim.", + "source": "https://linear.app/permit/issue/PER-16568", + "lifecycle": "GA" + }, + "pdp-cloud POST /user-permissions": { + "action": "retain", + "owner": "PER-16568", + "reason": "Retain the existing permission query and add request context in its fifth config argument, preserving global then request precedence. Route exposure alone does not establish real backend behavior.", + "source": "https://linear.app/permit/issue/PER-16568", + "lifecycle": "GA" + } + }, + "helpers": { + "permit.api.relationshipTuples.waitForSync": "Waits locally for requested propagation delay; performs no HTTP request.", + "permit.api.resourceInstances.waitForSync": "Waits locally for requested propagation delay; performs no HTTP request.", + "permit.api.roleAssignments.waitForSync": "Waits locally for requested propagation delay; performs no HTTP request.", + "permit.api.tenants.waitForSync": "Waits locally for requested propagation delay; performs no HTTP request.", + "permit.api.users.waitForSync": "Waits locally for requested propagation delay; performs no HTTP request." + }, + "sdkOnly": { + "pdp-forwarding POST /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/relationship_tuples": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/resource_instances": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding POST /v2/facts/{proj_id}/{env_id}/role_assignments/bulk": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/role_assignments/bulk": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/role_assignments": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/tenants": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding PATCH /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding POST /v2/facts/{proj_id}/{env_id}/bulk/users": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/bulk/users": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding PUT /v2/facts/{proj_id}/{env_id}/bulk/users": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/users/{user_id}": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "pdp-forwarding GET /v2/facts/{proj_id}/{env_id}/users": { + "reason": "SDK proxy routing forwards this control-plane path to the PDP; no matching operation is published by the pinned PDP. No local-handler or backend support is claimed.", + "owner": "PER-16568", + "source": "https://linear.app/permit/issue/PER-16568" + }, + "opa POST /root": { + "reason": "Existing optional OPA check uses the SDK-derived OPA base URL plus root; it is not a PDP OpenAPI operation.", + "owner": "PER-16561", + "source": "https://linear.app/permit/issue/PER-16561" + }, + "control-plane POST /v2/auth/elements_login_as": { + "reason": "Existing Elements login route is retained by the reviewed, hashed supplement in openapi/elements-login.json; it is missing from public OpenAPI.", + "owner": "PER-16342", + "source": "https://linear.app/permit/issue/PER-16342" + } + } +} diff --git a/api-coverage/release-matrix.json b/api-coverage/release-matrix.json new file mode 100644 index 00000000..65206acc --- /dev/null +++ b/api-coverage/release-matrix.json @@ -0,0 +1,3172 @@ +{ + "nodes": ["22.13.0", "22.23.3", "24.0.0", "24.21.0", "26.11.0"], + "pdps": [ + { + "role": "pinned", + "digest": "sha256:e3cf30794ec2d256636b4714641df46e51ee58a3f1f0d24c606e214e0bf8669a", + "resolvedAt": "2026-09-30" + }, + { + "role": "current", + "digest": "sha256:e3cf30794ec2d256636b4714641df46e51ee58a3f1f0d24c606e214e0bf8669a", + "resolvedAt": "2026-09-30" + } + ], + "cases": [ + { + "id": "wire.api.actionGroups.create.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups" + ] + }, + { + "id": "wire.api.actionGroups.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups" + ] + }, + { + "id": "wire.api.actionGroups.delete.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.get.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.getById.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.list.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups" + ] + }, + { + "id": "wire.api.actionGroups.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups" + ] + }, + { + "id": "wire.api.actionGroups.update.esm", + "level": "wire", + "methodNames": ["permit.api.actionGroups.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.actionGroups.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.actionGroups.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}" + ] + }, + { + "id": "wire.api.conditionSetRules.create.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSetRules.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/set_rules"] + }, + { + "id": "wire.api.conditionSetRules.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSetRules.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/set_rules"] + }, + { + "id": "wire.api.conditionSetRules.delete.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSetRules.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/set_rules"] + }, + { + "id": "wire.api.conditionSetRules.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSetRules.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/set_rules"] + }, + { + "id": "wire.api.conditionSetRules.list.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSetRules.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/set_rules"] + }, + { + "id": "wire.api.conditionSetRules.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSetRules.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/set_rules"] + }, + { + "id": "wire.api.conditionSets.create.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/condition_sets"] + }, + { + "id": "wire.api.conditionSets.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/condition_sets"] + }, + { + "id": "wire.api.conditionSets.delete.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.get.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.getById.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.list.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets"] + }, + { + "id": "wire.api.conditionSets.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/condition_sets"] + }, + { + "id": "wire.api.conditionSets.update.esm", + "level": "wire", + "methodNames": ["permit.api.conditionSets.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.conditionSets.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.conditionSets.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}" + ] + }, + { + "id": "wire.api.ensureAccessLevel.esm", + "level": "wire", + "methodNames": ["permit.api.ensureAccessLevel"], + "operationKeys": [] + }, + { + "id": "wire.api.ensureAccessLevel.commonjs", + "level": "wire", + "methodNames": ["permit.api.ensureAccessLevel"], + "operationKeys": [] + }, + { + "id": "wire.api.ensureContext.esm", + "level": "wire", + "methodNames": ["permit.api.ensureContext"], + "operationKeys": [] + }, + { + "id": "wire.api.ensureContext.commonjs", + "level": "wire", + "methodNames": ["permit.api.ensureContext"], + "operationKeys": [] + }, + { + "id": "wire.api.environments.copy.esm", + "level": "wire", + "methodNames": ["permit.api.environments.copy"], + "operationKeys": ["control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy"] + }, + { + "id": "wire.api.environments.copy.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.copy"], + "operationKeys": ["control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy"] + }, + { + "id": "wire.api.environments.create.esm", + "level": "wire", + "methodNames": ["permit.api.environments.create"], + "operationKeys": ["control-plane POST /v2/projects/{proj_id}/envs"] + }, + { + "id": "wire.api.environments.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.create"], + "operationKeys": ["control-plane POST /v2/projects/{proj_id}/envs"] + }, + { + "id": "wire.api.environments.delete.esm", + "level": "wire", + "methodNames": ["permit.api.environments.delete"], + "operationKeys": ["control-plane DELETE /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.delete"], + "operationKeys": ["control-plane DELETE /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.get.esm", + "level": "wire", + "methodNames": ["permit.api.environments.get"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.get"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.getApiKey.esm", + "level": "wire", + "methodNames": ["permit.api.environments.getApiKey"], + "operationKeys": ["control-plane GET /v2/api-key/{proj_id}/{env_id}"] + }, + { + "id": "wire.api.environments.getApiKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.getApiKey"], + "operationKeys": ["control-plane GET /v2/api-key/{proj_id}/{env_id}"] + }, + { + "id": "wire.api.environments.getById.esm", + "level": "wire", + "methodNames": ["permit.api.environments.getById"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.getById"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.environments.getByKey"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.getByKey"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.getStats.esm", + "level": "wire", + "methodNames": ["permit.api.environments.getStats"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}/stats"] + }, + { + "id": "wire.api.environments.getStats.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.getStats"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs/{env_id}/stats"] + }, + { + "id": "wire.api.environments.list.esm", + "level": "wire", + "methodNames": ["permit.api.environments.list"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs"] + }, + { + "id": "wire.api.environments.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.list"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}/envs"] + }, + { + "id": "wire.api.environments.update.esm", + "level": "wire", + "methodNames": ["permit.api.environments.update"], + "operationKeys": ["control-plane PATCH /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.environments.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.update"], + "operationKeys": ["control-plane PATCH /v2/projects/{proj_id}/envs/{env_id}"] + }, + { + "id": "wire.api.groups.assignRole.esm", + "level": "wire", + "methodNames": ["permit.api.groups.assignRole"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + ] + }, + { + "id": "wire.api.groups.assignRole.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.assignRole"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + ] + }, + { + "id": "wire.api.groups.assignUser.esm", + "level": "wire", + "methodNames": ["permit.api.groups.assignUser"], + "operationKeys": [ + "control-plane PUT /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}" + ] + }, + { + "id": "wire.api.groups.assignUser.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.assignUser"], + "operationKeys": [ + "control-plane PUT /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}" + ] + }, + { + "id": "wire.api.groups.create.esm", + "level": "wire", + "methodNames": ["permit.api.groups.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/groups"] + }, + { + "id": "wire.api.groups.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/groups"] + }, + { + "id": "wire.api.groups.delete.esm", + "level": "wire", + "methodNames": ["permit.api.groups.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}" + ] + }, + { + "id": "wire.api.groups.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}" + ] + }, + { + "id": "wire.api.groups.get.esm", + "level": "wire", + "methodNames": ["permit.api.groups.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}" + ] + }, + { + "id": "wire.api.groups.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}" + ] + }, + { + "id": "wire.api.groups.list.esm", + "level": "wire", + "methodNames": ["permit.api.groups.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/groups/direct"] + }, + { + "id": "wire.api.groups.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/groups/direct"] + }, + { + "id": "wire.api.groups.removeRole.esm", + "level": "wire", + "methodNames": ["permit.api.groups.removeRole"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + ] + }, + { + "id": "wire.api.groups.removeRole.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.removeRole"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles" + ] + }, + { + "id": "wire.api.groups.removeUser.esm", + "level": "wire", + "methodNames": ["permit.api.groups.removeUser"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}" + ] + }, + { + "id": "wire.api.groups.removeUser.commonjs", + "level": "wire", + "methodNames": ["permit.api.groups.removeUser"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}" + ] + }, + { + "id": "wire.api.pdps.refresh.esm", + "level": "wire", + "methodNames": ["permit.api.pdps.refresh"], + "operationKeys": ["control-plane POST /v2/pdps/{proj_id}/{env_id}/configs/refresh"] + }, + { + "id": "wire.api.pdps.refresh.commonjs", + "level": "wire", + "methodNames": ["permit.api.pdps.refresh"], + "operationKeys": ["control-plane POST /v2/pdps/{proj_id}/{env_id}/configs/refresh"] + }, + { + "id": "wire.api.projects.create.esm", + "level": "wire", + "methodNames": ["permit.api.projects.create"], + "operationKeys": ["control-plane POST /v2/projects"] + }, + { + "id": "wire.api.projects.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.create"], + "operationKeys": ["control-plane POST /v2/projects"] + }, + { + "id": "wire.api.projects.delete.esm", + "level": "wire", + "methodNames": ["permit.api.projects.delete"], + "operationKeys": ["control-plane DELETE /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.delete"], + "operationKeys": ["control-plane DELETE /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.get.esm", + "level": "wire", + "methodNames": ["permit.api.projects.get"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.get"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.getById.esm", + "level": "wire", + "methodNames": ["permit.api.projects.getById"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.getById"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.projects.getByKey"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.getByKey"], + "operationKeys": ["control-plane GET /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.list.esm", + "level": "wire", + "methodNames": ["permit.api.projects.list"], + "operationKeys": ["control-plane GET /v2/projects"] + }, + { + "id": "wire.api.projects.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.list"], + "operationKeys": ["control-plane GET /v2/projects"] + }, + { + "id": "wire.api.projects.update.esm", + "level": "wire", + "methodNames": ["permit.api.projects.update"], + "operationKeys": ["control-plane PATCH /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.projects.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.projects.update"], + "operationKeys": ["control-plane PATCH /v2/projects/{proj_id}"] + }, + { + "id": "wire.api.relationshipTuples.bulkRelationshipTuples.esm", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.bulkRelationshipTuples"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk"] + }, + { + "id": "wire.api.relationshipTuples.bulkRelationshipTuples.commonjs", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.bulkRelationshipTuples"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk"] + }, + { + "id": "wire.api.relationshipTuples.bulkUnRelationshipTuples.esm", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.bulkUnRelationshipTuples"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk" + ] + }, + { + "id": "wire.api.relationshipTuples.bulkUnRelationshipTuples.commonjs", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.bulkUnRelationshipTuples"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk" + ] + }, + { + "id": "wire.api.relationshipTuples.create.esm", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/relationship_tuples", + "pdp-container POST /facts/relationship_tuples" + ] + }, + { + "id": "wire.api.relationshipTuples.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/relationship_tuples", + "pdp-container POST /facts/relationship_tuples" + ] + }, + { + "id": "wire.api.relationshipTuples.delete.esm", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples"] + }, + { + "id": "wire.api.relationshipTuples.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/relationship_tuples"] + }, + { + "id": "wire.api.relationshipTuples.list.esm", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/relationship_tuples"] + }, + { + "id": "wire.api.relationshipTuples.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/relationship_tuples"] + }, + { + "id": "wire.api.relationshipTuples.listDetailed.esm", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.listDetailed"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed" + ] + }, + { + "id": "wire.api.relationshipTuples.listDetailed.commonjs", + "level": "wire", + "methodNames": ["permit.api.relationshipTuples.listDetailed"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed" + ] + }, + { + "id": "package.api.relationshipTuples.waitForSync.esm", + "level": "package", + "methodNames": ["permit.api.relationshipTuples.waitForSync"], + "operationKeys": [] + }, + { + "id": "package.api.relationshipTuples.waitForSync.commonjs", + "level": "package", + "methodNames": ["permit.api.relationshipTuples.waitForSync"], + "operationKeys": [] + }, + { + "id": "wire.api.resourceActions.create.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions" + ] + }, + { + "id": "wire.api.resourceActions.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions" + ] + }, + { + "id": "wire.api.resourceActions.delete.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.get.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.getById.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.list.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions" + ] + }, + { + "id": "wire.api.resourceActions.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions" + ] + }, + { + "id": "wire.api.resourceActions.update.esm", + "level": "wire", + "methodNames": ["permit.api.resourceActions.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceActions.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceActions.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.create.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes" + ] + }, + { + "id": "wire.api.resourceAttributes.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes" + ] + }, + { + "id": "wire.api.resourceAttributes.delete.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.get.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.getById.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.list.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes" + ] + }, + { + "id": "wire.api.resourceAttributes.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes" + ] + }, + { + "id": "wire.api.resourceAttributes.update.esm", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceAttributes.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceAttributes.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.resourceInstances.create.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/resource_instances", + "pdp-container POST /facts/resource_instances" + ] + }, + { + "id": "wire.api.resourceInstances.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/resource_instances", + "pdp-container POST /facts/resource_instances" + ] + }, + { + "id": "wire.api.resourceInstances.delete.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.get.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.getById.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.getById"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.getById"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.getByKey"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.getByKey"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.list.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances"] + }, + { + "id": "wire.api.resourceInstances.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances"] + }, + { + "id": "wire.api.resourceInstances.listDetailed.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.listDetailed"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/detailed" + ] + }, + { + "id": "wire.api.resourceInstances.listDetailed.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.listDetailed"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/detailed" + ] + }, + { + "id": "wire.api.resourceInstances.update.esm", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "pdp-container PATCH /facts/resource_instances/{instance_id}" + ] + }, + { + "id": "wire.api.resourceInstances.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceInstances.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "pdp-container PATCH /facts/resource_instances/{instance_id}" + ] + }, + { + "id": "package.api.resourceInstances.waitForSync.esm", + "level": "package", + "methodNames": ["permit.api.resourceInstances.waitForSync"], + "operationKeys": [] + }, + { + "id": "package.api.resourceInstances.waitForSync.commonjs", + "level": "package", + "methodNames": ["permit.api.resourceInstances.waitForSync"], + "operationKeys": [] + }, + { + "id": "wire.api.resourceRelations.create.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations" + ] + }, + { + "id": "wire.api.resourceRelations.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations" + ] + }, + { + "id": "wire.api.resourceRelations.delete.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.get.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.getById.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}" + ] + }, + { + "id": "wire.api.resourceRelations.list.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations" + ] + }, + { + "id": "wire.api.resourceRelations.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRelations.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations" + ] + }, + { + "id": "wire.api.resourceRoles.assignPermissions.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.assignPermissions"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.resourceRoles.assignPermissions.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.assignPermissions"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.resourceRoles.create.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles" + ] + }, + { + "id": "wire.api.resourceRoles.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.create"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles" + ] + }, + { + "id": "wire.api.resourceRoles.createRoleDerivation.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.createRoleDerivation"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants" + ] + }, + { + "id": "wire.api.resourceRoles.createRoleDerivation.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.createRoleDerivation"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants" + ] + }, + { + "id": "wire.api.resourceRoles.delete.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.deleteRoleDerivation.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.deleteRoleDerivation"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants" + ] + }, + { + "id": "wire.api.resourceRoles.deleteRoleDerivation.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.deleteRoleDerivation"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants" + ] + }, + { + "id": "wire.api.resourceRoles.get.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.getById.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.getById"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.getByKey"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.list.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles" + ] + }, + { + "id": "wire.api.resourceRoles.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.list"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles" + ] + }, + { + "id": "wire.api.resourceRoles.removePermissions.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.removePermissions"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.resourceRoles.removePermissions.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.removePermissions"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.resourceRoles.update.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}" + ] + }, + { + "id": "wire.api.resourceRoles.updateRoleDerivationConditions.esm", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.updateRoleDerivationConditions"], + "operationKeys": [ + "control-plane PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions" + ] + }, + { + "id": "wire.api.resourceRoles.updateRoleDerivationConditions.commonjs", + "level": "wire", + "methodNames": ["permit.api.resourceRoles.updateRoleDerivationConditions"], + "operationKeys": [ + "control-plane PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions" + ] + }, + { + "id": "wire.api.resources.create.esm", + "level": "wire", + "methodNames": ["permit.api.resources.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/resources"] + }, + { + "id": "wire.api.resources.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/resources"] + }, + { + "id": "wire.api.resources.delete.esm", + "level": "wire", + "methodNames": ["permit.api.resources.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}" + ] + }, + { + "id": "wire.api.resources.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}" + ] + }, + { + "id": "wire.api.resources.get.esm", + "level": "wire", + "methodNames": ["permit.api.resources.get"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.get"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.getById.esm", + "level": "wire", + "methodNames": ["permit.api.resources.getById"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.getById"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.resources.getByKey"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.getByKey"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.list.esm", + "level": "wire", + "methodNames": ["permit.api.resources.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources"] + }, + { + "id": "wire.api.resources.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/resources"] + }, + { + "id": "wire.api.resources.replace.esm", + "level": "wire", + "methodNames": ["permit.api.resources.replace"], + "operationKeys": ["control-plane PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.replace.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.replace"], + "operationKeys": ["control-plane PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.update.esm", + "level": "wire", + "methodNames": ["permit.api.resources.update"], + "operationKeys": ["control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.resources.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.resources.update"], + "operationKeys": ["control-plane PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}"] + }, + { + "id": "wire.api.roleAssignments.assign.esm", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.assign"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container POST /facts/role_assignments" + ] + }, + { + "id": "wire.api.roleAssignments.assign.commonjs", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.assign"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container POST /facts/role_assignments" + ] + }, + { + "id": "wire.api.roleAssignments.bulkAssign.esm", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.bulkAssign"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments/bulk"] + }, + { + "id": "wire.api.roleAssignments.bulkAssign.commonjs", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.bulkAssign"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments/bulk"] + }, + { + "id": "wire.api.roleAssignments.bulkUnassign.esm", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.bulkUnassign"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments/bulk"] + }, + { + "id": "wire.api.roleAssignments.bulkUnassign.commonjs", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.bulkUnassign"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments/bulk"] + }, + { + "id": "wire.api.roleAssignments.list.esm", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments"] + }, + { + "id": "wire.api.roleAssignments.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments"] + }, + { + "id": "wire.api.roleAssignments.listDetailed.esm", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.listDetailed"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments/detailed"] + }, + { + "id": "wire.api.roleAssignments.listDetailed.commonjs", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.listDetailed"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments/detailed"] + }, + { + "id": "wire.api.roleAssignments.unassign.esm", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.unassign"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container DELETE /facts/role_assignments" + ] + }, + { + "id": "wire.api.roleAssignments.unassign.commonjs", + "level": "wire", + "methodNames": ["permit.api.roleAssignments.unassign"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container DELETE /facts/role_assignments" + ] + }, + { + "id": "package.api.roleAssignments.waitForSync.esm", + "level": "package", + "methodNames": ["permit.api.roleAssignments.waitForSync"], + "operationKeys": [] + }, + { + "id": "package.api.roleAssignments.waitForSync.commonjs", + "level": "package", + "methodNames": ["permit.api.roleAssignments.waitForSync"], + "operationKeys": [] + }, + { + "id": "wire.api.roles.assignPermissions.esm", + "level": "wire", + "methodNames": ["permit.api.roles.assignPermissions"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.roles.assignPermissions.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.assignPermissions"], + "operationKeys": [ + "control-plane POST /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.roles.create.esm", + "level": "wire", + "methodNames": ["permit.api.roles.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/roles"] + }, + { + "id": "wire.api.roles.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/roles"] + }, + { + "id": "wire.api.roles.delete.esm", + "level": "wire", + "methodNames": ["permit.api.roles.delete"], + "operationKeys": ["control-plane DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.delete"], + "operationKeys": ["control-plane DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.get.esm", + "level": "wire", + "methodNames": ["permit.api.roles.get"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.get"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.getById.esm", + "level": "wire", + "methodNames": ["permit.api.roles.getById"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.getById"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.roles.getByKey"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.getByKey"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.list.esm", + "level": "wire", + "methodNames": ["permit.api.roles.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles"] + }, + { + "id": "wire.api.roles.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/roles"] + }, + { + "id": "wire.api.roles.removePermissions.esm", + "level": "wire", + "methodNames": ["permit.api.roles.removePermissions"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.roles.removePermissions.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.removePermissions"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions" + ] + }, + { + "id": "wire.api.roles.update.esm", + "level": "wire", + "methodNames": ["permit.api.roles.update"], + "operationKeys": ["control-plane PATCH /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.roles.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.update"], + "operationKeys": ["control-plane PATCH /v2/schema/{proj_id}/{env_id}/roles/{role_id}"] + }, + { + "id": "wire.api.tenants.addUser.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.addUser"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users"] + }, + { + "id": "wire.api.tenants.addUser.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.addUser"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users"] + }, + { + "id": "wire.api.tenants.create.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/tenants", + "pdp-container POST /facts/tenants" + ] + }, + { + "id": "wire.api.tenants.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/tenants", + "pdp-container POST /facts/tenants" + ] + }, + { + "id": "wire.api.tenants.delete.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.deleteTenantUser.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.deleteTenantUser"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}" + ] + }, + { + "id": "wire.api.tenants.deleteTenantUser.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.deleteTenantUser"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}" + ] + }, + { + "id": "wire.api.tenants.get.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.get"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.get"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.getById.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.getById"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.getById"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.getByKey"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.getByKey"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.list.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants"] + }, + { + "id": "wire.api.tenants.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants"] + }, + { + "id": "wire.api.tenants.listTenantUsers.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.listTenantUsers"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users"] + }, + { + "id": "wire.api.tenants.listTenantUsers.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.listTenantUsers"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users"] + }, + { + "id": "wire.api.tenants.update.esm", + "level": "wire", + "methodNames": ["permit.api.tenants.update"], + "operationKeys": ["control-plane PATCH /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "wire.api.tenants.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.tenants.update"], + "operationKeys": ["control-plane PATCH /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}"] + }, + { + "id": "package.api.tenants.waitForSync.esm", + "level": "package", + "methodNames": ["permit.api.tenants.waitForSync"], + "operationKeys": [] + }, + { + "id": "package.api.tenants.waitForSync.commonjs", + "level": "package", + "methodNames": ["permit.api.tenants.waitForSync"], + "operationKeys": [] + }, + { + "id": "wire.api.users.assignRole.esm", + "level": "wire", + "methodNames": ["permit.api.users.assignRole"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container POST /facts/role_assignments" + ] + }, + { + "id": "wire.api.users.assignRole.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.assignRole"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container POST /facts/role_assignments" + ] + }, + { + "id": "wire.api.users.bulkUserCreate.esm", + "level": "wire", + "methodNames": ["permit.api.users.bulkUserCreate"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/bulk/users"] + }, + { + "id": "wire.api.users.bulkUserCreate.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.bulkUserCreate"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/bulk/users"] + }, + { + "id": "wire.api.users.bulkUserDelete.esm", + "level": "wire", + "methodNames": ["permit.api.users.bulkUserDelete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/bulk/users"] + }, + { + "id": "wire.api.users.bulkUserDelete.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.bulkUserDelete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/bulk/users"] + }, + { + "id": "wire.api.users.bulkUserReplace.esm", + "level": "wire", + "methodNames": ["permit.api.users.bulkUserReplace"], + "operationKeys": ["control-plane PUT /v2/facts/{proj_id}/{env_id}/bulk/users"] + }, + { + "id": "wire.api.users.bulkUserReplace.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.bulkUserReplace"], + "operationKeys": ["control-plane PUT /v2/facts/{proj_id}/{env_id}/bulk/users"] + }, + { + "id": "wire.api.users.create.esm", + "level": "wire", + "methodNames": ["permit.api.users.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/users", + "pdp-container POST /facts/users" + ] + }, + { + "id": "wire.api.users.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.create"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/users", + "pdp-container POST /facts/users" + ] + }, + { + "id": "wire.api.users.delete.esm", + "level": "wire", + "methodNames": ["permit.api.users.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.delete"], + "operationKeys": ["control-plane DELETE /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.get.esm", + "level": "wire", + "methodNames": ["permit.api.users.get"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.get"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.getAssignedRoles.esm", + "level": "wire", + "methodNames": ["permit.api.users.getAssignedRoles"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments"] + }, + { + "id": "wire.api.users.getAssignedRoles.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.getAssignedRoles"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/role_assignments"] + }, + { + "id": "wire.api.users.getById.esm", + "level": "wire", + "methodNames": ["permit.api.users.getById"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.getById.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.getById"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.getByKey.esm", + "level": "wire", + "methodNames": ["permit.api.users.getByKey"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.getByKey.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.getByKey"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "wire.api.users.list.esm", + "level": "wire", + "methodNames": ["permit.api.users.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users"] + }, + { + "id": "wire.api.users.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users"] + }, + { + "id": "wire.api.users.sync.esm", + "level": "wire", + "methodNames": ["permit.api.users.sync"], + "operationKeys": [ + "control-plane PUT /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "pdp-container PUT /facts/users/{user_id}" + ] + }, + { + "id": "wire.api.users.sync.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.sync"], + "operationKeys": [ + "control-plane PUT /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "pdp-container PUT /facts/users/{user_id}" + ] + }, + { + "id": "wire.api.users.unassignRole.esm", + "level": "wire", + "methodNames": ["permit.api.users.unassignRole"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container DELETE /facts/role_assignments" + ] + }, + { + "id": "wire.api.users.unassignRole.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.unassignRole"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/role_assignments", + "pdp-container DELETE /facts/role_assignments" + ] + }, + { + "id": "wire.api.users.update.esm", + "level": "wire", + "methodNames": ["permit.api.users.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "pdp-container PATCH /facts/users/{user_id}" + ] + }, + { + "id": "wire.api.users.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.users.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "pdp-container PATCH /facts/users/{user_id}" + ] + }, + { + "id": "package.api.users.waitForSync.esm", + "level": "package", + "methodNames": ["permit.api.users.waitForSync"], + "operationKeys": [] + }, + { + "id": "package.api.users.waitForSync.commonjs", + "level": "package", + "methodNames": ["permit.api.users.waitForSync"], + "operationKeys": [] + }, + { + "id": "wire.bulkCheck.esm", + "level": "wire", + "methodNames": ["permit.bulkCheck"], + "operationKeys": ["pdp-container POST /allowed/bulk"] + }, + { + "id": "wire.bulkCheck.commonjs", + "level": "wire", + "methodNames": ["permit.bulkCheck"], + "operationKeys": ["pdp-container POST /allowed/bulk"] + }, + { + "id": "wire.check.esm", + "level": "wire", + "methodNames": ["permit.check"], + "operationKeys": ["pdp-container POST /allowed"] + }, + { + "id": "wire.check.commonjs", + "level": "wire", + "methodNames": ["permit.check"], + "operationKeys": ["pdp-container POST /allowed"] + }, + { + "id": "wire.checkAllTenants.esm", + "level": "wire", + "methodNames": ["permit.checkAllTenants"], + "operationKeys": ["pdp-container POST /allowed/all-tenants"] + }, + { + "id": "wire.checkAllTenants.commonjs", + "level": "wire", + "methodNames": ["permit.checkAllTenants"], + "operationKeys": ["pdp-container POST /allowed/all-tenants"] + }, + { + "id": "wire.elements.loginAs.esm", + "level": "wire", + "methodNames": ["permit.elements.loginAs"], + "operationKeys": [] + }, + { + "id": "wire.elements.loginAs.commonjs", + "level": "wire", + "methodNames": ["permit.elements.loginAs"], + "operationKeys": [] + }, + { + "id": "wire.filterObjects.esm", + "level": "wire", + "methodNames": ["permit.filterObjects"], + "operationKeys": ["pdp-container POST /allowed/bulk"] + }, + { + "id": "wire.filterObjects.commonjs", + "level": "wire", + "methodNames": ["permit.filterObjects"], + "operationKeys": ["pdp-container POST /allowed/bulk"] + }, + { + "id": "wire.getAuthorizedUsers.esm", + "level": "wire", + "methodNames": ["permit.getAuthorizedUsers"], + "operationKeys": ["pdp-container POST /authorized_users"] + }, + { + "id": "wire.getAuthorizedUsers.commonjs", + "level": "wire", + "methodNames": ["permit.getAuthorizedUsers"], + "operationKeys": ["pdp-container POST /authorized_users"] + }, + { + "id": "wire.getUserPermissions.esm", + "level": "wire", + "methodNames": ["permit.getUserPermissions"], + "operationKeys": ["pdp-container POST /user-permissions"] + }, + { + "id": "wire.getUserPermissions.commonjs", + "level": "wire", + "methodNames": ["permit.getUserPermissions"], + "operationKeys": ["pdp-container POST /user-permissions"] + }, + { + "id": "wire.getUserTenants.esm", + "level": "wire", + "methodNames": ["permit.getUserTenants"], + "operationKeys": ["pdp-container POST /user-tenants"] + }, + { + "id": "wire.getUserTenants.commonjs", + "level": "wire", + "methodNames": ["permit.getUserTenants"], + "operationKeys": ["pdp-container POST /user-tenants"] + }, + { + "id": "api.legal-attribute-roundtrip", + "level": "api", + "methodNames": ["permit.api.users.create", "permit.api.users.get", "permit.api.users.update"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "control-plane POST /v2/facts/{proj_id}/{env_id}/users" + ] + }, + { + "id": "pdp.shared-rbac-positive-negative", + "level": "pdp", + "methodNames": ["permit.check"], + "operationKeys": ["pdp-container POST /allowed"] + }, + { + "id": "package.strict-entrypoints", + "level": "package", + "methodNames": [], + "operationKeys": [] + }, + { + "id": "ab.users.create-get-update", + "level": "api", + "methodNames": ["permit.api.users.create", "permit.api.users.get", "permit.api.users.update"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/users/{user_id}", + "control-plane POST /v2/facts/{proj_id}/{env_id}/users" + ] + }, + { + "id": "ab.users.list-normalized", + "level": "api", + "methodNames": ["permit.api.users.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/users"] + }, + { + "id": "ab.users.sync-normalized", + "level": "api", + "methodNames": ["permit.api.users.sync"], + "operationKeys": ["control-plane PUT /v2/facts/{proj_id}/{env_id}/users/{user_id}"] + }, + { + "id": "ab.resource-instance-roundtrip", + "level": "api", + "methodNames": [ + "permit.api.resourceInstances.create", + "permit.api.resourceInstances.get", + "permit.api.resourceInstances.delete" + ], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "control-plane GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}", + "control-plane POST /v2/facts/{proj_id}/{env_id}/resource_instances" + ] + }, + { + "id": "ab.check.allow-deny", + "level": "pdp", + "methodNames": ["permit.check"], + "operationKeys": ["pdp-container POST /allowed"] + }, + { + "id": "ab.bulk-check-order-context", + "level": "pdp", + "methodNames": ["permit.bulkCheck"], + "operationKeys": ["pdp-container POST /allowed/bulk"] + }, + { + "id": "wire.supporting-scope.esm", + "level": "wire", + "methodNames": ["permit.api.ensureAccessLevel", "permit.api.ensureContext"], + "operationKeys": ["control-plane GET /v2/api-key/scope"] + }, + { + "id": "wire.supporting-scope.commonjs", + "level": "wire", + "methodNames": ["permit.api.ensureAccessLevel", "permit.api.ensureContext"], + "operationKeys": ["control-plane GET /v2/api-key/scope"] + }, + { + "id": "wire.api.userInvites.list.esm", + "level": "wire", + "methodNames": ["permit.api.userInvites.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites"] + }, + { + "id": "wire.api.userInvites.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.userInvites.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites"] + }, + { + "id": "api.user-invites.list", + "level": "api", + "methodNames": ["permit.api.userInvites.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites"] + }, + { + "id": "wire.api.userInvites.create.esm", + "level": "wire", + "methodNames": ["permit.api.userInvites.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites"] + }, + { + "id": "wire.api.userInvites.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.userInvites.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites"] + }, + { + "id": "api.user-invites.create", + "level": "api", + "methodNames": ["permit.api.userInvites.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites"] + }, + { + "id": "wire.api.userInvites.get.esm", + "level": "wire", + "methodNames": ["permit.api.userInvites.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "wire.api.userInvites.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.userInvites.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "api.user-invites.get", + "level": "api", + "methodNames": ["permit.api.userInvites.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "wire.api.userInvites.update.esm", + "level": "wire", + "methodNames": ["permit.api.userInvites.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "wire.api.userInvites.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.userInvites.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "api.user-invites.update", + "level": "api", + "methodNames": ["permit.api.userInvites.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "wire.api.userInvites.delete.esm", + "level": "wire", + "methodNames": ["permit.api.userInvites.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "wire.api.userInvites.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.userInvites.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "api.user-invites.delete", + "level": "api", + "methodNames": ["permit.api.userInvites.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}" + ] + }, + { + "id": "wire.api.userInvites.approve.esm", + "level": "wire", + "methodNames": ["permit.api.userInvites.approve"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve" + ] + }, + { + "id": "wire.api.userInvites.approve.commonjs", + "level": "wire", + "methodNames": ["permit.api.userInvites.approve"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve" + ] + }, + { + "id": "api.user-invites.approve", + "level": "api", + "methodNames": ["permit.api.userInvites.approve"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve" + ] + }, + { + "id": "api.user-invites.approval-refusals", + "level": "api", + "methodNames": ["permit.api.userInvites.approve"], + "operationKeys": [ + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve" + ] + }, + { + "id": "api.user-invites.access", + "level": "api", + "methodNames": [ + "permit.api.userInvites.list", + "permit.api.userInvites.create", + "permit.api.userInvites.get", + "permit.api.userInvites.update", + "permit.api.userInvites.delete", + "permit.api.userInvites.approve" + ], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites", + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites", + "control-plane GET /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}", + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}", + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}", + "control-plane POST /v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve" + ] + }, + { + "id": "wire.api.userAttributes.list.esm", + "level": "wire", + "methodNames": ["permit.api.userAttributes.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes"] + }, + { + "id": "wire.api.userAttributes.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.userAttributes.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes"] + }, + { + "id": "api.user-attributes.list", + "level": "api", + "methodNames": ["permit.api.userAttributes.list"], + "operationKeys": ["control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes"] + }, + { + "id": "wire.api.userAttributes.get.esm", + "level": "wire", + "methodNames": ["permit.api.userAttributes.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.userAttributes.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.userAttributes.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "api.user-attributes.get", + "level": "api", + "methodNames": ["permit.api.userAttributes.get"], + "operationKeys": [ + "control-plane GET /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.userAttributes.create.esm", + "level": "wire", + "methodNames": ["permit.api.userAttributes.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/users/attributes"] + }, + { + "id": "wire.api.userAttributes.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.userAttributes.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/users/attributes"] + }, + { + "id": "api.user-attributes.create", + "level": "api", + "methodNames": ["permit.api.userAttributes.create"], + "operationKeys": ["control-plane POST /v2/schema/{proj_id}/{env_id}/users/attributes"] + }, + { + "id": "wire.api.userAttributes.update.esm", + "level": "wire", + "methodNames": ["permit.api.userAttributes.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.userAttributes.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.userAttributes.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "api.user-attributes.update", + "level": "api", + "methodNames": ["permit.api.userAttributes.update"], + "operationKeys": [ + "control-plane PATCH /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.userAttributes.delete.esm", + "level": "wire", + "methodNames": ["permit.api.userAttributes.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "wire.api.userAttributes.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.userAttributes.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "api.user-attributes.delete", + "level": "api", + "methodNames": ["permit.api.userAttributes.delete"], + "operationKeys": [ + "control-plane DELETE /v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}" + ] + }, + { + "id": "api.user-attributes.access", + "level": "api", + "methodNames": [ + "permit.api.userAttributes.list", + "permit.api.userAttributes.get", + "permit.api.userAttributes.create", + "permit.api.userAttributes.update", + "permit.api.userAttributes.delete" + ], + "operationKeys": [] + }, + { + "id": "wire.api.roles.bulkCreateOrReplace.esm", + "level": "wire", + "methodNames": ["permit.api.roles.bulkCreateOrReplace"], + "operationKeys": ["control-plane PUT /v2/schema/{proj_id}/{env_id}/bulk/roles"] + }, + { + "id": "wire.api.roles.bulkCreateOrReplace.commonjs", + "level": "wire", + "methodNames": ["permit.api.roles.bulkCreateOrReplace"], + "operationKeys": ["control-plane PUT /v2/schema/{proj_id}/{env_id}/bulk/roles"] + }, + { + "id": "api.bulk-roles.create-replace", + "level": "api", + "methodNames": ["permit.api.roles.bulkCreateOrReplace"], + "operationKeys": ["control-plane PUT /v2/schema/{proj_id}/{env_id}/bulk/roles"] + }, + { + "id": "api.bulk-roles.scope", + "level": "api", + "methodNames": ["permit.api.roles.bulkCreateOrReplace"], + "operationKeys": ["control-plane PUT /v2/schema/{proj_id}/{env_id}/bulk/roles"] + }, + { + "id": "wire.checkUrl.esm", + "level": "wire", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "wire.checkUrl.commonjs", + "level": "wire", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "mock-pdp.url-check-contract", + "level": "mock-pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "mock-pdp.url-check-inputs", + "level": "mock-pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "mock-pdp.url-check-errors", + "level": "mock-pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "commonjs.mock-pdp.url-check-contract", + "level": "mock-pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "commonjs.mock-pdp.url-check-inputs", + "level": "mock-pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "commonjs.mock-pdp.url-check-errors", + "level": "mock-pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "pdp.url-check-mapped-allow-and-deny", + "level": "pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "pdp.url-check-mapping-removal", + "level": "pdp", + "methodNames": ["permit.checkUrl"], + "operationKeys": ["pdp-container POST /allowed_url"] + }, + { + "id": "wire.permit.getLocalRoleAssignments.esm", + "level": "wire", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "mock-pdp.local-role-assignments-invalid", + "level": "mock-pdp", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "mock-pdp.local-role-assignments-errors", + "level": "mock-pdp", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "wire.permit.getLocalRoleAssignments.commonjs", + "level": "wire", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "commonjs.mock-pdp.local-role-assignments-invalid", + "level": "mock-pdp", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "commonjs.mock-pdp.local-role-assignments-errors", + "level": "mock-pdp", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "pdp.local-role-assignments-filters-pagination", + "level": "pdp", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "pdp.local-role-assignments-removal", + "level": "pdp", + "methodNames": ["permit.getLocalRoleAssignments"], + "operationKeys": ["pdp-container GET /local/role_assignments"] + }, + { + "id": "wire.api.proxyConfigs.list.esm", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs"] + }, + { + "id": "wire.api.proxyConfigs.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs"] + }, + { + "id": "api.proxy-configs.list", + "level": "api", + "methodNames": ["permit.api.proxyConfigs.list"], + "operationKeys": ["control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs"] + }, + { + "id": "wire.api.proxyConfigs.get.esm", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "wire.api.proxyConfigs.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "api.proxy-configs.get", + "level": "api", + "methodNames": ["permit.api.proxyConfigs.get"], + "operationKeys": [ + "control-plane GET /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "wire.api.proxyConfigs.create.esm", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/proxy_configs"] + }, + { + "id": "wire.api.proxyConfigs.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/proxy_configs"] + }, + { + "id": "api.proxy-configs.create", + "level": "api", + "methodNames": ["permit.api.proxyConfigs.create"], + "operationKeys": ["control-plane POST /v2/facts/{proj_id}/{env_id}/proxy_configs"] + }, + { + "id": "wire.api.proxyConfigs.update.esm", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "wire.api.proxyConfigs.update.commonjs", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "api.proxy-configs.update", + "level": "api", + "methodNames": ["permit.api.proxyConfigs.update"], + "operationKeys": [ + "control-plane PATCH /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "wire.api.proxyConfigs.delete.esm", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "wire.api.proxyConfigs.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.proxyConfigs.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "api.proxy-configs.delete", + "level": "api", + "methodNames": ["permit.api.proxyConfigs.delete"], + "operationKeys": [ + "control-plane DELETE /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}" + ] + }, + { + "id": "wire.api.apiKeys.create.esm", + "level": "wire", + "methodNames": ["permit.api.apiKeys.create"], + "operationKeys": ["control-plane POST /v2/api-key"] + }, + { + "id": "wire.api.apiKeys.create.commonjs", + "level": "wire", + "methodNames": ["permit.api.apiKeys.create"], + "operationKeys": ["control-plane POST /v2/api-key"] + }, + { + "id": "api.api-keys.create", + "level": "api", + "methodNames": ["permit.api.apiKeys.create"], + "operationKeys": ["control-plane POST /v2/api-key"] + }, + { + "id": "wire.api.apiKeys.delete.esm", + "level": "wire", + "methodNames": ["permit.api.apiKeys.delete"], + "operationKeys": ["control-plane DELETE /v2/api-key/{api_key_id}"] + }, + { + "id": "wire.api.apiKeys.delete.commonjs", + "level": "wire", + "methodNames": ["permit.api.apiKeys.delete"], + "operationKeys": ["control-plane DELETE /v2/api-key/{api_key_id}"] + }, + { + "id": "api.api-keys.delete", + "level": "api", + "methodNames": ["permit.api.apiKeys.delete"], + "operationKeys": ["control-plane DELETE /v2/api-key/{api_key_id}"] + }, + { + "id": "wire.api.apiKeys.get.esm", + "level": "wire", + "methodNames": ["permit.api.apiKeys.get"], + "operationKeys": ["control-plane GET /v2/api-key/{api_key_id}"] + }, + { + "id": "wire.api.apiKeys.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.apiKeys.get"], + "operationKeys": ["control-plane GET /v2/api-key/{api_key_id}"] + }, + { + "id": "api.api-keys.get", + "level": "api", + "methodNames": ["permit.api.apiKeys.get"], + "operationKeys": ["control-plane GET /v2/api-key/{api_key_id}"] + }, + { + "id": "wire.api.apiKeys.getScope.esm", + "level": "wire", + "methodNames": ["permit.api.apiKeys.getScope"], + "operationKeys": ["control-plane GET /v2/api-key/scope"] + }, + { + "id": "wire.api.apiKeys.getScope.commonjs", + "level": "wire", + "methodNames": ["permit.api.apiKeys.getScope"], + "operationKeys": ["control-plane GET /v2/api-key/scope"] + }, + { + "id": "api.api-keys.getScope", + "level": "api", + "methodNames": ["permit.api.apiKeys.getScope"], + "operationKeys": ["control-plane GET /v2/api-key/scope"] + }, + { + "id": "wire.api.apiKeys.list.esm", + "level": "wire", + "methodNames": ["permit.api.apiKeys.list"], + "operationKeys": ["control-plane GET /v2/api-key"] + }, + { + "id": "wire.api.apiKeys.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.apiKeys.list"], + "operationKeys": ["control-plane GET /v2/api-key"] + }, + { + "id": "api.api-keys.list", + "level": "api", + "methodNames": ["permit.api.apiKeys.list"], + "operationKeys": ["control-plane GET /v2/api-key"] + }, + { + "id": "wire.api.apiKeys.rotate.esm", + "level": "wire", + "methodNames": ["permit.api.apiKeys.rotate"], + "operationKeys": ["control-plane POST /v2/api-key/{api_key_id}/rotate-secret"] + }, + { + "id": "wire.api.apiKeys.rotate.commonjs", + "level": "wire", + "methodNames": ["permit.api.apiKeys.rotate"], + "operationKeys": ["control-plane POST /v2/api-key/{api_key_id}/rotate-secret"] + }, + { + "id": "api.api-keys.rotate", + "level": "api", + "methodNames": ["permit.api.apiKeys.rotate"], + "operationKeys": ["control-plane POST /v2/api-key/{api_key_id}/rotate-secret"] + }, + { + "id": "wire.api.auditLogs.list.esm", + "level": "wire", + "methodNames": ["permit.api.auditLogs.list"], + "operationKeys": ["control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs"] + }, + { + "id": "wire.api.auditLogs.list.commonjs", + "level": "wire", + "methodNames": ["permit.api.auditLogs.list"], + "operationKeys": ["control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs"] + }, + { + "id": "api.audit-logs-ingestion-list", + "level": "api", + "methodNames": ["permit.api.auditLogs.list"], + "operationKeys": ["control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs"] + }, + { + "id": "wire.api.auditLogs.get.esm", + "level": "wire", + "methodNames": ["permit.api.auditLogs.get"], + "operationKeys": ["control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}"] + }, + { + "id": "wire.api.auditLogs.get.commonjs", + "level": "wire", + "methodNames": ["permit.api.auditLogs.get"], + "operationKeys": ["control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}"] + }, + { + "id": "api.audit-logs-ingestion-detail", + "level": "api", + "methodNames": ["permit.api.auditLogs.get"], + "operationKeys": ["control-plane GET /v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}"] + }, + { + "id": "wire.api.environments.copyAsync.esm", + "level": "wire", + "methodNames": ["permit.api.environments.copyAsync"], + "operationKeys": ["control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy/async"] + }, + { + "id": "wire.api.environments.copyAsync.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.copyAsync"], + "operationKeys": ["control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy/async"] + }, + { + "id": "wire.api.environments.getCopyResult.esm", + "level": "wire", + "methodNames": ["permit.api.environments.getCopyResult"], + "operationKeys": [ + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result" + ] + }, + { + "id": "wire.api.environments.getCopyResult.commonjs", + "level": "wire", + "methodNames": ["permit.api.environments.getCopyResult"], + "operationKeys": [ + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result" + ] + }, + { + "id": "api.async-copy.new-target", + "level": "api", + "methodNames": ["permit.api.environments.copyAsync", "permit.api.environments.getCopyResult"], + "operationKeys": [ + "control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy/async", + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result" + ] + }, + { + "id": "api.async-copy.existing-target", + "level": "api", + "methodNames": ["permit.api.environments.copyAsync", "permit.api.environments.getCopyResult"], + "operationKeys": [ + "control-plane POST /v2/projects/{proj_id}/envs/{env_id}/copy/async", + "control-plane GET /v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result" + ] + } + ], + "abCaseIds": [ + "ab.users.create-get-update", + "ab.users.list-normalized", + "ab.users.sync-normalized", + "ab.resource-instance-roundtrip", + "ab.check.allow-deny", + "ab.bulk-check-order-context" + ], + "intentionalDifferences": [ + { + "id": "migration.flat-facade", + "changeId": "A1" + }, + { + "id": "migration.flat-symbols-context-alias", + "changeId": "A2" + }, + { + "id": "migration.facade-return-adaptations", + "changeId": "A3" + }, + { + "id": "migration.configuration-validation", + "changeId": "F1" + }, + { + "id": "migration.frozen-settings", + "changeId": "F2" + }, + { + "id": "migration.sanitized-errors", + "changeId": "E2" + }, + { + "id": "migration.strict-decisions", + "changeId": "W1" + }, + { + "id": "migration.opa-json-input", + "changeId": "W2" + }, + { + "id": "migration.all-tenants-fix", + "changeId": "W3" + }, + { + "id": "migration.caller-axios-fix", + "changeId": "W5" + } + ], + "baseline": { + "version": "2.7.5", + "sha256": "917640ce20af73b9df1f93d6bf054c47a2beea2a03256317104128fe8cbc1661", + "integrity": "sha512-9HtUR6zkzyFTEYeM8AytKYIKyQfERy3zjjP4rvhnMwEn+Jaru5knZlBO2HdOXy9ohqmDI1n9Hhn2eV6R10n4dw==" + }, + "phaseIds": [ + "package.esm-and-commonjs", + "package.typescript-consumers", + "package.mixed-entry-contexts", + "package.mixed-entry-error-privacy", + "wire.mixed-axios.esm.esm.rest", + "wire.mixed-axios.esm.esm.opa", + "wire.mixed-axios.esm.commonjs.rest", + "wire.mixed-axios.esm.commonjs.opa", + "wire.mixed-axios.commonjs.esm.rest", + "wire.mixed-axios.commonjs.esm.opa", + "wire.mixed-axios.commonjs.commonjs.rest", + "wire.mixed-axios.commonjs.commonjs.opa", + "package.grouped-public-surface.esm", + "wire.condition-set-lists.esm", + "wire.condition-rule-lists.esm", + "package.grouped-public-surface.commonjs", + "wire.condition-set-lists.commonjs", + "wire.condition-rule-lists.commonjs", + "commonjs.mock-pdp.permission-context-contract", + "commonjs.mock-pdp.authorized-users-contract", + "commonjs.mock-pdp.user-tenants-contract", + "commonjs.mock-pdp.filter-object-identity-and-context", + "commonjs.mock-pdp.discovery-input-and-capability-errors", + "commonjs.mock-pdp.discovery-whole-response-validation", + "commonjs.mock-pdp.discovery-operational-failures", + "commonjs.mock-pdp.discovery-call-timeouts", + "wire.groups-contracts", + "wire.tenant-membership-contract", + "wire.dedicated-detailed-lists", + "wire.environment-refresh-contract", + "wire.detailed-api-selected-context", + "wire.membership-refresh-control-plane", + "mock-pdp.permission-context-contract", + "mock-pdp.authorized-users-contract", + "mock-pdp.user-tenants-contract", + "mock-pdp.filter-object-identity-and-context", + "mock-pdp.discovery-input-and-capability-errors", + "mock-pdp.discovery-whole-response-validation", + "mock-pdp.discovery-operational-failures", + "mock-pdp.discovery-call-timeouts", + "wire.api-crud", + "wire.pagination-and-scope", + "wire.configured-api-destinations", + "wire.list-response-contracts", + "wire.role-filter-contracts", + "mock-pdp.decisions-and-context", + "mock-pdp.bulk-and-empty", + "mock-pdp.all-tenants-and-permissions", + "mock-pdp.errors", + "mock-pdp.boolean-decisions", + "mock-pdp.bulk-response-cardinality", + "mock-pdp.dispatched-bulk-count", + "mock-pdp.permission-envelopes", + "mock-pdp.documented-response-defaults", + "mock-pdp.per-call-response-policy", + "mock-pdp.malformed-permissions", + "mock-pdp.malformed-tenants", + "wire.caller-client-hooks-and-defaults", + "wire.caller-basic-auth-isolation", + "wire.caller-transform-preservation", + "mock-pdp.shared-opa-routing", + "wire.non-idempotent-retry-restrictions", + "mock-pdp.retry-timeout-budget", + "wire.shared-client-retry-isolation", + "wire.constructor-validation", + "wire.stable-sdk-settings", + "wire.concurrent-scope-initialization", + "wire.failed-scope-recovery", + "wire.malformed-scope-rejection", + "wire.pending-context-selection", + "wire.nested-settings-ownership", + "wire.uninitialized-context-token-isolation", + "wire.supplied-context-ownership", + "package.caller-failure-privacy", + "wire.escaped-error-privacy", + "wire.deep-error-privacy", + "wire.credential-path-privacy", + "wire.rest-error-normalization", + "wire.rest-network-error", + "wire.rest-private-diagnostics", + "package.direct-error-causes", + "wire.scope-error-diagnostics", + "mock-pdp.private-error-diagnostics", + "mock-pdp.opa-private-error-diagnostics", + "wire.retry-safety", + "api.core-roundtrip", + "api.condition-set-roundtrip", + "api.resource-children", + "api.project-environment-context", + "pdp.rbac-grant-and-tenant-boundary", + "pdp.rbac-revoke", + "pdp.resource-role", + "pdp.opa", + "pdp.abac-generated-policy", + "pdp.groups-grants-and-membership", + "api.tenant-membership-without-role", + "api.dedicated-detailed-nested-lists", + "api.environment-refresh-acknowledgement", + "api.pdp-discovery-owned-fixtures", + "pdp.authorized-users-and-role-derived-tenants", + "pdp.discovery-context-abac", + "pdp.filter-objects-and-discovery-revoke", + "release.wire.observed.esm", + "release.wire.observed.commonjs", + "release.package.clone-helpers", + "release.api.legal-attributes", + "release.api.shared-baseline", + "release.pdp.shared-baseline", + "release.wire.enforcement.esm", + "release.wire.enforcement.commonjs", + "release.wire.grouped.esm", + "release.wire.grouped.commonjs", + "release.package.grouped.esm", + "release.package.grouped.commonjs", + "wire.user-invites.esm", + "wire.user-invites.commonjs", + "api.user-invites-lifecycle", + "api.user-invites-refusals", + "wire.user-attributes.esm", + "wire.user-attributes.commonjs", + "api.user-attributes-lifecycle", + "api.user-attributes-access", + "wire.bulk-roles.esm", + "wire.bulk-roles.commonjs", + "api.bulk-roles-lifecycle", + "api.bulk-roles-context-refusal", + "commonjs.mock-pdp.url-check-contract", + "commonjs.mock-pdp.url-check-inputs", + "commonjs.mock-pdp.url-check-errors", + "mock-pdp.url-check-contract", + "mock-pdp.url-check-inputs", + "mock-pdp.url-check-errors", + "api.url-check-owned-fixtures", + "pdp.url-check-mapped-allow-and-deny", + "pdp.url-check-mapping-removal", + "wire.local-role-assignments-contract", + "mock-pdp.local-role-assignments-invalid", + "mock-pdp.local-role-assignments-errors", + "commonjs.wire.local-role-assignments-contract", + "commonjs.mock-pdp.local-role-assignments-invalid", + "commonjs.mock-pdp.local-role-assignments-errors", + "api.local-role-assignments-owned-fixtures", + "pdp.local-role-assignments-filters-pagination", + "pdp.local-role-assignments-removal", + "wire.proxy-configs.esm", + "wire.proxy-configs.commonjs", + "api.proxy-configs-owned-fixtures", + "api.proxy-configs-lifecycle", + "wire.api-keys.esm", + "wire.api-keys.commonjs", + "api.api-keys-lifecycle", + "wire.audit-logs.esm", + "wire.audit-logs.commonjs", + "api.audit-logs-owned-fixtures", + "pdp.audit-logs-decisions", + "api.audit-logs-ingestion-list", + "api.audit-logs-ingestion-detail", + "wire.async-copy.esm", + "wire.async-copy.commonjs", + "api.async-copy-owned-fixtures", + "api.async-copy.new-target", + "api.async-copy.existing-target" + ], + "runIds": [ + "candidate.local.node22.13.0", + "candidate.offline.node22.13.0", + "baseline.local.node22.13.0", + "baseline.offline.node22.13.0", + "candidate.local.node22.23.3", + "candidate.offline.node22.23.3", + "baseline.local.node22.23.3", + "baseline.offline.node22.23.3", + "candidate.local.node24.0.0", + "candidate.offline.node24.0.0", + "baseline.local.node24.0.0", + "baseline.offline.node24.0.0", + "candidate.local.node24.21.0", + "candidate.offline.node24.21.0", + "baseline.local.node24.21.0", + "baseline.offline.node24.21.0", + "candidate.local.node26.11.0", + "candidate.offline.node26.11.0", + "baseline.local.node26.11.0", + "baseline.offline.node26.11.0" + ] +} diff --git a/api-coverage/sources.json b/api-coverage/sources.json new file mode 100644 index 00000000..c840872c --- /dev/null +++ b/api-coverage/sources.json @@ -0,0 +1,63 @@ +{ + "sources": [ + { + "name": "control-plane", + "file": "openapi/permit-api.json", + "url": "https://api.permit.io/v2/openapi.json", + "capturedAt": "2026-09-30", + "sha256": "1a29f1c75002d214b442a678a2b9f178db83a28f5fd1032322aa26d1eb835655", + "counts": { + "paths": 164, + "operations": 263, + "schemas": 333 + } + }, + { + "name": "pdp-container", + "file": "openapi/pdp/container.json", + "image": "permitio/pdp-v2:0.9.16@sha256:e3cf30794ec2d256636b4714641df46e51ee58a3f1f0d24c606e214e0bf8669a", + "capturedAt": "2026-09-30", + "sha256": "863635167e13483f21ccce5b3f38d93a2f8625c4e480d5fdea306c56a461b46f", + "counts": { + "paths": 29, + "operations": 34, + "schemas": 39 + } + }, + { + "name": "pdp-cloud", + "file": "openapi/pdp/cloud.json", + "url": "https://cloudpdp.api.permit.io/openapi.json", + "capturedAt": "2026-09-30", + "sha256": "8fb3ad79b93679b24ddd90596e17b7f6baa6b662e2c09a96f1a3ffc938292a29", + "counts": { + "paths": 10, + "operations": 10, + "schemas": 32 + } + } + ], + "containerFactsAlias": { + "from": "/v2/facts/{proj_id}/{env_id}", + "to": "/facts", + "sourceSha256": "8a5f22fd7e1e65f576716d73db9e58eb6801208c1d9f0ede89b581c7b892c5e8", + "basis": "The pinned image mounts the same facts router at both prefixes; the compatibility mount is intentionally omitted from OpenAPI." + }, + "unmeasuredCapabilities": { + "latestContainer": { + "status": "NOT_MEASURED", + "owner": "PER-16571", + "reason": "The inventory is tied to the pinned image, not a moving latest image." + }, + "futurePdp": { + "status": "NOT_ADOPTED", + "owner": "PER-16568", + "reason": "No approved future PDP contract snapshot is published in this SDK." + }, + "sharedTarget": { + "status": "UNAVAILABLE", + "owner": "PER-16345", + "reason": "No machine-readable shared target artifact was published when this Node evidence was reviewed." + } + } +} diff --git a/docs/assets/hierarchy.js b/docs/assets/hierarchy.js new file mode 100644 index 00000000..4306ccdc --- /dev/null +++ b/docs/assets/hierarchy.js @@ -0,0 +1 @@ +window.hierarchyData = "eJydmk1v2zgQhv+LzmzLb4q+GWm2CLbAGml7KnJwbSbRVpEMSS62KPLfF5QUiZQoa+hDKqSZ4cz7cGwOSf1JqrJs6mTznTKZIqIokhgjwjCiVCOqJeKMICpIigQhiBJMkH0ojVKBkWASSW6NJUaaKKS1RAQrgZSQiBDBEaGUIcK4RoQzjYjAChFJJaJYYER0qhFRmiPKKH9ASWUec3NosrKok82fhNh/iv2LSTbJ3c5UL1lzk2emaBKU/MyKY7KhQqLkXOXJJsmKxlSP+4OpP3i275+blzxBySHf13WySZr6+M46vxsc7B+fs/xYmSLZfJf44RUlEjuxu+GGoISmb0HbQU39obNYDNX9xytKCOWups9Z3dyUxTGzkr+Y5v6cm3pNXNAJoNKGZ66su9ko21O2Fj3kE4uY8JYx4W42F5MJII9KZJwAqaYTsD1lf5vfIOy9KRC2om6o3heAeLSMBqs7sNoFGwgcwAkIOkCkVFyq4ugKBgKlVC9Vb2zlXgOXCmrhUkEXqjamYoGgNZ2Cvi1+ZVVZvJgCxtm1B2LW0g3qDgCgPDGPhcxEW8FMuBW8lEKAMTT8gJjPa/lTVZ5PILidJQwrZ95y1rkCgA6GsSi5bOuVS7eG5mEDENdDDvgE8RfpI0hTbxarSBDx0MZ0p2waMrQ6r4Qb1TCv9HdV+d/vm7J4zJ5AqnzzaHWCteoEc9UtpBBSCQw/qk3na+H5mDWfyyfYavhmDPsASOw1H4M3ZEV0bOP7OdU1dK7YYPDQqggJPACV/kfcMro3+b7tZ5+z09fzCdjezb2AiL2O6m4+DIB10CkaumxrWUq3li+nE6Afl8owDYoHpqEuz9XB3BV1sy8O5lttKuBMBBxhk6H4bGWZjrbbV/uXq/LoPGOnRXWrq/JW1+D4H02zz3JzvD5DfwQgMiH9+vWHhJXv3Ccak26rV2m/ei8kEyzeiESG2k39qdlV5b/mAGq8HNNYvalq9aZqsvLMQodXndWwgzpN2GzFabf78JbLtYcVlSYqVFTuQBF1NXGLRa25tKg1l4HSWkrpQnVB0xmnYL6l2PYnLmD6UPA6+Gnux4hmftWGGNO2ZbTPReBxrIHnDFjNFqFt01TZj3MD6wFGa+BxA1YiiHsYJ4a46xQNnWDeQieYh6AHE7rEHZTMiJ6Elre+k4jqvoDgieAh8MMwEdxdn3jsKu2wqzSAPZjOBeqgVJyDTaKXeor7Etz2Og5A+JSyIPwS2u369tHQqWq3F/YZgj5N4xLwtRRG2IzrkOgYwVeJZX2FsWCFQYUCRXLmiyxzs63r7Al8FDX3iD+o7vYx9ukKXk4lJBuexiheYDUVD5V8lVDBO6GCT4VC5EHP3slsR/TVFPuiAW/HHHPg94Oks3W4G6SGb208B3Bcr/nphwBM4WgZPYkybU/87NOJHQgdmEZA2HEilX9y1M6HBQVDOjGH3qZoPosJwPlmFw0z7fbKxN+RzcIGUK6GHEHqdLYhst53xa8M2CY65kCQOtVTkP0AQJyjdfQVCiakvUPB3rHxQgoLaAHhxwsU7PeC1j+qIZ45xEuWqpPs3TwuJ7KgOrIJtnf189tzyDHCm2G0UMK6uSXeKej2lE3u7MOXjyuX9Y4wpefCbnMD7QpmDvFCdS9Uu0LfRlxX61tCrlslDrV70FYvWiCV7abZPt24f2V5Y6p/ftjznrXYri3w2pFh71qne4WjLIruhZDbqiqr9VcwJg4rcH3ZjHcXvMx7SaOvF1j4K4LijjXjdBZ093H3pdk35xoY3bcHFBaTbh9/82wOP7sLpJXpdSyji4spimi/kbC/TBP4VuXwHAZjaI15G5dPpl0+W3h1bfe6oMhLbsAcBEm9L7D9U1a0O+3Vb67BMn6XyhGRClEqENUUcSqQSBWSjCDF7Y9AmjCkNbUvcBH78hZGdk+PbNNuX9kiyHZ99pUt9vD6+vo/bBecww==" \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index 82f0890e..ec5df6ec 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -3,20 +3,22 @@ --dark-hl-0: #9CDCFE; --light-hl-1: #000000; --dark-hl-1: #D4D4D4; - --light-hl-2: #AF00DB; - --dark-hl-2: #C586C0; - --light-hl-3: #795E26; - --dark-hl-3: #DCDCAA; - --light-hl-4: #A31515; - --dark-hl-4: #CE9178; - --light-hl-5: #0000FF; - --dark-hl-5: #569CD6; - --light-hl-6: #0070C1; - --dark-hl-6: #4FC1FF; - --light-hl-7: #008000; - --dark-hl-7: #6A9955; + --light-hl-2: #795E26; + --dark-hl-2: #DCDCAA; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-hl-4: #0000FF; + --dark-hl-4: #569CD6; + --light-hl-5: #AF00DB; + --dark-hl-5: #C586C0; + --light-hl-6: #008000; + --dark-hl-6: #6A9955; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; --light-hl-8: #098658; --dark-hl-8: #B5CEA8; + --light-hl-9: #267F99; + --dark-hl-9: #4EC9B0; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -31,6 +33,7 @@ --hl-6: var(--light-hl-6); --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); --code-background: var(--light-code-background); } } @@ -44,6 +47,7 @@ --hl-6: var(--dark-hl-6); --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); --code-background: var(--dark-code-background); } } @@ -57,6 +61,7 @@ --hl-6: var(--light-hl-6); --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); --code-background: var(--light-code-background); } @@ -70,6 +75,7 @@ --hl-6: var(--dark-hl-6); --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); --code-background: var(--dark-code-background); } @@ -82,4 +88,5 @@ .hl-6 { color: var(--hl-6); } .hl-7 { color: var(--hl-7); } .hl-8 { color: var(--hl-8); } -pre, code { background: var(--code-background); } +.hl-9 { color: var(--hl-9); } +pre, code, math[display='block'] { background: var(--code-background); } diff --git a/docs/assets/icons.js b/docs/assets/icons.js new file mode 100644 index 00000000..4fbadc5a --- /dev/null +++ b/docs/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `MMNEPVFCICPMFPCPTTAAATR`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); + } + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/docs/assets/icons.svg b/docs/assets/icons.svg new file mode 100644 index 00000000..be7798fc --- /dev/null +++ b/docs/assets/icons.svg @@ -0,0 +1 @@ +MMNEPVFCICPMFPCPTTAAATR \ No newline at end of file diff --git a/docs/assets/main.js b/docs/assets/main.js index 4c8fa615..b0eda9ed 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,7 +1,9 @@ "use strict"; -"use strict";(()=>{var Se=Object.create;var re=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Te(e))!Qe.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=we(e,i))||n.enumerable});return t};var Ce=(t,e,r)=>(r=t!=null?Se(ke(t)):{},Ie(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t));var ae=Pe((se,oe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var d=t.utils.clone(r)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(n.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(r+=n[u+1]*i[d+1],u+=2,d+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),y;m in s.node.edges?y=s.node.edges[m]:(y=new t.TokenSet,s.node.edges[m]=y),s.str.length==1&&(y.final=!0),i.push({node:y,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof se=="object"?oe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ne=[];function G(t,e){ne.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){ne.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n,app:this}),n.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),r=e?.parentElement;for(;r&&!r.classList.contains(".tsd-navigation");)r instanceof HTMLDetailsElement&&(r.open=!0),r=r.parentElement;if(e){let n=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=n}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let r=e.parentElement;for(;r&&r.tagName!=="SECTION";)r=r.parentElement;if(r&&r.offsetParent==null){this.alwaysVisibleMember=r,r.classList.add("always-visible");let n=document.createElement("p");n.classList.add("warning"),n.textContent="This member is normally hidden due to your filter settings.",r.prepend(n)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let r;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(r),r=setTimeout(()=>{e.classList.remove("visible"),r=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout(()=>t(),e)}};var ce=Ce(ae());function de(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("tsd-search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Oe(t,n,r,s)}function Oe(t,e,r,n){r.addEventListener("input",ie(()=>{Re(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Fe(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function _e(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ce.Index.load(window.searchData.index))}function Re(t,e,r,n){if(_e(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${le(l.parent,i)}.${u}`);let d=document.createElement("li");d.classList.value=l.classes??"";let m=document.createElement("a");m.href=n.base+l.url,m.innerHTML=u,d.append(m),e.appendChild(d)}}function ue(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function Fe(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function le(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(K(t.substring(s))),i.join("")}var Me={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Me[e])}var P=class{constructor(e){this.el=e.el,this.app=e.app}};var M="mousedown",fe="mousemove",N="mouseup",J={x:0,y:0},he=!1,ee=!1,De=!1,D=!1,pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(pe?"is-mobile":"not-mobile");pe&&"ontouchstart"in document.documentElement&&(De=!0,M="touchstart",fe="touchmove",N="touchend");document.addEventListener(M,t=>{ee=!0,D=!1;let e=M=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=M=="touchstart"?t.targetTouches[0]:t,r=J.x-(e.pageX||0),n=J.y-(e.pageY||0);D=Math.sqrt(r*r+n*n)>10}});document.addEventListener(N,()=>{ee=!1});document.addEventListener("click",t=>{he&&(t.preventDefault(),t.stopImmediatePropagation(),he=!1)});var X=class extends P{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(M,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){D||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!D&&this.active&&r.target.closest(".col-sidebar")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),n.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var me=document.head.appendChild(document.createElement("style"));me.dataset.for="filters";var Y=class extends P{constructor(r){super(r);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),me.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}de();G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var ge=document.getElementById("tsd-theme");ge&&ve(ge);var Ae=new U;Object.defineProperty(window,"app",{value:Ae});document.querySelectorAll("summary a").forEach(t=>{t.addEventListener("click",()=>{location.assign(t.href)})});})(); +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings.","hierarchy_expand":"Expand","hierarchy_collapse":"Collapse","folder":"Folder","search_index_not_available":"The search index is not available","search_no_results_found_for_0":"No results found for {0}","kind_1":"Project","kind_2":"Module","kind_4":"Namespace","kind_8":"Enumeration","kind_16":"Enumeration Member","kind_32":"Variable","kind_64":"Function","kind_128":"Class","kind_256":"Interface","kind_512":"Constructor","kind_1024":"Property","kind_2048":"Method","kind_4096":"Call Signature","kind_8192":"Index Signature","kind_16384":"Constructor Signature","kind_32768":"Parameter","kind_65536":"Type Literal","kind_131072":"Type Parameter","kind_262144":"Accessor","kind_524288":"Get Signature","kind_1048576":"Set Signature","kind_2097152":"Type Alias","kind_4194304":"Reference","kind_8388608":"Document"}; +(()=>{var Ke=Object.create;var he=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Xe=Object.getPrototypeOf,Ye=Object.prototype.hasOwnProperty;var et=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var tt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ze(e))!Ye.call(t,i)&&i!==n&&he(t,i,{get:()=>e[i],enumerable:!(r=Ge(e,i))||r.enumerable});return t};var nt=(t,e,n)=>(n=t!=null?Ke(Xe(t)):{},tt(e||!t||!t.__esModule?he(n,"default",{value:t,enumerable:!0}):n,t));var ye=et((me,ge)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=(function(e){return function(n){e.console&&console.warn&&console.warn(n)}})(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,l],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(oc?d+=2:a==c&&(n+=r[l+1]*i[d+1],l+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new t.TokenSet;s.node.edges["*"]=c}if(s.str.length==0&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),f=s.str.charAt(1),p;f in s.node.edges?p=s.node.edges[f]:(p=new t.TokenSet,s.node.edges[f]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),c=0;c1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}if(s.type===t.QueryLexer.TERM)return t.QueryParser.parseTerm;var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},(function(e,n){typeof define=="function"&&define.amd?define(n):typeof me=="object"?ge.exports=n():e.lunr=n()})(this,function(){return t})})()});var M,G={getItem(){return null},setItem(){}},K;try{K=localStorage,M=K}catch{K=G,M=G}var S={getItem:t=>M.getItem(t),setItem:(t,e)=>M.setItem(t,e),disableWritingLocalStorage(){M=G},disable(){localStorage.clear(),M=G},enable(){M=K}};window.TypeDoc||={disableWritingLocalStorage(){S.disableWritingLocalStorage()},disableLocalStorage:()=>{S.disable()},enableLocalStorage:()=>{S.enable()}};window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse",search_index_not_available:"The search index is not available",search_no_results_found_for_0:"No results found for {0}",folder:"Folder",kind_1:"Project",kind_2:"Module",kind_4:"Namespace",kind_8:"Enumeration",kind_16:"Enumeration Member",kind_32:"Variable",kind_64:"Function",kind_128:"Class",kind_256:"Interface",kind_512:"Constructor",kind_1024:"Property",kind_2048:"Method",kind_4096:"Call Signature",kind_8192:"Index Signature",kind_16384:"Constructor Signature",kind_32768:"Parameter",kind_65536:"Type Literal",kind_131072:"Type Parameter",kind_262144:"Accessor",kind_524288:"Get Signature",kind_1048576:"Set Signature",kind_2097152:"Type Alias",kind_4194304:"Reference",kind_8388608:"Document"};var pe=[];function X(t,e){pe.push({selector:e,constructor:t})}var Z=class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){pe.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!rt(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function rt(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var fe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var Ie=nt(ye(),1);async function R(t){let e=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),r=new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate")),i=await new Response(r).text();return JSON.parse(i)}var Y="closing",ae="tsd-overlay";function it(){let t=Math.abs(window.innerWidth-document.documentElement.clientWidth);document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`}function st(){document.body.style.removeProperty("overflow"),document.body.style.removeProperty("padding-right")}function Ee(t,e){t.addEventListener("animationend",()=>{t.classList.contains(Y)&&(t.classList.remove(Y),document.getElementById(ae)?.remove(),t.close(),st())}),t.addEventListener("cancel",n=>{n.preventDefault(),ve(t)}),e?.closeOnClick&&document.addEventListener("click",n=>{t.open&&!t.contains(n.target)&&ve(t)},!0)}function xe(t){if(t.open)return;let e=document.createElement("div");e.id=ae,document.body.appendChild(e),t.showModal(),it()}function ve(t){if(!t.open)return;document.getElementById(ae)?.classList.add(Y),t.classList.add(Y)}var I=class{el;app;constructor(e){this.el=e.el,this.app=e.app}};var be=document.head.appendChild(document.createElement("style"));be.dataset.for="filters";var le={};function Le(t){for(let e of t.split(/\s+/))if(le.hasOwnProperty(e)&&!le[e])return!0;return!1}var ee=class extends I{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),be.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=S.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){S.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),le[`tsd-is-${this.el.name}`]=this.value,this.app.filterChanged(),this.app.updateIndexVisibility()}};var we=0;async function Se(t,e){if(!window.searchData)return;let n=await R(window.searchData);t.data=n,t.index=Ie.Index.load(n.index),e.innerHTML=""}function _e(){let t=document.getElementById("tsd-search-trigger"),e=document.getElementById("tsd-search"),n=document.getElementById("tsd-search-input"),r=document.getElementById("tsd-search-results"),i=document.getElementById("tsd-search-script"),s=document.getElementById("tsd-search-status");if(!(t&&e&&n&&r&&i&&s))throw new Error("Search controls missing");let o={base:document.documentElement.dataset.base};o.base.endsWith("/")||(o.base+="/"),i.addEventListener("error",()=>{let a=window.translations.search_index_not_available;Pe(s,a)}),i.addEventListener("load",()=>{Se(o,s)}),Se(o,s),ot({trigger:t,searchEl:e,results:r,field:n,status:s},o)}function ot(t,e){let{field:n,results:r,searchEl:i,status:s,trigger:o}=t;Ee(i,{closeOnClick:!0});function a(){xe(i),n.setSelectionRange(0,n.value.length)}o.addEventListener("click",a),n.addEventListener("input",fe(()=>{at(r,n,s,e)},200)),n.addEventListener("keydown",l=>{if(r.childElementCount===0||l.ctrlKey||l.metaKey||l.altKey)return;let d=n.getAttribute("aria-activedescendant"),f=d?document.getElementById(d):null;if(f){let p=!1,v=!1;switch(l.key){case"Home":case"End":case"ArrowLeft":case"ArrowRight":v=!0;break;case"ArrowDown":case"ArrowUp":p=l.shiftKey;break}(p||v)&&ke(n)}if(!l.shiftKey)switch(l.key){case"Enter":f?.querySelector("a")?.click();break;case"ArrowUp":Te(r,n,f,-1),l.preventDefault();break;case"ArrowDown":Te(r,n,f,1),l.preventDefault();break}});function c(){ke(n)}n.addEventListener("change",c),n.addEventListener("blur",c),n.addEventListener("click",c),document.body.addEventListener("keydown",l=>{if(l.altKey||l.metaKey||l.shiftKey)return;let d=l.ctrlKey&&l.key==="k",f=!l.ctrlKey&&!ut()&&l.key==="/";(d||f)&&(l.preventDefault(),a())})}function at(t,e,n,r){if(!r.index||!r.data)return;t.innerHTML="",n.innerHTML="",we+=1;let i=e.value.trim(),s;if(i){let a=i.split(" ").map(c=>c.length?`*${c}*`:"").join(" ");s=r.index.search(a).filter(({ref:c})=>{let l=r.data.rows[Number(c)].classes;return!l||!Le(l)})}else s=[];if(s.length===0&&i){let a=window.translations.search_no_results_found_for_0.replace("{0}",` "${te(i)}" `);Pe(n,a);return}for(let a=0;ac.score-a.score);let o=Math.min(10,s.length);for(let a=0;a`,f=Ce(c.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(f+=` (score: ${s[a].score.toFixed(2)})`),c.parent&&(f=` + ${Ce(c.parent,i)}.${f}`);let p=document.createElement("li");p.id=`tsd-search:${we}-${a}`,p.role="option",p.ariaSelected="false",p.classList.value=c.classes??"";let v=document.createElement("a");v.tabIndex=-1,v.href=r.base+c.url,v.innerHTML=d+`${f}`,p.append(v),t.appendChild(p)}}function Te(t,e,n,r){let i;if(r===1?i=n?.nextElementSibling||t.firstElementChild:i=n?.previousElementSibling||t.lastElementChild,i!==n){if(!i||i.role!=="option"){console.error("Option missing");return}i.ariaSelected="true",i.scrollIntoView({behavior:"smooth",block:"nearest"}),e.setAttribute("aria-activedescendant",i.id),n?.setAttribute("aria-selected","false")}}function ke(t){let e=t.getAttribute("aria-activedescendant");(e?document.getElementById(e):null)?.setAttribute("aria-selected","false"),t.setAttribute("aria-activedescendant","")}function Ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(te(t.substring(s,o)),`${te(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(te(t.substring(s))),i.join("")}var lt={"&":"&","<":"<",">":">","'":"'",'"':"""};function te(t){return t.replace(/[&<>"'"]/g,e=>lt[e])}function Pe(t,e){t.innerHTML=e?`
${e}
`:""}var ct=["button","checkbox","file","hidden","image","radio","range","reset","submit"];function ut(){let t=document.activeElement;return t?t.isContentEditable||t.tagName==="TEXTAREA"||t.tagName==="SEARCH"?!0:t.tagName==="INPUT"&&!ct.includes(t.type):!1}var D="mousedown",Me="mousemove",$="mouseup",ne={x:0,y:0},Qe=!1,ce=!1,dt=!1,F=!1,Oe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Oe?"is-mobile":"not-mobile");Oe&&"ontouchstart"in document.documentElement&&(dt=!0,D="touchstart",Me="touchmove",$="touchend");document.addEventListener(D,t=>{ce=!0,F=!1;let e=D=="touchstart"?t.targetTouches[0]:t;ne.y=e.pageY||0,ne.x=e.pageX||0});document.addEventListener(Me,t=>{if(ce&&!F){let e=D=="touchstart"?t.targetTouches[0]:t,n=ne.x-(e.pageX||0),r=ne.y-(e.pageY||0);F=Math.sqrt(n*n+r*r)>10}});document.addEventListener($,()=>{ce=!1});document.addEventListener("click",t=>{Qe&&(t.preventDefault(),t.stopImmediatePropagation(),Qe=!1)});var re=class extends I{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener($,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(D,n=>this.onDocumentPointerDown(n)),document.addEventListener($,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){F||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!F&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var ue=new Map,de=class{open;accordions=[];key;constructor(e,n){this.key=e,this.open=n}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",()=>{this.toggle(e.open)})}toggle(e){for(let n of this.accordions)n.open=e;S.setItem(this.key,e.toString())}},ie=class extends I{constructor(e){super(e);let n=this.el.querySelector("summary"),r=n.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)});let i=`tsd-accordion-${n.dataset.key??n.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`,s;if(ue.has(i))s=ue.get(i);else{let o=S.getItem(i),a=o?o==="true":this.el.open;s=new de(i,a),ue.set(i,s)}s.add(this.el)}};function He(t){let e=S.getItem("tsd-theme")||"os";t.value=e,Ae(e),t.addEventListener("change",()=>{S.setItem("tsd-theme",t.value),Ae(t.value)})}function Ae(t){document.documentElement.dataset.theme=t}var se;function Ne(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Re),Re())}async function Re(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let e=await R(window.navigationData);se=document.documentElement.dataset.base,se.endsWith("/")||(se+="/"),t.innerHTML="";for(let n of e)Ve(n,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Ve(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',De(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let c=a.appendChild(document.createElement("ul"));c.className="tsd-nested-navigation";for(let l of t.children)Ve(l,c,i)}else De(t,r,t.class)}function De(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));if(r.href=se+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&(r.classList.add("current"),r.ariaCurrent="page"),t.kind){let i=window.translations[`kind_${t.kind}`].replaceAll('"',""");r.innerHTML=``}r.appendChild(Fe(t.text,document.createElement("span")))}else{let r=e.appendChild(document.createElement("span")),i=window.translations.folder.replaceAll('"',""");r.innerHTML=``,r.appendChild(Fe(t.text,document.createElement("span")))}}function Fe(t,e){let n=t.split(/(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(?<=[_-])(?=[^_-])/);for(let r=0;r{let i=r.target;for(;i.parentElement&&i.parentElement.tagName!="LI";)i=i.parentElement;i.dataset.dropdown&&(i.dataset.dropdown=String(i.dataset.dropdown!=="true"))});let t=new Map,e=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let i=r.querySelector("ul");t.has(r.dataset.refl)?e.add(r.dataset.refl):i&&t.set(r.dataset.refl,i)}for(let r of e)n(r);function n(r){let i=t.get(r).cloneNode(!0);i.querySelectorAll("[id]").forEach(s=>{s.removeAttribute("id")}),i.querySelectorAll("[data-dropdown]").forEach(s=>{s.dataset.dropdown="false"});for(let s of document.querySelectorAll(`[data-refl="${r}"]`)){let o=gt(),a=s.querySelector("ul");s.insertBefore(o,a),o.dataset.dropdown=String(!!a),a||s.appendChild(i.cloneNode(!0))}}}function pt(){let t=document.getElementById("tsd-hierarchy-script");t&&(t.addEventListener("load",Be),Be())}async function Be(){let t=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!t||!window.hierarchyData)return;let e=+t.dataset.refl,n=await R(window.hierarchyData),r=t.querySelector("ul"),i=document.createElement("ul");if(i.classList.add("tsd-hierarchy"),ft(i,n,e),r.querySelectorAll("li").length==i.querySelectorAll("li").length)return;let s=document.createElement("span");s.classList.add("tsd-hierarchy-toggle"),s.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",s),s.insertAdjacentText("beforebegin",", "),s.addEventListener("click",()=>{s.textContent===window.translations.hierarchy_expand?(r.insertAdjacentElement("afterend",i),r.remove(),s.textContent=window.translations.hierarchy_collapse):(i.insertAdjacentElement("afterend",r),i.remove(),s.textContent=window.translations.hierarchy_expand)})}function ft(t,e,n){let r=e.roots.filter(i=>mt(e,i,n));for(let i of r)t.appendChild(je(e,i,n))}function je(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let i=t.reflections[e],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),e===n){let o=s.appendChild(document.createElement("span"));o.textContent=i.name,o.classList.add("tsd-hierarchy-target")}else{for(let a of i.uniqueNameParents||[]){let c=t.reflections[a],l=s.appendChild(document.createElement("a"));l.textContent=c.name,l.href=oe+c.url,l.className=c.class+" tsd-signature-type",s.append(document.createTextNode("."))}let o=s.appendChild(document.createElement("a"));o.textContent=t.reflections[e].name,o.href=oe+i.url,o.className=i.class+" tsd-signature-type"}if(i.children){let o=s.appendChild(document.createElement("ul"));o.classList.add("tsd-hierarchy");for(let a of i.children){let c=je(t,a,n,r);c&&o.appendChild(c)}}return r.delete(e),s}function mt(t,e,n){if(e===n)return!0;let r=new Set,i=[t.reflections[e]];for(;i.length;){let s=i.pop();if(!r.has(s)){r.add(s);for(let o of s.children||[]){if(o===n)return!0;i.push(t.reflections[o])}}}return!1}function gt(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","20"),t.setAttribute("height","20"),t.innerHTML='',t}X(re,"a[data-toggle]");X(ie,".tsd-accordion");X(ee,".tsd-filter-item input[type=checkbox]");var qe=document.getElementById("tsd-theme");qe&&He(qe);var yt=new Z;Object.defineProperty(window,"app",{value:yt});_e();Ne();$e();"virtualKeyboard"in navigator&&(navigator.virtualKeyboard.overlaysContent=!0);})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js new file mode 100644 index 00000000..9c4e78ed --- /dev/null +++ b/docs/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "eJylnFtv47gVx79LnhdtZwbby7w5TmZhTAZ2badFsVgsFIljcyJTqkRnxy32uxe6WbycG93HmH/+DiXeDg+P8vN/76z6bu8+3i1qvaxM98eTelPl3Q93dWaPdx/vlDmf2j8GxX842lOnedWmuPv4199/cDmf1QVjTEV4/cdSnZSx7aLWj01TNW1IiQRkW5alVsbOjLzM2lYNz9MX+bXfvQ/rDw8NA4YyhvBZXbq2goSxjCScC22fqgPCcEopyrIyhba6Mjtlt+dSwTRIJaXyRI42dSzWZX45STJvuqnMNEwAlC+gWD811bmGKdciqv6mQGqPBWRd1Zw08CaG3/ma0xTBCFM5T1pWxqi860gSGMhE3O7v5TEzB8WhA6WYLuEKiSRKyNg8bHY2s+eWhPkqktpU31SOjHSnkGF8vywr81UjC00goFhbVWbdEGiPut6fa2yxAWU0t63OTa4W/QAj5iUilLMlWDHR2ka/nC36FgCZhLsyrc1MzmBdlYR67RSS6qpE1AofBL5CQqNJLKUq1aJt9YHYHmINR8Q5XO29MhnWjrmMIjy3qmFGWSTheCvzpinYXM6RcAbr+fTz7L6s8tfHQtvspVQzSBurmq9Z3vlAsc7Hvv/xzzB2q7KCQ3YaErdZfVaXZaMyizTPEfAgvEnXYh6yy6taMaSrhsRNY0bQC6BUDsebG8lI6OgQf6kK9wDi8lyFBLV+6XdQnugKSfA/No/moI16ULludWWeqgMMBoQU+P5cvvpr11bVVWNBOCaWGHg2SSZiOWVkeVT56+BqgFSnnMU8NyVHukpImHOOIeZ6LJNC0eEfisTAc6mELZ2lKXBZi0dhGvhUvclaPUil8Oe6kLyOQcZA/aCAT4qDAn71B9XoN1V0M4PpJVCZgH5QpZKhB2UCGu1+QEdjbaZLVfALN6gk0efT6TIsoAQ1EFHAKQIxe0CLum6wwYqq00wQwwMTpxlAexKWpsGJOYeJSQOnF1UUqniqDtps1b/PqrXrs63P9p/aHvu5Z+B5KapJmp5jRsuqvsBGfE0CrnfHJMxemAr+pEur3FAqwx/1CWb2WXNQyJuHlFI0MfhDlRCJD3dfI8R1QRr2xfYiIZCaMaGKRHZxo2HNRNrnCCjQp6o5ZdaqYvFdV2HQyuEBOgr7kzKq0bnME8bEtAHbLS19OK3t9C3hCmJi0kAXWVoU/VYHQx0BD+pd5K4RBOuqYXHEzHHKWQw6W66lIsQuP6pTRoMGDYVbQdcpDmqFXamEGPBOxQOh9yoRyh6rRv9HFX2M5XrMwbCwOsFEu1XtuRTxRykJv89aNY79PloFc0MVi3zSrQ2iaDgZEJMG+mPb38+qgTdhp5zGkHdiHpC9FyPQMiyP7OfruhkW/r4niIGAqUkT6LWZSyavzgLg4EYMYRGY5ipIFBDudzlIkD+AdAPNvRSAWaFKiGRpAtCwfBGgQcCDrrFegnXV8LhpNSRok4SFRZMJh0bSJLgQzEPdIY8zXRWL5MafcORdL2Jw0lUih10v5ATUq1aA96+kpuP8JmuyE2mKqpdsNtXcjWb6/VdupZeLjRA7dSRjoeMlE/dePJkQyrwER8QCnUsnHOiIaGCVZ6XvcSDQWJgKbglHBZWTRjbZQZt+9sHUuZzGhIkpHgNKTgkBUw4JgpiKBZAw5SfmQEk/MAo/43kKAcrJNKN4jkwAXdfEgu1JaBiU9OGhsMSPGARnfgQwPPsjADLpHy5WkAISwYelDeMNpSIEmkYCEclUEtKAlC3Hwlf9IBm/8kfgcFYJxMYzSxA0nFoCofH0EgwdZWCAWDAbA0HyOAHKNhdqOXIENIhIWfF4TNoKgKVhLAJKXnEhWAJLgEGDXisu1LUikl9Cjnw2YBkwIRHLggFwTmAR5zkiFki3TNSmtvOZKL8vEFHAJ33StnPKe99DFUO4gb/UE9SjzJbdbc6iJcKLnoJCfcnqWptDd84EQU65EENE8iMVhVxvFrIoOSQkwc3hizq9dMEhJMrrKShU2IF0MhOqTjCRcJEpqplgWhLWpqskGIucpOkALH1cEpDUEPggLm8HXv+GZqSaTTXjbabJz4rWvrkJt5m+wWSKoUT84A9IDczqBBNDrFtmYNKS+IfNQ2azrfraqPa4VW1dmRZe1GEpCe/Pe/dZ/qrMuDKMO1WUntPot2yMWFptkFDs/8EjmzmcJYkrRU8hQOE9NJcLMMQO6ykY1HS2pR/QVwmR1IO6GiGOfmBfRSGnPYF4Yl8igaHP6gokoOtOJWheoL0B32WprmvV4CE1ScUkw0ReHqK9AX/DcwEVEw0z2+TNvkhUUW6CR7txGHLIxUI5mMvKQNWJJogXA2oT8cQKhKrlJoSNT2u3uMkJrZ1iCZIO9bVJeP59uMoktOSt+FoJXvA+5K9hOikIoL40BS5Ys247t4T1xAZSwYKe9KUSONtaaSu3qi4zJGIfaES4inELQpkUyj+w4LzjagXdMsskUAFQAPOOh9SbBIRyMD+rbjohC4/EaWfgUI1+fgIJOTDzhmXvdfY3GVAnkcOuTh6RSkbW4EyRHSTpFmrIi+bOPmtfx6ifIAUcVZMm+jAF0c+ugAdRKduegkfhzymKrIz5GXgXuAIK1MVZiPczF3OQlRlMophJwIPm73GyEn1PsJSDkzgRAEsonwo5ANFnczEFGSLy69+MavYX98MUe6mvnxBfiwPSn/72l3c/vndpkx8JstxCljReDPVZMiAtFEiJu6qxn9UF443FPM0ev6j8mBndnmKWU8iR3BRF6EHDco4XfIXTBYpKndudbTKrDtFzM3LO2qcst+3uYvK9PqnqbDdVqfPICKzi2KvhsBbCxp/Z2s6TbYraC9j2H4VFXK4CaxHOrx/pRFp9TCLT6kcgn00v4k4emYQ/aVk7c2ra43erTAHgYwlHje5Sn5uymxGP5hxNQUqbYkdmIYHdX7Iu8ly1bfC/00ZsKEghrl++Ubz1yzeeZo9VEQ228Weu9iZrlLGrqLOn37n62+y3btqF1cefhbXfIdXfsfWnM3TU/rmEZwypPsOS/SlavMJyAe/cGG/xgDYJRCajCxYbVCizMM91vPG+huPuVN6oaAkffuXqds7/8C+3wvpzCceYHUaYFJaz/gTmh71lje7+wQrji30QuGEOCnfFfBDuhTkw2hMDgZETFuNARyyAgT6Yi0L9MA+Eu2Azi3bDPJzYA5vpSV6YZ0y2Kc6W5BsjakZuQIbGt0SHSm+LKNDbEWFctCsGsGBDdCHApuhV3j7ut/9a3D89/rrbL/bPu1+X64fHHcSClQQaWsRmHLaQfZCtYTOIXsc+vP/9l/8BfugTwA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index eb26871e..707f1b5b 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"rows\":[{\"kind\":256,\"name\":\"IPermitClient\",\"url\":\"interfaces/IPermitClient.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"config\",\"url\":\"interfaces/IPermitClient.html#config\",\"classes\":\"\",\"parent\":\"IPermitClient\"},{\"kind\":1024,\"name\":\"api\",\"url\":\"interfaces/IPermitClient.html#api\",\"classes\":\"\",\"parent\":\"IPermitClient\"},{\"kind\":1024,\"name\":\"elements\",\"url\":\"interfaces/IPermitClient.html#elements\",\"classes\":\"\",\"parent\":\"IPermitClient\"},{\"kind\":2048,\"name\":\"check\",\"url\":\"interfaces/IPermitClient.html#check\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitClient\"},{\"kind\":2048,\"name\":\"bulkCheck\",\"url\":\"interfaces/IPermitClient.html#bulkCheck\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitClient\"},{\"kind\":2048,\"name\":\"getUserPermissions\",\"url\":\"interfaces/IPermitClient.html#getUserPermissions\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitClient\"},{\"kind\":2048,\"name\":\"checkAllTenants\",\"url\":\"interfaces/IPermitClient.html#checkAllTenants\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitClient\"},{\"kind\":128,\"name\":\"Permit\",\"url\":\"classes/Permit.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Permit.html#constructor\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":1024,\"name\":\"config\",\"url\":\"classes/Permit.html#config\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":1024,\"name\":\"api\",\"url\":\"classes/Permit.html#api\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":1024,\"name\":\"elements\",\"url\":\"classes/Permit.html#elements\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":2048,\"name\":\"check\",\"url\":\"classes/Permit.html#check\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":2048,\"name\":\"bulkCheck\",\"url\":\"classes/Permit.html#bulkCheck\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":2048,\"name\":\"checkAllTenants\",\"url\":\"classes/Permit.html#checkAllTenants\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":2048,\"name\":\"getUserPermissions\",\"url\":\"classes/Permit.html#getUserPermissions\",\"classes\":\"\",\"parent\":\"Permit\"},{\"kind\":256,\"name\":\"IPermitConfig\",\"url\":\"interfaces/IPermitConfig.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"interfaces/IPermitConfig.html#token\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"pdp\",\"url\":\"interfaces/IPermitConfig.html#pdp\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"apiUrl\",\"url\":\"interfaces/IPermitConfig.html#apiUrl\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"log\",\"url\":\"interfaces/IPermitConfig.html#log\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"multiTenancy\",\"url\":\"interfaces/IPermitConfig.html#multiTenancy\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"timeout\",\"url\":\"interfaces/IPermitConfig.html#timeout\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"throwOnError\",\"url\":\"interfaces/IPermitConfig.html#throwOnError\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"apiContext\",\"url\":\"interfaces/IPermitConfig.html#apiContext\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"axiosInstance\",\"url\":\"interfaces/IPermitConfig.html#axiosInstance\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"proxyFactsViaPdp\",\"url\":\"interfaces/IPermitConfig.html#proxyFactsViaPdp\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":1024,\"name\":\"factsSyncTimeout\",\"url\":\"interfaces/IPermitConfig.html#factsSyncTimeout\",\"classes\":\"\",\"parent\":\"IPermitConfig\"},{\"kind\":256,\"name\":\"IUser\",\"url\":\"interfaces/IUser.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/IUser.html#key\",\"classes\":\"\",\"parent\":\"IUser\"},{\"kind\":1024,\"name\":\"firstName\",\"url\":\"interfaces/IUser.html#firstName\",\"classes\":\"\",\"parent\":\"IUser\"},{\"kind\":1024,\"name\":\"lastName\",\"url\":\"interfaces/IUser.html#lastName\",\"classes\":\"\",\"parent\":\"IUser\"},{\"kind\":1024,\"name\":\"email\",\"url\":\"interfaces/IUser.html#email\",\"classes\":\"\",\"parent\":\"IUser\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/IUser.html#attributes\",\"classes\":\"\",\"parent\":\"IUser\"},{\"kind\":4194304,\"name\":\"IAction\",\"url\":\"types/IAction.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"IResource\",\"url\":\"interfaces/IResource.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/IResource.html#type\",\"classes\":\"\",\"parent\":\"IResource\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/IResource.html#key\",\"classes\":\"\",\"parent\":\"IResource\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/IResource.html#tenant\",\"classes\":\"\",\"parent\":\"IResource\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/IResource.html#attributes\",\"classes\":\"\",\"parent\":\"IResource\"},{\"kind\":128,\"name\":\"PermitConnectionError\",\"url\":\"classes/PermitConnectionError.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/PermitConnectionError.html#constructor\",\"classes\":\"\",\"parent\":\"PermitConnectionError\"},{\"kind\":128,\"name\":\"PermitError\",\"url\":\"classes/PermitError.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/PermitError.html#constructor\",\"classes\":\"\",\"parent\":\"PermitError\"},{\"kind\":128,\"name\":\"PermitPDPStatusError\",\"url\":\"classes/PermitPDPStatusError.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/PermitPDPStatusError.html#constructor\",\"classes\":\"\",\"parent\":\"PermitPDPStatusError\"},{\"kind\":256,\"name\":\"Context\",\"url\":\"interfaces/Context.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"ContextTransform\",\"url\":\"interfaces/ContextTransform.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"ApiContext\",\"url\":\"classes/ApiContext.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ApiContext.html#constructor\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":2048,\"name\":\"_saveApiKeyAccessibleScope\",\"url\":\"classes/ApiContext.html#_saveApiKeyAccessibleScope\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"permittedAccessLevel\",\"url\":\"classes/ApiContext.html#permittedAccessLevel\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"level\",\"url\":\"classes/ApiContext.html#level\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"contextLevel\",\"url\":\"classes/ApiContext.html#contextLevel\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"organization\",\"url\":\"classes/ApiContext.html#organization\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"project\",\"url\":\"classes/ApiContext.html#project\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"environment\",\"url\":\"classes/ApiContext.html#environment\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":2048,\"name\":\"setOrganizationLevelContext\",\"url\":\"classes/ApiContext.html#setOrganizationLevelContext\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":2048,\"name\":\"setProjectLevelContext\",\"url\":\"classes/ApiContext.html#setProjectLevelContext\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":2048,\"name\":\"setEnvironmentLevelContext\",\"url\":\"classes/ApiContext.html#setEnvironmentLevelContext\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":262144,\"name\":\"environmentContext\",\"url\":\"classes/ApiContext.html#environmentContext\",\"classes\":\"\",\"parent\":\"ApiContext\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/ApiContext.html#environmentContext.environmentContext-1.__type\",\"classes\":\"\",\"parent\":\"ApiContext.environmentContext.environmentContext\"},{\"kind\":1024,\"name\":\"projId\",\"url\":\"classes/ApiContext.html#environmentContext.environmentContext-1.__type.projId\",\"classes\":\"\",\"parent\":\"ApiContext.environmentContext.environmentContext.__type\"},{\"kind\":1024,\"name\":\"envId\",\"url\":\"classes/ApiContext.html#environmentContext.environmentContext-1.__type.envId\",\"classes\":\"\",\"parent\":\"ApiContext.environmentContext.environmentContext.__type\"},{\"kind\":128,\"name\":\"PermitContextError\",\"url\":\"classes/PermitContextError.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/PermitContextError.html#constructor\",\"classes\":\"\",\"parent\":\"PermitContextError\"},{\"kind\":8,\"name\":\"ApiKeyLevel\",\"url\":\"enums/ApiKeyLevel.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"WAIT_FOR_INIT\",\"url\":\"enums/ApiKeyLevel.html#WAIT_FOR_INIT\",\"classes\":\"\",\"parent\":\"ApiKeyLevel\"},{\"kind\":16,\"name\":\"ORGANIZATION_LEVEL_API_KEY\",\"url\":\"enums/ApiKeyLevel.html#ORGANIZATION_LEVEL_API_KEY\",\"classes\":\"\",\"parent\":\"ApiKeyLevel\"},{\"kind\":16,\"name\":\"PROJECT_LEVEL_API_KEY\",\"url\":\"enums/ApiKeyLevel.html#PROJECT_LEVEL_API_KEY\",\"classes\":\"\",\"parent\":\"ApiKeyLevel\"},{\"kind\":16,\"name\":\"ENVIRONMENT_LEVEL_API_KEY\",\"url\":\"enums/ApiKeyLevel.html#ENVIRONMENT_LEVEL_API_KEY\",\"classes\":\"\",\"parent\":\"ApiKeyLevel\"},{\"kind\":128,\"name\":\"PermitApiError\",\"url\":\"classes/PermitApiError.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/PermitApiError.html#constructor\",\"classes\":\"\",\"parent\":\"PermitApiError\"},{\"kind\":1024,\"name\":\"originalError\",\"url\":\"classes/PermitApiError.html#originalError\",\"classes\":\"\",\"parent\":\"PermitApiError\"},{\"kind\":262144,\"name\":\"request\",\"url\":\"classes/PermitApiError.html#request\",\"classes\":\"\",\"parent\":\"PermitApiError\"},{\"kind\":262144,\"name\":\"response\",\"url\":\"classes/PermitApiError.html#response\",\"classes\":\"\",\"parent\":\"PermitApiError\"},{\"kind\":256,\"name\":\"IPagination\",\"url\":\"interfaces/IPagination.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IPagination.html#page\",\"classes\":\"\",\"parent\":\"IPagination\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IPagination.html#perPage\",\"classes\":\"\",\"parent\":\"IPagination\"},{\"kind\":8,\"name\":\"MemberAccessLevel\",\"url\":\"enums/MemberAccessLevel.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"Admin\",\"url\":\"enums/MemberAccessLevel.html#Admin\",\"classes\":\"\",\"parent\":\"MemberAccessLevel\"},{\"kind\":16,\"name\":\"Write\",\"url\":\"enums/MemberAccessLevel.html#Write\",\"classes\":\"\",\"parent\":\"MemberAccessLevel\"},{\"kind\":16,\"name\":\"Read\",\"url\":\"enums/MemberAccessLevel.html#Read\",\"classes\":\"\",\"parent\":\"MemberAccessLevel\"},{\"kind\":256,\"name\":\"OrgMemberRead\",\"url\":\"interfaces/OrgMemberRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/OrgMemberRead.html#id\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"email\",\"url\":\"interfaces/OrgMemberRead.html#email\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"email_verified\",\"url\":\"interfaces/OrgMemberRead.html#email_verified\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/OrgMemberRead.html#name\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"given_name\",\"url\":\"interfaces/OrgMemberRead.html#given_name\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"family_name\",\"url\":\"interfaces/OrgMemberRead.html#family_name\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"picture\",\"url\":\"interfaces/OrgMemberRead.html#picture\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"is_superuser\",\"url\":\"interfaces/OrgMemberRead.html#is_superuser\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"is_onboarding\",\"url\":\"interfaces/OrgMemberRead.html#is_onboarding\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"onboarding_step\",\"url\":\"interfaces/OrgMemberRead.html#onboarding_step\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/OrgMemberRead.html#created_at\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"last_login\",\"url\":\"interfaces/OrgMemberRead.html#last_login\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"last_ip\",\"url\":\"interfaces/OrgMemberRead.html#last_ip\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"logins_count\",\"url\":\"interfaces/OrgMemberRead.html#logins_count\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"identities\",\"url\":\"interfaces/OrgMemberRead.html#identities\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"invite\",\"url\":\"interfaces/OrgMemberRead.html#invite\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":1024,\"name\":\"settings\",\"url\":\"interfaces/OrgMemberRead.html#settings\",\"classes\":\"\",\"parent\":\"OrgMemberRead\"},{\"kind\":8,\"name\":\"MemberAccessObj\",\"url\":\"enums/MemberAccessObj.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"Org\",\"url\":\"enums/MemberAccessObj.html#Org\",\"classes\":\"\",\"parent\":\"MemberAccessObj\"},{\"kind\":16,\"name\":\"Project\",\"url\":\"enums/MemberAccessObj.html#Project\",\"classes\":\"\",\"parent\":\"MemberAccessObj\"},{\"kind\":16,\"name\":\"Env\",\"url\":\"enums/MemberAccessObj.html#Env\",\"classes\":\"\",\"parent\":\"MemberAccessObj\"},{\"kind\":8,\"name\":\"APIKeyOwnerType\",\"url\":\"enums/APIKeyOwnerType.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"PdpConfig\",\"url\":\"enums/APIKeyOwnerType.html#PdpConfig\",\"classes\":\"\",\"parent\":\"APIKeyOwnerType\"},{\"kind\":16,\"name\":\"Member\",\"url\":\"enums/APIKeyOwnerType.html#Member\",\"classes\":\"\",\"parent\":\"APIKeyOwnerType\"},{\"kind\":16,\"name\":\"Elements\",\"url\":\"enums/APIKeyOwnerType.html#Elements\",\"classes\":\"\",\"parent\":\"APIKeyOwnerType\"},{\"kind\":256,\"name\":\"ParentId\",\"url\":\"interfaces/ParentId.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"ResourceId\",\"url\":\"interfaces/ResourceId.html\",\"classes\":\"\"},{\"kind\":8,\"name\":\"ConditionSetType\",\"url\":\"enums/ConditionSetType.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"Userset\",\"url\":\"enums/ConditionSetType.html#Userset\",\"classes\":\"\",\"parent\":\"ConditionSetType\"},{\"kind\":16,\"name\":\"Resourceset\",\"url\":\"enums/ConditionSetType.html#Resourceset\",\"classes\":\"\",\"parent\":\"ConditionSetType\"},{\"kind\":32,\"name\":\"EnvironmentCopyConflictStrategyEnum\",\"url\":\"variables/EnvironmentCopyConflictStrategyEnum-1.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/EnvironmentCopyConflictStrategyEnum-1.html#__type\",\"classes\":\"\",\"parent\":\"EnvironmentCopyConflictStrategyEnum\"},{\"kind\":1024,\"name\":\"Fail\",\"url\":\"variables/EnvironmentCopyConflictStrategyEnum-1.html#__type.Fail\",\"classes\":\"\",\"parent\":\"EnvironmentCopyConflictStrategyEnum.__type\"},{\"kind\":1024,\"name\":\"Overwrite\",\"url\":\"variables/EnvironmentCopyConflictStrategyEnum-1.html#__type.Overwrite\",\"classes\":\"\",\"parent\":\"EnvironmentCopyConflictStrategyEnum.__type\"},{\"kind\":4194304,\"name\":\"EnvironmentCopyConflictStrategyEnum\",\"url\":\"types/EnvironmentCopyConflictStrategyEnum.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"EnvironmentCopyScope\",\"url\":\"interfaces/EnvironmentCopyScope.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"resources\",\"url\":\"interfaces/EnvironmentCopyScope.html#resources\",\"classes\":\"\",\"parent\":\"EnvironmentCopyScope\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/EnvironmentCopyScope.html#roles\",\"classes\":\"\",\"parent\":\"EnvironmentCopyScope\"},{\"kind\":1024,\"name\":\"user_sets\",\"url\":\"interfaces/EnvironmentCopyScope.html#user_sets\",\"classes\":\"\",\"parent\":\"EnvironmentCopyScope\"},{\"kind\":1024,\"name\":\"resource_sets\",\"url\":\"interfaces/EnvironmentCopyScope.html#resource_sets\",\"classes\":\"\",\"parent\":\"EnvironmentCopyScope\"},{\"kind\":256,\"name\":\"EnvironmentCopyScopeFilters\",\"url\":\"interfaces/EnvironmentCopyScopeFilters.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"include\",\"url\":\"interfaces/EnvironmentCopyScopeFilters.html#include\",\"classes\":\"\",\"parent\":\"EnvironmentCopyScopeFilters\"},{\"kind\":1024,\"name\":\"exclude\",\"url\":\"interfaces/EnvironmentCopyScopeFilters.html#exclude\",\"classes\":\"\",\"parent\":\"EnvironmentCopyScopeFilters\"},{\"kind\":256,\"name\":\"EnvironmentCopyTarget\",\"url\":\"interfaces/EnvironmentCopyTarget.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"existing\",\"url\":\"interfaces/EnvironmentCopyTarget.html#existing\",\"classes\":\"\",\"parent\":\"EnvironmentCopyTarget\"},{\"kind\":1024,\"name\":\"new\",\"url\":\"interfaces/EnvironmentCopyTarget.html#new\",\"classes\":\"\",\"parent\":\"EnvironmentCopyTarget\"},{\"kind\":256,\"name\":\"Statistics\",\"url\":\"interfaces/Statistics.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/Statistics.html#roles\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":1024,\"name\":\"users\",\"url\":\"interfaces/Statistics.html#users\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":1024,\"name\":\"policies\",\"url\":\"interfaces/Statistics.html#policies\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":1024,\"name\":\"resources\",\"url\":\"interfaces/Statistics.html#resources\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":1024,\"name\":\"tenants\",\"url\":\"interfaces/Statistics.html#tenants\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":1024,\"name\":\"has_decision_logs\",\"url\":\"interfaces/Statistics.html#has_decision_logs\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":1024,\"name\":\"members\",\"url\":\"interfaces/Statistics.html#members\",\"classes\":\"\",\"parent\":\"Statistics\"},{\"kind\":8,\"name\":\"AttributeType\",\"url\":\"enums/AttributeType.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"Bool\",\"url\":\"enums/AttributeType.html#Bool\",\"classes\":\"\",\"parent\":\"AttributeType\"},{\"kind\":16,\"name\":\"Number\",\"url\":\"enums/AttributeType.html#Number\",\"classes\":\"\",\"parent\":\"AttributeType\"},{\"kind\":16,\"name\":\"String\",\"url\":\"enums/AttributeType.html#String\",\"classes\":\"\",\"parent\":\"AttributeType\"},{\"kind\":16,\"name\":\"Time\",\"url\":\"enums/AttributeType.html#Time\",\"classes\":\"\",\"parent\":\"AttributeType\"},{\"kind\":16,\"name\":\"Array\",\"url\":\"enums/AttributeType.html#Array\",\"classes\":\"\",\"parent\":\"AttributeType\"},{\"kind\":16,\"name\":\"Json\",\"url\":\"enums/AttributeType.html#Json\",\"classes\":\"\",\"parent\":\"AttributeType\"},{\"kind\":256,\"name\":\"UserInTenant\",\"url\":\"interfaces/UserInTenant.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/UserInTenant.html#tenant\",\"classes\":\"\",\"parent\":\"UserInTenant\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/UserInTenant.html#roles\",\"classes\":\"\",\"parent\":\"UserInTenant\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"interfaces/UserInTenant.html#status\",\"classes\":\"\",\"parent\":\"UserInTenant\"},{\"kind\":256,\"name\":\"UserRole\",\"url\":\"interfaces/UserRole.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/UserRole.html#role\",\"classes\":\"\",\"parent\":\"UserRole\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/UserRole.html#tenant\",\"classes\":\"\",\"parent\":\"UserRole\"},{\"kind\":256,\"name\":\"ActionBlockEditable\",\"url\":\"interfaces/ActionBlockEditable.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ActionBlockEditable.html#name\",\"classes\":\"\",\"parent\":\"ActionBlockEditable\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ActionBlockEditable.html#description\",\"classes\":\"\",\"parent\":\"ActionBlockEditable\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ActionBlockEditable.html#attributes\",\"classes\":\"\",\"parent\":\"ActionBlockEditable\"},{\"kind\":256,\"name\":\"AttributeBlockEditable\",\"url\":\"interfaces/AttributeBlockEditable.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/AttributeBlockEditable.html#type\",\"classes\":\"\",\"parent\":\"AttributeBlockEditable\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/AttributeBlockEditable.html#description\",\"classes\":\"\",\"parent\":\"AttributeBlockEditable\"},{\"kind\":256,\"name\":\"ActionBlockRead\",\"url\":\"interfaces/ActionBlockRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ActionBlockRead.html#name\",\"classes\":\"\",\"parent\":\"ActionBlockRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ActionBlockRead.html#description\",\"classes\":\"\",\"parent\":\"ActionBlockRead\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ActionBlockRead.html#attributes\",\"classes\":\"\",\"parent\":\"ActionBlockRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ActionBlockRead.html#id\",\"classes\":\"\",\"parent\":\"ActionBlockRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ActionBlockRead.html#key\",\"classes\":\"\",\"parent\":\"ActionBlockRead\"},{\"kind\":256,\"name\":\"AttributeBlockRead\",\"url\":\"interfaces/AttributeBlockRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/AttributeBlockRead.html#type\",\"classes\":\"\",\"parent\":\"AttributeBlockRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/AttributeBlockRead.html#description\",\"classes\":\"\",\"parent\":\"AttributeBlockRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/AttributeBlockRead.html#id\",\"classes\":\"\",\"parent\":\"AttributeBlockRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/AttributeBlockRead.html#key\",\"classes\":\"\",\"parent\":\"AttributeBlockRead\"},{\"kind\":256,\"name\":\"ConditionSetRuleCreate\",\"url\":\"interfaces/ConditionSetRuleCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"user_set\",\"url\":\"interfaces/ConditionSetRuleCreate.html#user_set\",\"classes\":\"\",\"parent\":\"ConditionSetRuleCreate\"},{\"kind\":1024,\"name\":\"permission\",\"url\":\"interfaces/ConditionSetRuleCreate.html#permission\",\"classes\":\"\",\"parent\":\"ConditionSetRuleCreate\"},{\"kind\":1024,\"name\":\"resource_set\",\"url\":\"interfaces/ConditionSetRuleCreate.html#resource_set\",\"classes\":\"\",\"parent\":\"ConditionSetRuleCreate\"},{\"kind\":1024,\"name\":\"is_role\",\"url\":\"interfaces/ConditionSetRuleCreate.html#is_role\",\"classes\":\"\",\"parent\":\"ConditionSetRuleCreate\"},{\"kind\":1024,\"name\":\"is_resource\",\"url\":\"interfaces/ConditionSetRuleCreate.html#is_resource\",\"classes\":\"\",\"parent\":\"ConditionSetRuleCreate\"},{\"kind\":256,\"name\":\"ConditionSetRuleRead\",\"url\":\"interfaces/ConditionSetRuleRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ConditionSetRuleRead.html#id\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ConditionSetRuleRead.html#key\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"user_set\",\"url\":\"interfaces/ConditionSetRuleRead.html#user_set\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"permission\",\"url\":\"interfaces/ConditionSetRuleRead.html#permission\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"resource_set\",\"url\":\"interfaces/ConditionSetRuleRead.html#resource_set\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ConditionSetRuleRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/ConditionSetRuleRead.html#project_id\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/ConditionSetRuleRead.html#environment_id\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ConditionSetRuleRead.html#created_at\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ConditionSetRuleRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRead\"},{\"kind\":256,\"name\":\"ConditionSetRuleRemove\",\"url\":\"interfaces/ConditionSetRuleRemove.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"user_set\",\"url\":\"interfaces/ConditionSetRuleRemove.html#user_set\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRemove\"},{\"kind\":1024,\"name\":\"permission\",\"url\":\"interfaces/ConditionSetRuleRemove.html#permission\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRemove\"},{\"kind\":1024,\"name\":\"resource_set\",\"url\":\"interfaces/ConditionSetRuleRemove.html#resource_set\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRemove\"},{\"kind\":1024,\"name\":\"is_role\",\"url\":\"interfaces/ConditionSetRuleRemove.html#is_role\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRemove\"},{\"kind\":1024,\"name\":\"is_resource\",\"url\":\"interfaces/ConditionSetRuleRemove.html#is_resource\",\"classes\":\"\",\"parent\":\"ConditionSetRuleRemove\"},{\"kind\":256,\"name\":\"IListConditionSetRules\",\"url\":\"interfaces/IListConditionSetRules.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"userSetKey\",\"url\":\"interfaces/IListConditionSetRules.html#userSetKey\",\"classes\":\"\",\"parent\":\"IListConditionSetRules\"},{\"kind\":1024,\"name\":\"permissionKey\",\"url\":\"interfaces/IListConditionSetRules.html#permissionKey\",\"classes\":\"\",\"parent\":\"IListConditionSetRules\"},{\"kind\":1024,\"name\":\"resourceSetKey\",\"url\":\"interfaces/IListConditionSetRules.html#resourceSetKey\",\"classes\":\"\",\"parent\":\"IListConditionSetRules\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListConditionSetRules.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListConditionSetRules\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListConditionSetRules.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListConditionSetRules\"},{\"kind\":256,\"name\":\"IConditionSetRulesApi\",\"url\":\"interfaces/IConditionSetRulesApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IConditionSetRulesApi.html#list\",\"classes\":\"\",\"parent\":\"IConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IConditionSetRulesApi.html#create\",\"classes\":\"\",\"parent\":\"IConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IConditionSetRulesApi.html#delete\",\"classes\":\"\",\"parent\":\"IConditionSetRulesApi\"},{\"kind\":128,\"name\":\"ConditionSetRulesApi\",\"url\":\"classes/ConditionSetRulesApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ConditionSetRulesApi.html#constructor\",\"classes\":\"\",\"parent\":\"ConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ConditionSetRulesApi.html#list\",\"classes\":\"\",\"parent\":\"ConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ConditionSetRulesApi.html#create\",\"classes\":\"\",\"parent\":\"ConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ConditionSetRulesApi.html#delete\",\"classes\":\"\",\"parent\":\"ConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ConditionSetRulesApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ConditionSetRulesApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ConditionSetRulesApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ConditionSetRulesApi\"},{\"kind\":256,\"name\":\"ConditionSetCreate\",\"url\":\"interfaces/ConditionSetCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ConditionSetCreate.html#key\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/ConditionSetCreate.html#type\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"autogenerated\",\"url\":\"interfaces/ConditionSetCreate.html#autogenerated\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"resource_id\",\"url\":\"interfaces/ConditionSetCreate.html#resource_id\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ConditionSetCreate.html#name\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ConditionSetCreate.html#description\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"conditions\",\"url\":\"interfaces/ConditionSetCreate.html#conditions\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":1024,\"name\":\"parent_id\",\"url\":\"interfaces/ConditionSetCreate.html#parent_id\",\"classes\":\"\",\"parent\":\"ConditionSetCreate\"},{\"kind\":256,\"name\":\"ConditionSetRead\",\"url\":\"interfaces/ConditionSetRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ConditionSetRead.html#key\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/ConditionSetRead.html#type\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"autogenerated\",\"url\":\"interfaces/ConditionSetRead.html#autogenerated\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"resource_id\",\"url\":\"interfaces/ConditionSetRead.html#resource_id\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ConditionSetRead.html#id\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ConditionSetRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/ConditionSetRead.html#project_id\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/ConditionSetRead.html#environment_id\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ConditionSetRead.html#created_at\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ConditionSetRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"resource\",\"url\":\"interfaces/ConditionSetRead.html#resource\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ConditionSetRead.html#name\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ConditionSetRead.html#description\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"conditions\",\"url\":\"interfaces/ConditionSetRead.html#conditions\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":1024,\"name\":\"parent_id\",\"url\":\"interfaces/ConditionSetRead.html#parent_id\",\"classes\":\"\",\"parent\":\"ConditionSetRead\"},{\"kind\":256,\"name\":\"ConditionSetUpdate\",\"url\":\"interfaces/ConditionSetUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ConditionSetUpdate.html#name\",\"classes\":\"\",\"parent\":\"ConditionSetUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ConditionSetUpdate.html#description\",\"classes\":\"\",\"parent\":\"ConditionSetUpdate\"},{\"kind\":1024,\"name\":\"conditions\",\"url\":\"interfaces/ConditionSetUpdate.html#conditions\",\"classes\":\"\",\"parent\":\"ConditionSetUpdate\"},{\"kind\":1024,\"name\":\"parent_id\",\"url\":\"interfaces/ConditionSetUpdate.html#parent_id\",\"classes\":\"\",\"parent\":\"ConditionSetUpdate\"},{\"kind\":256,\"name\":\"IConditionSetsApi\",\"url\":\"interfaces/IConditionSetsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IConditionSetsApi.html#list\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IConditionSetsApi.html#get\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IConditionSetsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IConditionSetsApi.html#getById\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IConditionSetsApi.html#create\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IConditionSetsApi.html#update\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IConditionSetsApi.html#delete\",\"classes\":\"\",\"parent\":\"IConditionSetsApi\"},{\"kind\":128,\"name\":\"ConditionSetsApi\",\"url\":\"classes/ConditionSetsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ConditionSetsApi.html#constructor\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ConditionSetsApi.html#list\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ConditionSetsApi.html#get\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/ConditionSetsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/ConditionSetsApi.html#getById\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ConditionSetsApi.html#create\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/ConditionSetsApi.html#update\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ConditionSetsApi.html#delete\",\"classes\":\"\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ConditionSetsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ConditionSetsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ConditionSetsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ConditionSetsApi\"},{\"kind\":256,\"name\":\"IDeprecatedReadApis\",\"url\":\"interfaces/IDeprecatedReadApis.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"listUsers\",\"url\":\"interfaces/IDeprecatedReadApis.html#listUsers\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"listRoles\",\"url\":\"interfaces/IDeprecatedReadApis.html#listRoles\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"getUser\",\"url\":\"interfaces/IDeprecatedReadApis.html#getUser\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"getTenant\",\"url\":\"interfaces/IDeprecatedReadApis.html#getTenant\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"getRole\",\"url\":\"interfaces/IDeprecatedReadApis.html#getRole\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"interfaces/IDeprecatedReadApis.html#getAssignedRoles\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"listConditionSets\",\"url\":\"interfaces/IDeprecatedReadApis.html#listConditionSets\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":2048,\"name\":\"listConditionSetsRules\",\"url\":\"interfaces/IDeprecatedReadApis.html#listConditionSetsRules\",\"classes\":\"\",\"parent\":\"IDeprecatedReadApis\"},{\"kind\":256,\"name\":\"IDeprecatedWriteApis\",\"url\":\"interfaces/IDeprecatedWriteApis.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"createUser\",\"url\":\"interfaces/IDeprecatedWriteApis.html#createUser\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"updateUser\",\"url\":\"interfaces/IDeprecatedWriteApis.html#updateUser\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"syncUser\",\"url\":\"interfaces/IDeprecatedWriteApis.html#syncUser\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"deleteUser\",\"url\":\"interfaces/IDeprecatedWriteApis.html#deleteUser\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"createTenant\",\"url\":\"interfaces/IDeprecatedWriteApis.html#createTenant\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"updateTenant\",\"url\":\"interfaces/IDeprecatedWriteApis.html#updateTenant\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"deleteTenant\",\"url\":\"interfaces/IDeprecatedWriteApis.html#deleteTenant\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"listTenants\",\"url\":\"interfaces/IDeprecatedWriteApis.html#listTenants\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"createRole\",\"url\":\"interfaces/IDeprecatedWriteApis.html#createRole\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"updateRole\",\"url\":\"interfaces/IDeprecatedWriteApis.html#updateRole\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"deleteRole\",\"url\":\"interfaces/IDeprecatedWriteApis.html#deleteRole\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"interfaces/IDeprecatedWriteApis.html#assignRole\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"interfaces/IDeprecatedWriteApis.html#unassignRole\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"createResource\",\"url\":\"interfaces/IDeprecatedWriteApis.html#createResource\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"updateResource\",\"url\":\"interfaces/IDeprecatedWriteApis.html#updateResource\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"deleteResource\",\"url\":\"interfaces/IDeprecatedWriteApis.html#deleteResource\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"createConditionSet\",\"url\":\"interfaces/IDeprecatedWriteApis.html#createConditionSet\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"updateConditionSet\",\"url\":\"interfaces/IDeprecatedWriteApis.html#updateConditionSet\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"deleteConditionSet\",\"url\":\"interfaces/IDeprecatedWriteApis.html#deleteConditionSet\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"assignConditionSetRule\",\"url\":\"interfaces/IDeprecatedWriteApis.html#assignConditionSetRule\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":2048,\"name\":\"unassignConditionSetRule\",\"url\":\"interfaces/IDeprecatedWriteApis.html#unassignConditionSetRule\",\"classes\":\"\",\"parent\":\"IDeprecatedWriteApis\"},{\"kind\":256,\"name\":\"IDeprecatedPermitApi\",\"url\":\"interfaces/IDeprecatedPermitApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"listUsers\",\"url\":\"interfaces/IDeprecatedPermitApi.html#listUsers\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"listRoles\",\"url\":\"interfaces/IDeprecatedPermitApi.html#listRoles\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"getUser\",\"url\":\"interfaces/IDeprecatedPermitApi.html#getUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"getTenant\",\"url\":\"interfaces/IDeprecatedPermitApi.html#getTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"getRole\",\"url\":\"interfaces/IDeprecatedPermitApi.html#getRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"interfaces/IDeprecatedPermitApi.html#getAssignedRoles\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"listConditionSets\",\"url\":\"interfaces/IDeprecatedPermitApi.html#listConditionSets\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"listConditionSetsRules\",\"url\":\"interfaces/IDeprecatedPermitApi.html#listConditionSetsRules\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"createUser\",\"url\":\"interfaces/IDeprecatedPermitApi.html#createUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"updateUser\",\"url\":\"interfaces/IDeprecatedPermitApi.html#updateUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"syncUser\",\"url\":\"interfaces/IDeprecatedPermitApi.html#syncUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"deleteUser\",\"url\":\"interfaces/IDeprecatedPermitApi.html#deleteUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"createTenant\",\"url\":\"interfaces/IDeprecatedPermitApi.html#createTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"updateTenant\",\"url\":\"interfaces/IDeprecatedPermitApi.html#updateTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"deleteTenant\",\"url\":\"interfaces/IDeprecatedPermitApi.html#deleteTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"listTenants\",\"url\":\"interfaces/IDeprecatedPermitApi.html#listTenants\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"createRole\",\"url\":\"interfaces/IDeprecatedPermitApi.html#createRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"updateRole\",\"url\":\"interfaces/IDeprecatedPermitApi.html#updateRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"deleteRole\",\"url\":\"interfaces/IDeprecatedPermitApi.html#deleteRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"interfaces/IDeprecatedPermitApi.html#assignRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"interfaces/IDeprecatedPermitApi.html#unassignRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"createResource\",\"url\":\"interfaces/IDeprecatedPermitApi.html#createResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"updateResource\",\"url\":\"interfaces/IDeprecatedPermitApi.html#updateResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"deleteResource\",\"url\":\"interfaces/IDeprecatedPermitApi.html#deleteResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"createConditionSet\",\"url\":\"interfaces/IDeprecatedPermitApi.html#createConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"updateConditionSet\",\"url\":\"interfaces/IDeprecatedPermitApi.html#updateConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"deleteConditionSet\",\"url\":\"interfaces/IDeprecatedPermitApi.html#deleteConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"assignConditionSetRule\",\"url\":\"interfaces/IDeprecatedPermitApi.html#assignConditionSetRule\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":2048,\"name\":\"unassignConditionSetRule\",\"url\":\"interfaces/IDeprecatedPermitApi.html#unassignConditionSetRule\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IDeprecatedPermitApi\"},{\"kind\":128,\"name\":\"DeprecatedApiClient\",\"url\":\"classes/DeprecatedApiClient.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/DeprecatedApiClient.html#constructor\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"listUsers\",\"url\":\"classes/DeprecatedApiClient.html#listUsers\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"listRoles\",\"url\":\"classes/DeprecatedApiClient.html#listRoles\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"listConditionSets\",\"url\":\"classes/DeprecatedApiClient.html#listConditionSets\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"listConditionSetsRules\",\"url\":\"classes/DeprecatedApiClient.html#listConditionSetsRules\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"getUser\",\"url\":\"classes/DeprecatedApiClient.html#getUser\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"getTenant\",\"url\":\"classes/DeprecatedApiClient.html#getTenant\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"listTenants\",\"url\":\"classes/DeprecatedApiClient.html#listTenants\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"getRole\",\"url\":\"classes/DeprecatedApiClient.html#getRole\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"classes/DeprecatedApiClient.html#getAssignedRoles\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"createResource\",\"url\":\"classes/DeprecatedApiClient.html#createResource\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"updateResource\",\"url\":\"classes/DeprecatedApiClient.html#updateResource\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"deleteResource\",\"url\":\"classes/DeprecatedApiClient.html#deleteResource\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"createUser\",\"url\":\"classes/DeprecatedApiClient.html#createUser\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"syncUser\",\"url\":\"classes/DeprecatedApiClient.html#syncUser\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"updateUser\",\"url\":\"classes/DeprecatedApiClient.html#updateUser\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"deleteUser\",\"url\":\"classes/DeprecatedApiClient.html#deleteUser\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"createTenant\",\"url\":\"classes/DeprecatedApiClient.html#createTenant\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"updateTenant\",\"url\":\"classes/DeprecatedApiClient.html#updateTenant\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"deleteTenant\",\"url\":\"classes/DeprecatedApiClient.html#deleteTenant\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"createRole\",\"url\":\"classes/DeprecatedApiClient.html#createRole\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"updateRole\",\"url\":\"classes/DeprecatedApiClient.html#updateRole\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"deleteRole\",\"url\":\"classes/DeprecatedApiClient.html#deleteRole\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"classes/DeprecatedApiClient.html#assignRole\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"classes/DeprecatedApiClient.html#unassignRole\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"createConditionSet\",\"url\":\"classes/DeprecatedApiClient.html#createConditionSet\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"updateConditionSet\",\"url\":\"classes/DeprecatedApiClient.html#updateConditionSet\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"deleteConditionSet\",\"url\":\"classes/DeprecatedApiClient.html#deleteConditionSet\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"assignConditionSetRule\",\"url\":\"classes/DeprecatedApiClient.html#assignConditionSetRule\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"unassignConditionSetRule\",\"url\":\"classes/DeprecatedApiClient.html#unassignConditionSetRule\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"getMethods\",\"url\":\"classes/DeprecatedApiClient.html#getMethods\",\"classes\":\"\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/DeprecatedApiClient.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/DeprecatedApiClient.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"DeprecatedApiClient\"},{\"kind\":256,\"name\":\"APIKeyRead\",\"url\":\"interfaces/APIKeyRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/APIKeyRead.html#organization_id\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/APIKeyRead.html#project_id\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/APIKeyRead.html#environment_id\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"object_type\",\"url\":\"interfaces/APIKeyRead.html#object_type\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"access_level\",\"url\":\"interfaces/APIKeyRead.html#access_level\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"owner_type\",\"url\":\"interfaces/APIKeyRead.html#owner_type\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/APIKeyRead.html#name\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/APIKeyRead.html#id\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"secret\",\"url\":\"interfaces/APIKeyRead.html#secret\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/APIKeyRead.html#created_at\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"created_by_member\",\"url\":\"interfaces/APIKeyRead.html#created_by_member\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"last_used_at\",\"url\":\"interfaces/APIKeyRead.html#last_used_at\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"env\",\"url\":\"interfaces/APIKeyRead.html#env\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":1024,\"name\":\"project\",\"url\":\"interfaces/APIKeyRead.html#project\",\"classes\":\"\",\"parent\":\"APIKeyRead\"},{\"kind\":256,\"name\":\"EnvironmentCopy\",\"url\":\"interfaces/EnvironmentCopy.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"target_env\",\"url\":\"interfaces/EnvironmentCopy.html#target_env\",\"classes\":\"\",\"parent\":\"EnvironmentCopy\"},{\"kind\":1024,\"name\":\"conflict_strategy\",\"url\":\"interfaces/EnvironmentCopy.html#conflict_strategy\",\"classes\":\"\",\"parent\":\"EnvironmentCopy\"},{\"kind\":1024,\"name\":\"scope\",\"url\":\"interfaces/EnvironmentCopy.html#scope\",\"classes\":\"\",\"parent\":\"EnvironmentCopy\"},{\"kind\":256,\"name\":\"EnvironmentCreate\",\"url\":\"interfaces/EnvironmentCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/EnvironmentCreate.html#key\",\"classes\":\"\",\"parent\":\"EnvironmentCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/EnvironmentCreate.html#name\",\"classes\":\"\",\"parent\":\"EnvironmentCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/EnvironmentCreate.html#description\",\"classes\":\"\",\"parent\":\"EnvironmentCreate\"},{\"kind\":1024,\"name\":\"custom_branch_name\",\"url\":\"interfaces/EnvironmentCreate.html#custom_branch_name\",\"classes\":\"\",\"parent\":\"EnvironmentCreate\"},{\"kind\":1024,\"name\":\"jwks\",\"url\":\"interfaces/EnvironmentCreate.html#jwks\",\"classes\":\"\",\"parent\":\"EnvironmentCreate\"},{\"kind\":256,\"name\":\"EnvironmentRead\",\"url\":\"interfaces/EnvironmentRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/EnvironmentRead.html#key\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/EnvironmentRead.html#id\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/EnvironmentRead.html#organization_id\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/EnvironmentRead.html#project_id\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/EnvironmentRead.html#created_at\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/EnvironmentRead.html#updated_at\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/EnvironmentRead.html#name\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/EnvironmentRead.html#description\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"custom_branch_name\",\"url\":\"interfaces/EnvironmentRead.html#custom_branch_name\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":1024,\"name\":\"jwks\",\"url\":\"interfaces/EnvironmentRead.html#jwks\",\"classes\":\"\",\"parent\":\"EnvironmentRead\"},{\"kind\":256,\"name\":\"EnvironmentStats\",\"url\":\"interfaces/EnvironmentStats.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/EnvironmentStats.html#key\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/EnvironmentStats.html#id\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/EnvironmentStats.html#organization_id\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/EnvironmentStats.html#project_id\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/EnvironmentStats.html#created_at\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/EnvironmentStats.html#updated_at\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/EnvironmentStats.html#name\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/EnvironmentStats.html#description\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"custom_branch_name\",\"url\":\"interfaces/EnvironmentStats.html#custom_branch_name\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"jwks\",\"url\":\"interfaces/EnvironmentStats.html#jwks\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"pdp_configs\",\"url\":\"interfaces/EnvironmentStats.html#pdp_configs\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":1024,\"name\":\"stats\",\"url\":\"interfaces/EnvironmentStats.html#stats\",\"classes\":\"\",\"parent\":\"EnvironmentStats\"},{\"kind\":256,\"name\":\"EnvironmentUpdate\",\"url\":\"interfaces/EnvironmentUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/EnvironmentUpdate.html#name\",\"classes\":\"\",\"parent\":\"EnvironmentUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/EnvironmentUpdate.html#description\",\"classes\":\"\",\"parent\":\"EnvironmentUpdate\"},{\"kind\":1024,\"name\":\"custom_branch_name\",\"url\":\"interfaces/EnvironmentUpdate.html#custom_branch_name\",\"classes\":\"\",\"parent\":\"EnvironmentUpdate\"},{\"kind\":1024,\"name\":\"jwks\",\"url\":\"interfaces/EnvironmentUpdate.html#jwks\",\"classes\":\"\",\"parent\":\"EnvironmentUpdate\"},{\"kind\":256,\"name\":\"IListEnvironments\",\"url\":\"interfaces/IListEnvironments.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"projectKey\",\"url\":\"interfaces/IListEnvironments.html#projectKey\",\"classes\":\"\",\"parent\":\"IListEnvironments\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListEnvironments.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListEnvironments\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListEnvironments.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListEnvironments\"},{\"kind\":256,\"name\":\"IEnvironmentsApi\",\"url\":\"interfaces/IEnvironmentsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IEnvironmentsApi.html#list\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IEnvironmentsApi.html#get\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IEnvironmentsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IEnvironmentsApi.html#getById\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"getStats\",\"url\":\"interfaces/IEnvironmentsApi.html#getStats\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"getApiKey\",\"url\":\"interfaces/IEnvironmentsApi.html#getApiKey\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IEnvironmentsApi.html#create\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IEnvironmentsApi.html#update\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"copy\",\"url\":\"interfaces/IEnvironmentsApi.html#copy\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IEnvironmentsApi.html#delete\",\"classes\":\"\",\"parent\":\"IEnvironmentsApi\"},{\"kind\":128,\"name\":\"EnvironmentsApi\",\"url\":\"classes/EnvironmentsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/EnvironmentsApi.html#constructor\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/EnvironmentsApi.html#list\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/EnvironmentsApi.html#get\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/EnvironmentsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/EnvironmentsApi.html#getById\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"getStats\",\"url\":\"classes/EnvironmentsApi.html#getStats\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"getApiKey\",\"url\":\"classes/EnvironmentsApi.html#getApiKey\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/EnvironmentsApi.html#create\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/EnvironmentsApi.html#update\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"copy\",\"url\":\"classes/EnvironmentsApi.html#copy\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/EnvironmentsApi.html#delete\",\"classes\":\"\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/EnvironmentsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EnvironmentsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/EnvironmentsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EnvironmentsApi\"},{\"kind\":256,\"name\":\"ProjectCreate\",\"url\":\"interfaces/ProjectCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ProjectCreate.html#key\",\"classes\":\"\",\"parent\":\"ProjectCreate\"},{\"kind\":1024,\"name\":\"urn_namespace\",\"url\":\"interfaces/ProjectCreate.html#urn_namespace\",\"classes\":\"\",\"parent\":\"ProjectCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ProjectCreate.html#name\",\"classes\":\"\",\"parent\":\"ProjectCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ProjectCreate.html#description\",\"classes\":\"\",\"parent\":\"ProjectCreate\"},{\"kind\":1024,\"name\":\"settings\",\"url\":\"interfaces/ProjectCreate.html#settings\",\"classes\":\"\",\"parent\":\"ProjectCreate\"},{\"kind\":1024,\"name\":\"active_policy_repo_id\",\"url\":\"interfaces/ProjectCreate.html#active_policy_repo_id\",\"classes\":\"\",\"parent\":\"ProjectCreate\"},{\"kind\":256,\"name\":\"ProjectRead\",\"url\":\"interfaces/ProjectRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ProjectRead.html#key\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"urn_namespace\",\"url\":\"interfaces/ProjectRead.html#urn_namespace\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ProjectRead.html#id\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ProjectRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ProjectRead.html#created_at\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ProjectRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ProjectRead.html#name\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ProjectRead.html#description\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"settings\",\"url\":\"interfaces/ProjectRead.html#settings\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":1024,\"name\":\"active_policy_repo_id\",\"url\":\"interfaces/ProjectRead.html#active_policy_repo_id\",\"classes\":\"\",\"parent\":\"ProjectRead\"},{\"kind\":256,\"name\":\"ProjectUpdate\",\"url\":\"interfaces/ProjectUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ProjectUpdate.html#name\",\"classes\":\"\",\"parent\":\"ProjectUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ProjectUpdate.html#description\",\"classes\":\"\",\"parent\":\"ProjectUpdate\"},{\"kind\":1024,\"name\":\"settings\",\"url\":\"interfaces/ProjectUpdate.html#settings\",\"classes\":\"\",\"parent\":\"ProjectUpdate\"},{\"kind\":1024,\"name\":\"active_policy_repo_id\",\"url\":\"interfaces/ProjectUpdate.html#active_policy_repo_id\",\"classes\":\"\",\"parent\":\"ProjectUpdate\"},{\"kind\":256,\"name\":\"IProjectsApi\",\"url\":\"interfaces/IProjectsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IProjectsApi.html#list\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IProjectsApi.html#get\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IProjectsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IProjectsApi.html#getById\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IProjectsApi.html#create\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IProjectsApi.html#update\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IProjectsApi.html#delete\",\"classes\":\"\",\"parent\":\"IProjectsApi\"},{\"kind\":128,\"name\":\"ProjectsApi\",\"url\":\"classes/ProjectsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ProjectsApi.html#constructor\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ProjectsApi.html#list\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ProjectsApi.html#get\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/ProjectsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/ProjectsApi.html#getById\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ProjectsApi.html#create\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/ProjectsApi.html#update\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ProjectsApi.html#delete\",\"classes\":\"\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ProjectsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ProjectsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ProjectsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ProjectsApi\"},{\"kind\":256,\"name\":\"ResourceActionGroupCreate\",\"url\":\"interfaces/ResourceActionGroupCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceActionGroupCreate.html#key\",\"classes\":\"\",\"parent\":\"ResourceActionGroupCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceActionGroupCreate.html#name\",\"classes\":\"\",\"parent\":\"ResourceActionGroupCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceActionGroupCreate.html#description\",\"classes\":\"\",\"parent\":\"ResourceActionGroupCreate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceActionGroupCreate.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceActionGroupCreate\"},{\"kind\":1024,\"name\":\"actions\",\"url\":\"interfaces/ResourceActionGroupCreate.html#actions\",\"classes\":\"\",\"parent\":\"ResourceActionGroupCreate\"},{\"kind\":256,\"name\":\"ResourceActionGroupRead\",\"url\":\"interfaces/ResourceActionGroupRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceActionGroupRead.html#name\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceActionGroupRead.html#description\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceActionGroupRead.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"actions\",\"url\":\"interfaces/ResourceActionGroupRead.html#actions\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceActionGroupRead.html#key\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ResourceActionGroupRead.html#id\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ResourceActionGroupRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/ResourceActionGroupRead.html#project_id\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/ResourceActionGroupRead.html#environment_id\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"resource_id\",\"url\":\"interfaces/ResourceActionGroupRead.html#resource_id\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ResourceActionGroupRead.html#created_at\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ResourceActionGroupRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ResourceActionGroupRead\"},{\"kind\":256,\"name\":\"IListActionGroups\",\"url\":\"interfaces/IListActionGroups.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"resourceKey\",\"url\":\"interfaces/IListActionGroups.html#resourceKey\",\"classes\":\"\",\"parent\":\"IListActionGroups\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListActionGroups.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListActionGroups\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListActionGroups.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListActionGroups\"},{\"kind\":256,\"name\":\"IResourceActionGroupsApi\",\"url\":\"interfaces/IResourceActionGroupsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IResourceActionGroupsApi.html#list\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IResourceActionGroupsApi.html#get\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IResourceActionGroupsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IResourceActionGroupsApi.html#getById\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IResourceActionGroupsApi.html#create\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IResourceActionGroupsApi.html#update\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IResourceActionGroupsApi.html#delete\",\"classes\":\"\",\"parent\":\"IResourceActionGroupsApi\"},{\"kind\":128,\"name\":\"ResourceActionGroupsApi\",\"url\":\"classes/ResourceActionGroupsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ResourceActionGroupsApi.html#constructor\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ResourceActionGroupsApi.html#list\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ResourceActionGroupsApi.html#get\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/ResourceActionGroupsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/ResourceActionGroupsApi.html#getById\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ResourceActionGroupsApi.html#create\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/ResourceActionGroupsApi.html#update\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ResourceActionGroupsApi.html#delete\",\"classes\":\"\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ResourceActionGroupsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ResourceActionGroupsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourceActionGroupsApi\"},{\"kind\":256,\"name\":\"ResourceActionCreate\",\"url\":\"interfaces/ResourceActionCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceActionCreate.html#key\",\"classes\":\"\",\"parent\":\"ResourceActionCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceActionCreate.html#name\",\"classes\":\"\",\"parent\":\"ResourceActionCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceActionCreate.html#description\",\"classes\":\"\",\"parent\":\"ResourceActionCreate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceActionCreate.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceActionCreate\"},{\"kind\":256,\"name\":\"ResourceActionRead\",\"url\":\"interfaces/ResourceActionRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceActionRead.html#name\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceActionRead.html#description\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceActionRead.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceActionRead.html#key\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ResourceActionRead.html#id\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"permission_name\",\"url\":\"interfaces/ResourceActionRead.html#permission_name\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ResourceActionRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/ResourceActionRead.html#project_id\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/ResourceActionRead.html#environment_id\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"resource_id\",\"url\":\"interfaces/ResourceActionRead.html#resource_id\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ResourceActionRead.html#created_at\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ResourceActionRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ResourceActionRead\"},{\"kind\":256,\"name\":\"ResourceActionUpdate\",\"url\":\"interfaces/ResourceActionUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceActionUpdate.html#name\",\"classes\":\"\",\"parent\":\"ResourceActionUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceActionUpdate.html#description\",\"classes\":\"\",\"parent\":\"ResourceActionUpdate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceActionUpdate.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceActionUpdate\"},{\"kind\":256,\"name\":\"IListActions\",\"url\":\"interfaces/IListActions.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"resourceKey\",\"url\":\"interfaces/IListActions.html#resourceKey\",\"classes\":\"\",\"parent\":\"IListActions\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListActions.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListActions\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListActions.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListActions\"},{\"kind\":256,\"name\":\"IResourceActionsApi\",\"url\":\"interfaces/IResourceActionsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IResourceActionsApi.html#list\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IResourceActionsApi.html#get\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IResourceActionsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IResourceActionsApi.html#getById\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IResourceActionsApi.html#create\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IResourceActionsApi.html#update\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IResourceActionsApi.html#delete\",\"classes\":\"\",\"parent\":\"IResourceActionsApi\"},{\"kind\":128,\"name\":\"ResourceActionsApi\",\"url\":\"classes/ResourceActionsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ResourceActionsApi.html#constructor\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ResourceActionsApi.html#list\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ResourceActionsApi.html#get\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/ResourceActionsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/ResourceActionsApi.html#getById\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ResourceActionsApi.html#create\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/ResourceActionsApi.html#update\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ResourceActionsApi.html#delete\",\"classes\":\"\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ResourceActionsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourceActionsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ResourceActionsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourceActionsApi\"},{\"kind\":256,\"name\":\"ResourceAttributeCreate\",\"url\":\"interfaces/ResourceAttributeCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceAttributeCreate.html#key\",\"classes\":\"\",\"parent\":\"ResourceAttributeCreate\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/ResourceAttributeCreate.html#type\",\"classes\":\"\",\"parent\":\"ResourceAttributeCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceAttributeCreate.html#description\",\"classes\":\"\",\"parent\":\"ResourceAttributeCreate\"},{\"kind\":256,\"name\":\"ResourceAttributeRead\",\"url\":\"interfaces/ResourceAttributeRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/ResourceAttributeRead.html#type\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceAttributeRead.html#description\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceAttributeRead.html#key\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ResourceAttributeRead.html#id\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"resource_id\",\"url\":\"interfaces/ResourceAttributeRead.html#resource_id\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"resource_key\",\"url\":\"interfaces/ResourceAttributeRead.html#resource_key\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ResourceAttributeRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/ResourceAttributeRead.html#project_id\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/ResourceAttributeRead.html#environment_id\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ResourceAttributeRead.html#created_at\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ResourceAttributeRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":1024,\"name\":\"built_in\",\"url\":\"interfaces/ResourceAttributeRead.html#built_in\",\"classes\":\"\",\"parent\":\"ResourceAttributeRead\"},{\"kind\":256,\"name\":\"ResourceAttributeUpdate\",\"url\":\"interfaces/ResourceAttributeUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/ResourceAttributeUpdate.html#type\",\"classes\":\"\",\"parent\":\"ResourceAttributeUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceAttributeUpdate.html#description\",\"classes\":\"\",\"parent\":\"ResourceAttributeUpdate\"},{\"kind\":256,\"name\":\"IListAttributes\",\"url\":\"interfaces/IListAttributes.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"resourceKey\",\"url\":\"interfaces/IListAttributes.html#resourceKey\",\"classes\":\"\",\"parent\":\"IListAttributes\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListAttributes.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListAttributes\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListAttributes.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListAttributes\"},{\"kind\":256,\"name\":\"IResourceAttributesApi\",\"url\":\"interfaces/IResourceAttributesApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IResourceAttributesApi.html#list\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IResourceAttributesApi.html#get\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IResourceAttributesApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IResourceAttributesApi.html#getById\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IResourceAttributesApi.html#create\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IResourceAttributesApi.html#update\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IResourceAttributesApi.html#delete\",\"classes\":\"\",\"parent\":\"IResourceAttributesApi\"},{\"kind\":128,\"name\":\"ResourceAttributesApi\",\"url\":\"classes/ResourceAttributesApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ResourceAttributesApi.html#constructor\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ResourceAttributesApi.html#list\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ResourceAttributesApi.html#get\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/ResourceAttributesApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/ResourceAttributesApi.html#getById\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ResourceAttributesApi.html#create\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/ResourceAttributesApi.html#update\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ResourceAttributesApi.html#delete\",\"classes\":\"\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ResourceAttributesApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ResourceAttributesApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourceAttributesApi\"},{\"kind\":256,\"name\":\"ResourceCreate\",\"url\":\"interfaces/ResourceCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceCreate.html#key\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceCreate.html#name\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":1024,\"name\":\"urn\",\"url\":\"interfaces/ResourceCreate.html#urn\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceCreate.html#description\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":1024,\"name\":\"actions\",\"url\":\"interfaces/ResourceCreate.html#actions\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceCreate.html#actions.__type\",\"classes\":\"\",\"parent\":\"ResourceCreate.actions\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceCreate.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceCreate.html#attributes.__type-1\",\"classes\":\"\",\"parent\":\"ResourceCreate.attributes\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/ResourceCreate.html#roles\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":1024,\"name\":\"relations\",\"url\":\"interfaces/ResourceCreate.html#relations\",\"classes\":\"\",\"parent\":\"ResourceCreate\"},{\"kind\":256,\"name\":\"ResourceRead\",\"url\":\"interfaces/ResourceRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/ResourceRead.html#key\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ResourceRead.html#id\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/ResourceRead.html#organization_id\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/ResourceRead.html#project_id\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/ResourceRead.html#environment_id\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/ResourceRead.html#created_at\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/ResourceRead.html#updated_at\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceRead.html#name\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"urn\",\"url\":\"interfaces/ResourceRead.html#urn\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceRead.html#description\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"actions\",\"url\":\"interfaces/ResourceRead.html#actions\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceRead.html#actions.__type-1\",\"classes\":\"\",\"parent\":\"ResourceRead.actions\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceRead.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceRead.html#attributes.__type-2\",\"classes\":\"\",\"parent\":\"ResourceRead.attributes\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/ResourceRead.html#roles\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":1024,\"name\":\"relations\",\"url\":\"interfaces/ResourceRead.html#relations\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceRead.html#relations.__type-3\",\"classes\":\"\",\"parent\":\"ResourceRead.relations\"},{\"kind\":1024,\"name\":\"action_groups\",\"url\":\"interfaces/ResourceRead.html#action_groups\",\"classes\":\"\",\"parent\":\"ResourceRead\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceRead.html#action_groups.__type\",\"classes\":\"\",\"parent\":\"ResourceRead.action_groups\"},{\"kind\":256,\"name\":\"ResourceReplace\",\"url\":\"interfaces/ResourceReplace.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceReplace.html#name\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":1024,\"name\":\"urn\",\"url\":\"interfaces/ResourceReplace.html#urn\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceReplace.html#description\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":1024,\"name\":\"actions\",\"url\":\"interfaces/ResourceReplace.html#actions\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceReplace.html#actions.__type\",\"classes\":\"\",\"parent\":\"ResourceReplace.actions\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceReplace.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceReplace.html#attributes.__type-1\",\"classes\":\"\",\"parent\":\"ResourceReplace.attributes\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/ResourceReplace.html#roles\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":1024,\"name\":\"relations\",\"url\":\"interfaces/ResourceReplace.html#relations\",\"classes\":\"\",\"parent\":\"ResourceReplace\"},{\"kind\":256,\"name\":\"ResourceUpdate\",\"url\":\"interfaces/ResourceUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ResourceUpdate.html#name\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":1024,\"name\":\"urn\",\"url\":\"interfaces/ResourceUpdate.html#urn\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/ResourceUpdate.html#description\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":1024,\"name\":\"actions\",\"url\":\"interfaces/ResourceUpdate.html#actions\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceUpdate.html#actions.__type\",\"classes\":\"\",\"parent\":\"ResourceUpdate.actions\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/ResourceUpdate.html#attributes\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/ResourceUpdate.html#attributes.__type-1\",\"classes\":\"\",\"parent\":\"ResourceUpdate.attributes\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/ResourceUpdate.html#roles\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":1024,\"name\":\"relations\",\"url\":\"interfaces/ResourceUpdate.html#relations\",\"classes\":\"\",\"parent\":\"ResourceUpdate\"},{\"kind\":256,\"name\":\"IListResourceUsers\",\"url\":\"interfaces/IListResourceUsers.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"resourceKey\",\"url\":\"interfaces/IListResourceUsers.html#resourceKey\",\"classes\":\"\",\"parent\":\"IListResourceUsers\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListResourceUsers.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListResourceUsers\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListResourceUsers.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListResourceUsers\"},{\"kind\":256,\"name\":\"IResourcesApi\",\"url\":\"interfaces/IResourcesApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IResourcesApi.html#list\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IResourcesApi.html#get\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IResourcesApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IResourcesApi.html#getById\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IResourcesApi.html#create\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"replace\",\"url\":\"interfaces/IResourcesApi.html#replace\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IResourcesApi.html#update\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IResourcesApi.html#delete\",\"classes\":\"\",\"parent\":\"IResourcesApi\"},{\"kind\":128,\"name\":\"ResourcesApi\",\"url\":\"classes/ResourcesApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ResourcesApi.html#constructor\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/ResourcesApi.html#list\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ResourcesApi.html#get\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/ResourcesApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/ResourcesApi.html#getById\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/ResourcesApi.html#create\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"replace\",\"url\":\"classes/ResourcesApi.html#replace\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/ResourcesApi.html#update\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/ResourcesApi.html#delete\",\"classes\":\"\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ResourcesApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourcesApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ResourcesApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ResourcesApi\"},{\"kind\":256,\"name\":\"BulkRoleAssignmentReport\",\"url\":\"interfaces/BulkRoleAssignmentReport.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"assignments_created\",\"url\":\"interfaces/BulkRoleAssignmentReport.html#assignments_created\",\"classes\":\"\",\"parent\":\"BulkRoleAssignmentReport\"},{\"kind\":256,\"name\":\"BulkRoleUnAssignmentReport\",\"url\":\"interfaces/BulkRoleUnAssignmentReport.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"assignments_removed\",\"url\":\"interfaces/BulkRoleUnAssignmentReport.html#assignments_removed\",\"classes\":\"\",\"parent\":\"BulkRoleUnAssignmentReport\"},{\"kind\":256,\"name\":\"RoleAssignmentCreate\",\"url\":\"interfaces/RoleAssignmentCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/RoleAssignmentCreate.html#role\",\"classes\":\"\",\"parent\":\"RoleAssignmentCreate\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/RoleAssignmentCreate.html#tenant\",\"classes\":\"\",\"parent\":\"RoleAssignmentCreate\"},{\"kind\":1024,\"name\":\"resource_instance\",\"url\":\"interfaces/RoleAssignmentCreate.html#resource_instance\",\"classes\":\"\",\"parent\":\"RoleAssignmentCreate\"},{\"kind\":1024,\"name\":\"user\",\"url\":\"interfaces/RoleAssignmentCreate.html#user\",\"classes\":\"\",\"parent\":\"RoleAssignmentCreate\"},{\"kind\":256,\"name\":\"RoleAssignmentRead\",\"url\":\"interfaces/RoleAssignmentRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/RoleAssignmentRead.html#id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"user\",\"url\":\"interfaces/RoleAssignmentRead.html#user\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/RoleAssignmentRead.html#role\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/RoleAssignmentRead.html#tenant\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"resource\",\"url\":\"interfaces/RoleAssignmentRead.html#resource\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"resource_instance\",\"url\":\"interfaces/RoleAssignmentRead.html#resource_instance\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"resource_id\",\"url\":\"interfaces/RoleAssignmentRead.html#resource_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"resource_instance_id\",\"url\":\"interfaces/RoleAssignmentRead.html#resource_instance_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"user_id\",\"url\":\"interfaces/RoleAssignmentRead.html#user_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"role_id\",\"url\":\"interfaces/RoleAssignmentRead.html#role_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"tenant_id\",\"url\":\"interfaces/RoleAssignmentRead.html#tenant_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/RoleAssignmentRead.html#organization_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/RoleAssignmentRead.html#project_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/RoleAssignmentRead.html#environment_id\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/RoleAssignmentRead.html#created_at\",\"classes\":\"\",\"parent\":\"RoleAssignmentRead\"},{\"kind\":256,\"name\":\"RoleAssignmentRemove\",\"url\":\"interfaces/RoleAssignmentRemove.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/RoleAssignmentRemove.html#role\",\"classes\":\"\",\"parent\":\"RoleAssignmentRemove\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/RoleAssignmentRemove.html#tenant\",\"classes\":\"\",\"parent\":\"RoleAssignmentRemove\"},{\"kind\":1024,\"name\":\"resource_instance\",\"url\":\"interfaces/RoleAssignmentRemove.html#resource_instance\",\"classes\":\"\",\"parent\":\"RoleAssignmentRemove\"},{\"kind\":1024,\"name\":\"user\",\"url\":\"interfaces/RoleAssignmentRemove.html#user\",\"classes\":\"\",\"parent\":\"RoleAssignmentRemove\"},{\"kind\":256,\"name\":\"IListRoleAssignments\",\"url\":\"interfaces/IListRoleAssignments.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"user\",\"url\":\"interfaces/IListRoleAssignments.html#user\",\"classes\":\"\",\"parent\":\"IListRoleAssignments\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/IListRoleAssignments.html#role\",\"classes\":\"\",\"parent\":\"IListRoleAssignments\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/IListRoleAssignments.html#tenant\",\"classes\":\"\",\"parent\":\"IListRoleAssignments\"},{\"kind\":1024,\"name\":\"resourceInstance\",\"url\":\"interfaces/IListRoleAssignments.html#resourceInstance\",\"classes\":\"\",\"parent\":\"IListRoleAssignments\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListRoleAssignments.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListRoleAssignments\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListRoleAssignments.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListRoleAssignments\"},{\"kind\":256,\"name\":\"IRoleAssignmentsApi\",\"url\":\"interfaces/IRoleAssignmentsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IRoleAssignmentsApi.html#list\",\"classes\":\"\",\"parent\":\"IRoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"assign\",\"url\":\"interfaces/IRoleAssignmentsApi.html#assign\",\"classes\":\"\",\"parent\":\"IRoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"unassign\",\"url\":\"interfaces/IRoleAssignmentsApi.html#unassign\",\"classes\":\"\",\"parent\":\"IRoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"bulkAssign\",\"url\":\"interfaces/IRoleAssignmentsApi.html#bulkAssign\",\"classes\":\"\",\"parent\":\"IRoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"bulkUnassign\",\"url\":\"interfaces/IRoleAssignmentsApi.html#bulkUnassign\",\"classes\":\"\",\"parent\":\"IRoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"waitForSync\",\"url\":\"interfaces/IRoleAssignmentsApi.html#waitForSync\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IRoleAssignmentsApi\"},{\"kind\":128,\"name\":\"RoleAssignmentsApi\",\"url\":\"classes/RoleAssignmentsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/RoleAssignmentsApi.html#constructor\",\"classes\":\"\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/RoleAssignmentsApi.html#list\",\"classes\":\"\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"assign\",\"url\":\"classes/RoleAssignmentsApi.html#assign\",\"classes\":\"\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"unassign\",\"url\":\"classes/RoleAssignmentsApi.html#unassign\",\"classes\":\"\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"bulkAssign\",\"url\":\"classes/RoleAssignmentsApi.html#bulkAssign\",\"classes\":\"\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"bulkUnassign\",\"url\":\"classes/RoleAssignmentsApi.html#bulkUnassign\",\"classes\":\"\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"waitForSync\",\"url\":\"classes/RoleAssignmentsApi.html#waitForSync\",\"classes\":\"tsd-is-inherited\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/RoleAssignmentsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/RoleAssignmentsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"RoleAssignmentsApi\"},{\"kind\":256,\"name\":\"RoleCreate\",\"url\":\"interfaces/RoleCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/RoleCreate.html#key\",\"classes\":\"\",\"parent\":\"RoleCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/RoleCreate.html#name\",\"classes\":\"\",\"parent\":\"RoleCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/RoleCreate.html#description\",\"classes\":\"\",\"parent\":\"RoleCreate\"},{\"kind\":1024,\"name\":\"permissions\",\"url\":\"interfaces/RoleCreate.html#permissions\",\"classes\":\"\",\"parent\":\"RoleCreate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/RoleCreate.html#attributes\",\"classes\":\"\",\"parent\":\"RoleCreate\"},{\"kind\":1024,\"name\":\"granted_to\",\"url\":\"interfaces/RoleCreate.html#granted_to\",\"classes\":\"\",\"parent\":\"RoleCreate\"},{\"kind\":256,\"name\":\"RoleRead\",\"url\":\"interfaces/RoleRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/RoleRead.html#name\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/RoleRead.html#description\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"permissions\",\"url\":\"interfaces/RoleRead.html#permissions\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/RoleRead.html#attributes\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"granted_to\",\"url\":\"interfaces/RoleRead.html#granted_to\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/RoleRead.html#key\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/RoleRead.html#id\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/RoleRead.html#organization_id\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/RoleRead.html#project_id\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/RoleRead.html#environment_id\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/RoleRead.html#created_at\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/RoleRead.html#updated_at\",\"classes\":\"\",\"parent\":\"RoleRead\"},{\"kind\":256,\"name\":\"RoleUpdate\",\"url\":\"interfaces/RoleUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/RoleUpdate.html#name\",\"classes\":\"\",\"parent\":\"RoleUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/RoleUpdate.html#description\",\"classes\":\"\",\"parent\":\"RoleUpdate\"},{\"kind\":1024,\"name\":\"permissions\",\"url\":\"interfaces/RoleUpdate.html#permissions\",\"classes\":\"\",\"parent\":\"RoleUpdate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/RoleUpdate.html#attributes\",\"classes\":\"\",\"parent\":\"RoleUpdate\"},{\"kind\":1024,\"name\":\"granted_to\",\"url\":\"interfaces/RoleUpdate.html#granted_to\",\"classes\":\"\",\"parent\":\"RoleUpdate\"},{\"kind\":256,\"name\":\"IRolesApi\",\"url\":\"interfaces/IRolesApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IRolesApi.html#list\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IRolesApi.html#get\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IRolesApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IRolesApi.html#getById\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IRolesApi.html#create\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IRolesApi.html#update\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IRolesApi.html#delete\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"assignPermissions\",\"url\":\"interfaces/IRolesApi.html#assignPermissions\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":2048,\"name\":\"removePermissions\",\"url\":\"interfaces/IRolesApi.html#removePermissions\",\"classes\":\"\",\"parent\":\"IRolesApi\"},{\"kind\":128,\"name\":\"RolesApi\",\"url\":\"classes/RolesApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/RolesApi.html#constructor\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/RolesApi.html#list\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/RolesApi.html#get\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/RolesApi.html#getByKey\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/RolesApi.html#getById\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/RolesApi.html#create\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/RolesApi.html#update\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/RolesApi.html#delete\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"assignPermissions\",\"url\":\"classes/RolesApi.html#assignPermissions\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"removePermissions\",\"url\":\"classes/RolesApi.html#removePermissions\",\"classes\":\"\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/RolesApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"RolesApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/RolesApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"RolesApi\"},{\"kind\":256,\"name\":\"PaginatedResultUserRead\",\"url\":\"interfaces/PaginatedResultUserRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"data\",\"url\":\"interfaces/PaginatedResultUserRead.html#data\",\"classes\":\"\",\"parent\":\"PaginatedResultUserRead\"},{\"kind\":1024,\"name\":\"total_count\",\"url\":\"interfaces/PaginatedResultUserRead.html#total_count\",\"classes\":\"\",\"parent\":\"PaginatedResultUserRead\"},{\"kind\":1024,\"name\":\"page_count\",\"url\":\"interfaces/PaginatedResultUserRead.html#page_count\",\"classes\":\"\",\"parent\":\"PaginatedResultUserRead\"},{\"kind\":256,\"name\":\"TenantCreate\",\"url\":\"interfaces/TenantCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/TenantCreate.html#key\",\"classes\":\"\",\"parent\":\"TenantCreate\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/TenantCreate.html#name\",\"classes\":\"\",\"parent\":\"TenantCreate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/TenantCreate.html#description\",\"classes\":\"\",\"parent\":\"TenantCreate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/TenantCreate.html#attributes\",\"classes\":\"\",\"parent\":\"TenantCreate\"},{\"kind\":256,\"name\":\"TenantRead\",\"url\":\"interfaces/TenantRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/TenantRead.html#key\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/TenantRead.html#id\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/TenantRead.html#organization_id\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/TenantRead.html#project_id\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/TenantRead.html#environment_id\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"created_at\",\"url\":\"interfaces/TenantRead.html#created_at\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"updated_at\",\"url\":\"interfaces/TenantRead.html#updated_at\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"last_action_at\",\"url\":\"interfaces/TenantRead.html#last_action_at\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/TenantRead.html#name\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/TenantRead.html#description\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/TenantRead.html#attributes\",\"classes\":\"\",\"parent\":\"TenantRead\"},{\"kind\":256,\"name\":\"TenantUpdate\",\"url\":\"interfaces/TenantUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/TenantUpdate.html#name\",\"classes\":\"\",\"parent\":\"TenantUpdate\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/TenantUpdate.html#description\",\"classes\":\"\",\"parent\":\"TenantUpdate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/TenantUpdate.html#attributes\",\"classes\":\"\",\"parent\":\"TenantUpdate\"},{\"kind\":256,\"name\":\"IListTenantUsers\",\"url\":\"interfaces/IListTenantUsers.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"tenantKey\",\"url\":\"interfaces/IListTenantUsers.html#tenantKey\",\"classes\":\"\",\"parent\":\"IListTenantUsers\"},{\"kind\":1024,\"name\":\"search\",\"url\":\"interfaces/IListTenantUsers.html#search\",\"classes\":\"\",\"parent\":\"IListTenantUsers\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/IListTenantUsers.html#role\",\"classes\":\"\",\"parent\":\"IListTenantUsers\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListTenantUsers.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListTenantUsers\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListTenantUsers.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListTenantUsers\"},{\"kind\":256,\"name\":\"IListTenantsParams\",\"url\":\"interfaces/IListTenantsParams.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"search\",\"url\":\"interfaces/IListTenantsParams.html#search\",\"classes\":\"\",\"parent\":\"IListTenantsParams\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IListTenantsParams.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListTenantsParams\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IListTenantsParams.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IListTenantsParams\"},{\"kind\":256,\"name\":\"ITenantsApi\",\"url\":\"interfaces/ITenantsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/ITenantsApi.html#list\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"listTenantUsers\",\"url\":\"interfaces/ITenantsApi.html#listTenantUsers\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/ITenantsApi.html#get\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/ITenantsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/ITenantsApi.html#getById\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/ITenantsApi.html#create\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/ITenantsApi.html#update\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/ITenantsApi.html#delete\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"deleteTenantUser\",\"url\":\"interfaces/ITenantsApi.html#deleteTenantUser\",\"classes\":\"\",\"parent\":\"ITenantsApi\"},{\"kind\":2048,\"name\":\"waitForSync\",\"url\":\"interfaces/ITenantsApi.html#waitForSync\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ITenantsApi\"},{\"kind\":128,\"name\":\"TenantsApi\",\"url\":\"classes/TenantsApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/TenantsApi.html#constructor\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/TenantsApi.html#list\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"listTenantUsers\",\"url\":\"classes/TenantsApi.html#listTenantUsers\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/TenantsApi.html#get\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/TenantsApi.html#getByKey\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/TenantsApi.html#getById\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/TenantsApi.html#create\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/TenantsApi.html#update\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/TenantsApi.html#delete\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"deleteTenantUser\",\"url\":\"classes/TenantsApi.html#deleteTenantUser\",\"classes\":\"\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"waitForSync\",\"url\":\"classes/TenantsApi.html#waitForSync\",\"classes\":\"tsd-is-inherited\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/TenantsApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"TenantsApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/TenantsApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"TenantsApi\"},{\"kind\":256,\"name\":\"UserCreate\",\"url\":\"interfaces/UserCreate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/UserCreate.html#key\",\"classes\":\"\",\"parent\":\"UserCreate\"},{\"kind\":1024,\"name\":\"email\",\"url\":\"interfaces/UserCreate.html#email\",\"classes\":\"\",\"parent\":\"UserCreate\"},{\"kind\":1024,\"name\":\"first_name\",\"url\":\"interfaces/UserCreate.html#first_name\",\"classes\":\"\",\"parent\":\"UserCreate\"},{\"kind\":1024,\"name\":\"last_name\",\"url\":\"interfaces/UserCreate.html#last_name\",\"classes\":\"\",\"parent\":\"UserCreate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/UserCreate.html#attributes\",\"classes\":\"\",\"parent\":\"UserCreate\"},{\"kind\":256,\"name\":\"UserRead\",\"url\":\"interfaces/UserRead.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"key\",\"url\":\"interfaces/UserRead.html#key\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/UserRead.html#id\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"organization_id\",\"url\":\"interfaces/UserRead.html#organization_id\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"project_id\",\"url\":\"interfaces/UserRead.html#project_id\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"environment_id\",\"url\":\"interfaces/UserRead.html#environment_id\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"associated_tenants\",\"url\":\"interfaces/UserRead.html#associated_tenants\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/UserRead.html#roles\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"email\",\"url\":\"interfaces/UserRead.html#email\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"first_name\",\"url\":\"interfaces/UserRead.html#first_name\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"last_name\",\"url\":\"interfaces/UserRead.html#last_name\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/UserRead.html#attributes\",\"classes\":\"\",\"parent\":\"UserRead\"},{\"kind\":256,\"name\":\"UserUpdate\",\"url\":\"interfaces/UserUpdate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"email\",\"url\":\"interfaces/UserUpdate.html#email\",\"classes\":\"\",\"parent\":\"UserUpdate\"},{\"kind\":1024,\"name\":\"first_name\",\"url\":\"interfaces/UserUpdate.html#first_name\",\"classes\":\"\",\"parent\":\"UserUpdate\"},{\"kind\":1024,\"name\":\"last_name\",\"url\":\"interfaces/UserUpdate.html#last_name\",\"classes\":\"\",\"parent\":\"UserUpdate\"},{\"kind\":1024,\"name\":\"attributes\",\"url\":\"interfaces/UserUpdate.html#attributes\",\"classes\":\"\",\"parent\":\"UserUpdate\"},{\"kind\":256,\"name\":\"ICreateOrUpdateUserResult\",\"url\":\"interfaces/ICreateOrUpdateUserResult.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"user\",\"url\":\"interfaces/ICreateOrUpdateUserResult.html#user\",\"classes\":\"\",\"parent\":\"ICreateOrUpdateUserResult\"},{\"kind\":1024,\"name\":\"created\",\"url\":\"interfaces/ICreateOrUpdateUserResult.html#created\",\"classes\":\"\",\"parent\":\"ICreateOrUpdateUserResult\"},{\"kind\":256,\"name\":\"IGetUserRoles\",\"url\":\"interfaces/IGetUserRoles.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"user\",\"url\":\"interfaces/IGetUserRoles.html#user\",\"classes\":\"\",\"parent\":\"IGetUserRoles\"},{\"kind\":1024,\"name\":\"tenant\",\"url\":\"interfaces/IGetUserRoles.html#tenant\",\"classes\":\"\",\"parent\":\"IGetUserRoles\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IGetUserRoles.html#page\",\"classes\":\"\",\"parent\":\"IGetUserRoles\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IGetUserRoles.html#perPage\",\"classes\":\"\",\"parent\":\"IGetUserRoles\"},{\"kind\":256,\"name\":\"IUsersListParams\",\"url\":\"interfaces/IUsersListParams.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"search\",\"url\":\"interfaces/IUsersListParams.html#search\",\"classes\":\"\",\"parent\":\"IUsersListParams\"},{\"kind\":1024,\"name\":\"role\",\"url\":\"interfaces/IUsersListParams.html#role\",\"classes\":\"\",\"parent\":\"IUsersListParams\"},{\"kind\":1024,\"name\":\"page\",\"url\":\"interfaces/IUsersListParams.html#page\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IUsersListParams\"},{\"kind\":1024,\"name\":\"perPage\",\"url\":\"interfaces/IUsersListParams.html#perPage\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IUsersListParams\"},{\"kind\":256,\"name\":\"IUsersApi\",\"url\":\"interfaces/IUsersApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"interfaces/IUsersApi.html#list\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"interfaces/IUsersApi.html#get\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"interfaces/IUsersApi.html#getByKey\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"interfaces/IUsersApi.html#getById\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"interfaces/IUsersApi.html#create\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"interfaces/IUsersApi.html#update\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"sync\",\"url\":\"interfaces/IUsersApi.html#sync\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"interfaces/IUsersApi.html#delete\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"interfaces/IUsersApi.html#assignRole\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"interfaces/IUsersApi.html#unassignRole\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"interfaces/IUsersApi.html#getAssignedRoles\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"bulkUserCreate\",\"url\":\"interfaces/IUsersApi.html#bulkUserCreate\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"bulkUserDelete\",\"url\":\"interfaces/IUsersApi.html#bulkUserDelete\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"bulkUserReplace\",\"url\":\"interfaces/IUsersApi.html#bulkUserReplace\",\"classes\":\"\",\"parent\":\"IUsersApi\"},{\"kind\":2048,\"name\":\"waitForSync\",\"url\":\"interfaces/IUsersApi.html#waitForSync\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IUsersApi\"},{\"kind\":128,\"name\":\"UsersApi\",\"url\":\"classes/UsersApi.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/UsersApi.html#constructor\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"list\",\"url\":\"classes/UsersApi.html#list\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/UsersApi.html#get\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"getByKey\",\"url\":\"classes/UsersApi.html#getByKey\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"getById\",\"url\":\"classes/UsersApi.html#getById\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"create\",\"url\":\"classes/UsersApi.html#create\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/UsersApi.html#update\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"sync\",\"url\":\"classes/UsersApi.html#sync\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/UsersApi.html#delete\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"classes/UsersApi.html#assignRole\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"classes/UsersApi.html#unassignRole\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"bulkUserCreate\",\"url\":\"classes/UsersApi.html#bulkUserCreate\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"bulkUserDelete\",\"url\":\"classes/UsersApi.html#bulkUserDelete\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"bulkUserReplace\",\"url\":\"classes/UsersApi.html#bulkUserReplace\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"classes/UsersApi.html#getAssignedRoles\",\"classes\":\"\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"waitForSync\",\"url\":\"classes/UsersApi.html#waitForSync\",\"classes\":\"tsd-is-inherited\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/UsersApi.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"UsersApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/UsersApi.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"UsersApi\"},{\"kind\":256,\"name\":\"IPermitApi\",\"url\":\"interfaces/IPermitApi.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"conditionSetRules\",\"url\":\"interfaces/IPermitApi.html#conditionSetRules\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"conditionSets\",\"url\":\"interfaces/IPermitApi.html#conditionSets\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"projects\",\"url\":\"interfaces/IPermitApi.html#projects\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"environments\",\"url\":\"interfaces/IPermitApi.html#environments\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"actionGroups\",\"url\":\"interfaces/IPermitApi.html#actionGroups\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"resourceActions\",\"url\":\"interfaces/IPermitApi.html#resourceActions\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"resourceAttributes\",\"url\":\"interfaces/IPermitApi.html#resourceAttributes\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"resourceRoles\",\"url\":\"interfaces/IPermitApi.html#resourceRoles\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"resourceRelations\",\"url\":\"interfaces/IPermitApi.html#resourceRelations\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"resourceInstances\",\"url\":\"interfaces/IPermitApi.html#resourceInstances\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"resources\",\"url\":\"interfaces/IPermitApi.html#resources\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"roleAssignments\",\"url\":\"interfaces/IPermitApi.html#roleAssignments\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"relationshipTuples\",\"url\":\"interfaces/IPermitApi.html#relationshipTuples\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"interfaces/IPermitApi.html#roles\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"tenants\",\"url\":\"interfaces/IPermitApi.html#tenants\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":1024,\"name\":\"users\",\"url\":\"interfaces/IPermitApi.html#users\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"interfaces/IPermitApi.html#ensureAccessLevel\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"interfaces/IPermitApi.html#ensureContext\",\"classes\":\"\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"listUsers\",\"url\":\"interfaces/IPermitApi.html#listUsers\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"listRoles\",\"url\":\"interfaces/IPermitApi.html#listRoles\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"getUser\",\"url\":\"interfaces/IPermitApi.html#getUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"getTenant\",\"url\":\"interfaces/IPermitApi.html#getTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"getRole\",\"url\":\"interfaces/IPermitApi.html#getRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"interfaces/IPermitApi.html#getAssignedRoles\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"listConditionSets\",\"url\":\"interfaces/IPermitApi.html#listConditionSets\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"listConditionSetsRules\",\"url\":\"interfaces/IPermitApi.html#listConditionSetsRules\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"createUser\",\"url\":\"interfaces/IPermitApi.html#createUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"updateUser\",\"url\":\"interfaces/IPermitApi.html#updateUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"syncUser\",\"url\":\"interfaces/IPermitApi.html#syncUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"deleteUser\",\"url\":\"interfaces/IPermitApi.html#deleteUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"createTenant\",\"url\":\"interfaces/IPermitApi.html#createTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"updateTenant\",\"url\":\"interfaces/IPermitApi.html#updateTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"deleteTenant\",\"url\":\"interfaces/IPermitApi.html#deleteTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"listTenants\",\"url\":\"interfaces/IPermitApi.html#listTenants\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"createRole\",\"url\":\"interfaces/IPermitApi.html#createRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"updateRole\",\"url\":\"interfaces/IPermitApi.html#updateRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"deleteRole\",\"url\":\"interfaces/IPermitApi.html#deleteRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"interfaces/IPermitApi.html#assignRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"interfaces/IPermitApi.html#unassignRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"createResource\",\"url\":\"interfaces/IPermitApi.html#createResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"updateResource\",\"url\":\"interfaces/IPermitApi.html#updateResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"deleteResource\",\"url\":\"interfaces/IPermitApi.html#deleteResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"createConditionSet\",\"url\":\"interfaces/IPermitApi.html#createConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"updateConditionSet\",\"url\":\"interfaces/IPermitApi.html#updateConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"deleteConditionSet\",\"url\":\"interfaces/IPermitApi.html#deleteConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"assignConditionSetRule\",\"url\":\"interfaces/IPermitApi.html#assignConditionSetRule\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":2048,\"name\":\"unassignConditionSetRule\",\"url\":\"interfaces/IPermitApi.html#unassignConditionSetRule\",\"classes\":\"tsd-is-inherited\",\"parent\":\"IPermitApi\"},{\"kind\":128,\"name\":\"ApiClient\",\"url\":\"classes/ApiClient.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ApiClient.html#constructor\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"conditionSetRules\",\"url\":\"classes/ApiClient.html#conditionSetRules\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"conditionSets\",\"url\":\"classes/ApiClient.html#conditionSets\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"projects\",\"url\":\"classes/ApiClient.html#projects\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"environments\",\"url\":\"classes/ApiClient.html#environments\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"actionGroups\",\"url\":\"classes/ApiClient.html#actionGroups\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"resourceActions\",\"url\":\"classes/ApiClient.html#resourceActions\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"resourceAttributes\",\"url\":\"classes/ApiClient.html#resourceAttributes\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"resourceRoles\",\"url\":\"classes/ApiClient.html#resourceRoles\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"resourceRelations\",\"url\":\"classes/ApiClient.html#resourceRelations\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"resourceInstances\",\"url\":\"classes/ApiClient.html#resourceInstances\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"resources\",\"url\":\"classes/ApiClient.html#resources\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"roleAssignments\",\"url\":\"classes/ApiClient.html#roleAssignments\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"relationshipTuples\",\"url\":\"classes/ApiClient.html#relationshipTuples\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"roles\",\"url\":\"classes/ApiClient.html#roles\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"tenants\",\"url\":\"classes/ApiClient.html#tenants\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"users\",\"url\":\"classes/ApiClient.html#users\",\"classes\":\"\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"listUsers\",\"url\":\"classes/ApiClient.html#listUsers\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"listRoles\",\"url\":\"classes/ApiClient.html#listRoles\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"listConditionSets\",\"url\":\"classes/ApiClient.html#listConditionSets\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"listConditionSetsRules\",\"url\":\"classes/ApiClient.html#listConditionSetsRules\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"getUser\",\"url\":\"classes/ApiClient.html#getUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"getTenant\",\"url\":\"classes/ApiClient.html#getTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"listTenants\",\"url\":\"classes/ApiClient.html#listTenants\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"getRole\",\"url\":\"classes/ApiClient.html#getRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"getAssignedRoles\",\"url\":\"classes/ApiClient.html#getAssignedRoles\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"createResource\",\"url\":\"classes/ApiClient.html#createResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"updateResource\",\"url\":\"classes/ApiClient.html#updateResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"deleteResource\",\"url\":\"classes/ApiClient.html#deleteResource\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"createUser\",\"url\":\"classes/ApiClient.html#createUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"syncUser\",\"url\":\"classes/ApiClient.html#syncUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"updateUser\",\"url\":\"classes/ApiClient.html#updateUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"deleteUser\",\"url\":\"classes/ApiClient.html#deleteUser\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"createTenant\",\"url\":\"classes/ApiClient.html#createTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"updateTenant\",\"url\":\"classes/ApiClient.html#updateTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"deleteTenant\",\"url\":\"classes/ApiClient.html#deleteTenant\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"createRole\",\"url\":\"classes/ApiClient.html#createRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"updateRole\",\"url\":\"classes/ApiClient.html#updateRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"deleteRole\",\"url\":\"classes/ApiClient.html#deleteRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"assignRole\",\"url\":\"classes/ApiClient.html#assignRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"unassignRole\",\"url\":\"classes/ApiClient.html#unassignRole\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"createConditionSet\",\"url\":\"classes/ApiClient.html#createConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"updateConditionSet\",\"url\":\"classes/ApiClient.html#updateConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"deleteConditionSet\",\"url\":\"classes/ApiClient.html#deleteConditionSet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"assignConditionSetRule\",\"url\":\"classes/ApiClient.html#assignConditionSetRule\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"unassignConditionSetRule\",\"url\":\"classes/ApiClient.html#unassignConditionSetRule\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"getMethods\",\"url\":\"classes/ApiClient.html#getMethods\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ApiClient.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ApiClient.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ApiClient\"},{\"kind\":256,\"name\":\"EmbeddedLoginRequestOutputWithContent\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"content\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html#content\",\"classes\":\"\",\"parent\":\"EmbeddedLoginRequestOutputWithContent\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html#error\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EmbeddedLoginRequestOutputWithContent\"},{\"kind\":1024,\"name\":\"error_code\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html#error_code\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EmbeddedLoginRequestOutputWithContent\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html#token\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EmbeddedLoginRequestOutputWithContent\"},{\"kind\":1024,\"name\":\"extra\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html#extra\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EmbeddedLoginRequestOutputWithContent\"},{\"kind\":1024,\"name\":\"redirect_url\",\"url\":\"interfaces/EmbeddedLoginRequestOutputWithContent.html#redirect_url\",\"classes\":\"tsd-is-inherited\",\"parent\":\"EmbeddedLoginRequestOutputWithContent\"},{\"kind\":256,\"name\":\"IPermitElementsApi\",\"url\":\"interfaces/IPermitElementsApi.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"loginAs\",\"url\":\"interfaces/IPermitElementsApi.html#loginAs\",\"classes\":\"\",\"parent\":\"IPermitElementsApi\"},{\"kind\":8,\"name\":\"ElementsApiErrors\",\"url\":\"enums/ElementsApiErrors.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"USER_NOT_FOUND\",\"url\":\"enums/ElementsApiErrors.html#USER_NOT_FOUND\",\"classes\":\"\",\"parent\":\"ElementsApiErrors\"},{\"kind\":16,\"name\":\"TENANT_NOT_FOUND\",\"url\":\"enums/ElementsApiErrors.html#TENANT_NOT_FOUND\",\"classes\":\"\",\"parent\":\"ElementsApiErrors\"},{\"kind\":16,\"name\":\"INVALID_PERMISSION_LEVEL\",\"url\":\"enums/ElementsApiErrors.html#INVALID_PERMISSION_LEVEL\",\"classes\":\"\",\"parent\":\"ElementsApiErrors\"},{\"kind\":16,\"name\":\"FORBIDDEN_ACCESS\",\"url\":\"enums/ElementsApiErrors.html#FORBIDDEN_ACCESS\",\"classes\":\"\",\"parent\":\"ElementsApiErrors\"},{\"kind\":256,\"name\":\"loginAsSchema\",\"url\":\"interfaces/loginAsSchema.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"userId\",\"url\":\"interfaces/loginAsSchema.html#userId\",\"classes\":\"\",\"parent\":\"loginAsSchema\"},{\"kind\":1024,\"name\":\"tenantId\",\"url\":\"interfaces/loginAsSchema.html#tenantId\",\"classes\":\"\",\"parent\":\"loginAsSchema\"},{\"kind\":128,\"name\":\"ElementsClient\",\"url\":\"classes/ElementsClient.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ElementsClient.html#constructor\",\"classes\":\"\",\"parent\":\"ElementsClient\"},{\"kind\":2048,\"name\":\"loginAs\",\"url\":\"classes/ElementsClient.html#loginAs\",\"classes\":\"\",\"parent\":\"ElementsClient\"},{\"kind\":2048,\"name\":\"ensureAccessLevel\",\"url\":\"classes/ElementsClient.html#ensureAccessLevel\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ElementsClient\"},{\"kind\":2048,\"name\":\"ensureContext\",\"url\":\"classes/ElementsClient.html#ensureContext\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ElementsClient\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,65.425]],[\"comment/0\",[]],[\"name/1\",[1,60.316]],[\"comment/1\",[]],[\"name/2\",[2,60.316]],[\"comment/2\",[]],[\"name/3\",[3,56.952]],[\"comment/3\",[]],[\"name/4\",[4,60.316]],[\"comment/4\",[]],[\"name/5\",[5,60.316]],[\"comment/5\",[]],[\"name/6\",[6,60.316]],[\"comment/6\",[]],[\"name/7\",[7,60.316]],[\"comment/7\",[]],[\"name/8\",[8,65.425]],[\"comment/8\",[]],[\"name/9\",[9,38.344]],[\"comment/9\",[]],[\"name/10\",[1,60.316]],[\"comment/10\",[]],[\"name/11\",[2,60.316]],[\"comment/11\",[]],[\"name/12\",[3,56.952]],[\"comment/12\",[]],[\"name/13\",[4,60.316]],[\"comment/13\",[]],[\"name/14\",[5,60.316]],[\"comment/14\",[]],[\"name/15\",[7,60.316]],[\"comment/15\",[]],[\"name/16\",[6,60.316]],[\"comment/16\",[]],[\"name/17\",[10,65.425]],[\"comment/17\",[]],[\"name/18\",[11,60.316]],[\"comment/18\",[]],[\"name/19\",[12,65.425]],[\"comment/19\",[]],[\"name/20\",[13,65.425]],[\"comment/20\",[]],[\"name/21\",[14,65.425]],[\"comment/21\",[]],[\"name/22\",[15,65.425]],[\"comment/22\",[]],[\"name/23\",[16,65.425]],[\"comment/23\",[]],[\"name/24\",[17,65.425]],[\"comment/24\",[]],[\"name/25\",[18,60.316]],[\"comment/25\",[]],[\"name/26\",[19,65.425]],[\"comment/26\",[]],[\"name/27\",[20,65.425]],[\"comment/27\",[]],[\"name/28\",[21,65.425]],[\"comment/28\",[]],[\"name/29\",[22,65.425]],[\"comment/29\",[]],[\"name/30\",[23,36.708]],[\"comment/30\",[]],[\"name/31\",[24,65.425]],[\"comment/31\",[]],[\"name/32\",[25,65.425]],[\"comment/32\",[]],[\"name/33\",[26,52.432]],[\"comment/33\",[]],[\"name/34\",[27,38.344]],[\"comment/34\",[]],[\"name/35\",[28,65.425]],[\"comment/35\",[]],[\"name/36\",[29,65.425]],[\"comment/36\",[]],[\"name/37\",[30,48.079]],[\"comment/37\",[]],[\"name/38\",[23,36.708]],[\"comment/38\",[]],[\"name/39\",[31,48.079]],[\"comment/39\",[]],[\"name/40\",[27,38.344]],[\"comment/40\",[]],[\"name/41\",[32,65.425]],[\"comment/41\",[]],[\"name/42\",[9,38.344]],[\"comment/42\",[]],[\"name/43\",[33,65.425]],[\"comment/43\",[]],[\"name/44\",[9,38.344]],[\"comment/44\",[]],[\"name/45\",[34,65.425]],[\"comment/45\",[]],[\"name/46\",[9,38.344]],[\"comment/46\",[]],[\"name/47\",[35,65.425]],[\"comment/47\",[]],[\"name/48\",[36,65.425]],[\"comment/48\",[]],[\"name/49\",[18,60.316]],[\"comment/49\",[]],[\"name/50\",[9,38.344]],[\"comment/50\",[]],[\"name/51\",[37,65.425]],[\"comment/51\",[]],[\"name/52\",[38,65.425]],[\"comment/52\",[]],[\"name/53\",[39,65.425]],[\"comment/53\",[]],[\"name/54\",[40,65.425]],[\"comment/54\",[]],[\"name/55\",[41,65.425]],[\"comment/55\",[]],[\"name/56\",[42,56.952]],[\"comment/56\",[]],[\"name/57\",[43,65.425]],[\"comment/57\",[]],[\"name/58\",[44,65.425]],[\"comment/58\",[]],[\"name/59\",[45,65.425]],[\"comment/59\",[]],[\"name/60\",[46,65.425]],[\"comment/60\",[]],[\"name/61\",[47,65.425]],[\"comment/61\",[]],[\"name/62\",[48,44.222]],[\"comment/62\",[]],[\"name/63\",[49,65.425]],[\"comment/63\",[]],[\"name/64\",[50,65.425]],[\"comment/64\",[]],[\"name/65\",[51,65.425]],[\"comment/65\",[]],[\"name/66\",[9,38.344]],[\"comment/66\",[]],[\"name/67\",[52,65.425]],[\"comment/67\",[]],[\"name/68\",[53,65.425]],[\"comment/68\",[]],[\"name/69\",[54,65.425]],[\"comment/69\",[]],[\"name/70\",[55,65.425]],[\"comment/70\",[]],[\"name/71\",[56,65.425]],[\"comment/71\",[]],[\"name/72\",[57,65.425]],[\"comment/72\",[]],[\"name/73\",[9,38.344]],[\"comment/73\",[]],[\"name/74\",[58,65.425]],[\"comment/74\",[]],[\"name/75\",[59,65.425]],[\"comment/75\",[]],[\"name/76\",[60,65.425]],[\"comment/76\",[]],[\"name/77\",[61,65.425]],[\"comment/77\",[]],[\"name/78\",[62,44.222]],[\"comment/78\",[]],[\"name/79\",[63,44.222]],[\"comment/79\",[]],[\"name/80\",[64,65.425]],[\"comment/80\",[]],[\"name/81\",[65,65.425]],[\"comment/81\",[]],[\"name/82\",[66,65.425]],[\"comment/82\",[]],[\"name/83\",[67,65.425]],[\"comment/83\",[]],[\"name/84\",[68,65.425]],[\"comment/84\",[]],[\"name/85\",[69,40.857]],[\"comment/85\",[]],[\"name/86\",[26,52.432]],[\"comment/86\",[]],[\"name/87\",[70,65.425]],[\"comment/87\",[]],[\"name/88\",[71,35.635]],[\"comment/88\",[]],[\"name/89\",[72,65.425]],[\"comment/89\",[]],[\"name/90\",[73,65.425]],[\"comment/90\",[]],[\"name/91\",[74,65.425]],[\"comment/91\",[]],[\"name/92\",[75,65.425]],[\"comment/92\",[]],[\"name/93\",[76,65.425]],[\"comment/93\",[]],[\"name/94\",[77,65.425]],[\"comment/94\",[]],[\"name/95\",[78,42.738]],[\"comment/95\",[]],[\"name/96\",[79,65.425]],[\"comment/96\",[]],[\"name/97\",[80,65.425]],[\"comment/97\",[]],[\"name/98\",[81,65.425]],[\"comment/98\",[]],[\"name/99\",[82,65.425]],[\"comment/99\",[]],[\"name/100\",[83,65.425]],[\"comment/100\",[]],[\"name/101\",[84,54.439]],[\"comment/101\",[]],[\"name/102\",[85,65.425]],[\"comment/102\",[]],[\"name/103\",[86,65.425]],[\"comment/103\",[]],[\"name/104\",[42,56.952]],[\"comment/104\",[]],[\"name/105\",[87,60.316]],[\"comment/105\",[]],[\"name/106\",[88,65.425]],[\"comment/106\",[]],[\"name/107\",[89,65.425]],[\"comment/107\",[]],[\"name/108\",[90,65.425]],[\"comment/108\",[]],[\"name/109\",[3,56.952]],[\"comment/109\",[]],[\"name/110\",[91,65.425]],[\"comment/110\",[]],[\"name/111\",[92,65.425]],[\"comment/111\",[]],[\"name/112\",[93,65.425]],[\"comment/112\",[]],[\"name/113\",[94,65.425]],[\"comment/113\",[]],[\"name/114\",[95,65.425]],[\"comment/114\",[]],[\"name/115\",[96,60.316]],[\"comment/115\",[]],[\"name/116\",[48,44.222]],[\"comment/116\",[]],[\"name/117\",[97,65.425]],[\"comment/117\",[]],[\"name/118\",[98,65.425]],[\"comment/118\",[]],[\"name/119\",[96,60.316]],[\"comment/119\",[]],[\"name/120\",[99,65.425]],[\"comment/120\",[]],[\"name/121\",[100,54.439]],[\"comment/121\",[]],[\"name/122\",[101,45.966]],[\"comment/122\",[]],[\"name/123\",[102,65.425]],[\"comment/123\",[]],[\"name/124\",[103,65.425]],[\"comment/124\",[]],[\"name/125\",[104,65.425]],[\"comment/125\",[]],[\"name/126\",[105,65.425]],[\"comment/126\",[]],[\"name/127\",[106,65.425]],[\"comment/127\",[]],[\"name/128\",[107,65.425]],[\"comment/128\",[]],[\"name/129\",[108,65.425]],[\"comment/129\",[]],[\"name/130\",[109,65.425]],[\"comment/130\",[]],[\"name/131\",[110,65.425]],[\"comment/131\",[]],[\"name/132\",[101,45.966]],[\"comment/132\",[]],[\"name/133\",[111,56.952]],[\"comment/133\",[]],[\"name/134\",[112,65.425]],[\"comment/134\",[]],[\"name/135\",[100,54.439]],[\"comment/135\",[]],[\"name/136\",[113,56.952]],[\"comment/136\",[]],[\"name/137\",[114,65.425]],[\"comment/137\",[]],[\"name/138\",[115,65.425]],[\"comment/138\",[]],[\"name/139\",[116,65.425]],[\"comment/139\",[]],[\"name/140\",[117,65.425]],[\"comment/140\",[]],[\"name/141\",[118,65.425]],[\"comment/141\",[]],[\"name/142\",[119,65.425]],[\"comment/142\",[]],[\"name/143\",[120,65.425]],[\"comment/143\",[]],[\"name/144\",[121,65.425]],[\"comment/144\",[]],[\"name/145\",[122,65.425]],[\"comment/145\",[]],[\"name/146\",[123,65.425]],[\"comment/146\",[]],[\"name/147\",[31,48.079]],[\"comment/147\",[]],[\"name/148\",[101,45.966]],[\"comment/148\",[]],[\"name/149\",[124,65.425]],[\"comment/149\",[]],[\"name/150\",[125,65.425]],[\"comment/150\",[]],[\"name/151\",[126,49.33]],[\"comment/151\",[]],[\"name/152\",[31,48.079]],[\"comment/152\",[]],[\"name/153\",[127,65.425]],[\"comment/153\",[]],[\"name/154\",[71,35.635]],[\"comment/154\",[]],[\"name/155\",[128,34.667]],[\"comment/155\",[]],[\"name/156\",[27,38.344]],[\"comment/156\",[]],[\"name/157\",[129,65.425]],[\"comment/157\",[]],[\"name/158\",[30,48.079]],[\"comment/158\",[]],[\"name/159\",[128,34.667]],[\"comment/159\",[]],[\"name/160\",[130,65.425]],[\"comment/160\",[]],[\"name/161\",[71,35.635]],[\"comment/161\",[]],[\"name/162\",[128,34.667]],[\"comment/162\",[]],[\"name/163\",[27,38.344]],[\"comment/163\",[]],[\"name/164\",[69,40.857]],[\"comment/164\",[]],[\"name/165\",[23,36.708]],[\"comment/165\",[]],[\"name/166\",[131,65.425]],[\"comment/166\",[]],[\"name/167\",[30,48.079]],[\"comment/167\",[]],[\"name/168\",[128,34.667]],[\"comment/168\",[]],[\"name/169\",[69,40.857]],[\"comment/169\",[]],[\"name/170\",[23,36.708]],[\"comment/170\",[]],[\"name/171\",[132,65.425]],[\"comment/171\",[]],[\"name/172\",[133,56.952]],[\"comment/172\",[]],[\"name/173\",[134,56.952]],[\"comment/173\",[]],[\"name/174\",[135,56.952]],[\"comment/174\",[]],[\"name/175\",[136,60.316]],[\"comment/175\",[]],[\"name/176\",[137,60.316]],[\"comment/176\",[]],[\"name/177\",[138,65.425]],[\"comment/177\",[]],[\"name/178\",[69,40.857]],[\"comment/178\",[]],[\"name/179\",[23,36.708]],[\"comment/179\",[]],[\"name/180\",[133,56.952]],[\"comment/180\",[]],[\"name/181\",[134,56.952]],[\"comment/181\",[]],[\"name/182\",[135,56.952]],[\"comment/182\",[]],[\"name/183\",[139,42.738]],[\"comment/183\",[]],[\"name/184\",[140,43.452]],[\"comment/184\",[]],[\"name/185\",[141,45.056]],[\"comment/185\",[]],[\"name/186\",[78,42.738]],[\"comment/186\",[]],[\"name/187\",[142,45.056]],[\"comment/187\",[]],[\"name/188\",[143,65.425]],[\"comment/188\",[]],[\"name/189\",[133,56.952]],[\"comment/189\",[]],[\"name/190\",[134,56.952]],[\"comment/190\",[]],[\"name/191\",[135,56.952]],[\"comment/191\",[]],[\"name/192\",[136,60.316]],[\"comment/192\",[]],[\"name/193\",[137,60.316]],[\"comment/193\",[]],[\"name/194\",[144,65.425]],[\"comment/194\",[]],[\"name/195\",[145,65.425]],[\"comment/195\",[]],[\"name/196\",[146,65.425]],[\"comment/196\",[]],[\"name/197\",[147,65.425]],[\"comment/197\",[]],[\"name/198\",[62,44.222]],[\"comment/198\",[]],[\"name/199\",[63,44.222]],[\"comment/199\",[]],[\"name/200\",[148,65.425]],[\"comment/200\",[]],[\"name/201\",[149,37.493]],[\"comment/201\",[]],[\"name/202\",[150,38.344]],[\"comment/202\",[]],[\"name/203\",[151,38.344]],[\"comment/203\",[]],[\"name/204\",[152,65.425]],[\"comment/204\",[]],[\"name/205\",[9,38.344]],[\"comment/205\",[]],[\"name/206\",[149,37.493]],[\"comment/206\",[]],[\"name/207\",[150,38.344]],[\"comment/207\",[]],[\"name/208\",[151,38.344]],[\"comment/208\",[]],[\"name/209\",[153,41.446]],[\"comment/209\",[]],[\"name/210\",[154,41.446]],[\"comment/210\",[]],[\"name/211\",[155,65.425]],[\"comment/211\",[]],[\"name/212\",[23,36.708]],[\"comment/212\",[]],[\"name/213\",[30,48.079]],[\"comment/213\",[]],[\"name/214\",[156,60.316]],[\"comment/214\",[]],[\"name/215\",[157,50.761]],[\"comment/215\",[]],[\"name/216\",[71,35.635]],[\"comment/216\",[]],[\"name/217\",[128,34.667]],[\"comment/217\",[]],[\"name/218\",[158,56.952]],[\"comment/218\",[]],[\"name/219\",[159,56.952]],[\"comment/219\",[]],[\"name/220\",[160,65.425]],[\"comment/220\",[]],[\"name/221\",[23,36.708]],[\"comment/221\",[]],[\"name/222\",[30,48.079]],[\"comment/222\",[]],[\"name/223\",[156,60.316]],[\"comment/223\",[]],[\"name/224\",[157,50.761]],[\"comment/224\",[]],[\"name/225\",[69,40.857]],[\"comment/225\",[]],[\"name/226\",[139,42.738]],[\"comment/226\",[]],[\"name/227\",[140,43.452]],[\"comment/227\",[]],[\"name/228\",[141,45.056]],[\"comment/228\",[]],[\"name/229\",[78,42.738]],[\"comment/229\",[]],[\"name/230\",[142,45.056]],[\"comment/230\",[]],[\"name/231\",[161,60.316]],[\"comment/231\",[]],[\"name/232\",[71,35.635]],[\"comment/232\",[]],[\"name/233\",[128,34.667]],[\"comment/233\",[]],[\"name/234\",[158,56.952]],[\"comment/234\",[]],[\"name/235\",[159,56.952]],[\"comment/235\",[]],[\"name/236\",[162,65.425]],[\"comment/236\",[]],[\"name/237\",[71,35.635]],[\"comment/237\",[]],[\"name/238\",[128,34.667]],[\"comment/238\",[]],[\"name/239\",[158,56.952]],[\"comment/239\",[]],[\"name/240\",[159,56.952]],[\"comment/240\",[]],[\"name/241\",[163,65.425]],[\"comment/241\",[]],[\"name/242\",[149,37.493]],[\"comment/242\",[]],[\"name/243\",[164,39.275]],[\"comment/243\",[]],[\"name/244\",[165,39.275]],[\"comment/244\",[]],[\"name/245\",[166,39.275]],[\"comment/245\",[]],[\"name/246\",[150,38.344]],[\"comment/246\",[]],[\"name/247\",[167,39.275]],[\"comment/247\",[]],[\"name/248\",[151,38.344]],[\"comment/248\",[]],[\"name/249\",[168,65.425]],[\"comment/249\",[]],[\"name/250\",[9,38.344]],[\"comment/250\",[]],[\"name/251\",[149,37.493]],[\"comment/251\",[]],[\"name/252\",[164,39.275]],[\"comment/252\",[]],[\"name/253\",[165,39.275]],[\"comment/253\",[]],[\"name/254\",[166,39.275]],[\"comment/254\",[]],[\"name/255\",[150,38.344]],[\"comment/255\",[]],[\"name/256\",[167,39.275]],[\"comment/256\",[]],[\"name/257\",[151,38.344]],[\"comment/257\",[]],[\"name/258\",[153,41.446]],[\"comment/258\",[]],[\"name/259\",[154,41.446]],[\"comment/259\",[]],[\"name/260\",[169,65.425]],[\"comment/260\",[]],[\"name/261\",[170,52.432]],[\"comment/261\",[]],[\"name/262\",[171,52.432]],[\"comment/262\",[]],[\"name/263\",[172,52.432]],[\"comment/263\",[]],[\"name/264\",[173,52.432]],[\"comment/264\",[]],[\"name/265\",[174,52.432]],[\"comment/265\",[]],[\"name/266\",[175,49.33]],[\"comment/266\",[]],[\"name/267\",[176,52.432]],[\"comment/267\",[]],[\"name/268\",[177,52.432]],[\"comment/268\",[]],[\"name/269\",[178,65.425]],[\"comment/269\",[]],[\"name/270\",[179,52.432]],[\"comment/270\",[]],[\"name/271\",[180,52.432]],[\"comment/271\",[]],[\"name/272\",[181,52.432]],[\"comment/272\",[]],[\"name/273\",[182,52.432]],[\"comment/273\",[]],[\"name/274\",[183,52.432]],[\"comment/274\",[]],[\"name/275\",[184,52.432]],[\"comment/275\",[]],[\"name/276\",[185,52.432]],[\"comment/276\",[]],[\"name/277\",[186,52.432]],[\"comment/277\",[]],[\"name/278\",[187,52.432]],[\"comment/278\",[]],[\"name/279\",[188,52.432]],[\"comment/279\",[]],[\"name/280\",[189,52.432]],[\"comment/280\",[]],[\"name/281\",[190,49.33]],[\"comment/281\",[]],[\"name/282\",[191,49.33]],[\"comment/282\",[]],[\"name/283\",[192,52.432]],[\"comment/283\",[]],[\"name/284\",[193,52.432]],[\"comment/284\",[]],[\"name/285\",[194,52.432]],[\"comment/285\",[]],[\"name/286\",[195,52.432]],[\"comment/286\",[]],[\"name/287\",[196,52.432]],[\"comment/287\",[]],[\"name/288\",[197,52.432]],[\"comment/288\",[]],[\"name/289\",[198,52.432]],[\"comment/289\",[]],[\"name/290\",[199,52.432]],[\"comment/290\",[]],[\"name/291\",[200,65.425]],[\"comment/291\",[]],[\"name/292\",[170,52.432]],[\"comment/292\",[]],[\"name/293\",[171,52.432]],[\"comment/293\",[]],[\"name/294\",[172,52.432]],[\"comment/294\",[]],[\"name/295\",[173,52.432]],[\"comment/295\",[]],[\"name/296\",[174,52.432]],[\"comment/296\",[]],[\"name/297\",[175,49.33]],[\"comment/297\",[]],[\"name/298\",[176,52.432]],[\"comment/298\",[]],[\"name/299\",[177,52.432]],[\"comment/299\",[]],[\"name/300\",[179,52.432]],[\"comment/300\",[]],[\"name/301\",[180,52.432]],[\"comment/301\",[]],[\"name/302\",[181,52.432]],[\"comment/302\",[]],[\"name/303\",[182,52.432]],[\"comment/303\",[]],[\"name/304\",[183,52.432]],[\"comment/304\",[]],[\"name/305\",[184,52.432]],[\"comment/305\",[]],[\"name/306\",[185,52.432]],[\"comment/306\",[]],[\"name/307\",[186,52.432]],[\"comment/307\",[]],[\"name/308\",[187,52.432]],[\"comment/308\",[]],[\"name/309\",[188,52.432]],[\"comment/309\",[]],[\"name/310\",[189,52.432]],[\"comment/310\",[]],[\"name/311\",[190,49.33]],[\"comment/311\",[]],[\"name/312\",[191,49.33]],[\"comment/312\",[]],[\"name/313\",[192,52.432]],[\"comment/313\",[]],[\"name/314\",[193,52.432]],[\"comment/314\",[]],[\"name/315\",[194,52.432]],[\"comment/315\",[]],[\"name/316\",[195,52.432]],[\"comment/316\",[]],[\"name/317\",[196,52.432]],[\"comment/317\",[]],[\"name/318\",[197,52.432]],[\"comment/318\",[]],[\"name/319\",[198,52.432]],[\"comment/319\",[]],[\"name/320\",[199,52.432]],[\"comment/320\",[]],[\"name/321\",[201,65.425]],[\"comment/321\",[]],[\"name/322\",[9,38.344]],[\"comment/322\",[]],[\"name/323\",[170,52.432]],[\"comment/323\",[]],[\"name/324\",[171,52.432]],[\"comment/324\",[]],[\"name/325\",[176,52.432]],[\"comment/325\",[]],[\"name/326\",[177,52.432]],[\"comment/326\",[]],[\"name/327\",[172,52.432]],[\"comment/327\",[]],[\"name/328\",[173,52.432]],[\"comment/328\",[]],[\"name/329\",[186,52.432]],[\"comment/329\",[]],[\"name/330\",[174,52.432]],[\"comment/330\",[]],[\"name/331\",[175,49.33]],[\"comment/331\",[]],[\"name/332\",[192,52.432]],[\"comment/332\",[]],[\"name/333\",[193,52.432]],[\"comment/333\",[]],[\"name/334\",[194,52.432]],[\"comment/334\",[]],[\"name/335\",[179,52.432]],[\"comment/335\",[]],[\"name/336\",[181,52.432]],[\"comment/336\",[]],[\"name/337\",[180,52.432]],[\"comment/337\",[]],[\"name/338\",[182,52.432]],[\"comment/338\",[]],[\"name/339\",[183,52.432]],[\"comment/339\",[]],[\"name/340\",[184,52.432]],[\"comment/340\",[]],[\"name/341\",[185,52.432]],[\"comment/341\",[]],[\"name/342\",[187,52.432]],[\"comment/342\",[]],[\"name/343\",[188,52.432]],[\"comment/343\",[]],[\"name/344\",[189,52.432]],[\"comment/344\",[]],[\"name/345\",[190,49.33]],[\"comment/345\",[]],[\"name/346\",[191,49.33]],[\"comment/346\",[]],[\"name/347\",[195,52.432]],[\"comment/347\",[]],[\"name/348\",[196,52.432]],[\"comment/348\",[]],[\"name/349\",[197,52.432]],[\"comment/349\",[]],[\"name/350\",[198,52.432]],[\"comment/350\",[]],[\"name/351\",[199,52.432]],[\"comment/351\",[]],[\"name/352\",[202,60.316]],[\"comment/352\",[]],[\"name/353\",[153,41.446]],[\"comment/353\",[]],[\"name/354\",[154,41.446]],[\"comment/354\",[]],[\"name/355\",[203,65.425]],[\"comment/355\",[]],[\"name/356\",[139,42.738]],[\"comment/356\",[]],[\"name/357\",[140,43.452]],[\"comment/357\",[]],[\"name/358\",[141,45.056]],[\"comment/358\",[]],[\"name/359\",[204,65.425]],[\"comment/359\",[]],[\"name/360\",[205,65.425]],[\"comment/360\",[]],[\"name/361\",[206,65.425]],[\"comment/361\",[]],[\"name/362\",[71,35.635]],[\"comment/362\",[]],[\"name/363\",[69,40.857]],[\"comment/363\",[]],[\"name/364\",[207,65.425]],[\"comment/364\",[]],[\"name/365\",[78,42.738]],[\"comment/365\",[]],[\"name/366\",[208,65.425]],[\"comment/366\",[]],[\"name/367\",[209,65.425]],[\"comment/367\",[]],[\"name/368\",[87,60.316]],[\"comment/368\",[]],[\"name/369\",[42,56.952]],[\"comment/369\",[]],[\"name/370\",[210,65.425]],[\"comment/370\",[]],[\"name/371\",[211,65.425]],[\"comment/371\",[]],[\"name/372\",[212,65.425]],[\"comment/372\",[]],[\"name/373\",[213,65.425]],[\"comment/373\",[]],[\"name/374\",[214,65.425]],[\"comment/374\",[]],[\"name/375\",[23,36.708]],[\"comment/375\",[]],[\"name/376\",[71,35.635]],[\"comment/376\",[]],[\"name/377\",[128,34.667]],[\"comment/377\",[]],[\"name/378\",[215,54.439]],[\"comment/378\",[]],[\"name/379\",[216,54.439]],[\"comment/379\",[]],[\"name/380\",[217,65.425]],[\"comment/380\",[]],[\"name/381\",[23,36.708]],[\"comment/381\",[]],[\"name/382\",[69,40.857]],[\"comment/382\",[]],[\"name/383\",[139,42.738]],[\"comment/383\",[]],[\"name/384\",[140,43.452]],[\"comment/384\",[]],[\"name/385\",[78,42.738]],[\"comment/385\",[]],[\"name/386\",[142,45.056]],[\"comment/386\",[]],[\"name/387\",[71,35.635]],[\"comment/387\",[]],[\"name/388\",[128,34.667]],[\"comment/388\",[]],[\"name/389\",[215,54.439]],[\"comment/389\",[]],[\"name/390\",[216,54.439]],[\"comment/390\",[]],[\"name/391\",[218,65.425]],[\"comment/391\",[]],[\"name/392\",[23,36.708]],[\"comment/392\",[]],[\"name/393\",[69,40.857]],[\"comment/393\",[]],[\"name/394\",[139,42.738]],[\"comment/394\",[]],[\"name/395\",[140,43.452]],[\"comment/395\",[]],[\"name/396\",[78,42.738]],[\"comment/396\",[]],[\"name/397\",[142,45.056]],[\"comment/397\",[]],[\"name/398\",[71,35.635]],[\"comment/398\",[]],[\"name/399\",[128,34.667]],[\"comment/399\",[]],[\"name/400\",[215,54.439]],[\"comment/400\",[]],[\"name/401\",[216,54.439]],[\"comment/401\",[]],[\"name/402\",[219,65.425]],[\"comment/402\",[]],[\"name/403\",[220,65.425]],[\"comment/403\",[]],[\"name/404\",[221,65.425]],[\"comment/404\",[]],[\"name/405\",[71,35.635]],[\"comment/405\",[]],[\"name/406\",[128,34.667]],[\"comment/406\",[]],[\"name/407\",[215,54.439]],[\"comment/407\",[]],[\"name/408\",[216,54.439]],[\"comment/408\",[]],[\"name/409\",[222,65.425]],[\"comment/409\",[]],[\"name/410\",[223,65.425]],[\"comment/410\",[]],[\"name/411\",[62,44.222]],[\"comment/411\",[]],[\"name/412\",[63,44.222]],[\"comment/412\",[]],[\"name/413\",[224,65.425]],[\"comment/413\",[]],[\"name/414\",[149,37.493]],[\"comment/414\",[]],[\"name/415\",[164,39.275]],[\"comment/415\",[]],[\"name/416\",[165,39.275]],[\"comment/416\",[]],[\"name/417\",[166,39.275]],[\"comment/417\",[]],[\"name/418\",[225,60.316]],[\"comment/418\",[]],[\"name/419\",[226,60.316]],[\"comment/419\",[]],[\"name/420\",[150,38.344]],[\"comment/420\",[]],[\"name/421\",[167,39.275]],[\"comment/421\",[]],[\"name/422\",[227,60.316]],[\"comment/422\",[]],[\"name/423\",[151,38.344]],[\"comment/423\",[]],[\"name/424\",[228,65.425]],[\"comment/424\",[]],[\"name/425\",[9,38.344]],[\"comment/425\",[]],[\"name/426\",[149,37.493]],[\"comment/426\",[]],[\"name/427\",[164,39.275]],[\"comment/427\",[]],[\"name/428\",[165,39.275]],[\"comment/428\",[]],[\"name/429\",[166,39.275]],[\"comment/429\",[]],[\"name/430\",[225,60.316]],[\"comment/430\",[]],[\"name/431\",[226,60.316]],[\"comment/431\",[]],[\"name/432\",[150,38.344]],[\"comment/432\",[]],[\"name/433\",[167,39.275]],[\"comment/433\",[]],[\"name/434\",[227,60.316]],[\"comment/434\",[]],[\"name/435\",[151,38.344]],[\"comment/435\",[]],[\"name/436\",[153,41.446]],[\"comment/436\",[]],[\"name/437\",[154,41.446]],[\"comment/437\",[]],[\"name/438\",[229,65.425]],[\"comment/438\",[]],[\"name/439\",[23,36.708]],[\"comment/439\",[]],[\"name/440\",[230,60.316]],[\"comment/440\",[]],[\"name/441\",[71,35.635]],[\"comment/441\",[]],[\"name/442\",[128,34.667]],[\"comment/442\",[]],[\"name/443\",[84,54.439]],[\"comment/443\",[]],[\"name/444\",[231,56.952]],[\"comment/444\",[]],[\"name/445\",[232,65.425]],[\"comment/445\",[]],[\"name/446\",[23,36.708]],[\"comment/446\",[]],[\"name/447\",[230,60.316]],[\"comment/447\",[]],[\"name/448\",[69,40.857]],[\"comment/448\",[]],[\"name/449\",[139,42.738]],[\"comment/449\",[]],[\"name/450\",[78,42.738]],[\"comment/450\",[]],[\"name/451\",[142,45.056]],[\"comment/451\",[]],[\"name/452\",[71,35.635]],[\"comment/452\",[]],[\"name/453\",[128,34.667]],[\"comment/453\",[]],[\"name/454\",[84,54.439]],[\"comment/454\",[]],[\"name/455\",[231,56.952]],[\"comment/455\",[]],[\"name/456\",[233,65.425]],[\"comment/456\",[]],[\"name/457\",[71,35.635]],[\"comment/457\",[]],[\"name/458\",[128,34.667]],[\"comment/458\",[]],[\"name/459\",[84,54.439]],[\"comment/459\",[]],[\"name/460\",[231,56.952]],[\"comment/460\",[]],[\"name/461\",[234,65.425]],[\"comment/461\",[]],[\"name/462\",[149,37.493]],[\"comment/462\",[]],[\"name/463\",[164,39.275]],[\"comment/463\",[]],[\"name/464\",[165,39.275]],[\"comment/464\",[]],[\"name/465\",[166,39.275]],[\"comment/465\",[]],[\"name/466\",[150,38.344]],[\"comment/466\",[]],[\"name/467\",[167,39.275]],[\"comment/467\",[]],[\"name/468\",[151,38.344]],[\"comment/468\",[]],[\"name/469\",[235,65.425]],[\"comment/469\",[]],[\"name/470\",[9,38.344]],[\"comment/470\",[]],[\"name/471\",[149,37.493]],[\"comment/471\",[]],[\"name/472\",[164,39.275]],[\"comment/472\",[]],[\"name/473\",[165,39.275]],[\"comment/473\",[]],[\"name/474\",[166,39.275]],[\"comment/474\",[]],[\"name/475\",[150,38.344]],[\"comment/475\",[]],[\"name/476\",[167,39.275]],[\"comment/476\",[]],[\"name/477\",[151,38.344]],[\"comment/477\",[]],[\"name/478\",[153,41.446]],[\"comment/478\",[]],[\"name/479\",[154,41.446]],[\"comment/479\",[]],[\"name/480\",[236,65.425]],[\"comment/480\",[]],[\"name/481\",[23,36.708]],[\"comment/481\",[]],[\"name/482\",[71,35.635]],[\"comment/482\",[]],[\"name/483\",[128,34.667]],[\"comment/483\",[]],[\"name/484\",[27,38.344]],[\"comment/484\",[]],[\"name/485\",[237,50.761]],[\"comment/485\",[]],[\"name/486\",[238,65.425]],[\"comment/486\",[]],[\"name/487\",[71,35.635]],[\"comment/487\",[]],[\"name/488\",[128,34.667]],[\"comment/488\",[]],[\"name/489\",[27,38.344]],[\"comment/489\",[]],[\"name/490\",[237,50.761]],[\"comment/490\",[]],[\"name/491\",[23,36.708]],[\"comment/491\",[]],[\"name/492\",[69,40.857]],[\"comment/492\",[]],[\"name/493\",[139,42.738]],[\"comment/493\",[]],[\"name/494\",[140,43.452]],[\"comment/494\",[]],[\"name/495\",[141,45.056]],[\"comment/495\",[]],[\"name/496\",[157,50.761]],[\"comment/496\",[]],[\"name/497\",[78,42.738]],[\"comment/497\",[]],[\"name/498\",[142,45.056]],[\"comment/498\",[]],[\"name/499\",[239,65.425]],[\"comment/499\",[]],[\"name/500\",[240,54.439]],[\"comment/500\",[]],[\"name/501\",[62,44.222]],[\"comment/501\",[]],[\"name/502\",[63,44.222]],[\"comment/502\",[]],[\"name/503\",[241,65.425]],[\"comment/503\",[]],[\"name/504\",[149,37.493]],[\"comment/504\",[]],[\"name/505\",[164,39.275]],[\"comment/505\",[]],[\"name/506\",[165,39.275]],[\"comment/506\",[]],[\"name/507\",[166,39.275]],[\"comment/507\",[]],[\"name/508\",[150,38.344]],[\"comment/508\",[]],[\"name/509\",[167,39.275]],[\"comment/509\",[]],[\"name/510\",[151,38.344]],[\"comment/510\",[]],[\"name/511\",[242,65.425]],[\"comment/511\",[]],[\"name/512\",[9,38.344]],[\"comment/512\",[]],[\"name/513\",[149,37.493]],[\"comment/513\",[]],[\"name/514\",[164,39.275]],[\"comment/514\",[]],[\"name/515\",[165,39.275]],[\"comment/515\",[]],[\"name/516\",[166,39.275]],[\"comment/516\",[]],[\"name/517\",[150,38.344]],[\"comment/517\",[]],[\"name/518\",[167,39.275]],[\"comment/518\",[]],[\"name/519\",[151,38.344]],[\"comment/519\",[]],[\"name/520\",[153,41.446]],[\"comment/520\",[]],[\"name/521\",[154,41.446]],[\"comment/521\",[]],[\"name/522\",[243,65.425]],[\"comment/522\",[]],[\"name/523\",[23,36.708]],[\"comment/523\",[]],[\"name/524\",[71,35.635]],[\"comment/524\",[]],[\"name/525\",[128,34.667]],[\"comment/525\",[]],[\"name/526\",[27,38.344]],[\"comment/526\",[]],[\"name/527\",[244,65.425]],[\"comment/527\",[]],[\"name/528\",[71,35.635]],[\"comment/528\",[]],[\"name/529\",[128,34.667]],[\"comment/529\",[]],[\"name/530\",[27,38.344]],[\"comment/530\",[]],[\"name/531\",[23,36.708]],[\"comment/531\",[]],[\"name/532\",[69,40.857]],[\"comment/532\",[]],[\"name/533\",[245,65.425]],[\"comment/533\",[]],[\"name/534\",[139,42.738]],[\"comment/534\",[]],[\"name/535\",[140,43.452]],[\"comment/535\",[]],[\"name/536\",[141,45.056]],[\"comment/536\",[]],[\"name/537\",[157,50.761]],[\"comment/537\",[]],[\"name/538\",[78,42.738]],[\"comment/538\",[]],[\"name/539\",[142,45.056]],[\"comment/539\",[]],[\"name/540\",[246,65.425]],[\"comment/540\",[]],[\"name/541\",[71,35.635]],[\"comment/541\",[]],[\"name/542\",[128,34.667]],[\"comment/542\",[]],[\"name/543\",[27,38.344]],[\"comment/543\",[]],[\"name/544\",[247,65.425]],[\"comment/544\",[]],[\"name/545\",[240,54.439]],[\"comment/545\",[]],[\"name/546\",[62,44.222]],[\"comment/546\",[]],[\"name/547\",[63,44.222]],[\"comment/547\",[]],[\"name/548\",[248,65.425]],[\"comment/548\",[]],[\"name/549\",[149,37.493]],[\"comment/549\",[]],[\"name/550\",[164,39.275]],[\"comment/550\",[]],[\"name/551\",[165,39.275]],[\"comment/551\",[]],[\"name/552\",[166,39.275]],[\"comment/552\",[]],[\"name/553\",[150,38.344]],[\"comment/553\",[]],[\"name/554\",[167,39.275]],[\"comment/554\",[]],[\"name/555\",[151,38.344]],[\"comment/555\",[]],[\"name/556\",[249,65.425]],[\"comment/556\",[]],[\"name/557\",[9,38.344]],[\"comment/557\",[]],[\"name/558\",[149,37.493]],[\"comment/558\",[]],[\"name/559\",[164,39.275]],[\"comment/559\",[]],[\"name/560\",[165,39.275]],[\"comment/560\",[]],[\"name/561\",[166,39.275]],[\"comment/561\",[]],[\"name/562\",[150,38.344]],[\"comment/562\",[]],[\"name/563\",[167,39.275]],[\"comment/563\",[]],[\"name/564\",[151,38.344]],[\"comment/564\",[]],[\"name/565\",[153,41.446]],[\"comment/565\",[]],[\"name/566\",[154,41.446]],[\"comment/566\",[]],[\"name/567\",[250,65.425]],[\"comment/567\",[]],[\"name/568\",[23,36.708]],[\"comment/568\",[]],[\"name/569\",[30,48.079]],[\"comment/569\",[]],[\"name/570\",[128,34.667]],[\"comment/570\",[]],[\"name/571\",[251,65.425]],[\"comment/571\",[]],[\"name/572\",[30,48.079]],[\"comment/572\",[]],[\"name/573\",[128,34.667]],[\"comment/573\",[]],[\"name/574\",[23,36.708]],[\"comment/574\",[]],[\"name/575\",[69,40.857]],[\"comment/575\",[]],[\"name/576\",[157,50.761]],[\"comment/576\",[]],[\"name/577\",[252,65.425]],[\"comment/577\",[]],[\"name/578\",[139,42.738]],[\"comment/578\",[]],[\"name/579\",[140,43.452]],[\"comment/579\",[]],[\"name/580\",[141,45.056]],[\"comment/580\",[]],[\"name/581\",[78,42.738]],[\"comment/581\",[]],[\"name/582\",[142,45.056]],[\"comment/582\",[]],[\"name/583\",[253,65.425]],[\"comment/583\",[]],[\"name/584\",[254,65.425]],[\"comment/584\",[]],[\"name/585\",[30,48.079]],[\"comment/585\",[]],[\"name/586\",[128,34.667]],[\"comment/586\",[]],[\"name/587\",[255,65.425]],[\"comment/587\",[]],[\"name/588\",[240,54.439]],[\"comment/588\",[]],[\"name/589\",[62,44.222]],[\"comment/589\",[]],[\"name/590\",[63,44.222]],[\"comment/590\",[]],[\"name/591\",[256,65.425]],[\"comment/591\",[]],[\"name/592\",[149,37.493]],[\"comment/592\",[]],[\"name/593\",[164,39.275]],[\"comment/593\",[]],[\"name/594\",[165,39.275]],[\"comment/594\",[]],[\"name/595\",[166,39.275]],[\"comment/595\",[]],[\"name/596\",[150,38.344]],[\"comment/596\",[]],[\"name/597\",[167,39.275]],[\"comment/597\",[]],[\"name/598\",[151,38.344]],[\"comment/598\",[]],[\"name/599\",[257,65.425]],[\"comment/599\",[]],[\"name/600\",[9,38.344]],[\"comment/600\",[]],[\"name/601\",[149,37.493]],[\"comment/601\",[]],[\"name/602\",[164,39.275]],[\"comment/602\",[]],[\"name/603\",[165,39.275]],[\"comment/603\",[]],[\"name/604\",[166,39.275]],[\"comment/604\",[]],[\"name/605\",[150,38.344]],[\"comment/605\",[]],[\"name/606\",[167,39.275]],[\"comment/606\",[]],[\"name/607\",[151,38.344]],[\"comment/607\",[]],[\"name/608\",[153,41.446]],[\"comment/608\",[]],[\"name/609\",[154,41.446]],[\"comment/609\",[]],[\"name/610\",[258,65.425]],[\"comment/610\",[]],[\"name/611\",[23,36.708]],[\"comment/611\",[]],[\"name/612\",[71,35.635]],[\"comment/612\",[]],[\"name/613\",[259,54.439]],[\"comment/613\",[]],[\"name/614\",[128,34.667]],[\"comment/614\",[]],[\"name/615\",[237,50.761]],[\"comment/615\",[]],[\"name/616\",[48,44.222]],[\"comment/616\",[]],[\"name/617\",[27,38.344]],[\"comment/617\",[]],[\"name/618\",[48,44.222]],[\"comment/618\",[]],[\"name/619\",[101,45.966]],[\"comment/619\",[]],[\"name/620\",[260,54.439]],[\"comment/620\",[]],[\"name/621\",[261,65.425]],[\"comment/621\",[]],[\"name/622\",[23,36.708]],[\"comment/622\",[]],[\"name/623\",[69,40.857]],[\"comment/623\",[]],[\"name/624\",[139,42.738]],[\"comment/624\",[]],[\"name/625\",[140,43.452]],[\"comment/625\",[]],[\"name/626\",[141,45.056]],[\"comment/626\",[]],[\"name/627\",[78,42.738]],[\"comment/627\",[]],[\"name/628\",[142,45.056]],[\"comment/628\",[]],[\"name/629\",[71,35.635]],[\"comment/629\",[]],[\"name/630\",[259,54.439]],[\"comment/630\",[]],[\"name/631\",[128,34.667]],[\"comment/631\",[]],[\"name/632\",[237,50.761]],[\"comment/632\",[]],[\"name/633\",[48,44.222]],[\"comment/633\",[]],[\"name/634\",[27,38.344]],[\"comment/634\",[]],[\"name/635\",[48,44.222]],[\"comment/635\",[]],[\"name/636\",[101,45.966]],[\"comment/636\",[]],[\"name/637\",[260,54.439]],[\"comment/637\",[]],[\"name/638\",[48,44.222]],[\"comment/638\",[]],[\"name/639\",[262,65.425]],[\"comment/639\",[]],[\"name/640\",[48,44.222]],[\"comment/640\",[]],[\"name/641\",[263,65.425]],[\"comment/641\",[]],[\"name/642\",[71,35.635]],[\"comment/642\",[]],[\"name/643\",[259,54.439]],[\"comment/643\",[]],[\"name/644\",[128,34.667]],[\"comment/644\",[]],[\"name/645\",[237,50.761]],[\"comment/645\",[]],[\"name/646\",[48,44.222]],[\"comment/646\",[]],[\"name/647\",[27,38.344]],[\"comment/647\",[]],[\"name/648\",[48,44.222]],[\"comment/648\",[]],[\"name/649\",[101,45.966]],[\"comment/649\",[]],[\"name/650\",[260,54.439]],[\"comment/650\",[]],[\"name/651\",[264,65.425]],[\"comment/651\",[]],[\"name/652\",[71,35.635]],[\"comment/652\",[]],[\"name/653\",[259,54.439]],[\"comment/653\",[]],[\"name/654\",[128,34.667]],[\"comment/654\",[]],[\"name/655\",[237,50.761]],[\"comment/655\",[]],[\"name/656\",[48,44.222]],[\"comment/656\",[]],[\"name/657\",[27,38.344]],[\"comment/657\",[]],[\"name/658\",[48,44.222]],[\"comment/658\",[]],[\"name/659\",[101,45.966]],[\"comment/659\",[]],[\"name/660\",[260,54.439]],[\"comment/660\",[]],[\"name/661\",[265,65.425]],[\"comment/661\",[]],[\"name/662\",[240,54.439]],[\"comment/662\",[]],[\"name/663\",[62,44.222]],[\"comment/663\",[]],[\"name/664\",[63,44.222]],[\"comment/664\",[]],[\"name/665\",[266,65.425]],[\"comment/665\",[]],[\"name/666\",[149,37.493]],[\"comment/666\",[]],[\"name/667\",[164,39.275]],[\"comment/667\",[]],[\"name/668\",[165,39.275]],[\"comment/668\",[]],[\"name/669\",[166,39.275]],[\"comment/669\",[]],[\"name/670\",[150,38.344]],[\"comment/670\",[]],[\"name/671\",[267,60.316]],[\"comment/671\",[]],[\"name/672\",[167,39.275]],[\"comment/672\",[]],[\"name/673\",[151,38.344]],[\"comment/673\",[]],[\"name/674\",[268,65.425]],[\"comment/674\",[]],[\"name/675\",[9,38.344]],[\"comment/675\",[]],[\"name/676\",[149,37.493]],[\"comment/676\",[]],[\"name/677\",[164,39.275]],[\"comment/677\",[]],[\"name/678\",[165,39.275]],[\"comment/678\",[]],[\"name/679\",[166,39.275]],[\"comment/679\",[]],[\"name/680\",[150,38.344]],[\"comment/680\",[]],[\"name/681\",[267,60.316]],[\"comment/681\",[]],[\"name/682\",[167,39.275]],[\"comment/682\",[]],[\"name/683\",[151,38.344]],[\"comment/683\",[]],[\"name/684\",[153,41.446]],[\"comment/684\",[]],[\"name/685\",[154,41.446]],[\"comment/685\",[]],[\"name/686\",[269,65.425]],[\"comment/686\",[]],[\"name/687\",[270,65.425]],[\"comment/687\",[]],[\"name/688\",[271,65.425]],[\"comment/688\",[]],[\"name/689\",[272,65.425]],[\"comment/689\",[]],[\"name/690\",[273,65.425]],[\"comment/690\",[]],[\"name/691\",[126,49.33]],[\"comment/691\",[]],[\"name/692\",[31,48.079]],[\"comment/692\",[]],[\"name/693\",[274,56.952]],[\"comment/693\",[]],[\"name/694\",[275,50.761]],[\"comment/694\",[]],[\"name/695\",[276,65.425]],[\"comment/695\",[]],[\"name/696\",[69,40.857]],[\"comment/696\",[]],[\"name/697\",[275,50.761]],[\"comment/697\",[]],[\"name/698\",[126,49.33]],[\"comment/698\",[]],[\"name/699\",[31,48.079]],[\"comment/699\",[]],[\"name/700\",[161,60.316]],[\"comment/700\",[]],[\"name/701\",[274,56.952]],[\"comment/701\",[]],[\"name/702\",[157,50.761]],[\"comment/702\",[]],[\"name/703\",[277,65.425]],[\"comment/703\",[]],[\"name/704\",[278,65.425]],[\"comment/704\",[]],[\"name/705\",[279,65.425]],[\"comment/705\",[]],[\"name/706\",[280,65.425]],[\"comment/706\",[]],[\"name/707\",[139,42.738]],[\"comment/707\",[]],[\"name/708\",[140,43.452]],[\"comment/708\",[]],[\"name/709\",[141,45.056]],[\"comment/709\",[]],[\"name/710\",[78,42.738]],[\"comment/710\",[]],[\"name/711\",[281,65.425]],[\"comment/711\",[]],[\"name/712\",[126,49.33]],[\"comment/712\",[]],[\"name/713\",[31,48.079]],[\"comment/713\",[]],[\"name/714\",[274,56.952]],[\"comment/714\",[]],[\"name/715\",[275,50.761]],[\"comment/715\",[]],[\"name/716\",[282,65.425]],[\"comment/716\",[]],[\"name/717\",[275,50.761]],[\"comment/717\",[]],[\"name/718\",[126,49.33]],[\"comment/718\",[]],[\"name/719\",[31,48.079]],[\"comment/719\",[]],[\"name/720\",[283,65.425]],[\"comment/720\",[]],[\"name/721\",[62,44.222]],[\"comment/721\",[]],[\"name/722\",[63,44.222]],[\"comment/722\",[]],[\"name/723\",[284,65.425]],[\"comment/723\",[]],[\"name/724\",[149,37.493]],[\"comment/724\",[]],[\"name/725\",[285,60.316]],[\"comment/725\",[]],[\"name/726\",[286,60.316]],[\"comment/726\",[]],[\"name/727\",[287,60.316]],[\"comment/727\",[]],[\"name/728\",[288,60.316]],[\"comment/728\",[]],[\"name/729\",[289,50.761]],[\"comment/729\",[]],[\"name/730\",[290,65.425]],[\"comment/730\",[]],[\"name/731\",[9,38.344]],[\"comment/731\",[]],[\"name/732\",[149,37.493]],[\"comment/732\",[]],[\"name/733\",[285,60.316]],[\"comment/733\",[]],[\"name/734\",[286,60.316]],[\"comment/734\",[]],[\"name/735\",[287,60.316]],[\"comment/735\",[]],[\"name/736\",[288,60.316]],[\"comment/736\",[]],[\"name/737\",[289,50.761]],[\"comment/737\",[]],[\"name/738\",[153,41.446]],[\"comment/738\",[]],[\"name/739\",[154,41.446]],[\"comment/739\",[]],[\"name/740\",[291,65.425]],[\"comment/740\",[]],[\"name/741\",[23,36.708]],[\"comment/741\",[]],[\"name/742\",[71,35.635]],[\"comment/742\",[]],[\"name/743\",[128,34.667]],[\"comment/743\",[]],[\"name/744\",[292,56.952]],[\"comment/744\",[]],[\"name/745\",[27,38.344]],[\"comment/745\",[]],[\"name/746\",[293,56.952]],[\"comment/746\",[]],[\"name/747\",[294,65.425]],[\"comment/747\",[]],[\"name/748\",[71,35.635]],[\"comment/748\",[]],[\"name/749\",[128,34.667]],[\"comment/749\",[]],[\"name/750\",[292,56.952]],[\"comment/750\",[]],[\"name/751\",[27,38.344]],[\"comment/751\",[]],[\"name/752\",[293,56.952]],[\"comment/752\",[]],[\"name/753\",[23,36.708]],[\"comment/753\",[]],[\"name/754\",[69,40.857]],[\"comment/754\",[]],[\"name/755\",[139,42.738]],[\"comment/755\",[]],[\"name/756\",[140,43.452]],[\"comment/756\",[]],[\"name/757\",[141,45.056]],[\"comment/757\",[]],[\"name/758\",[78,42.738]],[\"comment/758\",[]],[\"name/759\",[142,45.056]],[\"comment/759\",[]],[\"name/760\",[295,65.425]],[\"comment/760\",[]],[\"name/761\",[71,35.635]],[\"comment/761\",[]],[\"name/762\",[128,34.667]],[\"comment/762\",[]],[\"name/763\",[292,56.952]],[\"comment/763\",[]],[\"name/764\",[27,38.344]],[\"comment/764\",[]],[\"name/765\",[293,56.952]],[\"comment/765\",[]],[\"name/766\",[296,65.425]],[\"comment/766\",[]],[\"name/767\",[149,37.493]],[\"comment/767\",[]],[\"name/768\",[164,39.275]],[\"comment/768\",[]],[\"name/769\",[165,39.275]],[\"comment/769\",[]],[\"name/770\",[166,39.275]],[\"comment/770\",[]],[\"name/771\",[150,38.344]],[\"comment/771\",[]],[\"name/772\",[167,39.275]],[\"comment/772\",[]],[\"name/773\",[151,38.344]],[\"comment/773\",[]],[\"name/774\",[297,60.316]],[\"comment/774\",[]],[\"name/775\",[298,60.316]],[\"comment/775\",[]],[\"name/776\",[299,65.425]],[\"comment/776\",[]],[\"name/777\",[9,38.344]],[\"comment/777\",[]],[\"name/778\",[149,37.493]],[\"comment/778\",[]],[\"name/779\",[164,39.275]],[\"comment/779\",[]],[\"name/780\",[165,39.275]],[\"comment/780\",[]],[\"name/781\",[166,39.275]],[\"comment/781\",[]],[\"name/782\",[150,38.344]],[\"comment/782\",[]],[\"name/783\",[167,39.275]],[\"comment/783\",[]],[\"name/784\",[151,38.344]],[\"comment/784\",[]],[\"name/785\",[297,60.316]],[\"comment/785\",[]],[\"name/786\",[298,60.316]],[\"comment/786\",[]],[\"name/787\",[153,41.446]],[\"comment/787\",[]],[\"name/788\",[154,41.446]],[\"comment/788\",[]],[\"name/789\",[300,65.425]],[\"comment/789\",[]],[\"name/790\",[301,65.425]],[\"comment/790\",[]],[\"name/791\",[302,65.425]],[\"comment/791\",[]],[\"name/792\",[303,65.425]],[\"comment/792\",[]],[\"name/793\",[304,65.425]],[\"comment/793\",[]],[\"name/794\",[23,36.708]],[\"comment/794\",[]],[\"name/795\",[71,35.635]],[\"comment/795\",[]],[\"name/796\",[128,34.667]],[\"comment/796\",[]],[\"name/797\",[27,38.344]],[\"comment/797\",[]],[\"name/798\",[305,65.425]],[\"comment/798\",[]],[\"name/799\",[23,36.708]],[\"comment/799\",[]],[\"name/800\",[69,40.857]],[\"comment/800\",[]],[\"name/801\",[139,42.738]],[\"comment/801\",[]],[\"name/802\",[140,43.452]],[\"comment/802\",[]],[\"name/803\",[141,45.056]],[\"comment/803\",[]],[\"name/804\",[78,42.738]],[\"comment/804\",[]],[\"name/805\",[142,45.056]],[\"comment/805\",[]],[\"name/806\",[306,65.425]],[\"comment/806\",[]],[\"name/807\",[71,35.635]],[\"comment/807\",[]],[\"name/808\",[128,34.667]],[\"comment/808\",[]],[\"name/809\",[27,38.344]],[\"comment/809\",[]],[\"name/810\",[307,65.425]],[\"comment/810\",[]],[\"name/811\",[71,35.635]],[\"comment/811\",[]],[\"name/812\",[128,34.667]],[\"comment/812\",[]],[\"name/813\",[27,38.344]],[\"comment/813\",[]],[\"name/814\",[308,65.425]],[\"comment/814\",[]],[\"name/815\",[309,65.425]],[\"comment/815\",[]],[\"name/816\",[310,56.952]],[\"comment/816\",[]],[\"name/817\",[126,49.33]],[\"comment/817\",[]],[\"name/818\",[62,44.222]],[\"comment/818\",[]],[\"name/819\",[63,44.222]],[\"comment/819\",[]],[\"name/820\",[311,65.425]],[\"comment/820\",[]],[\"name/821\",[310,56.952]],[\"comment/821\",[]],[\"name/822\",[62,44.222]],[\"comment/822\",[]],[\"name/823\",[63,44.222]],[\"comment/823\",[]],[\"name/824\",[312,65.425]],[\"comment/824\",[]],[\"name/825\",[149,37.493]],[\"comment/825\",[]],[\"name/826\",[313,60.316]],[\"comment/826\",[]],[\"name/827\",[164,39.275]],[\"comment/827\",[]],[\"name/828\",[165,39.275]],[\"comment/828\",[]],[\"name/829\",[166,39.275]],[\"comment/829\",[]],[\"name/830\",[150,38.344]],[\"comment/830\",[]],[\"name/831\",[167,39.275]],[\"comment/831\",[]],[\"name/832\",[151,38.344]],[\"comment/832\",[]],[\"name/833\",[314,60.316]],[\"comment/833\",[]],[\"name/834\",[289,50.761]],[\"comment/834\",[]],[\"name/835\",[315,65.425]],[\"comment/835\",[]],[\"name/836\",[9,38.344]],[\"comment/836\",[]],[\"name/837\",[149,37.493]],[\"comment/837\",[]],[\"name/838\",[313,60.316]],[\"comment/838\",[]],[\"name/839\",[164,39.275]],[\"comment/839\",[]],[\"name/840\",[165,39.275]],[\"comment/840\",[]],[\"name/841\",[166,39.275]],[\"comment/841\",[]],[\"name/842\",[150,38.344]],[\"comment/842\",[]],[\"name/843\",[167,39.275]],[\"comment/843\",[]],[\"name/844\",[151,38.344]],[\"comment/844\",[]],[\"name/845\",[314,60.316]],[\"comment/845\",[]],[\"name/846\",[289,50.761]],[\"comment/846\",[]],[\"name/847\",[153,41.446]],[\"comment/847\",[]],[\"name/848\",[154,41.446]],[\"comment/848\",[]],[\"name/849\",[316,65.425]],[\"comment/849\",[]],[\"name/850\",[23,36.708]],[\"comment/850\",[]],[\"name/851\",[26,52.432]],[\"comment/851\",[]],[\"name/852\",[317,56.952]],[\"comment/852\",[]],[\"name/853\",[318,56.952]],[\"comment/853\",[]],[\"name/854\",[27,38.344]],[\"comment/854\",[]],[\"name/855\",[319,65.425]],[\"comment/855\",[]],[\"name/856\",[23,36.708]],[\"comment/856\",[]],[\"name/857\",[69,40.857]],[\"comment/857\",[]],[\"name/858\",[139,42.738]],[\"comment/858\",[]],[\"name/859\",[140,43.452]],[\"comment/859\",[]],[\"name/860\",[141,45.056]],[\"comment/860\",[]],[\"name/861\",[320,65.425]],[\"comment/861\",[]],[\"name/862\",[101,45.966]],[\"comment/862\",[]],[\"name/863\",[26,52.432]],[\"comment/863\",[]],[\"name/864\",[317,56.952]],[\"comment/864\",[]],[\"name/865\",[318,56.952]],[\"comment/865\",[]],[\"name/866\",[27,38.344]],[\"comment/866\",[]],[\"name/867\",[321,65.425]],[\"comment/867\",[]],[\"name/868\",[26,52.432]],[\"comment/868\",[]],[\"name/869\",[317,56.952]],[\"comment/869\",[]],[\"name/870\",[318,56.952]],[\"comment/870\",[]],[\"name/871\",[27,38.344]],[\"comment/871\",[]],[\"name/872\",[322,65.425]],[\"comment/872\",[]],[\"name/873\",[275,50.761]],[\"comment/873\",[]],[\"name/874\",[323,65.425]],[\"comment/874\",[]],[\"name/875\",[324,65.425]],[\"comment/875\",[]],[\"name/876\",[275,50.761]],[\"comment/876\",[]],[\"name/877\",[31,48.079]],[\"comment/877\",[]],[\"name/878\",[62,44.222]],[\"comment/878\",[]],[\"name/879\",[63,44.222]],[\"comment/879\",[]],[\"name/880\",[325,65.425]],[\"comment/880\",[]],[\"name/881\",[310,56.952]],[\"comment/881\",[]],[\"name/882\",[126,49.33]],[\"comment/882\",[]],[\"name/883\",[62,44.222]],[\"comment/883\",[]],[\"name/884\",[63,44.222]],[\"comment/884\",[]],[\"name/885\",[326,65.425]],[\"comment/885\",[]],[\"name/886\",[149,37.493]],[\"comment/886\",[]],[\"name/887\",[164,39.275]],[\"comment/887\",[]],[\"name/888\",[165,39.275]],[\"comment/888\",[]],[\"name/889\",[166,39.275]],[\"comment/889\",[]],[\"name/890\",[150,38.344]],[\"comment/890\",[]],[\"name/891\",[167,39.275]],[\"comment/891\",[]],[\"name/892\",[327,60.316]],[\"comment/892\",[]],[\"name/893\",[151,38.344]],[\"comment/893\",[]],[\"name/894\",[190,49.33]],[\"comment/894\",[]],[\"name/895\",[191,49.33]],[\"comment/895\",[]],[\"name/896\",[175,49.33]],[\"comment/896\",[]],[\"name/897\",[328,60.316]],[\"comment/897\",[]],[\"name/898\",[329,60.316]],[\"comment/898\",[]],[\"name/899\",[330,60.316]],[\"comment/899\",[]],[\"name/900\",[289,50.761]],[\"comment/900\",[]],[\"name/901\",[331,65.425]],[\"comment/901\",[]],[\"name/902\",[9,38.344]],[\"comment/902\",[]],[\"name/903\",[149,37.493]],[\"comment/903\",[]],[\"name/904\",[164,39.275]],[\"comment/904\",[]],[\"name/905\",[165,39.275]],[\"comment/905\",[]],[\"name/906\",[166,39.275]],[\"comment/906\",[]],[\"name/907\",[150,38.344]],[\"comment/907\",[]],[\"name/908\",[167,39.275]],[\"comment/908\",[]],[\"name/909\",[327,60.316]],[\"comment/909\",[]],[\"name/910\",[151,38.344]],[\"comment/910\",[]],[\"name/911\",[190,49.33]],[\"comment/911\",[]],[\"name/912\",[191,49.33]],[\"comment/912\",[]],[\"name/913\",[328,60.316]],[\"comment/913\",[]],[\"name/914\",[329,60.316]],[\"comment/914\",[]],[\"name/915\",[330,60.316]],[\"comment/915\",[]],[\"name/916\",[175,49.33]],[\"comment/916\",[]],[\"name/917\",[289,50.761]],[\"comment/917\",[]],[\"name/918\",[153,41.446]],[\"comment/918\",[]],[\"name/919\",[154,41.446]],[\"comment/919\",[]],[\"name/920\",[332,65.425]],[\"comment/920\",[]],[\"name/921\",[333,60.316]],[\"comment/921\",[]],[\"name/922\",[334,60.316]],[\"comment/922\",[]],[\"name/923\",[335,60.316]],[\"comment/923\",[]],[\"name/924\",[336,60.316]],[\"comment/924\",[]],[\"name/925\",[337,60.316]],[\"comment/925\",[]],[\"name/926\",[338,60.316]],[\"comment/926\",[]],[\"name/927\",[339,60.316]],[\"comment/927\",[]],[\"name/928\",[340,60.316]],[\"comment/928\",[]],[\"name/929\",[341,60.316]],[\"comment/929\",[]],[\"name/930\",[342,60.316]],[\"comment/930\",[]],[\"name/931\",[100,54.439]],[\"comment/931\",[]],[\"name/932\",[343,60.316]],[\"comment/932\",[]],[\"name/933\",[344,60.316]],[\"comment/933\",[]],[\"name/934\",[101,45.966]],[\"comment/934\",[]],[\"name/935\",[113,56.952]],[\"comment/935\",[]],[\"name/936\",[111,56.952]],[\"comment/936\",[]],[\"name/937\",[153,41.446]],[\"comment/937\",[]],[\"name/938\",[154,41.446]],[\"comment/938\",[]],[\"name/939\",[170,52.432]],[\"comment/939\",[]],[\"name/940\",[171,52.432]],[\"comment/940\",[]],[\"name/941\",[172,52.432]],[\"comment/941\",[]],[\"name/942\",[173,52.432]],[\"comment/942\",[]],[\"name/943\",[174,52.432]],[\"comment/943\",[]],[\"name/944\",[175,49.33]],[\"comment/944\",[]],[\"name/945\",[176,52.432]],[\"comment/945\",[]],[\"name/946\",[177,52.432]],[\"comment/946\",[]],[\"name/947\",[179,52.432]],[\"comment/947\",[]],[\"name/948\",[180,52.432]],[\"comment/948\",[]],[\"name/949\",[181,52.432]],[\"comment/949\",[]],[\"name/950\",[182,52.432]],[\"comment/950\",[]],[\"name/951\",[183,52.432]],[\"comment/951\",[]],[\"name/952\",[184,52.432]],[\"comment/952\",[]],[\"name/953\",[185,52.432]],[\"comment/953\",[]],[\"name/954\",[186,52.432]],[\"comment/954\",[]],[\"name/955\",[187,52.432]],[\"comment/955\",[]],[\"name/956\",[188,52.432]],[\"comment/956\",[]],[\"name/957\",[189,52.432]],[\"comment/957\",[]],[\"name/958\",[190,49.33]],[\"comment/958\",[]],[\"name/959\",[191,49.33]],[\"comment/959\",[]],[\"name/960\",[192,52.432]],[\"comment/960\",[]],[\"name/961\",[193,52.432]],[\"comment/961\",[]],[\"name/962\",[194,52.432]],[\"comment/962\",[]],[\"name/963\",[195,52.432]],[\"comment/963\",[]],[\"name/964\",[196,52.432]],[\"comment/964\",[]],[\"name/965\",[197,52.432]],[\"comment/965\",[]],[\"name/966\",[198,52.432]],[\"comment/966\",[]],[\"name/967\",[199,52.432]],[\"comment/967\",[]],[\"name/968\",[345,65.425]],[\"comment/968\",[]],[\"name/969\",[9,38.344]],[\"comment/969\",[]],[\"name/970\",[333,60.316]],[\"comment/970\",[]],[\"name/971\",[334,60.316]],[\"comment/971\",[]],[\"name/972\",[335,60.316]],[\"comment/972\",[]],[\"name/973\",[336,60.316]],[\"comment/973\",[]],[\"name/974\",[337,60.316]],[\"comment/974\",[]],[\"name/975\",[338,60.316]],[\"comment/975\",[]],[\"name/976\",[339,60.316]],[\"comment/976\",[]],[\"name/977\",[340,60.316]],[\"comment/977\",[]],[\"name/978\",[341,60.316]],[\"comment/978\",[]],[\"name/979\",[342,60.316]],[\"comment/979\",[]],[\"name/980\",[100,54.439]],[\"comment/980\",[]],[\"name/981\",[343,60.316]],[\"comment/981\",[]],[\"name/982\",[344,60.316]],[\"comment/982\",[]],[\"name/983\",[101,45.966]],[\"comment/983\",[]],[\"name/984\",[113,56.952]],[\"comment/984\",[]],[\"name/985\",[111,56.952]],[\"comment/985\",[]],[\"name/986\",[170,52.432]],[\"comment/986\",[]],[\"name/987\",[171,52.432]],[\"comment/987\",[]],[\"name/988\",[176,52.432]],[\"comment/988\",[]],[\"name/989\",[177,52.432]],[\"comment/989\",[]],[\"name/990\",[172,52.432]],[\"comment/990\",[]],[\"name/991\",[173,52.432]],[\"comment/991\",[]],[\"name/992\",[186,52.432]],[\"comment/992\",[]],[\"name/993\",[174,52.432]],[\"comment/993\",[]],[\"name/994\",[175,49.33]],[\"comment/994\",[]],[\"name/995\",[192,52.432]],[\"comment/995\",[]],[\"name/996\",[193,52.432]],[\"comment/996\",[]],[\"name/997\",[194,52.432]],[\"comment/997\",[]],[\"name/998\",[179,52.432]],[\"comment/998\",[]],[\"name/999\",[181,52.432]],[\"comment/999\",[]],[\"name/1000\",[180,52.432]],[\"comment/1000\",[]],[\"name/1001\",[182,52.432]],[\"comment/1001\",[]],[\"name/1002\",[183,52.432]],[\"comment/1002\",[]],[\"name/1003\",[184,52.432]],[\"comment/1003\",[]],[\"name/1004\",[185,52.432]],[\"comment/1004\",[]],[\"name/1005\",[187,52.432]],[\"comment/1005\",[]],[\"name/1006\",[188,52.432]],[\"comment/1006\",[]],[\"name/1007\",[189,52.432]],[\"comment/1007\",[]],[\"name/1008\",[190,49.33]],[\"comment/1008\",[]],[\"name/1009\",[191,49.33]],[\"comment/1009\",[]],[\"name/1010\",[195,52.432]],[\"comment/1010\",[]],[\"name/1011\",[196,52.432]],[\"comment/1011\",[]],[\"name/1012\",[197,52.432]],[\"comment/1012\",[]],[\"name/1013\",[198,52.432]],[\"comment/1013\",[]],[\"name/1014\",[199,52.432]],[\"comment/1014\",[]],[\"name/1015\",[202,60.316]],[\"comment/1015\",[]],[\"name/1016\",[153,41.446]],[\"comment/1016\",[]],[\"name/1017\",[154,41.446]],[\"comment/1017\",[]],[\"name/1018\",[346,65.425]],[\"comment/1018\",[]],[\"name/1019\",[347,65.425]],[\"comment/1019\",[]],[\"name/1020\",[348,65.425]],[\"comment/1020\",[]],[\"name/1021\",[349,65.425]],[\"comment/1021\",[]],[\"name/1022\",[11,60.316]],[\"comment/1022\",[]],[\"name/1023\",[350,65.425]],[\"comment/1023\",[]],[\"name/1024\",[351,65.425]],[\"comment/1024\",[]],[\"name/1025\",[352,65.425]],[\"comment/1025\",[]],[\"name/1026\",[353,60.316]],[\"comment/1026\",[]],[\"name/1027\",[354,65.425]],[\"comment/1027\",[]],[\"name/1028\",[355,65.425]],[\"comment/1028\",[]],[\"name/1029\",[356,65.425]],[\"comment/1029\",[]],[\"name/1030\",[357,65.425]],[\"comment/1030\",[]],[\"name/1031\",[358,65.425]],[\"comment/1031\",[]],[\"name/1032\",[359,65.425]],[\"comment/1032\",[]],[\"name/1033\",[360,65.425]],[\"comment/1033\",[]],[\"name/1034\",[361,65.425]],[\"comment/1034\",[]],[\"name/1035\",[362,65.425]],[\"comment/1035\",[]],[\"name/1036\",[9,38.344]],[\"comment/1036\",[]],[\"name/1037\",[353,60.316]],[\"comment/1037\",[]],[\"name/1038\",[153,41.446]],[\"comment/1038\",[]],[\"name/1039\",[154,41.446]],[\"comment/1039\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":48,\"name\":{\"62\":{},\"116\":{},\"616\":{},\"618\":{},\"633\":{},\"635\":{},\"638\":{},\"640\":{},\"646\":{},\"648\":{},\"656\":{},\"658\":{}},\"comment\":{}}],[\"_saveapikeyaccessiblescope\",{\"_index\":37,\"name\":{\"51\":{}},\"comment\":{}}],[\"access_level\",{\"_index\":205,\"name\":{\"360\":{}},\"comment\":{}}],[\"action_groups\",{\"_index\":262,\"name\":{\"639\":{}},\"comment\":{}}],[\"actionblockeditable\",{\"_index\":127,\"name\":{\"153\":{}},\"comment\":{}}],[\"actionblockread\",{\"_index\":130,\"name\":{\"160\":{}},\"comment\":{}}],[\"actiongroups\",{\"_index\":337,\"name\":{\"925\":{},\"974\":{}},\"comment\":{}}],[\"actions\",{\"_index\":237,\"name\":{\"485\":{},\"490\":{},\"615\":{},\"632\":{},\"645\":{},\"655\":{}},\"comment\":{}}],[\"active_policy_repo_id\",{\"_index\":231,\"name\":{\"444\":{},\"455\":{},\"460\":{}},\"comment\":{}}],[\"admin\",{\"_index\":65,\"name\":{\"81\":{}},\"comment\":{}}],[\"api\",{\"_index\":2,\"name\":{\"2\":{},\"11\":{}},\"comment\":{}}],[\"apiclient\",{\"_index\":345,\"name\":{\"968\":{}},\"comment\":{}}],[\"apicontext\",{\"_index\":18,\"name\":{\"25\":{},\"49\":{}},\"comment\":{}}],[\"apikeylevel\",{\"_index\":52,\"name\":{\"67\":{}},\"comment\":{}}],[\"apikeyownertype\",{\"_index\":88,\"name\":{\"106\":{}},\"comment\":{}}],[\"apikeyread\",{\"_index\":203,\"name\":{\"355\":{}},\"comment\":{}}],[\"apiurl\",{\"_index\":13,\"name\":{\"20\":{}},\"comment\":{}}],[\"array\",{\"_index\":121,\"name\":{\"144\":{}},\"comment\":{}}],[\"assign\",{\"_index\":285,\"name\":{\"725\":{},\"733\":{}},\"comment\":{}}],[\"assignconditionsetrule\",{\"_index\":198,\"name\":{\"289\":{},\"319\":{},\"350\":{},\"966\":{},\"1013\":{}},\"comment\":{}}],[\"assignments_created\",{\"_index\":270,\"name\":{\"687\":{}},\"comment\":{}}],[\"assignments_removed\",{\"_index\":272,\"name\":{\"689\":{}},\"comment\":{}}],[\"assignpermissions\",{\"_index\":297,\"name\":{\"774\":{},\"785\":{}},\"comment\":{}}],[\"assignrole\",{\"_index\":190,\"name\":{\"281\":{},\"311\":{},\"345\":{},\"894\":{},\"911\":{},\"958\":{},\"1008\":{}},\"comment\":{}}],[\"associated_tenants\",{\"_index\":320,\"name\":{\"861\":{}},\"comment\":{}}],[\"attributeblockeditable\",{\"_index\":129,\"name\":{\"157\":{}},\"comment\":{}}],[\"attributeblockread\",{\"_index\":131,\"name\":{\"166\":{}},\"comment\":{}}],[\"attributes\",{\"_index\":27,\"name\":{\"34\":{},\"40\":{},\"156\":{},\"163\":{},\"484\":{},\"489\":{},\"526\":{},\"530\":{},\"543\":{},\"617\":{},\"634\":{},\"647\":{},\"657\":{},\"745\":{},\"751\":{},\"764\":{},\"797\":{},\"809\":{},\"813\":{},\"854\":{},\"866\":{},\"871\":{}},\"comment\":{}}],[\"attributetype\",{\"_index\":116,\"name\":{\"139\":{}},\"comment\":{}}],[\"autogenerated\",{\"_index\":156,\"name\":{\"214\":{},\"223\":{}},\"comment\":{}}],[\"axiosinstance\",{\"_index\":19,\"name\":{\"26\":{}},\"comment\":{}}],[\"bool\",{\"_index\":117,\"name\":{\"140\":{}},\"comment\":{}}],[\"built_in\",{\"_index\":253,\"name\":{\"583\":{}},\"comment\":{}}],[\"bulkassign\",{\"_index\":287,\"name\":{\"727\":{},\"735\":{}},\"comment\":{}}],[\"bulkcheck\",{\"_index\":5,\"name\":{\"5\":{},\"14\":{}},\"comment\":{}}],[\"bulkroleassignmentreport\",{\"_index\":269,\"name\":{\"686\":{}},\"comment\":{}}],[\"bulkroleunassignmentreport\",{\"_index\":271,\"name\":{\"688\":{}},\"comment\":{}}],[\"bulkunassign\",{\"_index\":288,\"name\":{\"728\":{},\"736\":{}},\"comment\":{}}],[\"bulkusercreate\",{\"_index\":328,\"name\":{\"897\":{},\"913\":{}},\"comment\":{}}],[\"bulkuserdelete\",{\"_index\":329,\"name\":{\"898\":{},\"914\":{}},\"comment\":{}}],[\"bulkuserreplace\",{\"_index\":330,\"name\":{\"899\":{},\"915\":{}},\"comment\":{}}],[\"check\",{\"_index\":4,\"name\":{\"4\":{},\"13\":{}},\"comment\":{}}],[\"checkalltenants\",{\"_index\":7,\"name\":{\"7\":{},\"15\":{}},\"comment\":{}}],[\"conditions\",{\"_index\":158,\"name\":{\"218\":{},\"234\":{},\"239\":{}},\"comment\":{}}],[\"conditionsetcreate\",{\"_index\":155,\"name\":{\"211\":{}},\"comment\":{}}],[\"conditionsetread\",{\"_index\":160,\"name\":{\"220\":{}},\"comment\":{}}],[\"conditionsetrulecreate\",{\"_index\":132,\"name\":{\"171\":{}},\"comment\":{}}],[\"conditionsetruleread\",{\"_index\":138,\"name\":{\"177\":{}},\"comment\":{}}],[\"conditionsetruleremove\",{\"_index\":143,\"name\":{\"188\":{}},\"comment\":{}}],[\"conditionsetrules\",{\"_index\":333,\"name\":{\"921\":{},\"970\":{}},\"comment\":{}}],[\"conditionsetrulesapi\",{\"_index\":152,\"name\":{\"204\":{}},\"comment\":{}}],[\"conditionsets\",{\"_index\":334,\"name\":{\"922\":{},\"971\":{}},\"comment\":{}}],[\"conditionsetsapi\",{\"_index\":168,\"name\":{\"249\":{}},\"comment\":{}}],[\"conditionsettype\",{\"_index\":93,\"name\":{\"112\":{}},\"comment\":{}}],[\"conditionsetupdate\",{\"_index\":162,\"name\":{\"236\":{}},\"comment\":{}}],[\"config\",{\"_index\":1,\"name\":{\"1\":{},\"10\":{}},\"comment\":{}}],[\"conflict_strategy\",{\"_index\":212,\"name\":{\"372\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":9,\"name\":{\"9\":{},\"42\":{},\"44\":{},\"46\":{},\"50\":{},\"66\":{},\"73\":{},\"205\":{},\"250\":{},\"322\":{},\"425\":{},\"470\":{},\"512\":{},\"557\":{},\"600\":{},\"675\":{},\"731\":{},\"777\":{},\"836\":{},\"902\":{},\"969\":{},\"1036\":{}},\"comment\":{}}],[\"content\",{\"_index\":347,\"name\":{\"1019\":{}},\"comment\":{}}],[\"context\",{\"_index\":35,\"name\":{\"47\":{}},\"comment\":{}}],[\"contextlevel\",{\"_index\":40,\"name\":{\"54\":{}},\"comment\":{}}],[\"contexttransform\",{\"_index\":36,\"name\":{\"48\":{}},\"comment\":{}}],[\"copy\",{\"_index\":227,\"name\":{\"422\":{},\"434\":{}},\"comment\":{}}],[\"create\",{\"_index\":150,\"name\":{\"202\":{},\"207\":{},\"246\":{},\"255\":{},\"420\":{},\"432\":{},\"466\":{},\"475\":{},\"508\":{},\"517\":{},\"553\":{},\"562\":{},\"596\":{},\"605\":{},\"670\":{},\"680\":{},\"771\":{},\"782\":{},\"830\":{},\"842\":{},\"890\":{},\"907\":{}},\"comment\":{}}],[\"createconditionset\",{\"_index\":195,\"name\":{\"286\":{},\"316\":{},\"347\":{},\"963\":{},\"1010\":{}},\"comment\":{}}],[\"created\",{\"_index\":323,\"name\":{\"874\":{}},\"comment\":{}}],[\"created_at\",{\"_index\":78,\"name\":{\"95\":{},\"186\":{},\"229\":{},\"365\":{},\"385\":{},\"396\":{},\"450\":{},\"497\":{},\"538\":{},\"581\":{},\"627\":{},\"710\":{},\"758\":{},\"804\":{}},\"comment\":{}}],[\"created_by_member\",{\"_index\":208,\"name\":{\"366\":{}},\"comment\":{}}],[\"createresource\",{\"_index\":192,\"name\":{\"283\":{},\"313\":{},\"332\":{},\"960\":{},\"995\":{}},\"comment\":{}}],[\"createrole\",{\"_index\":187,\"name\":{\"278\":{},\"308\":{},\"342\":{},\"955\":{},\"1005\":{}},\"comment\":{}}],[\"createtenant\",{\"_index\":183,\"name\":{\"274\":{},\"304\":{},\"339\":{},\"951\":{},\"1002\":{}},\"comment\":{}}],[\"createuser\",{\"_index\":179,\"name\":{\"270\":{},\"300\":{},\"335\":{},\"947\":{},\"998\":{}},\"comment\":{}}],[\"custom_branch_name\",{\"_index\":215,\"name\":{\"378\":{},\"389\":{},\"400\":{},\"407\":{}},\"comment\":{}}],[\"data\",{\"_index\":301,\"name\":{\"790\":{}},\"comment\":{}}],[\"delete\",{\"_index\":151,\"name\":{\"203\":{},\"208\":{},\"248\":{},\"257\":{},\"423\":{},\"435\":{},\"468\":{},\"477\":{},\"510\":{},\"519\":{},\"555\":{},\"564\":{},\"598\":{},\"607\":{},\"673\":{},\"683\":{},\"773\":{},\"784\":{},\"832\":{},\"844\":{},\"893\":{},\"910\":{}},\"comment\":{}}],[\"deleteconditionset\",{\"_index\":197,\"name\":{\"288\":{},\"318\":{},\"349\":{},\"965\":{},\"1012\":{}},\"comment\":{}}],[\"deleteresource\",{\"_index\":194,\"name\":{\"285\":{},\"315\":{},\"334\":{},\"962\":{},\"997\":{}},\"comment\":{}}],[\"deleterole\",{\"_index\":189,\"name\":{\"280\":{},\"310\":{},\"344\":{},\"957\":{},\"1007\":{}},\"comment\":{}}],[\"deletetenant\",{\"_index\":185,\"name\":{\"276\":{},\"306\":{},\"341\":{},\"953\":{},\"1004\":{}},\"comment\":{}}],[\"deletetenantuser\",{\"_index\":314,\"name\":{\"833\":{},\"845\":{}},\"comment\":{}}],[\"deleteuser\",{\"_index\":182,\"name\":{\"273\":{},\"303\":{},\"338\":{},\"950\":{},\"1001\":{}},\"comment\":{}}],[\"deprecatedapiclient\",{\"_index\":201,\"name\":{\"321\":{}},\"comment\":{}}],[\"description\",{\"_index\":128,\"name\":{\"155\":{},\"159\":{},\"162\":{},\"168\":{},\"217\":{},\"233\":{},\"238\":{},\"377\":{},\"388\":{},\"399\":{},\"406\":{},\"442\":{},\"453\":{},\"458\":{},\"483\":{},\"488\":{},\"525\":{},\"529\":{},\"542\":{},\"570\":{},\"573\":{},\"586\":{},\"614\":{},\"631\":{},\"644\":{},\"654\":{},\"743\":{},\"749\":{},\"762\":{},\"796\":{},\"808\":{},\"812\":{}},\"comment\":{}}],[\"elements\",{\"_index\":3,\"name\":{\"3\":{},\"12\":{},\"109\":{}},\"comment\":{}}],[\"elementsapierrors\",{\"_index\":354,\"name\":{\"1027\":{}},\"comment\":{}}],[\"elementsclient\",{\"_index\":362,\"name\":{\"1035\":{}},\"comment\":{}}],[\"email\",{\"_index\":26,\"name\":{\"33\":{},\"86\":{},\"851\":{},\"863\":{},\"868\":{}},\"comment\":{}}],[\"email_verified\",{\"_index\":70,\"name\":{\"87\":{}},\"comment\":{}}],[\"embeddedloginrequestoutputwithcontent\",{\"_index\":346,\"name\":{\"1018\":{}},\"comment\":{}}],[\"ensureaccesslevel\",{\"_index\":153,\"name\":{\"209\":{},\"258\":{},\"353\":{},\"436\":{},\"478\":{},\"520\":{},\"565\":{},\"608\":{},\"684\":{},\"738\":{},\"787\":{},\"847\":{},\"918\":{},\"937\":{},\"1016\":{},\"1038\":{}},\"comment\":{}}],[\"ensurecontext\",{\"_index\":154,\"name\":{\"210\":{},\"259\":{},\"354\":{},\"437\":{},\"479\":{},\"521\":{},\"566\":{},\"609\":{},\"685\":{},\"739\":{},\"788\":{},\"848\":{},\"919\":{},\"938\":{},\"1017\":{},\"1039\":{}},\"comment\":{}}],[\"env\",{\"_index\":87,\"name\":{\"105\":{},\"368\":{}},\"comment\":{}}],[\"envid\",{\"_index\":50,\"name\":{\"64\":{}},\"comment\":{}}],[\"environment\",{\"_index\":43,\"name\":{\"57\":{}},\"comment\":{}}],[\"environment_id\",{\"_index\":141,\"name\":{\"185\":{},\"228\":{},\"358\":{},\"495\":{},\"536\":{},\"580\":{},\"626\":{},\"709\":{},\"757\":{},\"803\":{},\"860\":{}},\"comment\":{}}],[\"environment_level_api_key\",{\"_index\":56,\"name\":{\"71\":{}},\"comment\":{}}],[\"environmentcontext\",{\"_index\":47,\"name\":{\"61\":{}},\"comment\":{}}],[\"environmentcopy\",{\"_index\":210,\"name\":{\"370\":{}},\"comment\":{}}],[\"environmentcopyconflictstrategyenum\",{\"_index\":96,\"name\":{\"115\":{},\"119\":{}},\"comment\":{}}],[\"environmentcopyscope\",{\"_index\":99,\"name\":{\"120\":{}},\"comment\":{}}],[\"environmentcopyscopefilters\",{\"_index\":104,\"name\":{\"125\":{}},\"comment\":{}}],[\"environmentcopytarget\",{\"_index\":107,\"name\":{\"128\":{}},\"comment\":{}}],[\"environmentcreate\",{\"_index\":214,\"name\":{\"374\":{}},\"comment\":{}}],[\"environmentread\",{\"_index\":217,\"name\":{\"380\":{}},\"comment\":{}}],[\"environments\",{\"_index\":336,\"name\":{\"924\":{},\"973\":{}},\"comment\":{}}],[\"environmentsapi\",{\"_index\":228,\"name\":{\"424\":{}},\"comment\":{}}],[\"environmentstats\",{\"_index\":218,\"name\":{\"391\":{}},\"comment\":{}}],[\"environmentupdate\",{\"_index\":221,\"name\":{\"404\":{}},\"comment\":{}}],[\"error\",{\"_index\":348,\"name\":{\"1020\":{}},\"comment\":{}}],[\"error_code\",{\"_index\":349,\"name\":{\"1021\":{}},\"comment\":{}}],[\"exclude\",{\"_index\":106,\"name\":{\"127\":{}},\"comment\":{}}],[\"existing\",{\"_index\":108,\"name\":{\"129\":{}},\"comment\":{}}],[\"extra\",{\"_index\":350,\"name\":{\"1023\":{}},\"comment\":{}}],[\"factssynctimeout\",{\"_index\":21,\"name\":{\"28\":{}},\"comment\":{}}],[\"fail\",{\"_index\":97,\"name\":{\"117\":{}},\"comment\":{}}],[\"family_name\",{\"_index\":73,\"name\":{\"90\":{}},\"comment\":{}}],[\"first_name\",{\"_index\":317,\"name\":{\"852\":{},\"864\":{},\"869\":{}},\"comment\":{}}],[\"firstname\",{\"_index\":24,\"name\":{\"31\":{}},\"comment\":{}}],[\"forbidden_access\",{\"_index\":358,\"name\":{\"1031\":{}},\"comment\":{}}],[\"get\",{\"_index\":164,\"name\":{\"243\":{},\"252\":{},\"415\":{},\"427\":{},\"463\":{},\"472\":{},\"505\":{},\"514\":{},\"550\":{},\"559\":{},\"593\":{},\"602\":{},\"667\":{},\"677\":{},\"768\":{},\"779\":{},\"827\":{},\"839\":{},\"887\":{},\"904\":{}},\"comment\":{}}],[\"getapikey\",{\"_index\":226,\"name\":{\"419\":{},\"431\":{}},\"comment\":{}}],[\"getassignedroles\",{\"_index\":175,\"name\":{\"266\":{},\"297\":{},\"331\":{},\"896\":{},\"916\":{},\"944\":{},\"994\":{}},\"comment\":{}}],[\"getbyid\",{\"_index\":166,\"name\":{\"245\":{},\"254\":{},\"417\":{},\"429\":{},\"465\":{},\"474\":{},\"507\":{},\"516\":{},\"552\":{},\"561\":{},\"595\":{},\"604\":{},\"669\":{},\"679\":{},\"770\":{},\"781\":{},\"829\":{},\"841\":{},\"889\":{},\"906\":{}},\"comment\":{}}],[\"getbykey\",{\"_index\":165,\"name\":{\"244\":{},\"253\":{},\"416\":{},\"428\":{},\"464\":{},\"473\":{},\"506\":{},\"515\":{},\"551\":{},\"560\":{},\"594\":{},\"603\":{},\"668\":{},\"678\":{},\"769\":{},\"780\":{},\"828\":{},\"840\":{},\"888\":{},\"905\":{}},\"comment\":{}}],[\"getmethods\",{\"_index\":202,\"name\":{\"352\":{},\"1015\":{}},\"comment\":{}}],[\"getrole\",{\"_index\":174,\"name\":{\"265\":{},\"296\":{},\"330\":{},\"943\":{},\"993\":{}},\"comment\":{}}],[\"getstats\",{\"_index\":225,\"name\":{\"418\":{},\"430\":{}},\"comment\":{}}],[\"gettenant\",{\"_index\":173,\"name\":{\"264\":{},\"295\":{},\"328\":{},\"942\":{},\"991\":{}},\"comment\":{}}],[\"getuser\",{\"_index\":172,\"name\":{\"263\":{},\"294\":{},\"327\":{},\"941\":{},\"990\":{}},\"comment\":{}}],[\"getuserpermissions\",{\"_index\":6,\"name\":{\"6\":{},\"16\":{}},\"comment\":{}}],[\"given_name\",{\"_index\":72,\"name\":{\"89\":{}},\"comment\":{}}],[\"granted_to\",{\"_index\":293,\"name\":{\"746\":{},\"752\":{},\"765\":{}},\"comment\":{}}],[\"has_decision_logs\",{\"_index\":114,\"name\":{\"137\":{}},\"comment\":{}}],[\"iaction\",{\"_index\":28,\"name\":{\"35\":{}},\"comment\":{}}],[\"iconditionsetrulesapi\",{\"_index\":148,\"name\":{\"200\":{}},\"comment\":{}}],[\"iconditionsetsapi\",{\"_index\":163,\"name\":{\"241\":{}},\"comment\":{}}],[\"icreateorupdateuserresult\",{\"_index\":322,\"name\":{\"872\":{}},\"comment\":{}}],[\"id\",{\"_index\":69,\"name\":{\"85\":{},\"164\":{},\"169\":{},\"178\":{},\"225\":{},\"363\":{},\"382\":{},\"393\":{},\"448\":{},\"492\":{},\"532\":{},\"575\":{},\"623\":{},\"696\":{},\"754\":{},\"800\":{},\"857\":{}},\"comment\":{}}],[\"identities\",{\"_index\":82,\"name\":{\"99\":{}},\"comment\":{}}],[\"ideprecatedpermitapi\",{\"_index\":200,\"name\":{\"291\":{}},\"comment\":{}}],[\"ideprecatedreadapis\",{\"_index\":169,\"name\":{\"260\":{}},\"comment\":{}}],[\"ideprecatedwriteapis\",{\"_index\":178,\"name\":{\"269\":{}},\"comment\":{}}],[\"ienvironmentsapi\",{\"_index\":224,\"name\":{\"413\":{}},\"comment\":{}}],[\"igetuserroles\",{\"_index\":324,\"name\":{\"875\":{}},\"comment\":{}}],[\"ilistactiongroups\",{\"_index\":239,\"name\":{\"499\":{}},\"comment\":{}}],[\"ilistactions\",{\"_index\":247,\"name\":{\"544\":{}},\"comment\":{}}],[\"ilistattributes\",{\"_index\":255,\"name\":{\"587\":{}},\"comment\":{}}],[\"ilistconditionsetrules\",{\"_index\":144,\"name\":{\"194\":{}},\"comment\":{}}],[\"ilistenvironments\",{\"_index\":222,\"name\":{\"409\":{}},\"comment\":{}}],[\"ilistresourceusers\",{\"_index\":265,\"name\":{\"661\":{}},\"comment\":{}}],[\"ilistroleassignments\",{\"_index\":282,\"name\":{\"716\":{}},\"comment\":{}}],[\"ilisttenantsparams\",{\"_index\":311,\"name\":{\"820\":{}},\"comment\":{}}],[\"ilisttenantusers\",{\"_index\":308,\"name\":{\"814\":{}},\"comment\":{}}],[\"include\",{\"_index\":105,\"name\":{\"126\":{}},\"comment\":{}}],[\"invalid_permission_level\",{\"_index\":357,\"name\":{\"1030\":{}},\"comment\":{}}],[\"invite\",{\"_index\":83,\"name\":{\"100\":{}},\"comment\":{}}],[\"ipagination\",{\"_index\":61,\"name\":{\"77\":{}},\"comment\":{}}],[\"ipermitapi\",{\"_index\":332,\"name\":{\"920\":{}},\"comment\":{}}],[\"ipermitclient\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"ipermitconfig\",{\"_index\":10,\"name\":{\"17\":{}},\"comment\":{}}],[\"ipermitelementsapi\",{\"_index\":352,\"name\":{\"1025\":{}},\"comment\":{}}],[\"iprojectsapi\",{\"_index\":234,\"name\":{\"461\":{}},\"comment\":{}}],[\"iresource\",{\"_index\":29,\"name\":{\"36\":{}},\"comment\":{}}],[\"iresourceactiongroupsapi\",{\"_index\":241,\"name\":{\"503\":{}},\"comment\":{}}],[\"iresourceactionsapi\",{\"_index\":248,\"name\":{\"548\":{}},\"comment\":{}}],[\"iresourceattributesapi\",{\"_index\":256,\"name\":{\"591\":{}},\"comment\":{}}],[\"iresourcesapi\",{\"_index\":266,\"name\":{\"665\":{}},\"comment\":{}}],[\"iroleassignmentsapi\",{\"_index\":284,\"name\":{\"723\":{}},\"comment\":{}}],[\"irolesapi\",{\"_index\":296,\"name\":{\"766\":{}},\"comment\":{}}],[\"is_onboarding\",{\"_index\":76,\"name\":{\"93\":{}},\"comment\":{}}],[\"is_resource\",{\"_index\":137,\"name\":{\"176\":{},\"193\":{}},\"comment\":{}}],[\"is_role\",{\"_index\":136,\"name\":{\"175\":{},\"192\":{}},\"comment\":{}}],[\"is_superuser\",{\"_index\":75,\"name\":{\"92\":{}},\"comment\":{}}],[\"itenantsapi\",{\"_index\":312,\"name\":{\"824\":{}},\"comment\":{}}],[\"iuser\",{\"_index\":22,\"name\":{\"29\":{}},\"comment\":{}}],[\"iusersapi\",{\"_index\":326,\"name\":{\"885\":{}},\"comment\":{}}],[\"iuserslistparams\",{\"_index\":325,\"name\":{\"880\":{}},\"comment\":{}}],[\"json\",{\"_index\":122,\"name\":{\"145\":{}},\"comment\":{}}],[\"jwks\",{\"_index\":216,\"name\":{\"379\":{},\"390\":{},\"401\":{},\"408\":{}},\"comment\":{}}],[\"key\",{\"_index\":23,\"name\":{\"30\":{},\"38\":{},\"165\":{},\"170\":{},\"179\":{},\"212\":{},\"221\":{},\"375\":{},\"381\":{},\"392\":{},\"439\":{},\"446\":{},\"481\":{},\"491\":{},\"523\":{},\"531\":{},\"568\":{},\"574\":{},\"611\":{},\"622\":{},\"741\":{},\"753\":{},\"794\":{},\"799\":{},\"850\":{},\"856\":{}},\"comment\":{}}],[\"last_action_at\",{\"_index\":306,\"name\":{\"806\":{}},\"comment\":{}}],[\"last_ip\",{\"_index\":80,\"name\":{\"97\":{}},\"comment\":{}}],[\"last_login\",{\"_index\":79,\"name\":{\"96\":{}},\"comment\":{}}],[\"last_name\",{\"_index\":318,\"name\":{\"853\":{},\"865\":{},\"870\":{}},\"comment\":{}}],[\"last_used_at\",{\"_index\":209,\"name\":{\"367\":{}},\"comment\":{}}],[\"lastname\",{\"_index\":25,\"name\":{\"32\":{}},\"comment\":{}}],[\"level\",{\"_index\":39,\"name\":{\"53\":{}},\"comment\":{}}],[\"list\",{\"_index\":149,\"name\":{\"201\":{},\"206\":{},\"242\":{},\"251\":{},\"414\":{},\"426\":{},\"462\":{},\"471\":{},\"504\":{},\"513\":{},\"549\":{},\"558\":{},\"592\":{},\"601\":{},\"666\":{},\"676\":{},\"724\":{},\"732\":{},\"767\":{},\"778\":{},\"825\":{},\"837\":{},\"886\":{},\"903\":{}},\"comment\":{}}],[\"listconditionsets\",{\"_index\":176,\"name\":{\"267\":{},\"298\":{},\"325\":{},\"945\":{},\"988\":{}},\"comment\":{}}],[\"listconditionsetsrules\",{\"_index\":177,\"name\":{\"268\":{},\"299\":{},\"326\":{},\"946\":{},\"989\":{}},\"comment\":{}}],[\"listroles\",{\"_index\":171,\"name\":{\"262\":{},\"293\":{},\"324\":{},\"940\":{},\"987\":{}},\"comment\":{}}],[\"listtenants\",{\"_index\":186,\"name\":{\"277\":{},\"307\":{},\"329\":{},\"954\":{},\"992\":{}},\"comment\":{}}],[\"listtenantusers\",{\"_index\":313,\"name\":{\"826\":{},\"838\":{}},\"comment\":{}}],[\"listusers\",{\"_index\":170,\"name\":{\"261\":{},\"292\":{},\"323\":{},\"939\":{},\"986\":{}},\"comment\":{}}],[\"log\",{\"_index\":14,\"name\":{\"21\":{}},\"comment\":{}}],[\"loginas\",{\"_index\":353,\"name\":{\"1026\":{},\"1037\":{}},\"comment\":{}}],[\"loginasschema\",{\"_index\":359,\"name\":{\"1032\":{}},\"comment\":{}}],[\"logins_count\",{\"_index\":81,\"name\":{\"98\":{}},\"comment\":{}}],[\"member\",{\"_index\":90,\"name\":{\"108\":{}},\"comment\":{}}],[\"memberaccesslevel\",{\"_index\":64,\"name\":{\"80\":{}},\"comment\":{}}],[\"memberaccessobj\",{\"_index\":85,\"name\":{\"102\":{}},\"comment\":{}}],[\"members\",{\"_index\":115,\"name\":{\"138\":{}},\"comment\":{}}],[\"multitenancy\",{\"_index\":15,\"name\":{\"22\":{}},\"comment\":{}}],[\"name\",{\"_index\":71,\"name\":{\"88\":{},\"154\":{},\"161\":{},\"216\":{},\"232\":{},\"237\":{},\"362\":{},\"376\":{},\"387\":{},\"398\":{},\"405\":{},\"441\":{},\"452\":{},\"457\":{},\"482\":{},\"487\":{},\"524\":{},\"528\":{},\"541\":{},\"612\":{},\"629\":{},\"642\":{},\"652\":{},\"742\":{},\"748\":{},\"761\":{},\"795\":{},\"807\":{},\"811\":{}},\"comment\":{}}],[\"new\",{\"_index\":109,\"name\":{\"130\":{}},\"comment\":{}}],[\"number\",{\"_index\":118,\"name\":{\"141\":{}},\"comment\":{}}],[\"object_type\",{\"_index\":204,\"name\":{\"359\":{}},\"comment\":{}}],[\"onboarding_step\",{\"_index\":77,\"name\":{\"94\":{}},\"comment\":{}}],[\"org\",{\"_index\":86,\"name\":{\"103\":{}},\"comment\":{}}],[\"organization\",{\"_index\":41,\"name\":{\"55\":{}},\"comment\":{}}],[\"organization_id\",{\"_index\":139,\"name\":{\"183\":{},\"226\":{},\"356\":{},\"383\":{},\"394\":{},\"449\":{},\"493\":{},\"534\":{},\"578\":{},\"624\":{},\"707\":{},\"755\":{},\"801\":{},\"858\":{}},\"comment\":{}}],[\"organization_level_api_key\",{\"_index\":54,\"name\":{\"69\":{}},\"comment\":{}}],[\"orgmemberread\",{\"_index\":68,\"name\":{\"84\":{}},\"comment\":{}}],[\"originalerror\",{\"_index\":58,\"name\":{\"74\":{}},\"comment\":{}}],[\"overwrite\",{\"_index\":98,\"name\":{\"118\":{}},\"comment\":{}}],[\"owner_type\",{\"_index\":206,\"name\":{\"361\":{}},\"comment\":{}}],[\"page\",{\"_index\":62,\"name\":{\"78\":{},\"198\":{},\"411\":{},\"501\":{},\"546\":{},\"589\":{},\"663\":{},\"721\":{},\"818\":{},\"822\":{},\"878\":{},\"883\":{}},\"comment\":{}}],[\"page_count\",{\"_index\":303,\"name\":{\"792\":{}},\"comment\":{}}],[\"paginatedresultuserread\",{\"_index\":300,\"name\":{\"789\":{}},\"comment\":{}}],[\"parent_id\",{\"_index\":159,\"name\":{\"219\":{},\"235\":{},\"240\":{}},\"comment\":{}}],[\"parentid\",{\"_index\":91,\"name\":{\"110\":{}},\"comment\":{}}],[\"pdp\",{\"_index\":12,\"name\":{\"19\":{}},\"comment\":{}}],[\"pdp_configs\",{\"_index\":219,\"name\":{\"402\":{}},\"comment\":{}}],[\"pdpconfig\",{\"_index\":89,\"name\":{\"107\":{}},\"comment\":{}}],[\"permission\",{\"_index\":134,\"name\":{\"173\":{},\"181\":{},\"190\":{}},\"comment\":{}}],[\"permission_name\",{\"_index\":245,\"name\":{\"533\":{}},\"comment\":{}}],[\"permissionkey\",{\"_index\":146,\"name\":{\"196\":{}},\"comment\":{}}],[\"permissions\",{\"_index\":292,\"name\":{\"744\":{},\"750\":{},\"763\":{}},\"comment\":{}}],[\"permit\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"permitapierror\",{\"_index\":57,\"name\":{\"72\":{}},\"comment\":{}}],[\"permitconnectionerror\",{\"_index\":32,\"name\":{\"41\":{}},\"comment\":{}}],[\"permitcontexterror\",{\"_index\":51,\"name\":{\"65\":{}},\"comment\":{}}],[\"permiterror\",{\"_index\":33,\"name\":{\"43\":{}},\"comment\":{}}],[\"permitpdpstatuserror\",{\"_index\":34,\"name\":{\"45\":{}},\"comment\":{}}],[\"permittedaccesslevel\",{\"_index\":38,\"name\":{\"52\":{}},\"comment\":{}}],[\"perpage\",{\"_index\":63,\"name\":{\"79\":{},\"199\":{},\"412\":{},\"502\":{},\"547\":{},\"590\":{},\"664\":{},\"722\":{},\"819\":{},\"823\":{},\"879\":{},\"884\":{}},\"comment\":{}}],[\"picture\",{\"_index\":74,\"name\":{\"91\":{}},\"comment\":{}}],[\"policies\",{\"_index\":112,\"name\":{\"134\":{}},\"comment\":{}}],[\"project\",{\"_index\":42,\"name\":{\"56\":{},\"104\":{},\"369\":{}},\"comment\":{}}],[\"project_id\",{\"_index\":140,\"name\":{\"184\":{},\"227\":{},\"357\":{},\"384\":{},\"395\":{},\"494\":{},\"535\":{},\"579\":{},\"625\":{},\"708\":{},\"756\":{},\"802\":{},\"859\":{}},\"comment\":{}}],[\"project_level_api_key\",{\"_index\":55,\"name\":{\"70\":{}},\"comment\":{}}],[\"projectcreate\",{\"_index\":229,\"name\":{\"438\":{}},\"comment\":{}}],[\"projectkey\",{\"_index\":223,\"name\":{\"410\":{}},\"comment\":{}}],[\"projectread\",{\"_index\":232,\"name\":{\"445\":{}},\"comment\":{}}],[\"projects\",{\"_index\":335,\"name\":{\"923\":{},\"972\":{}},\"comment\":{}}],[\"projectsapi\",{\"_index\":235,\"name\":{\"469\":{}},\"comment\":{}}],[\"projectupdate\",{\"_index\":233,\"name\":{\"456\":{}},\"comment\":{}}],[\"projid\",{\"_index\":49,\"name\":{\"63\":{}},\"comment\":{}}],[\"proxyfactsviapdp\",{\"_index\":20,\"name\":{\"27\":{}},\"comment\":{}}],[\"read\",{\"_index\":67,\"name\":{\"83\":{}},\"comment\":{}}],[\"redirect_url\",{\"_index\":351,\"name\":{\"1024\":{}},\"comment\":{}}],[\"relations\",{\"_index\":260,\"name\":{\"620\":{},\"637\":{},\"650\":{},\"660\":{}},\"comment\":{}}],[\"relationshiptuples\",{\"_index\":344,\"name\":{\"933\":{},\"982\":{}},\"comment\":{}}],[\"removepermissions\",{\"_index\":298,\"name\":{\"775\":{},\"786\":{}},\"comment\":{}}],[\"replace\",{\"_index\":267,\"name\":{\"671\":{},\"681\":{}},\"comment\":{}}],[\"request\",{\"_index\":59,\"name\":{\"75\":{}},\"comment\":{}}],[\"resource\",{\"_index\":161,\"name\":{\"231\":{},\"700\":{}},\"comment\":{}}],[\"resource_id\",{\"_index\":157,\"name\":{\"215\":{},\"224\":{},\"496\":{},\"537\":{},\"576\":{},\"702\":{}},\"comment\":{}}],[\"resource_instance\",{\"_index\":274,\"name\":{\"693\":{},\"701\":{},\"714\":{}},\"comment\":{}}],[\"resource_instance_id\",{\"_index\":277,\"name\":{\"703\":{}},\"comment\":{}}],[\"resource_key\",{\"_index\":252,\"name\":{\"577\":{}},\"comment\":{}}],[\"resource_set\",{\"_index\":135,\"name\":{\"174\":{},\"182\":{},\"191\":{}},\"comment\":{}}],[\"resource_sets\",{\"_index\":103,\"name\":{\"124\":{}},\"comment\":{}}],[\"resourceactioncreate\",{\"_index\":243,\"name\":{\"522\":{}},\"comment\":{}}],[\"resourceactiongroupcreate\",{\"_index\":236,\"name\":{\"480\":{}},\"comment\":{}}],[\"resourceactiongroupread\",{\"_index\":238,\"name\":{\"486\":{}},\"comment\":{}}],[\"resourceactiongroupsapi\",{\"_index\":242,\"name\":{\"511\":{}},\"comment\":{}}],[\"resourceactionread\",{\"_index\":244,\"name\":{\"527\":{}},\"comment\":{}}],[\"resourceactions\",{\"_index\":338,\"name\":{\"926\":{},\"975\":{}},\"comment\":{}}],[\"resourceactionsapi\",{\"_index\":249,\"name\":{\"556\":{}},\"comment\":{}}],[\"resourceactionupdate\",{\"_index\":246,\"name\":{\"540\":{}},\"comment\":{}}],[\"resourceattributecreate\",{\"_index\":250,\"name\":{\"567\":{}},\"comment\":{}}],[\"resourceattributeread\",{\"_index\":251,\"name\":{\"571\":{}},\"comment\":{}}],[\"resourceattributes\",{\"_index\":339,\"name\":{\"927\":{},\"976\":{}},\"comment\":{}}],[\"resourceattributesapi\",{\"_index\":257,\"name\":{\"599\":{}},\"comment\":{}}],[\"resourceattributeupdate\",{\"_index\":254,\"name\":{\"584\":{}},\"comment\":{}}],[\"resourcecreate\",{\"_index\":258,\"name\":{\"610\":{}},\"comment\":{}}],[\"resourceid\",{\"_index\":92,\"name\":{\"111\":{}},\"comment\":{}}],[\"resourceinstance\",{\"_index\":283,\"name\":{\"720\":{}},\"comment\":{}}],[\"resourceinstances\",{\"_index\":342,\"name\":{\"930\":{},\"979\":{}},\"comment\":{}}],[\"resourcekey\",{\"_index\":240,\"name\":{\"500\":{},\"545\":{},\"588\":{},\"662\":{}},\"comment\":{}}],[\"resourceread\",{\"_index\":261,\"name\":{\"621\":{}},\"comment\":{}}],[\"resourcerelations\",{\"_index\":341,\"name\":{\"929\":{},\"978\":{}},\"comment\":{}}],[\"resourcereplace\",{\"_index\":263,\"name\":{\"641\":{}},\"comment\":{}}],[\"resourceroles\",{\"_index\":340,\"name\":{\"928\":{},\"977\":{}},\"comment\":{}}],[\"resources\",{\"_index\":100,\"name\":{\"121\":{},\"135\":{},\"931\":{},\"980\":{}},\"comment\":{}}],[\"resourcesapi\",{\"_index\":268,\"name\":{\"674\":{}},\"comment\":{}}],[\"resourceset\",{\"_index\":95,\"name\":{\"114\":{}},\"comment\":{}}],[\"resourcesetkey\",{\"_index\":147,\"name\":{\"197\":{}},\"comment\":{}}],[\"resourceupdate\",{\"_index\":264,\"name\":{\"651\":{}},\"comment\":{}}],[\"response\",{\"_index\":60,\"name\":{\"76\":{}},\"comment\":{}}],[\"role\",{\"_index\":126,\"name\":{\"151\":{},\"691\":{},\"698\":{},\"712\":{},\"718\":{},\"817\":{},\"882\":{}},\"comment\":{}}],[\"role_id\",{\"_index\":279,\"name\":{\"705\":{}},\"comment\":{}}],[\"roleassignmentcreate\",{\"_index\":273,\"name\":{\"690\":{}},\"comment\":{}}],[\"roleassignmentread\",{\"_index\":276,\"name\":{\"695\":{}},\"comment\":{}}],[\"roleassignmentremove\",{\"_index\":281,\"name\":{\"711\":{}},\"comment\":{}}],[\"roleassignments\",{\"_index\":343,\"name\":{\"932\":{},\"981\":{}},\"comment\":{}}],[\"roleassignmentsapi\",{\"_index\":290,\"name\":{\"730\":{}},\"comment\":{}}],[\"rolecreate\",{\"_index\":291,\"name\":{\"740\":{}},\"comment\":{}}],[\"roleread\",{\"_index\":294,\"name\":{\"747\":{}},\"comment\":{}}],[\"roles\",{\"_index\":101,\"name\":{\"122\":{},\"132\":{},\"148\":{},\"619\":{},\"636\":{},\"649\":{},\"659\":{},\"862\":{},\"934\":{},\"983\":{}},\"comment\":{}}],[\"rolesapi\",{\"_index\":299,\"name\":{\"776\":{}},\"comment\":{}}],[\"roleupdate\",{\"_index\":295,\"name\":{\"760\":{}},\"comment\":{}}],[\"scope\",{\"_index\":213,\"name\":{\"373\":{}},\"comment\":{}}],[\"search\",{\"_index\":310,\"name\":{\"816\":{},\"821\":{},\"881\":{}},\"comment\":{}}],[\"secret\",{\"_index\":207,\"name\":{\"364\":{}},\"comment\":{}}],[\"setenvironmentlevelcontext\",{\"_index\":46,\"name\":{\"60\":{}},\"comment\":{}}],[\"setorganizationlevelcontext\",{\"_index\":44,\"name\":{\"58\":{}},\"comment\":{}}],[\"setprojectlevelcontext\",{\"_index\":45,\"name\":{\"59\":{}},\"comment\":{}}],[\"settings\",{\"_index\":84,\"name\":{\"101\":{},\"443\":{},\"454\":{},\"459\":{}},\"comment\":{}}],[\"statistics\",{\"_index\":110,\"name\":{\"131\":{}},\"comment\":{}}],[\"stats\",{\"_index\":220,\"name\":{\"403\":{}},\"comment\":{}}],[\"status\",{\"_index\":124,\"name\":{\"149\":{}},\"comment\":{}}],[\"string\",{\"_index\":119,\"name\":{\"142\":{}},\"comment\":{}}],[\"sync\",{\"_index\":327,\"name\":{\"892\":{},\"909\":{}},\"comment\":{}}],[\"syncuser\",{\"_index\":181,\"name\":{\"272\":{},\"302\":{},\"336\":{},\"949\":{},\"999\":{}},\"comment\":{}}],[\"target_env\",{\"_index\":211,\"name\":{\"371\":{}},\"comment\":{}}],[\"tenant\",{\"_index\":31,\"name\":{\"39\":{},\"147\":{},\"152\":{},\"692\":{},\"699\":{},\"713\":{},\"719\":{},\"877\":{}},\"comment\":{}}],[\"tenant_id\",{\"_index\":280,\"name\":{\"706\":{}},\"comment\":{}}],[\"tenant_not_found\",{\"_index\":356,\"name\":{\"1029\":{}},\"comment\":{}}],[\"tenantcreate\",{\"_index\":304,\"name\":{\"793\":{}},\"comment\":{}}],[\"tenantid\",{\"_index\":361,\"name\":{\"1034\":{}},\"comment\":{}}],[\"tenantkey\",{\"_index\":309,\"name\":{\"815\":{}},\"comment\":{}}],[\"tenantread\",{\"_index\":305,\"name\":{\"798\":{}},\"comment\":{}}],[\"tenants\",{\"_index\":113,\"name\":{\"136\":{},\"935\":{},\"984\":{}},\"comment\":{}}],[\"tenantsapi\",{\"_index\":315,\"name\":{\"835\":{}},\"comment\":{}}],[\"tenantupdate\",{\"_index\":307,\"name\":{\"810\":{}},\"comment\":{}}],[\"throwonerror\",{\"_index\":17,\"name\":{\"24\":{}},\"comment\":{}}],[\"time\",{\"_index\":120,\"name\":{\"143\":{}},\"comment\":{}}],[\"timeout\",{\"_index\":16,\"name\":{\"23\":{}},\"comment\":{}}],[\"token\",{\"_index\":11,\"name\":{\"18\":{},\"1022\":{}},\"comment\":{}}],[\"total_count\",{\"_index\":302,\"name\":{\"791\":{}},\"comment\":{}}],[\"type\",{\"_index\":30,\"name\":{\"37\":{},\"158\":{},\"167\":{},\"213\":{},\"222\":{},\"569\":{},\"572\":{},\"585\":{}},\"comment\":{}}],[\"unassign\",{\"_index\":286,\"name\":{\"726\":{},\"734\":{}},\"comment\":{}}],[\"unassignconditionsetrule\",{\"_index\":199,\"name\":{\"290\":{},\"320\":{},\"351\":{},\"967\":{},\"1014\":{}},\"comment\":{}}],[\"unassignrole\",{\"_index\":191,\"name\":{\"282\":{},\"312\":{},\"346\":{},\"895\":{},\"912\":{},\"959\":{},\"1009\":{}},\"comment\":{}}],[\"update\",{\"_index\":167,\"name\":{\"247\":{},\"256\":{},\"421\":{},\"433\":{},\"467\":{},\"476\":{},\"509\":{},\"518\":{},\"554\":{},\"563\":{},\"597\":{},\"606\":{},\"672\":{},\"682\":{},\"772\":{},\"783\":{},\"831\":{},\"843\":{},\"891\":{},\"908\":{}},\"comment\":{}}],[\"updateconditionset\",{\"_index\":196,\"name\":{\"287\":{},\"317\":{},\"348\":{},\"964\":{},\"1011\":{}},\"comment\":{}}],[\"updated_at\",{\"_index\":142,\"name\":{\"187\":{},\"230\":{},\"386\":{},\"397\":{},\"451\":{},\"498\":{},\"539\":{},\"582\":{},\"628\":{},\"759\":{},\"805\":{}},\"comment\":{}}],[\"updateresource\",{\"_index\":193,\"name\":{\"284\":{},\"314\":{},\"333\":{},\"961\":{},\"996\":{}},\"comment\":{}}],[\"updaterole\",{\"_index\":188,\"name\":{\"279\":{},\"309\":{},\"343\":{},\"956\":{},\"1006\":{}},\"comment\":{}}],[\"updatetenant\",{\"_index\":184,\"name\":{\"275\":{},\"305\":{},\"340\":{},\"952\":{},\"1003\":{}},\"comment\":{}}],[\"updateuser\",{\"_index\":180,\"name\":{\"271\":{},\"301\":{},\"337\":{},\"948\":{},\"1000\":{}},\"comment\":{}}],[\"urn\",{\"_index\":259,\"name\":{\"613\":{},\"630\":{},\"643\":{},\"653\":{}},\"comment\":{}}],[\"urn_namespace\",{\"_index\":230,\"name\":{\"440\":{},\"447\":{}},\"comment\":{}}],[\"user\",{\"_index\":275,\"name\":{\"694\":{},\"697\":{},\"715\":{},\"717\":{},\"873\":{},\"876\":{}},\"comment\":{}}],[\"user_id\",{\"_index\":278,\"name\":{\"704\":{}},\"comment\":{}}],[\"user_not_found\",{\"_index\":355,\"name\":{\"1028\":{}},\"comment\":{}}],[\"user_set\",{\"_index\":133,\"name\":{\"172\":{},\"180\":{},\"189\":{}},\"comment\":{}}],[\"user_sets\",{\"_index\":102,\"name\":{\"123\":{}},\"comment\":{}}],[\"usercreate\",{\"_index\":316,\"name\":{\"849\":{}},\"comment\":{}}],[\"userid\",{\"_index\":360,\"name\":{\"1033\":{}},\"comment\":{}}],[\"userintenant\",{\"_index\":123,\"name\":{\"146\":{}},\"comment\":{}}],[\"userread\",{\"_index\":319,\"name\":{\"855\":{}},\"comment\":{}}],[\"userrole\",{\"_index\":125,\"name\":{\"150\":{}},\"comment\":{}}],[\"users\",{\"_index\":111,\"name\":{\"133\":{},\"936\":{},\"985\":{}},\"comment\":{}}],[\"usersapi\",{\"_index\":331,\"name\":{\"901\":{}},\"comment\":{}}],[\"userset\",{\"_index\":94,\"name\":{\"113\":{}},\"comment\":{}}],[\"usersetkey\",{\"_index\":145,\"name\":{\"195\":{}},\"comment\":{}}],[\"userupdate\",{\"_index\":321,\"name\":{\"867\":{}},\"comment\":{}}],[\"wait_for_init\",{\"_index\":53,\"name\":{\"68\":{}},\"comment\":{}}],[\"waitforsync\",{\"_index\":289,\"name\":{\"729\":{},\"737\":{},\"834\":{},\"846\":{},\"900\":{},\"917\":{}},\"comment\":{}}],[\"write\",{\"_index\":66,\"name\":{\"82\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = "eJy8vV+T2ziS7v1dXLder0iQBDl3brd7js/0tH1s92yct2OjQq6ibU2rJK3+uNuzcb77GyRUEpl4MpEAWXs1PS6Az0MxkQDxA8D/frbf/nF49pff/vvZ76vN/bO/1M+fbZYP7bO/PHu5W73abo7tn8ef22/t+tnzZ6f9+tlfnrWb08Ph38lfX3w9PnRF7tbLw6E9PPvLs2f/7/njNbPqctHXv/zjzfu3v/z99S8fFRe8aTffVvvt5qHdHMcXf/5st9x3/+r7hLpv3//15S9v/r+XH9+8/UUjvN1/WW5W/1oeV9vNNOV379/+79evVHe722//2d5NvNP/ePnm4+1Pb9/fvvnljUr1j+XqePt5u79dbVYp2qOI+Vv7nYmWx78kRMrtz6//8frn25fv3tz+7fX/DVx6GDO36+6fb5e71e3v7Xfp3i6+g9ETZ2YYR3O5OUdUnJFzbM3lIRBlY211hAHNa3S9XrfdMz283K1e7/fb/YHIen/XRtpPb9//8ObHH1//cvvy1avXHz6ornvzebv/tLq/bze3y7u79nBg78v3DV28+eUfL39+8+Ptu9fv//7mw4dLpOncrDbfluvV/e2u3T+sDodLtE119fH1Ly9/+Xj7y9vuaf/6y486N8d2s9wcbzfb7rGfNvdTXfz64fX7WA+nQ7uf6iAf94brleuHnPr5ev9++YsYb2WWX651t90cjvvT3XG7D1ztZlyUT83O2sD6Ii8uesu7Lv38db897Q4hQVf2y2PZVMW+LYfFdqvfXbFUndP96vjz9ktYqSu4dgUTte62m/tV9+N8aI/vT+s2qHmpcGiP+3OFGbSjdCdoDvrRoCQpm6j4RRWhU2Nzdx/WOJdJVXB9bVjlWi5d6c/vr7abz6twE+jL3l3KJiru23U/mDl8Xe0+nnaKZjCscXyskax+2J72d+3LPksppF3x5aX4VN3jcb/6dDpq7vosPawxUf3N5nBcbu704qtBhYna7x+folZ7P6gwVXurCrOz7naWCFPrTdHartuXh8Pqiy7JdsWXo+ITdFVqEzTcEDCoci2WqNMN8/Stsis9R4vsrvNm822llFxdik7QUynFaeSLoh7094fTvn3Zv8yM3+HZTr+r4N5+/JeN4+H+31aHf1ttvrb71bG9T/BynnDQ+bi7FE73QAf8gr7702xD/sHl1GP+s7vBT1jlWTEaNPqzd4Jo93/kl0aN6njKThaNm95TaSqf2VAaRU6sAzJfKGtHTi7yqv3b/vHY3oda7VD9UolrudEuLtOWAWH19CaXFm4Py2+tmydyd7z6tG4/3G13bVC8r+reN5eXqodz1VQ/h/b4+hpH/c+vjb9DexyEYP8Q0uKQ+Hk7iK1YQ8O4nM/RO/fYY82coyXdB0nm3XzEy90KSZ//NFcyH15Om8wf3TE/492+XR5hkI/FHoul6ty361ahcymWqqMaa4wkJw02VG6E2AROEoYbARdf2rC2K5P6q39pj2yypDLB1BjQWq8O4ds5F0rV2G+PmlZxKRahM0oej5OMMH0M/jhPAqEX1KWQocf0RudpT2h2akdsw2PcRDc9hRPY+Dx9sfkpVHCj8GTkZoF1hgH7is5Uo8BFhWYJYPbCqkCG3uN6RcGA3D/GaDM9Ja8d6DNjtMMNmbeR3qDjHXINO+QutoHHOINNkDckNsWALtckg83xSZpiejOc2ASTmt/EppfU7OZrcnM3t3ma2pzNLLYvxT6k/jRC7Yfvb+71ip++r/jlAFGqf+tX0KhlpQU3Wt1g+kpIXZLeaXevb9+XwtGaw1T5uCKDWW4x/vMsaRJcUpUkidPk1IH00xNHjCsubfCOYpOGzs16+2W1eekTDuSjL7sMr7cSZ/cH03awOyZ/nyfMwDV1cUbMcn3xdufnI0Z0x6eiCLWXh++bO73k8lx8mi4ecWBRecChVGTGG1AxMNxQKipSBhKfkDNifLFJg/cUnTV0ftBIA7qQBhp6LTdTpFZ0tGEGXTi+4VTF4U2MZsytyoMbveqr7e77+/ZwWuufa5dY9o9Vpup/OC7BmgVO+nAuPUkVjuigojigU6ox4zmoFxjO8YrDjtatOkVd7OUvs3Su46uputWrNebHcottutVHITlXcu9KTlL79dAGb86VPLmSiWpMN0p/RrkDDaowXSdRCXSaQZVwd0kE0ztKpReui4Q+YjvHoAfULRJlqUMMXh+mLCIgJqugwr592H5rNS3PlZzW8tw1NC3PlYxuecOE+O4ep8Pzv8+SDIfXUqXCR1PJDWykmN68VD64xgU8xDatgP6+/bxvD19l5Wsh7W89Co9+dY6v0P/zPMFxvZQuNpwjfqeHqOD+nnJlt1Q9ZN8VSbl+e54nEBUGhZQao4D5dFr//upre/e7KNKVujuXSlG5CypMvvrL9fojs6LX01mu16FlvQrFX/cgy1Cp055fuiZrfF6tj+3+7Se8UWMo5EpuP8lbNWS17uXxdPy63a/+1d7/ChfzDiW7l8dLcXlZb1D35+3dcv0+sNKciK+7Otrl5kEH3f2+u+xLDIp397sbFZ+gqwnas2Z0zPpp+3ETISP3+OcZ0/jokhHp/OKUTb73/tALS97zIy+d1na/6mZ01+qf7uaxRnuuMUW9e4k/cQEylr0UjdQj62U/b/cPy37V7p+r7UF/15d6y65e4r0TL/v2v04tGM0j/WvZqZqHXbc5USl6KRz7lL3m+Wq72bT9VjDpRyelZmys6MoRbZbaj2+6jIFgCxaU0Y/cDblffV1uvrSB35kUnPenRheP+7XpfST94IwNzW+u1BczGOdAlctkD9yjVzz0J3rcUx70xEec9HAnP9bEBxp+lNIznPvhJT218C28+/Hdh/43ke5lXGjGmwIXjrg74j0+KrE8iUtxJiTCx2Mf/cP23kdGvJ/Hap9ctem/h2sCr+J+FVdJ0WZ5D8PQO2/phzN817/NE2jkerr4GhiMQwO+nAwHFEoMHvCUAoBAoaSYwaSiE2YxtX7YmUzsJXo2M+wDoQJPXYIFOg1IsJGOSK+1WohcYzGJWivUIAjxlEQUolBhmK2nE+C1WIkkr8tpIkwCG/59riTmXVObyEZmo5MZkA0mNI0in9R8xXBi0yiqkpsvPinB6X0JSY7zlJDoNH6YZOe7CCQ8jRaXGnyxUHrQqPEpwtcLpwlGcZgq3nvHAKGEAUvNkjb4K6uSB7YvQBy/Qoyl7goRxyBFu/t1M93fafNUDpkULD1CORFHqTPpWFAPJOUo9XBqFoykJ+gEj1yaDvqLTdZR3mAaFSyJyTRa+cf2uFytW3/oGnBwf603g5Pu+NSftvsPaK21YKSr9nm799ZcT3k24y5geBYbv86PKTdTN8BfW9kR4JuITWWSjVAyi3LApjPBQTChRTnQpDTBzJSkluCTT2tBj/GJLcofGo2KrqRRabw2fCUP6Yuv5yke0Kt62IT02h7pgulgBAeBLiZKnRm3i/qB8XvYAZ/EFfn7iVL3lKw9OWEn5urJaToxQ8+ZnOfPy3Ol5Hmz8bREnJKDp6ff1Mw7Q9JNzrcTU21Slp2cYBNzqyatXs4aFTPrsNS8ydW7clx+HdlPTLHAgjLLatRDidZX1+ZajXpEuvWNzJBx9R6DSZfzl5x3Nd7E1Os7UmVfpa6cgKG2Lger9cU0zBhQZWKNAzkZ++q6fKxRDqVkX1ublRl1lJgvR6lLeXlYaNa07F04KiuPvKclZWBAl5M12oGU7GsrM7JGW5+QfRvT87HeYSgdc+5Ss7HGmZSMfT+aXKxUFVMxVFZlYrW6lIgZeU0e1uiLadjXVmVhra4wuy3pKya39T4CnYHvQNkXaLTleXXOQNq0uugKdVCXmXipgxoWmrWD8i4c1UGNvKd1UMCAroPSaAc6KF9b2UFptPUdlG9jegeldxjqoDh3qR2UxpnUQfl+NB2UUlXsoKCyqoNSq0sdFCOv6aA0+mIH5WurOihGF6bBLbu0ZFxg3vS3jV9QQvwyP6fbUCnthsQeXD3Ntkitk1AC3kYtyIjR7Er92O5X3/DXMiQH3Z7U+2HVaX5CHcE2allIjGbSb+CqzvwbRHRI27kWp8Q4C3ZEwFVyJxRwJHZAIx+qziesJnc8VFHX6WhUxQ7Hl1V1NgFduaPZRizy0em5o1ziM7GrN2cmDrwDjeWV7z86zXEWupzPqv0p3EXG+ehueJFoj2gIIHb/s3f9ad3+hI42upOd0KFFd2bzdBxzdhrTO4y5OovUjiKuk5jSQcR3DpM6hoROIblDiOwM5I5gt17eaRrNtWS6WiDZRyd6KYGOD32BadQrMk8yxZfVpVTftfgupRa/FJ+q262Wfxmn3VWZVf/XTeTduyX+s3lQJH/GyIQuINId2xGIzqK7A7UrnNAYM3Jai9Lk5/kF7fAsv9rDKTZWZ4xTcY6fkU+a4Zcc0aTMpuJZE3B82p04cZU6YRVQ7s/Q64fGb/fvub56pN2fp9fX2O6DfXbiNFnU9FjiNFTU9NP0aZ65pnemTevMMZ2TMo2jn75JnbaJm65JnqaJnJ5JmpaJmI6ZPg2TOv2SOO0SNd0iT2GcTx9E6f76p1kSPrmcKuUP3HFJ//4enopM1Zb39+KZyGElJs16tyUn2rAOk2qpTiDZanVcOdVP6Cq4Mygn/pbhVE/F05O91g2X7rGT2IQfdoFSPtWWkr5KAaZ9oCImfqUSSv1QSkr+YS2Y/qmO2AHoNK4txe8AkNy1ofAdQFiZ6QKoYKATCOtIbyFULOXtAzoYdkTdDyvvRfBKzNIt4auqeiffclzXwUnLPYhalelIGNVAf6JWDad2xkB6ho/0xiV60Vdsvld7QmmfcSJlf7UeTJeMoJg11YpMCmM0A5lMUqXp5M3m20rIJdc/z5ZIyCXVWWTglBvn7nb77Tf8K1LVa9kpikLS8m4znLHCekK6onqKXBXW0yUqKj0tS2ldSSkKO0rJT2E3XHKiHkKZKazEpiUqFcxJYS0hIVE1RTaCejQVsUlo1vQTn3jC86nwC0djMcWnxUJaPTA6tPtXfNIhoOjQ7hVpR6P5I594fE1F6tFocrPEWDQ0QxxSFVJ5VBJPTN9RiXt6yp4rWU9L03Mk6JTUrE/Kgas7VtTe9xOIYanlufh+K53KptCFUxSenDhBoVJB0xNARpqcCOmwnVpEdyZdH37beHx98XvGoes/Uk5FH/BYdFIvIHTMUV1y6kTHWChlmgOpl9VF3J3K8MN6e/f76/vVcflp8LuuNsd2/3l51x7+HRQTxwjjz51d3o5iLn0zqoZ/WuSeMXHfHu72q91o5bjGxbjeZBv9/8TonytMFv6W3W0fdsvjbbQDWnM+K7vl8WualXPNFCtM9L9vl/cBL12RJ4j6y2UjI753PDnar+qRkS7Jr9Q/5Y3QaSrFfh90myE1qe9Uyinaz1VP22QkwZiWe1WObrUqC4oWCyxoWyuxMGqp7978rf1OXsaGBgZ/j2ij/UD8dj0auUtXvSE1mFsammWk2+uXwG+Z5uKJe3XS5dlY8kTl+FFIua9A3h6/75SK4woThPdflpvVv/otFurf2K80wcAfm3Yfc+PD8umyO/fRAvUtj8pHyfotlO1GL3+du3UOuk9925SSnZt2uL9dHjWio9JTJT99v31oHz4Nlj4olIeVUg20m28aSVdsgogq5Y309AkvYUBC5CZJrJeH4+3poA4cUj5VVk7k2pFIUEaVxK9q+hQuimoT+EA4Kn2L4orkPdDVpm5J8pyINXrXohPFlL+ruo+QJA/t3b5V3d6lZISU3xl9uNvuWrlHuhTRd0vaNDa+dFwuuzqf2jSIi7j2EbShCSLiQB1JSHz0jB/flsOzV7Ck/omH3qb5y+teqvGNMGbYjCS4kPNSSJ7/0dm25ZV6oh87cvbCNx83XmC0pVBWS3LTGIymOJOhFtUF01U1IpCklnu6Xx1/3n75+/aeGdkPC8S8MLBR413w5lKYuZmRR27cTnCbrIiAW7yk/HYCVBUvKBrh+/ZuddD/vIPiE0TbzTeub/ElL4UnCKrFJgttdiftI3wsO0Fuu/+i/yEvhScI7u53t3f9F9H0urTOFHl5YAK0FcMSjfB/ndo9TuS+5mPZCXL75R+398vjUqk4KD5FtF0e1IngUniSoNu4z7+OId1xnWnyp7W2sV4KTxB0K/WVgpfCUwRXD+3huHzYaTUH5SfIdkuJbtuH5Uo5CrgZVZgqzI24GFlxxKUWZedrGFV53oaRRYOtt/2UzCE45hqWix163bp5n6jL39Cq8q2ObmPSGMl3EjFU0tgYvvGn/DCw/nRbcpfo21D0iBrZ0cxDys+BLzDd2GDUkWILVZ/B1Hk4kuSI1p1uZ9SZJplirjDdmuv+kjzRqtPN9Ck7xcq4YpKRUdL/x7vXmy+rTfvj+TXs5+0XaAiUi5kJ7apGXffmUoe5R2Q8+hWKVQ+8SUWI7/bbnjZ2I6HbB7zGh7XhV55uSBiksj5CY9UIeWHIysqHRq4x8uIAlncQHsfKJoaN7ofum9ejM23et7vtHv4oXNmIEdf15Jzb88AlWugGXwT/Euztyb/Gr5uY38MvnfaLuCMvxF+EkbrBl5F/E3CT+Fd59bW9+919KR55G/xZf9/Hr/vtH283r/f7LVw4QC9601fYbtpzBXxrQ6dCo9viFOxrXsomy50O7dsdnOnw1E6HdrvjZzmwmPecft2vA4/qUkL/tIQ5Y3DJ4KQxMRqdnZFmIC8rJTVRSYW5wJRWuCvtBGKVOgHhOt1EIIKJBxDESRZGcf141PCH9sivpvRLRWTh03H7pd20e65HYi5+QysyweffAN/Q6NHMCheKs5j1FgIsk/OgYZl6E8w0FycuTXPpRblpLk5VnObSy7oqzKw/pz2sNNXA5TU3zsK42lQT3Cw5py7OkIuyXGrhFgbQMk+UVgZrQqOTirhOU51SBss04xJK+spURj48p6mVj8hmcesytAbCK6+wB+XSK62NGOkZ5BT5W7csRCuoyd3KhaVaScVyNqyuXc+mNaLuQAYL2qK6j/TVdIx6mFtr5R87Ib34oMY80lG3HttppiyEwsrqDlOSdNuG47L5qE60PNtbn9at7mXgWlLfc6+6aRRlZI0vfzOuqrjf640IZrZ4lWjIiLSPPM7E9STWWB+jmnNYubShA16YLZkhdeew02OQBCuDeok2pLahGs2ey0VMBOlHc8NrR4/oHm9gnkHVyErKwCpgJ9bCTLKaQdZIVz3QCgjHjnxGJpJGPwFDcclpMBCJT00zjYXGNiLHQwEbsfkRjE5i0tJM44WRkdgxQ8hGRIoemIhN0BFDl/c9pNH56Uo+2dBlcPmkocv5RqYPXaiRmKGLbCI2O1x9JOUHyUp807yaSWyckp24dnG1ktAyiA2ubfw6PryI8eNKRfEr5RzY4Mqxs2Bn69MnooYeYqeiZBOaWZKhunqeRJZVT1AMteOmKDwDJMBYfOn+JIbS8FL9VzTdcW7yGygsqI/Y9Wrzu9snvz9/RDtO5AZeAP+O+J64sd9G7F4ER+OaM1jhehbBg9irRIn/8bWNfSTnKmniQhCSozd5M67gEwfhQGRCEJ7vaZYgHDpKCELZijIIhx5iglAWVwbhUDwmCD1xIQi5+QZQ7IkDcHBcRXL4iW+/UcE3ePGNDz35LW8tvYCzNsb1ZrAhzoILNsIT4TE2dM1woB/RCEPC0fd+qTNZXpkBrtox7V94n3381mRwWzQsOMf2aP7CoW3S2Hv80jfBQWgFXJwFcdJVchGedY0yIm2nFmwEt1VHmeC3VwsWAtusowxEi88mzO0dkLTFzQNR8m6nB3yDFgxca81hgd0RLjmQd4ZHGQjuEBd86HaKx9kRJ5wlL+EZ5ygj7A5ywYO8kzxKXtpRLjgI7iyPM8HuMJcsyDvNIw0EdpyLPjQ7z2PtMJt7ZB/S7p4oA/wCcsFAYB15nAFpg4/kIbjDJ8qGvGNd8KHYuR5vhKGWIRsSu4w3wU2EhlyIE6IhG6Px8+nh4bvbpMUPnUmZOTY5wmuGNjh6ZpPiHSorQp0XH/6gr9dtv/3p+jGhl+RjXwMvbOGIFxPxqHRZQHNoOn8/3DPnGnjAi9++pQ0b0baY5h4wRVv7VEtypPCz+FzZiKaofyyjY7MnPhV58vrzan/gz2aXnY3qamM3abeH7EPqEGIN9Ofapv0cw6rzmLnOjG0Ox+WGnVqTfTFXmckiP+kVcAVmvuYM7MNxeTwpM/LQ16Xe09g6H9qQ8osNq85mTk6H3FQ+LjnX4kHh6txEVtyvIC4o1GfpwUrCiTl62gpH0Rm/xnE+i7GdyNVeUhcSvwBTsvBkv4q6L9Mty4wTj+zHyMHuMz4QxQpRyY60RnS+RyXPnkn+mOmz+ayljwEQYUsaASRCL9HR5N5fPKk9ou8fnNo+tecXd+jE9fuDzToz9Prp63IlZ8zK3EnW5OEIvySQK/skb2fDtWlTe355uVxsxzp0ltS1ynbUPdrQR1yfJhuI7NWGNlL6NdlMemYe+pqYmwMWY7LzyNXk/Cwbi8nQQ1+Tc7RsKzJLD53NkafFpauvHz619/ft/c/bL6vN+/a/Tu3h+PZ03J2O/7E6fu1Xr2LEoaoYtYJ6utLN9SpMpKvulsvl7pe9/dQu9913bba/46UxEX6ZSyqf9KSb4Y4ginEfdSTRdLu3d9t7nKMjPT9e6H/C+J/HPcTGMZ7P1/gfsLtv71f77s2j8zvNNbnU/4D5OVrk0zbBUea9zqG82u7wEGhcJCqbfl6v7o63h2N3yMsX9dVvUE0mlxL/XJ/cfbFILf9YepLkcbn/0h5vme/3Qd1RlVhx4al+UN59Xy7i+Z4Ox+3D7W67Xt2tGELICdz4lVU37G5Fse8s0g6tOp+ZRCMzmdiuow2cq0wXf9w/F2lgWC3JRKgl/LRaH9u92tW5eMTr9p936xMzRghc/+ZaV3/rj/fDLqhMt3OtO8WO8EA+9ilP4c0VjHkIq8NxtYEHhPKXvhlUU93x2T+3E7H9I1Lf1UiT5n5mnvvTQtG5/9N+ubn7yk9bQIEbWDl8z1MOdGScaDaeqi3884/fg0lloH0uPlGUm7fCmuKElVYy8mnP83wP7bFrlzE/8KBKvDjTmFhqPC4SscLq284Ngr7fHo7bPTulBa5/g+sG7zX9IEPoQrH/Qisem1QGJpJSyoQzFaGLyHSSAHuR6vSnrshcVzlt3krhx0hPmbNSzk2EenMEj4YMI23tsUFKGwH2ixwo9kwoxZUZewApI/L1BOyHpBUn8fDiTFfx4bgMvvr0ZZ6ys7gKpPYW7jamdhcDH3H9hSwf22EMbST1GKIdfZcx8BHZZ4gGYsJhhqev6DYGgtp+Q5QMdxwDRWXPIQrGBdUsYRTXeQzUE3oP0ch1L1/EYx5XmmhA238N9aM6MFFe2YMNxGO6MFk6qvO4eSw+TVTdcQ6U43pOKs90ncJiGFroCacsRqdkJfUWkw7LYpxE9heyBUUGH2prU3ja+VyM6Dw/trItjxZkRDRmeXlDh3vdvjmsP/h7xGDw3p0Ltlzfrjaft6oL3/iVmFsbWk7D4Z42Q71jZZnOwJOTOgCFzEN7OCy/KG/tWjhd8HDadZ8nu+3O89Gpkhrp0sfVER8s42s+Fo0SGzaGn7b7h+Xx2N6//HO1PbAfoQLFYsgzjknuojdiUCLHsQtaWGX5U28R0kK8suKhsI2Q51e9sepgwZtefBhSf+0+I7O6U31XlSsbkXfZw3rEa4fO62FvQlqrho/skX2ETu2JNSKdlyM7CR6Zk2qFeWHQuZHeHGIN8VvUZS+BreqxNtgzdWQX8rE6sSYU3+WV7Wi/zRtrjD3WRbYjn+wSayJ4rIlsRneySYIp5nCToBvpfJNYG/wRJ7KNwCkn0Takgx8CToIHQMSakY87kd0oTjxJssNMzinMSDN1SVa4d0yFF/F9U2FmPDI5dkvg311OWD/wn63lykYuX+eGBMLFFUMC5ja4lhL4wqzsJulbs9EW+a/OBtxFfn821hj/JVrZV+Q3aRW2RoG83552L+/7QzOht8Hf9QErnTDrXTH8TbORSe3OpjjtYbUJJrS/onyAq0ZK6Ds9sVB/ieX8MOk/uN5FFy97KaIPltCdjC+pu5mrU+F++AV0gz/r7+NLV+m6JY7rNMmlb2A14d7k5VTuaqNRY6QTVHeincAT9j1onrG4sqsvwa3puvwxYm6gD6j2/pZdeD2+6I1XQbgTac1DRFBdxWNDKmxAH1DURWQ4ha0Egonqa0Ip9PElzQN/LKeXgfH64e5r+4BHCeMiT5KXyOWTAul8BzOGk+8oIag0thSh5XvRBphsgJnYQrLSNBYrNgy2Ny93q7+13w8vdyskOvizGGT5oqjJgiHN5W4uRfE9DN0xYvfsJ0M8sUvRZDFmG4On9EX4oJROht3OhbTkvWwKwfXqoLuxc8Fkof32qA2NS9EosVFon08v5YN7UEAf3mwQ0KsFwmDoLvq5eFqBJ8OIjX+u49ftfvWv9r4bLLth8wOzU54tPM97oXz58Esify+RL2shI9KbW7QJvssJ2Ah0O9FGTsxrXcDGuVq6CSEcD+/ZaWpc8kkCcXjt6Ch8vIWpT39kIu7RByyw41vJgTzYDRoYPfMflof2PGn1nnu58grpn/T9+Vhr/WVvBlWYG/Q8y1s0P26Py/Wr7Yl51NjFue6xq3t3rjvRzo5ZR8A42ElLCPSi7f5dpG67n0daaF5YOdSytMJsMsWychIVRL2G9PPqcOwKXVMt355A2RmbFXd1ZetCNzK5kbGe5LYmTbfHmhWbIOvPaw6zWgo0UN4VaKdzGnvsbN8IM/qyw8crBCf3o61xY0fZjjh0jLQQSG6sCU2Oi7AhpjrWRDjjyRZGie/V1/bu9//DLfYY/HmOtWD0cqHlX0N38XjXUwsRXYWcOPaleuEBb1iQDREqJkcFFBoHAvluNzsJgArOMtfFXjg46wW9x89/8QZCM2ExBtg5Cl5enqsIiXNPWfWEn+Tppj3ZGZ5q2hNNmeHEquIEV4TkD9/f4NEjK/vpuzD1HSf9N4wcJG2JMqjFVQ0npdFIoid21xUje6mQIDxqqX3LeLt3m2j6Fxh+RocrHLFMym1Ajr/6zbUmd8fcnUR3eaKPQAcYNjH6+QfbmNg8ScpEpEnmVEF4xZtzaebGqFFB8uXh++YuTnd5rjJRnO8WsHKgV1DKCp0ClA31CUpZrkuAmmKPoBd0cCdKdrlbiWlZL872Rpy03BnFCMfedKAr0kt3h40JCZnT79pUYCF4hAn2NA1WX94TrZVme2IoK3fESkmhH4aioW5YkB12A+7cvrf9l4yh+LBAxCuy+AlB/6LcZwPFGaOR94TXZ99F8AVaI8msWAFyMZ8CVEkL0z6+OpjrmW6A2ceC5OmelRTxUSz3C1zYwczlr/phjFunx61+Jlc8r+qTp/GuFkVJbhktlpQHhkFJYfBC5ELDlqCUMGAhUqGhSlCKG6QQHXF4EhRh+wmiIvcQQZl9+7D91mrj0JWeGIfuIto4dKUT4nDYfLtJ3Zf9fKkrCoVpIX2XxMIVeMlIquJ5T8ApjI9YjqK18jh5y40wsZ3HWuIoU7DAPPHQw573OU98xBOf7vQHO8MzTXuc8pN06+94Yfd3/ZPc9r39R25IQa9548qLe2FHRpMCaCiY8PwC0qEAGqknBVDAwH77T+Zd19ffb/8pveZiOT9s5FeFcZG50sD4gikP8uo69VlSD0mPM2hDlRKIFX1WQPL+E35ca8obeCwxC4T1rxjksGOb7LIW/swLJBo86UInK0fyWDIhgoLy9zspIxD9+10wJQQFQw2HSCa1m5AJ9ngIZEE+FEInKH45BImGvxmiEz5s98cf1Lfalf409V6FaQogGVqTopN8PIvhp/32Qa38WOmzqzSLgY/w0DZR/sgf2aYT59fxAtnA+l1O0Ev7HrZnDXglZ+rm8XUTkqR/K3zuOu+sl/pbztelcrDjjTEkJlPeyhP+So+p60N7TPiZLomvPc73O3VBn2anby4TrYhtR9dunqLNzNJeZgnNucKST8/SWyZwEn7L5GS9Zz0kNayFYaGZnrR3yYQHPfKe+JyBj5THrLLijomWWjlw4yoFGzhjwHvegdnNWec1p81oTpvLnDyLqZu/VOmHV6qGBQ/tcn/3VSV3KZosFhgiD8U04+PwPOz7dr2UZ2IvJWaKzfH1EsLzajkxQqmDlCANmtBMwBAj6vkXJM4/2a+r3cfTThqI+0VjZ2tjL31zqaa5zesdpE8Zy0bC/brejC76iY0JERg2pG0P1NOkhhG0tT+XjPY1qDjLAzuc0mL4Wm9OG0lRfK47ZxgHuiLOiaZbEk2ARDbe8vXjebPgu+V+iY+WVVSbrTMLiiQ1bfGOk5u5wmtak0+xGxzIafzCAd4TGQ4MBDV2NQPENHPB1ho2F7swLMpssFVHtuYnbcXztt55W+3srXXmVhpsnRMNRQZ6IMDjzQQD+Vdx0h2W1ofx46Zl+a2Ck7h5rK54w0A3NUfbGriZHruyrciWNXQ2R8Oi5tjI4Y848UrNnPCkgz3U95t80gfnZMqPL5rRvZN7hiLey7EJ78l/7DPRIdDnjUrF5AjN2RdYIOaEGf9GUkIReIh/+jobgVBETlJCUWUmMJgEXjRjR06aCUC5qxqUmSnt0CsmP+lJed93kf6URSPsgSDQhbxyWympCquBqD6oRFk3spLSqqfsqgRTKhb34rkr8GbzbSUtJxyUmSme6RUT4nloPDGefRcp8awwIsaz5yIczwrJQDx7opp4VsgGXjI8Wc2bBZYdR/L2brkeH3CDPfjl9BGt+igCKxHxcQR4O9GhxfqQw0svLT1rTjz4vPXy7KkArLi830aWDoXbgT8yiS09RzIVrx04dJC/jZSEGnASOoYw2ow8wSK7UcyvpNoRz1dT2krKEAF7EXliZCk2W8g24nLG0EhC5pCtxOSPg/pcLY2NUS55t/yy2vA47/rnGbIFuVggPQycJeQDTyuUAKDc+Ke653crn/+m36u8bz/v2wMeIQ0vdnMtyBm/F7dp9h+POrK+H/8au5NDWBU1vuZ5L8eXx/LcXVxscrLCdjWq2J8kMklM3AJD5brC663wDfKw4J1q8TURvlQ6tMf9Sfo0TZyBaPEpwm1oOSXRJeVTZb+o43dy5O7udULncskybt2jTupadoLcn9/d5+i0kn9+v7uUT5Xd61ZHEfFhreNjrXQLbpgkbYX29F2V5aXKZHF5Gyanj49tSbPwONSMcrAaVJpqQF4DyRjYDypNNsACIE5c/ICYXjhKdJKg4vxxKrtdt8tRlSniaskpQm5wr5K6Fk0V6wbwca23qzFLyz0FZluB7upSfIqoWi5SaDSkbjeH0759edd9f/zn9lsLP7rsDye6Ssu+0vpcaZqBV8IRVlA8eIoVFPbH+K/WK27icVggYqQvvjQMrnbjSor2z+744SfzxWWgdik8QbBdt6GMNpQcFI8THQXIp9P69/7ka6VqV/7uXF6JBDQ27iIsPJX8y/X6YzDrekaW6zVKwPNY+nUvZQzPy2m/ntfE58GZadpfxdXZfvJH85PtdKd4jr/9o/TUneV5qegn9TmMoWkuvbt1V1sapsxhkXy4W++u+8V2o4rzG4tremdTs7U80HUF0//1I+rarivcDw+/zL7crZT9sPxl+OVuFcgjY1GaReIF/1xtD+KsP9Dt6oRn+TXyn5d3x8OH75u7j6uHdnvS/tx9te4s5+Ol2owm3m3XqztMw8JWdo+VJxhab5XBfONKTpB6OK2Pq749q++4r3K8VJkgvt0tXybE33a3nDEEd/c7pa4rOU3qfXtkQCvU25+LTxHtZs5+6qL0H6vlO/3NdtX64P62Wk6+833Ebc9wz8ev++0fbzev9/stpmS+al9lu2nPVaaIR6WyWTLYcft7yxA4X/BcNk4O9Lqvzy81MhwalNLjrfX2y2rzUhpg0Mve9FWWwTesoWnx7t7uQnOD5xIzjyqGV40YVjzaTR1XUFnFwCIkqczsY+WYvB4wEDG2GHmIHVxE2giOLkQzuuFFwJI8vhjpKwYYATHlCGOkGjPECMhHjDFGFmIHGQEb8ihjpKzobMNioXEGVVR1uiFZ/UhjLB851AjYCI01Rtpz3LdytDHSjRluhOTj0ts8WS004hhLaoYcvuC4Vz4zZ3a0cf27fpwhHIZPrxc8Dn9okJETDsT35EJH4ivkuEPxPS3xWHydEPvRHCQmfzBHK8jtO8CK4pYDhSR7+L8nJx//r5ASPg7jiYU+DMPIkZZ1WYohtK5hmblamHdNTSsbmU1qab6sorVpZIUW52uGWp1GUIpKXzEYmRpJOTp9UUWEcrLDKPUPD+FiFZbUR2xHzZSHKPFKPXuLWTaEb0+w+OtmHpOnzZPZFNq+YCqUAaIsCHlAsBDKBlEW2CYqGJAbarT84/EcKTbur3XnsPPHcnX8abv/wH26UXDTVf283XufcBQhUtDcOMcImzIe/xgx3yMv0xldkPskGrmZsz9GkPsW2VhJHAmFJIQtEGOV0I6HoBB3HhaREY++AiLwgQ8/X8N3K7DsLEMh6dqKhIhvIiUlCjbCSTHKBjdUEj2IQ6Z4A+xLS8iE/AKTYoR7mQk7UTVnpRWhrxJshHqrKAvC8FI0ERpmKmzwmUGZFJ4oH6SmglmyQGoCmN72k5r9PC0+ubHP1M7Tm/gMrTutYc/SplObs6olXwZYwcY8LDlve/aurG/SI/sTWrVvQd2wNRaCbdvX1zVvpXi4hUMDykauNhFs54wLXVPX2Ai3dt+CssFr5DVt3jegbvacBdTyLzuNQg1/WHDWdu9dWN3sR97TW71vQNvoNQZCbd5XVzV5pXSwxUN5XYNXWwi1d8aDqrlrTARbu29A19i14oE5JsmEZopJb0aReHwb2ryjMRCe4uJcJM5wydZQRrzMioUy4rDgrBnRu7A6I468p2dE34A2I2oMhDKir67KiErpYEaE8rqMqLYQyoiMB1VG1JgIZkTfgC4jcuKwoW1FUDUupG9gbudJaH8IvP6Nq8ttEcF3vJ0AepAHdVtXCXelfmz3q2/8QTSSjW4rz/2w+kRTmuSzjcNNMcLJv4arPvevEcyEIw+6LBiWDGdAKqvMfhrpYObztXVZLyAeznjbGMioE923D9tvbVoqcnVnTUWK0d/Yg3bkpxMeN77LRwFjfhR3oXEzvBteKMEo6pqC3dLsY774/D8xzcan2CmZLDKLTc1gCdlrcuZKyVqTMlZstpIz1W69DMD9YW56LD1BUpGN4jOR3LiP++/CdtjB3/XrGD4t737ffv78925R/m69Yg4epJe+OVd7GFZjb+1qmzHRbpaf+OkFIn0tnC74sPzzx3a95BoEUXxY/nl/Lj1Jsiu1YheM+KL7S/l02X172LV3x77ky89H7fM9V+tX0C/P1aaYcEVcP6d1cNx/vxvUmSgf8bz78tOfeH+Zv7fHr9t75TPvazxcakRJj1PF+PwDdjTgFYt9TY257M2lCndjvmthkeTLeANdtXlN/LpJ+B3c0sz5jPA9LWMg0N9GCctzw4IBxcyw2sgp5THM+QiC88KMh7RZYdEWzQNi63+SqankKanAa1h/RlL/dvF2/14a8I0M9Ccl9bW2+/DAb8JsWNws2ISJprgJptQ5nIi5mylzNpFzNZPmaGLnZpLnZGLmYuaZg0mee5kw5xI31xKYujifO8Qlq+ufI9LVfX84leZ6N8v7e/n49IG/+NxA1ULZISwm5AcqFsoQWrHrd3siZN1S8ak/LZekqKaYplQybKICUnKqUspxyQrqiekqLMgmLCompyydUOh7ZEjzGi1CygrLC0mLqobSVlgsNPSjiklDPmxjmD/Zdtn9YbZ9LZeLqfa09J64OZ+H5QofWnLVeCyTcPnPq/3h+Ev337JEX27jyiXIcLtyrgJik5UuvV6qbqArFuXfi5rw4lmv1CzoAF812Df6luO7SEY61FOqpbn+itEVuy21KJvdGVU5yatlhWTLCIdyrihNo/d8aLUUutciEWPH3W6//cbfFrnmzbW8cFMDr2nNhapq2kpYNNBQqKimlYRFpSZCFYPtIywnNg6qF24ZYcFAs6CSmjaBRWmDCL0qkjJyk6AXF9tZymTSe+7rX6MLnmeR5E9+XfxJ87WHdv9KbmNknvbQ7jWtTCP8o9zOfGFNS9MIS5NlWDk4URaSDiSyuBQ2IXnFpa3UhBWRqgISbl63vee/H+LpLc9VAp+6UIizL7+epvzqq5LiXnyBVnAMnZz5Y3K+JHLg3v7GIt5LX5TII7BQ5szH4tOyZqAfi+vBprxHj9WS3qKRBa+H6z7se/7aOmvjWkb/Zr3a3K1P9y1d0h9o6ETp5nwV+s0kTdsf3Bhjkf08I7QS90FqrQXhw43YReyXsZVG2M+SQheKNhaWFL6MDUVDX8aOkn27674kxBxyKMhvr/WibQwb38+rh+5Rnb+12d6/bw+n9fHl+WuLf9/e44/2KKrpm+j98ricInJzvgD+ITR3KDTM27vtCZ/OorY3usxTmDx/JnUeq/Risxs+bo/L9Qxex9eZw+awYZzPy/5w97V9gNE5KqAPdjfXjgd8/iXPZ/4Io76xT0a0/8yYVrL/yFi84PDH+/tyt1ttvnTfTUWigz9HTJHfcavY6OVuLkXxHQzdMWJf2+U9Q1A8tWvZdLnjcXfrVqDpJEflk2V3+9V2vzrCFwJPc1A4WVD6RLsnGPwmu0LwhE9o97ROwtnsOplb7nQtpHUrnrGFBZn29Sv7ouAVmrmtDS4a0eLOfie1u6FyROsLSKvb4Eg+riXKFpTtcagf0yplcWXbHIrHtFBZ/PB1e1rf3/KzSowDWm+ijXC6GIork0ZQUpM6iK46gXjiwzTy9t3L15svq037Y3u36qalf8ZfMUDlIob350q3K9iw2IvfjCviW4W3wO536ArGebjUmS6/2uzwkfK8+mOV6eLr5ad2DfMqr36pM13+odtTcRepf6003cBueYSv+Lz6ucZ06X3/zhEnfqkzXb77OMHhuHyA347gHQyrJZkYJZr9l7+3D586JLLESWBYQJ9aHMW4v13in9e76M2oAnNbI6+xy2iAprycRi93+63drz6v8Jp/TndYaYKBz8uH1fr77YZZGAPUxzUmSH9ZfWs3McqjChOEme7KF5S6J51QuzmujsweNSg4qDBFuCfbWtHHwlMED7fbzaftcn+/2uCRBtAldabJH067dn9iFu1h9WGVCeLdirHbFc7Cvu619FTJfr4mRvWxwhTh7hIHfo4PSY+rTBCPSBXTk8Q1NG8Px1b7dP1aEyzsVnfH0157y9fSEyQP7fG42nzR5qtB8TjR4RiCzuG+e/O39js3nmALT6cS8qVlFsHfQxKBCFhRcIdoQ4HJ+4AjzZS9xpIQF49fo7yu3FLGCK44e7wIMlGxw9znHHEkWWRiSkK/k4zHxZvknIu9Oa0Lcdkfj94V54mSXGP2SETXjwpBektzxB40FZ/IlNbiogt6S0hpvDkhfryvrjzuAFemN7H+7LEVVouKNPnm54g7heH4KEyyHReTCt8JEao1LsbreMFVdLjy1Z8gWgNikcEq3Pk8sRqyO72XTrmJ2MgN3cUMPbbyNhRxHBm3Txqn0+Jy9jicliLDptLiamIChLakOBmdDhKb7djK88eQLBUXUfw9zxJfAasJ0RZtODL2Ao5TIlFjWR2XSfH4PxCHc8TfE8XdfPH2VHE2Y3zFxVVEND1ZDKVHzqzxMjVK5o2NyRGhjwN3RIIyEq6FZ48FcumoaBjcwxzxQK1MH42HDcbFCHU4w0gbWhTixm2QVEXNY9HZY2Z04aiIubifI17GNqZHS8hcXKyM3c0QKcDeKE5+fPfj8rh8337et4ev79vDbrs5QLqFS+qjZHe/u13hQ0KFS99cqzGhgm+AW//XL9Bj1sZJNoYVE42MfvZub/rxh+Xd7+3mPDF5XuPfH77utsZ2KwqvZ7F/ECjghMvpH+Bme3u/2rd3x9t+I97tdnO7/fTP9g6H9URHN5Ia8wAm/KbMU9pvO0V+L/2oQNyC72/t7W67Xt19v923uy0Xkd71b7i6zG8yugN2yejhbr/acYvQgYlxjQnSq83quFqub9vNt9V+6476VHpgqk4ww5xzBLSlvdoqKW7VBNASV02oxKT1A0AwuH5AJXrau1Vhhx1zKANQpnXi5EHLZYc81z8/Xau9duNJbVYaU8grMT19xTpMhaguTQxGePokEb8w0FOb9oPKTf+qomj4KYulPB1NoxcXSu2/LDerf7m9pcpf0K+TLK/IOBHrlRSCbnimbhCj4umiyhQ30I1JcNKo3ZXgd6ONCjxdiqOb0qKTnLxbR5dxhiYico4sHWipQ01NWw3sxwo3l9E2LGWDEXcjvdtv/zx/YEEc344LRYTS6fj19qG9+7rcrA4P+ovfeBXZeyT+o1M7Ug8keJ3kg9sRdrs/MceeMOK03kQbQgwj9VAc60QP7d0eHyLFyF4qxAsz8SyM+oZFniiWB8O+6EieNObzDejGfRrxwUsW3yP4Brxqk0xECE8XC6cN9ahQIxeTMq7C0QkjcXDqK2uTxfRBqq8dMVDV2Ni53jLGwajKJHFVuhyOlbXJctJo2RfWjZgZcSZPi8PXcaEnytWj8Wt0tpYHdTEteugjuk0nD2SRurZdhwa0iqgeD2m1cS0Oah9XUvIj2nGJmG314qsIuKzqXYQYjuuLkKjUFenEuIBBamK06OQOp35W/1Y6EANJg3qRNlDgcEPH4d/n2jDtXVMzXhsZnRarcTN1GuHwKNHXVg4RNfJayYkygdaoGxZqhEItUTka00ht9Y1wMA6LbIERBtThA+tNsBEekgIPyvGoxoA8GPW1FSNRjWxMFh6MRmNzcIwF9U+AK6YbkUfHvr5iaMzIoh7osgkkPIYhRfX9Eo/tpUvfBPg7dweMif25eLSNQcVZjJzjJ9rHtd4sNtzZk9EuLtVSTSiC8IfT+nd3dG7c8xrViwjPxyrwtUmtdTO6TtTPM75h5W/Ff/mAKfokDXZw6egGe76DORrs0EZ8g5WNxDTYoY/oBuvZUDz/+LYC6ukjoz+cRtdOOJ2byzWifpbENiLv1Jlp36zuxUvYxRnxJha13VT/hiSYi3xlijKYbGpuI1Epj5qJT3xaQ7fui97aFoeNDS4yv8HkJzisP6ct/SuVZC7yHStu77rqpUvarK5/C4syFtnlUlspHa/e1MSmAC7zFCaTn+n4CjNaixu+UFsJgxi1pYlP1L/KE1hMfp6jC8xoLOK9DWxRjXx70xua+Cy9i8xvMPlJDuvPaEs37yP4ipgIijnqw6ujHjw/6aB52mB55kHy9MHxDIPitMHwTIPg9MHvzIPe6YPd+Qa5kwa3cw9qZxjMzjiInTZ4nW3QOmWwOvsgdY7B6ZyD0omD0bkGoRMGn3MPOmcYbM44yJw2uJxpUJk+mJx5EDl98DjfoHHSYHHGQeK0waE4KHSw82X/KSCJFfrlIhbTXT5QH3Xtm1E97mbBDaQuaOF86Ba26I2wSz84A/ISEL0wvxSEUw4sCdFLf8vutg+75fF2dbj9dFqtj7f4gHPeCnOFGa3F/zy06oxmuI+fKMyIX0EJmOGzQ38CqjZFDArH7Rtjca109ZtrTc1ND+9khpTlu4nNWwpDUcnLcxSfwRSWVGnMs6LPZQoLuhbreYhordhEoJXwUyuw6FO1kMEeovj2IQ1folvHwElS25DMhCacBDOqKacoM/HNNHb9bJQdzRyY4Eg9CxZlKsHIfOL6pKVdgRslH5Gw1OtyowyoppwEL/pJpyhboWknwZFq4inKTHDtqOBGt3w0yk7oZVFwo3pdDJkJdHb8/iu28FN1eP7XbaN6GXk3UnSnN3KT1O1NOtcg4Cixt0nbJhbwEpvgAru3huV1Q7HIUVhEJEwY+cw16Jkw3pltqDNllDPnAGfi2GbqsCZhRDN5MJMyjpk+hEkavcw6cJk6ZhGHK90hgYf+O8exP4dfdbKZiLHThGHTbCOmKYOlucZJE4ZIkoW0Wc6rmQlznCpbscGaMr+pMqKb3QRGIuY21cNY7Qg2evAaMU6YNFiccZw4bYg4x+gwcWAoS6c1zKGVCU1TaS3+50lpnkozugYKzUQ0Ud1A/rE5KODDuOiMBzPw149rJuReEgd2yIZqdKeTP37fRf/MN+dKqQbEJx98ixsW1D91VSbwLn2jb/4j/9Ne5XwbMW9zGiOxbSDxnU5jJeK1zncT+2anMRRtYi5hbSaIfMvTSMe8cfk2ol+6NJaUrzq+m5i3HY0R7QuP7yTqnSfKSnyokKozmFH3HIOlVVH9xgwvgL6FmHdAxojYfSleMMZFn27gkjy+J/cy9fkPfcRFgGrMGB4qPsHilJQVKXMsQ0lcezLLgpPUgfCk8W/ssHfaIpLolSO6E0vUj3RYYZLwljlCEIpupXMDdYJdu76ND2G/2hQTp706fl3RKWLqd/n0RYQzLR9MXzioNBDqCaABVU+genV8/HhwuCMYl5x7dg9cPSZHk9tIS5fIgyZt6sTlw754B4rjvmJsSHsdeBPBzQ4BC1LohU8p4cs/VRj6202v9f8tU/8Omo2wunkN3hgzvSF9tC7Fpn6qgbcqzDjMbTfV4hPbUmYg3xfNQ3Mbi5jE4E1KcxlzG9ZNcfBemZmOuW3uB7uMEjMPvcRTmtV3Ucgn6KieymLyc+fmleY2qu9nVedUPI295F8R7/Ob26Ruoop3ycxXzWBTGs9oxzFPOX6ZOG6Zb7wy6zhl3vHJ7OOS6eORWcYhM4w/5hl3zDzemH+cMd/4YtZxxazjibnHEXONH2YcN8w4Xph3nDDP+GC2ccFs44E5xwHz9f+z9vsR/X2YWo1LPlWfn7g0jtyGfM+hsU3kmKaHP7dfur0K4i0OhjOkinxvUnApQBWVnSioeppJGyGmj9eSlsvMsEombXHMPAPB5KUw6QO9qIUvEwZycctcpmxjiNzAMNOYMH39zPQxX9JqGdWYTqeq55yiaIhyDgRVjDO03EVJOMcLXmL45vSRRNJKF1FWhqoDPQVSnWXnQuqehVl2K6TuU1CJh0AqEFdhVMVI8H27WzMfJSdFZl1HM7xmxAjFeZ04SBkqxzRRUVw9Zhioxw0bRPlw2xnoKluNKKhM/APVmNwvS4fT/1BW2QOIklGdwEA8vh8QbQRz8kBal5ZFuYjMPBCOTc46C+H8jCwoU7TOQjhLIwvKRE0twFy9lT/2RUvN/bZOrhyVPbehr1ppEyjxEJVDgybaP4/t5j7qR7hWmSr+Zb/cdAO34zZGf1RrqoXQqxnRVr2gBUWD2YWo6vJKUPa6SzvqeY+rTTVxSRNpLRBXn83UoT0eV5svaZYGlRMMcfkvOIu3jT3NXv/Lp81vbeVzYpVzXCP5mHmugHxE2k2c7woYiJjzGnmInfcK2dBl/oF+RN6XhPVZ/6odmfMnzPmNZGf4mRUdTOT8X0BQ07nEzgMGJGPmAkfq0fOBASMRPdxgYjCyf5thUnKsHzExGZDXMN2xuHrBslY66tZj9g2GDChnDUf6MTOHvjzXY4cZ47XUU/TaiWxxYH1615m6JS9sQtlvDQ3E9FyyuL7vGupH9l7TDhyh4uoML8tGpNahemxyVYHtcAN7giMZU85hnOPwxcTWPEtLTm3F0yI4OnplOdXE7VBTP28bEA5N245EVbO24Y3KyvdqulU55n1aNhGYsh0Ka2ZsZzpnKP2EoZnOFko/VUhpIDRZCw2o5mrlnLxdty8Ph9WX/sVUmKwF5fT5+TpQPC+AipK4QdWZe0a3I7TvSB+uxnRpYUEiKx7aFhghfzq0+zjxc40kaT7cgrsR2dL60AtMV8kKqokr/pbSZ5ACtrRzSdHW0uzMakEzGxHwo56XiDYXmCAI+NJMFURbSsit0k6tuAyrMqjKs8CTPttO3CQWMBKVeVV7rVT5F+yx0mdhzV6qUQVdDn663Dsh586Zayfm2Km5NSGnzppLp+bQuXLnhJw5c66cniOjDEX+Okz9ybZUKTspVYdkY3+AS5Wp4tr+IbFfSN8QJKrPc++6DimpIwrJRt71tUqCuNT7PWy/qUK+K/ekL74DiQkpp7+dia174COmfUvS+kZ2FY9sZpK8Ns6v4lGRTqRpuMmzKzMvgUtY+jZ5yVvKUrdJS9xil7ZNXdKWsJQteQlbzNK19CVrUUvVJi9RS1maNtuStClL0fQmQof5cy5UR/jPtBIufQVccOXbpcAPp/XvsnhXYv50d7lqXMrr7U5Ne1ftuNQniavS31VYnwIlUW0avOpGpUJJOpgOr5q6lCiJhdPiVU2ZGiU5dXq8qsalSElcXFwElMNLi1Sy0dn56iAtQ6vM6NIjsBKRIokRPk2+3bX7pfs60OG0ZkfHbIXoCbk0hZtrbc2t07uS130lWrrWnmaJPhxpNnTW1drRq7Snrc6OXpU9cTV2/Crs6auvk1ZdT1htHbfKetrq6uhV1WmrqdWrqBNXT+tXTaeulo5YJT3D6ui0VdETV0PHr4Ketvo5etXztBW/0St9A3IRAxGwfX2G1KwefAB51bAjMNspLLucfz1zwjrmyeuXU9YtT1qvHLtOeer65IR1yenrkaPWIU9ef5yy7jgoGtHk4fK6WaJW3eyhBVXDF1f4fVwefnfj3dfXsRA3vmUL6xNDu99v4SS7fO2bx3r4Nvm74F93mXepgI9LxZmMHI7L4wk+9ICRS8WZjByXh9+Zvj3g5Foz3cooJHuiw+OQ4d/n6pG8a2r6pJHRtF7J19X0SxphZnDtC0oDbI0Q10X4SmInwUj5geHWLglP8Vxg3tAYXlQfG49eU57RSDH8kHwp/6dj8/rlr/P+aGjuQjj7emAyaf6Ciiaccx22oGrQ4VmNaSbC8xzUR+LB2mErOvlZJcVmw88cTBNdLw/H2/OZp7rw82rMZUXOuMLExjRZxVQHdZB6PHjYjDwbQX0kHAUetiDPUFALCSchQwt+Vuff3Id/nzezR769j4xOSayxb/AaYbk5qd9yGanh8/r10O75ce31r3M9K3JFzZMaWOT6noflaq1ReyyYKvR5tT/we/+o2qh0qiTTs1AtaTQWFun7Be1tDQunCvarYJeXlWiqUAF1IuRp0L/ZfGSX9g3/PmHp5C27IdcTAOui5Q26o1uI3Q8M5CeL8bMGvlpgokAjx6/L9OUC6zEZOT9gvq2O7cvdbr/9tlxz7y24ZET2PBy2d6u+W3a2hZ8UqtzAK+h6d+Y2kxM9a1Hz6hVnRn4Nk8wkvJLFWRN7J86V31PNaCj4qiY6S3tti7MY7mg5e8pOV28l/hd6sl9FGAtwXmLeOOPMBMcMnCXd+EFvRPESKNlJfSGMMym/HEr+El4U46wFhgnYlT9gmM+Q/BYruUp4ow1ao+MAqed/qr5+tt59Wn+e0INP67Mn99LJ/fKUnnh63ztLbzutfw32qFPkNXc+490K/WZ6Tzmpbwz1hlPElf3hPD3gtD5vci+X3K9N6cmm9V2Te6tQ/8Rslnz8W8SEhuZK8lbLi6Gk1/iriOIVnsjQn4Wfkr7+dc5Jzsjp6IHFlO5qtKorOMkpC4X7hqGa8n1Llgzmy6Gi7v3Bn/VeNDYr84vmy3dv/tZ+f/vHpt1/HB5l1h1Rdvh38lcxMrwrPz5udN3h3+KuerpfHX/efvk/p3b/HV2Z/j3p6h+2++PfBt3l+Nrnv0Ze+fj17+3d1+VmdXjwrjv4W9RVX20396uuw/rQHsGPQf8cde3BmqBX2933V9vN5/Xq7vjhuF8e2y/0twmUjlL+aXl3PHz4vrn7uHpot6fju+16dUcFcaEonTcv70ZQy134/K9xVxrc/rv73Y/L4/J9+3nfHr6+b//r1B6OVCNUPk79r+3xMfcfqNLwb3FX/Xl1OI63ynsXB0UmazwegaTQeiwap/lu+WW16Yd5r/uVv76UXyJK4e/L3W61+fL+9LjE89f9umt+rzcn2vSlosmaKrVUnfbhU7t/eXfXHg4/t9/aNZWgf0+++ttP/xSu/fbTPyOvfPy6vacBfP7XqCu96/vXNzRoHv856lrvl390bZ9c6vyvKVfK8KWyuGudKZx3j9c/RF7vuP9+6Yt+ogmX/jn22qf9ZpTlQEfIlEpQCidFtlyC2jURsTc1LhKl8aG927e0a3L/GHWdbh3xhzH4dNe6/iHqetfJSHhV+mfx2iY81P223K+Wn9aRw93RyP31uh2HgnzNm/ZaHo/daa1bd2YwI+8So1b84bH0HNK/LI+Hd/e7bry3+qJ1sFkeD7v73d1jpTmMRJuYwYAJve0MLKjfeEZ39XK/X35XXe5meS7K3MuogvxT/rDdrnWan1zJ6ZL/+zAYh4uS/zwIq8piJH85cY3GF92c5CYTIfv2UzfDp5PdPpadSzYinJz2fEH14bhfbWDj9LUPj2Wny3ZvhzrR40qYSwlIGs0ExUA9apJidD+vvrZ3v6sveXN3Ls7clVdJ/jH/2h67uYrtfvWv9r7rhmGHh518aY/LS93Tue5stjoz78BeRY2tzoxm42KsrV+2G/3Dv9m40snSIATpLJbvQTOTFXNPw+vp7uixRrgVH47Lh51W+ziokGjAhCbvhha0E3jjfnZ5WN2pLnfz6VyUu5dhhUDn3i73uNsDqo9lp8v+r3Z5z+ULT/frpXCSsFFMkF71oyZJR/f0+Dp8aFF/Dq97WeHq6uDb82rKP22fiCMsnC7lU+VN/Czx1dSUmeLRff80JEFx17/5LMGh0BUCI61v7f6PDlmmetsOLjCTQRM5OXl1nDxBSVrKl/bPlKvf7M818Q8h1tf+Cur7f6o7T79n7d2yk7YDQ1ETt+OX1PuHFXp7w5e8WZ6LM7fnVQqNslxZvf5mu3ysMY+F0Vq4oPzelZ5H+j+YRMNoy2lFIc4E1XCuHpsIzdePp9M235SX61aGqe6nqxDI23v0dgpFt3v+5TRO9J1b8KMV3l2KJ4obnogMpcNUZHQXP7brlgnD65Vu7h9Lcd5d2eC7XkjnizC20Yn8L65BD1S+ys1YI/N2d2ReVkdK20uxKWLvlse7ryGp3bnQJKHtIfiIdq7MJJlTWOWUIDJoIe9ff3z/f1/+8PPr2w8fX3789cPtq7c/vv4AVHFBLZcA+OR6aSVCGc8RdTvn1kOEzl7v5m5QFv9SgxryE+nG46c9SgNU9POl5ETJd/ttl+rwxCJV3Q0LTxT+cOIGHVT1cJIHG5KkUTCxq3IUFxsP4Po1/zBe4EVvltcKob0ruufYbu7xQ8T6u0v5SPn/fP5stblv/3z2l/9+9q3ddxN+z/7yLH9hXjTPnj/7vGrX94dnf/nt2ePCuu1D95L17Pmz++3dqf/P/zwX+0d7d9zuu8Ku9L8vnj3/bfHcZi8Wdf6f//n8t8fK/R/6f3i8xvVf+orZs+e/Zc+r8kVji1HFzKuYjSrmz57/lqOKuVcxH1U0z57/Zp5XixeLphpVNF5FM6pYPHv+W4EUC69iMapYPnv+W4l+nNKrWI4qVs+e/1ahipVXsRpVtM+e/2ZRRetVtKOK9bPnv9WoYu1VrEcVG+7HabyKzTgAunhokGTmx05GgqePHhh3GYifcQBlXVhkGazsx1A2DqKsC40sh5X9OMrGgZR14ZEZWNmPpWwcTFkXIlkBK/vxlI0DKuvCJCufF4sXi5xU9mMqGwdV1oVKVsHG6sdVNg6srAuXzMLKfmxl4+DKupDJaljZj69sHGB5FzNZA1OFH2H5OMLyLmbyBazsR1hOUlSfo2B2y0GWGkdY3sVMjjOcH2H5OMLyLmZyAyv7EZaPIyzvYiaHjTn3IywfR1jexUxewsp+hOXjCMu7mMlhhOV+hOXjCMu7mMlhhOV+hOXjCMu7mMlhhOV+hOXjCDNdzOQwwowfYWYcYaaLGQMjzPgRZsYRZrqYMTDCjB9hhnSEfU+Yw64Q9IXjCDNdzBgYYcaPMDOOMNPFjCmel9mLKjfjyn6EmXGEmS5mDIww40eYGUeY6WLGwAgzfoSZcYSZLmYMjDDjR5gZR5jpYsbUz8v6xaIZ1/UDzIwDrOhCxjTPi/yFqcZPqvADrBgHWNGFTLGAlf0AK8YBVnQhU2TPq/xFRWwXfoAV4wArDNvbFH6AFWS01Q+3YA9bgAHXOMCKkhtWFn58FeP4KrqIKWDvXPjxVYzjq7DcsLTww6sYh1fRBUwBe/bCD69iHF5Fww1rCz+8inF4lV3AFHiE6odXOQ6vsg8vOEot/fAqx+FV9uEFR6qlH17lOLzKLmAKOFot/fAqx+FV9uEFx52lH14lGdCXbGCXYEw/jq+yi5hy8dzUL7J8HCOlH1/lOL7KLmTK7LmxL+p6XNePr3IcX2XNZpHSj69yHF9lw2aR0g+wchxgVRcyZd7dsiHNovIDrBoHWNWFTAl7msoPsGocYFUXMmXR/V4ZfYfyA6waB1jVhUwJe5rKD7BqHGBVFzIlfnvzA6waB1jFB1jlB1hF3hor9jlX4MVxHGCVZZ9z5UdYNY6wquafsx9h1TjCqoZ/VH6EVeMIs32E4VdeP8LsOMJsxv7a1o8wO44wm7PN2foRZscRZg3XnK0fYHYcYLZgH7P1A8yOA8yW7GO2foDZcYDZin1S1g8wS6Ym+gwGs7YFsxPjALM1/6T8ALPjALMN/6T8ALPjAKsX3JOq/fiqx/FVZ+yTqv34qsfxVefsk6r9+KrH8VUbtkHWfoDV4wCr+wyGbfsBVo8DrO5CpsK2/QCrxwFW8wFW+wFWjwOs7kKmyroYISOh2o+vmkx/dRFTwUFnDWbAxvFVN2xw1n581eP4avghfuMHWDMOsIYf4jd+gDXjAGu6kKlg/9r4AdaMA6zpQqaCY9bGD7BmHGBNwf5gjR9gzTjAmj7AYOfc+AHWjAOs6WdW4Wtg4wdYMw6wxrJ5pPEjrBlHWFNzeaTxA6whc6wNHyNgmpXOsy7YIHF/G1cf/Nu5fsbmEvc3Wp9Mty76OMMzgAsw4bogM64Lw6Yj9zdan0y6Lgo2I7m/0fpk3nXRBxyehFyAmdcFmXpd9DEHZ4nc32h9Mvu6sGxSdH+j9ckE7KLm8qL7E61OpmAXXThZPNe+AJOwCxJ+/dQ9M/WMZvq9qf4unGyG3nAzONlPwq+fwLfw1TxD8/10wr+fw8etPkNT/nTOv5/Ghw0/Q5P+dNa/n8jHbT9D8/504r+fy2daP5r6p3P//XQ+0/rR7D+d/u9n9JnoRQCAEoB+Ut/CXipDDIBAgKyf17dwUjsDGCAjHCDrp/YtnCPJAAnICArI+tl9JvwBDMgIDcj6CX7m+QMekBEgkPVz/MzzB0ggI0wg66f5LYY/gApkBAtk/Uy/hS9oGQADGSEDWT/Zz/1+IP4IHMj6+X6LszfAAxnhA1k/5W9x9gaEICOIIOtn/esFmkjNACTICCXI+on/GpNywAkyAgqyfu6/zrE+iD/CCrJ++r/G7Q/QgozggqwnADVufwAYZIQYZD0EqOFwLwPMICPQIOs5QF3h+wfxR7hB1qOAGo9eADnICDrIehpQ11gfxB+hB1lPBGocfwAgZIQgZD0UaHD3DRhCRiBCVvBzJBnACBnhCFmPBprseVm9KDJy/4AkZAQlZD0daDBwBzAhIzQh6wFBY56X+YuKdt+AJ2QEKGQ9JGhw/AKmkBGokPWcoMH9B8AKGeEKWc8KGjidmAG0kBG2kPW4oMH5F9CFjOCFrOBfbjNAGDKCGLKeGjDPH0CGjFCGrAcHDZw2ygBnyAhoyEqh/wWoISOsIevxAecfxB/BDVkpxB8ADhkhDlkPERq8TgYwh4xAh6wUVn4A7JAR7pD1LIG7fxB/hD1kPU7g7h/EH8EPWU8UsgVOYIBAZARBZJXw/gEgREYoRFa5tUZ4vRAAERkhEVklRCBgERmBEVklRCDAERnhEVmPGLIFTqEASWSESWQOSizwuiWAJTLCJbIeNWQLvHYJoImMsImsEgaBgE5kBE9kjk/gdzgAKDJCKDKHKOA7HEAUGWEUmeXn+DJAKTKCKTLLT/NlAFRkhFRkDlXgdzjAKjICKzIrzMAAXpERYJFZYQYGIIuMMIusxxDMOySgFhnBFllPIvAMCOAWGQEXWc8isgXuwwG7yAi8yAR6kQF8kRF+kQkAIwMEIyMII+MZRgYgRkYoRiZgjAxwjIyAjEwgGRlAGRlhGZkAMzJAMzKCMzLHM3D4AKCREaKROaQBwwcgjYwwjax22Q8P4QDWyAjXyGoh+wG0kRG2kfW4IlswazDRIkwSfw5wLPBLNEAcGWEcWY8tmAAGlCMjmCPryQUOYMA5MgI6sp5dMAEMUEdGWEfW4wsmgAHtyAjuyBohAAHwyAjxyBrXATdwCACgR0aoR9aDjCxboIV3GQAfGSEfWQ8zMmbRNIAfGaEfWSOkQABAMkJAskZIgYCBZASC5As2BeaAgeSEgeQLPgXmgIHkhIHkCz4F5oCB5ISB5As+BeaAgeSEgeQLHunmgIHkhIHkC57q5oCB5ISB5Ase7OaAgeSEgeQLlu3mAIHkBIHkPdPI8LL9HECQnECQfMG/BecAguQEguQZnwBzAEFyAkHyjE2AOWAgOWEgecYnwBwwkJwwkDzjE2AOGEhOGEjuGAgOXwBBcgJB8h5qMOELIEhOIEjeQw0mfAEEyQkEyTMeweUAguQEguQZi+BywEBywkBytw0CbxzJAQTJ6U6InH8HztFeCLoZoocaTPii7RDefoicDV+4IYKEn8BAcrQngm6KEBhIjrZF0H0RPdNgwhftjKBbI3qmwYQv2hxBd0f0TIMJX7Q/gm6QyHkGl6MtEnSPRM80cPiiTRIEgeQ90sjw1qUcMJCcMJDc8HPQOWAgOWEgueGX6uWAgeSEgeSGXa2XAwSSEwSSG37BXg4QSE4QSG74NXs5QCA5QSB5jzSY8AUIJCcIJO+RBhO+AIHkBIHkPdJgwhcgkJwgkNzwC0RzgEBygkDyHmkww+ccMJCcMJC8Zxo4/gECyQkCyYucH33ngIHkhIHkbj9FBicgcgBBcgJB8oJfcJUDCJITCJL3UINpQACC5ASC5D3UwA0IMJCcMJC8ZxpMAwIMJCcMJHcbLHAAAgaSEwaS90yDaUCAgeSEgeQ902AaEGAgOWEgec80mAYEGEhOGEhe8ovhc8BAcsJA8tLFH5zByAEEyQkEyUsh/gAEyQkEyd2+i24Xqb8IKAcUJCcUJBf2XuSAguSEguSle//F+wQBBskJBslLdvlfDihITihI7igIs5kVUJCcUJC84qegc0BBckJB8oqfgs4BBMkJBMkrfgo6BxAkJxAkr/gp6BxAkJxAkLzip6BzwEBywkDyip+CzgECyQkCyR0C6TYUgwgGCCQnCCSv+DdgQEByQkDynmhkzJ5kgEBygkDynmlkOX6FBhAkJxAkt8I7CIAgOYEguRXeQQAEyQkEyS3/DgIYSE4YSG6FdxDAQHLCQHIrvIMABpITBpJb4R0EMJCcMJDcCu8gAILkBILkVngHAQwkJwwkt8I7CGAgOWEguXXxh7e2AwiSEwiS91QDNyAAQXICQfIeamQ5fokBFCQnFCSveQycAwqSEwqS1+7kCbzDHmCQnGCQvMcaGbPLHnCQnHCQvAcbGbfTHsQgISF5zW9QywEIyQkIyWt+j1oOQEhOQEheCzEIOEhOOEh+5iD4RQJwkJxwkLznGhl33ACIQgJC8p5scK8SAIXkBIXkPdrIcrieJAcsJCcsJG/4vd05YCE5YSG52/vBDOUADMkJDMkdDMEHJ+QAhuQEhuSNMBYELCQnLCRv2K24OSAhOSEhecPvxs0BCckJCckbfkNuDkhITkiIWfB7cg1AIYagEOO2g0D/BqAQQ1CIcdtBoH8DUIghKMQ4FAIbsQEoxBAUYhYFPxIzgIUYwkLMgsXBBqAQQ1CI6dFGZiBKM4CFGMJCzILHwQbAEENgiHEwxMAdEQbAEENgiFnwLM4AGGIIDDEZy+IMYCGGsBDjDn9ijiABNMQQGmIEGmIADTGEhhiBhhhAQwyhIUagIQbQEENoiBFoiAE0xBAaYgQaYgANMYSGGIGGGEBDDKEhxh0JZeCaWgN4iCE8xGTsfLQBNMQQGmIcDcGdqAE4xBAcYnIXgXA+zgAeYggPMcKmEAOAiCFAxOT8niQDgIghQMTk7J4kA3iIITzE5PyeJAN4iCE8xOT8niQDeIghPMTk/J4kA3iIITzECDzEAB5iCA8xPA8xgIcYemqU4yEGTqcZdHAUPTlK4CEGnR1FD4/q+UbGHGiEzo/yDpAS4g8eIUXiz/Dxhw6RoqdIGSH+0DlS9CApI8QfOkqKniVlhPhDp0nR46SMEH/oQCl6opTh4w+dKUV4iHE8xMA19QbwEEN4iBH2hBgARAwBIqbnG3hLpwE8xBAeYhwPMfjgNcBDDOEhxvGQAh++BoCIIUDEuHOmCnwAGyAihhARU/AvIQYgEUOQiCnYlxADiIghRMQU/EuIAUTEECJiCv4lxAAiYggRMaXwEgKIiCFExPSEIyvwGBYgEUOQiHFIBP8AAIkYgkRMTziYMRQgIoYQEVPySwINICKGEBHjiEiBB8GAiBhCRIzbF1LgQRhAIoYgEVOyE9IGABFDgIgpa2EQBpCIIUjEOCSCTy8zAIkYgkSM2xhSVM9N86IoyAUAEzGEiRi3M6SwMIoBFDEEihi3M6SoYRYAVMQQKmJ6ypEVDdpdYwAWMQSLGLc3pFzgC4A4JFzEnA+swm+zAIwYAkaMAyPcU0DnOpI4dHtDuKcAIpGgEePQSJl3kWzyklwARCJBI8ahkdJ0jbmgZzwCNGIIGjEOjTBxANiIIWzEuIOsmDgAcMQQOGJsLsQBwCOG4BFj3bQgnB43gI8YwkeMdZGIj/cEgMQQQGKsi8TqeWFelJUlFwCRSAiJsZX0FEAkEkRi3D6REg+rASMxhJGY8z6RGvYqAJIYAkmMgyQlHhgBSGIIJDE99ci6fi170TSkLQBMYggmMQ6TVDgfAExiCCYxZ0yC4wBwEkM4iXGcpMq7W6gMGRsBTmIIJzGOk1RwtaUBnMQQTmIcJ6lw1wo4iSGcxLgdI0woA1BiCCgx5x0jOKUBUmIIKTFuy0iFO1eASgxBJcahEqYxAVRiCCoxDpUwjQmgEkNQiXGohGlMAJUYgkqMQyVMYwKoxBBUYhr+iwOAlBhCSowjJUxbBKTEEFJiHCmpKnj0MAhDAkqM2zVSwb3jBpASQ0iJcbtGmDgGrMQQVmIaKSECWGIILDE9/GB/Q3T+Mj2A2SVE+K5cAFxSEFxSLIRBYgF4SUF4SdHzj6xq0EC5AMCkIMCk6AFIhk9wKgAxKQgxKRwx4W4BnMlMiEmxKPl0VABmUhBmUjhmgkdYBWAmBWEmhWMm3I8ITmgm0KRw0MTCfq0A0KQg0KRwO0hs/rwsXjTklb0A1KQg1KRw52hZ87w0L6yh53mDSCTcpHDcBHeMBeAmBeEmhftwRneWEjhsGoCTgoCTwn08w8K+vQDkpCDkpHAf0GACCaCTgqCTwn1Ew6KUWAB0UhB0UrjvaFjYKxWAnRSEnRTuWxr4PKICwJOCwJPCwROc0QoATwoCTwq3maQ70Qg9RRCIBJ8UDp/UcPKsAPikIPikcPgEn2lUAHxSEHxSOHyCDzUqAD8pCD8peh6S1QYt5CgAQCkIQCl6IpLVBTziHiCUgiCUokciWV3CdAAYSkEYStEzkQwfbFQAiFIQiFK4g7W6k43QBUAkEopS9FQkw0cbFQCjFASjFLn7ugtci1IAkFIQkFI4kIIPNyoASCkISCmMlBIBSSkISSkcSWlwtwBISkFISmGMkNEASikISil6NpLhA5IKAFMKAlOKHo5kDf7uAaApBaEpRU9HsgZ/vwDglILglKLHIxk+I6kAPKUgPKXo+UiGD0kqAFApCFApekKS4VOSCoBUCvqdDodU8DFFBfpUB/1Wh0MqDc7K6HMd9HsdbpMJ7tnQFzvoJzt6RJIvcFZHX+3wPttRCDkVfrmDBKJjKkxORZ/voN/vKCohp6JPeNBveLiPeOCjfgr0HQ/6IY8ek+T4qJ0CfcuDfsyj5yQ5PmqnQB/0IGCl6EFJjo/aKQBZKQhZKXpQkuPDTgpAVgpCVoqelOQLGIiArBSErBSlC0QL64M4JGSl6ElJvsDdEkArBUErRU9K8gXulgBaKQhaKRxaYUbqAK0UBK0UbrcJ0xIAXCkIXCnKWngGIAwJWynKRngGIAoJWimqhfAMAFopCFopelKS4y/8FQCtFAStFD0pyTM8xgRopSBopehJSZ7hMSZAKwVBK0UlvTUDtFIQtFKc0Qp+6QVopSBopaiECe0CoJWCoJWiJyV5ZvBvAOKQoJWiJyV5ViCsUAC0UhC0Uji0wry3A7RSELRS9KQkx1snC4BWCoJWCpsJgQTQSkHQSmFzIZAAWikIWimsMKFdALRSELRSWCkSAVopCFopJLRSALRSELRSOLTCjHIBWikIWinOaAW3BYBWCoJWCodWmLYA0EpB0EpxRitwKrIAaKUgaKWoF0JjAmilIGilOKMV/OYP0EpB0EpRu0isnhf2RbYgjQmglYKglaI2QnMGaKUgaKU4oxXcnAFaKQhaKXpSkmf2eVG8KEoSiQCtFAStFD0pyTM8UAdopSBopahdToRUoABopSBopehJSY4/LVoAtFIQtFL0pCTP8bf5AFopCFopelKS5zgjAbRSELRS9KQkz3EoA7RSELRS9KQkx5upCoBWCoJWikbKiQCuFASuFOdPkOCUBuBKQeBK0Uhz2oCuFISuFI00pw3oSkHoSnGmKzgjAbpSELpSNLUQSICuFISuFBJdKQBdKQhdKRdCJJaArpSErpSLjM8HJaArJaEr5SLnQ7kEdKUkdKXsYUmeMx9R9COxJHSl7GEJk1BKQFdKQlfKHpYwCaUEdKUkdKXsYQkTByWgKyWhK2UPS9jH6EdiSehKuailp+BHYknoSrlwORF/jRLQlZLQlTJb8KO0EtCVktCVMhM4XwnoSknoSpkJi8FKQFdKQlfKzPADjBLQlZLQldLRFfzeWgK6UhK6UmYuEvFnPQFeKQleKTMXifC9sQR4pSR4pcxcJDb4AiASCV4pe1qSmwUaI5UAr5QEr5Q9LckNbkwAr5QEr5Q9LckNnEMqAV4pCV4p3afLmR8R4JWS4JXSfb6c+REBXikJXindJ8yZHxHglZLglfL8GXP8IwK8UhK8UrpPmRs4j1YCvFISvFLmUiQCvFISvFLmUiQCvFISvFK6z5p3u6TQBUAkErxSuk+b49F6CfBKSfBK6T5vzjxGgFdKglfKnpbkpgTTSCWgKyWhK2UPS7gwAHSlJHSlNC4QcbcA6EpJ6Erp6Aqm9iWgKyWhK6WjK0xOBXSlJHSldHQFj3RLQFdKQldKR1cwtS8BXSkJXSkdXcHUvgR0pSR0pXR0BQ+VS0BXSkJXSkdXINsoAVwpCVwpCxeHuF8CcKUkcKU8wxWI/UtAV0pCV0q3YwVj/xLQlZLQlbIQFoOVgK6UhK6Ujq5g7F8CulISulKe6QoeZgK6UhK6UhaWx/4loCsloStlUfPYvwR0pSR0pXTfMsGIqgR0paTfSy8X/MR8iT6ZTr+Z7vatYERVos+m0++mu8+ZYOxfok+n02+nu7O8MPYv0efT6ffT3VleGPuX6BPq3jfUXd+Mv98OP6NOItHxFcxKS/Qpdfot9TNfYZ4CiET6QXXHVwz+ijz6pjr9qPp58wrc9VCi76oTwlI6wlLA7TMlICwlISyl27yCpx9KQFhKQlhKR1gKCEtLQFhKQlhKR1i4WwCRSAhL2QOTvMCdMyAsJSEspURYSkBYSkJYyh6Y5IXBDkAkEsJSOsJS4M4ZEJaSEJbSERY8xAKApSSApex5Cf48Twn4Skn4Sun4SlHC8Q3gKyXhK6XjKwUeogG+UhK+UrqtK8wACfCVkvCV0kpxCPhKSfhKaYW5xBLwlZLwlbLHJVwgA75SEr5SSnylBHylJHyllPhKCfhKSfhK2eMSriUAvlISvlJKfKUEfKUkfKWUtq6UgK+UhK+UdSa0RcBXSsJXSsdXcFsEeKUkeKXsaQnTFgFdKQldKetCaIuArpSErpQSXSkBXSkJXSkdXSnwQBvQlZLQldLRFaYtArpSErpSOrrCNCVAV0pCV8pa2MxXArpSErpSOrrCtARAV0pCV8pGikNAV0pCV8pGiEMAV0oCV8pGiEPAVkrCVspGikPAVkrCVsrG5UM8QgRspSRspWxcHOLxGWArJWErZY9K8hKuPykBWykJWykdWynx1AVgKyVhK2WPSvIS7nAvAVspCVupHFsp4RRYBdhKRdhK5dgK3tJZAbZSEbZSObbSbeXzf4MKsJWKsJXKsZUSjg0qwFYqwlYqx1ZKmI8qwFYqwlYqx1ZKGIkVYCsVYSuVYysljMQKsJWKsJXKsZUKRmIF2EpF2Erl2ArekVkBtlIRtlI5tlLBCekKsJWKsJWqRyXdeWN+PqsAWqkIWql6UmIK1CdUgKxUhKxUPSjJ8YbOCpCVipCVypGVCrcEQFYqQlaqHpTkeDtlBchKRchK5chKhVsCICsVISuVIyt4L18FyEpFyErlyAreCFcBslIRslI5slLhlgDISkXISuXICt7HVgGyUhGyUjmygs+dqQBZqQhZqXKB8VWArFSErFSOrFjcFABZqQhZqdzGFTw6qQBZqQhZqdzGFUwZK0BWKkJWKkdW8IR2BchKRchK5ciKxY0JkJWKkJXKkRU8H10BslIRslK5jSv4jbECZKUiZKVyZIULJBCJhKxUbuMKE0iArFSErFTnE8DgC18F0EpF0EplpEgEaKUiaKUyUiQCtFIRtFIZKRIBWqkIWqkcWsFvjBVAKxVBK9UZrcA3xgqglYqglcpYoS0AtFIRtFKZmn/hqgBaqQhaqYyLRNwvALRSEbRSFQuhMQG2UhG2UhXCFqoKsJWKsJWqyIXGBNhKRdhK5dgK05gAW6kIW6kKYVdpBdhKRdhKVZRCYwJspSJspSqEtWAVYCsVYSuVYytMYwJspSJspSqEnfYVYCsVYSuV27li8QADsJWKsJWqFOZvKsBWKsJWKrdzhWmNgK1UhK1UbueKxUMcwFYqwlYqt3WFac6ArVSErVRu74rFYyTAVirCVirHVpjGBNhKRdhKdT4WDDcmwFYqwlaq0gptAbCVirCVqhRWaleArVSErVRu8woXByASCVupHFup8UATsJWKsJXK7V6p8SsXYCsVYSuVYyv45b8CbKUibKWqhG2lFWArFWErlWMrNeMARCJhK1WPSvIav3QBtlIRtlI5tlLjcSJgKxVhK1WPShp4Ck8F0EpF0ErVo5ImQ7C4AmilImilqhp+CqgCbKUibKVybIV5BoCtVIStVD0qwRN5FUArFUErldu6UuPXVoBWKoJWKrd1BS+fqQBaqQhaqaywJLECaKUiaKVyW1fw6pcKoJWKoJXKujCEX82oAFqpCFqpHFrBtLoCaKUiaKVyW1fg6pcKkJWKkJXKus18cOFGBchKRchK5cgKXjpSAbJSEbJSuZ0reOFGBchKRchK5Q4Fwws3KoBWKoJWKncoGF64UQG2UhG2UrmdK3jJQAXYSkXYSuUOBcMLNyrAVirCVip3KBheuFEBtlIRtlK5Q8Hwwo0KsJWKsJXKsZUaD/EAW6kIW6kcW2FaM2ArFWErlWMrcF9rBdBKRdBK5dAK3NdaAbJSEbJSObKC97VWAK1UBK1UPSrJazzEBGylImylcmwF7+GqAFupCFupHFup4TdsKsBWKsJWKsdW8KrQCrCVirCVqhF2N1eArVSErVSOreBjPyrAVirCViq3b4VzAOKQsBXr2Ao+9sMCtmIJW7GOrTQwI1rAVixhK9axlQYu9reArVjCVqxjKw1cXmwBW7GErVjHVvCpHRawFUvYinVsBZ/aYQFbsYStWMdWuB/Rj0RL2Ip1bIX7Ef1ItIStWMdWuB/Rj0RL2IrtUYmpQT6ygKxYQlas27WCzy2xAK1YglZsJsUhYCuWsBWbSXEI2IolbMVmUhwCtmIJW7HSmWAWsBVL2Ip1bAWf3WIBW7GErdiMP8vdArRiCVqxGXuWuwVgxRKwYntOgs9St4CrWMJVbI9JSniSuAVYxRKsYntKgo8yt4CqWEJVrPu4PJyBtACqWAJVrIMqDZw0sQCqWAJVrPuaCv4BAVOxhKnYnD/L3QKkYglSse5zKgvYn1mAVCxBKtYhFTwosACpWIJUrEMquE+3AKlYglTs+Sww2KNagFQsQSq2JyRmkT0vFy9sRh8CiEKCVGxPSAw+escCpGIJUrFuswrzIwKkYglSse4sMOY3AEjFEqRie0KCOwMAVCwBKtZ9Zh6fHWQBULEEqFj3WZUFnDGxAKhYAlRsz0fMAi74sACoWAJUbM9HzAKupLQAqFgCVGzPR8zC4guAOCRAxRphaGgBULEEqNhiIQQyACqWABXb8xGzwN0RACqWABXb8xHuMQKgYglQsT0f4R4jACqWABVbFMJjBEDFEqBii1J4jACoWAJUbOEiEW6qtgCoWAJUbCFlRABULAEqtpAyIgAqlgAVW0gZEQAVS4CK7fmIwWcoWQBULAEq1m1WwbN3FgAVS4CKdZtV8Pu+BUDFEqBiz0AF52QAVCwBKrYshB8RABVLgIrt+YjJ8JseACqWABUrfHneAp5iCU+xJT84BDTFEppiS/5TUxbAFEtgiu3ZiMlwtwpgiiUwxfZshLl/wFIsYSm2RyP4/gFJsYSkWOG78xaAFEtAihW+O28BR7GEo1jhu/MWYBRLMIoVvjtvAUWxhKLYHorAr/RYwFAsYSi2ZyImw2MKAFEsgSi2hyImw50RoCiWUBRbSWkQUBRLKIq1Lg3ieQpAUSyhKLanIhV+PwEUxRKKYnsoUkGAYAFEsQSi2J6JMC0IMBRLGIrtkQhuQYCgWEJQrPDheQsAiiUAxfY8pIJbZy3gJ5bwE9vjEKYFAnxiCT6xPQ5hWiDAJ5bgE9vTkAru3LWAnlhCT6z77jweiQB4Ygk8sT0LYTIAYCeWsBPboxCcAQA5sYSc2B6EmAzP0gFyYgk5sY6c4K2OFpATS8iJrYUt9BaQE0vIia2F1TUWkBNLyImthRlrC8iJJeTEnj+nAs89s4CcWEJObO26YTzRB8iJJeTE9iQErwuxgJxYQk5sT0IsRNEWkBNLyIntQQiTxAA4sQSc2J6D4CQGsIkl2MT2FIRJYoCaWEJNbCN0wwCaWAJNbM9ALJ5jA8zEEmZiewRicS8KkIklyMS6j87jY+8sQCaWIBPbNMIrHUAmliCTerHgX+lqgExqgkzqnoCYrAHTIzUgJjUhJnUPQEwOX4dqQExqQkzqheF/ghoQk5oQk3pRSD+BH4U1ISb1ohR+Aj8KawJM6p5/mBy+zNQAmNQEmNQ9/zA5TAM1ACY1ASb1opZ+Qz8OawJMagdMuN/Qj8OaIJP6vBkFjmhrgExqgkxqtxsFn11YA2RSE2RSu8/PM78BQCY1QSZ1ZoTfACCTmiCTuicgTBwBYlITYlL3AMTgM+9qQExqQkzq82dU4MxCDZBJTZBJnQmH2tQAmtQEmtSZFIiAmtSEmtQ9BTH4xLkaYJOaYJM6lxIi4CY14Sa1242Cl+XUAJzUBJzUec7uy6oBN6kJN6l7DmLwcW81ACc1ASe19BWVGpCTmpCT2pGTHHZrNSAnNSEnde4yImRHNSAnNSEndQ9C4Jx9DbhJTbhJ3WMQY3CnBLhJTbhJnQv9cg24SU24Se24icF9AuAmNeEmtcmEOAbcpCbcpO4xiMEH3tWAm9SEm9SOm+DD3mpATmpCTmpHTgxO6YCc1ISc1Gdygp8CICc1ISf1mZwwPyKIQ0JOanfKF37DqAE5qQk5qR05MTinA3JSE3JSGykSATmpCTmpCykhAnJSE3JSO3KCT3urATmpCTmpHTnB54TVgJzUhJzUhTREBOSkJuSkLqQhIiAnNSEntduKgmfMa0BOakJOakdOuozmrw+rATmpCTmpC+FluQbkpCbkpHbfpseHK9WAnNSEnNSFFImAnNSEnNSlFImAnNSEnNSl8K4CwElNwEndcxBT4G4BgJOagJO65yCmgIvXawBOagJOagdOmJE+ACc1ASd1KaVEAE5qAk7qUkqJgJzUhJzUPQox3VEg4CGAOCTopO5RiOkO8gD1QRgSdFI7dFLgXgWgk5qgk7oSTpurATupCTupK7dxHud0QE9qQk/qSnpVAfikJvikrqRXFcBPasJP6kpY71oDgFITgFL3QITLZ4Cg1ISg1O4rKtxTAHFIGErtGAo+4aoGDKUmDKWupHcVwFBqwlDqSnppBgylJgylPn9FBT8FwFBqwlBq94F65kcEEKUmEKW2LiPirhlQlJpQlNq6jIhfFQBGqQlGqa2wqKEGIKUmIKW2wqKGGpCUmpCUuicjBp9qUwOUUhOUUltheU0NWEpNWEptheU1NYApNYEptW34jhHAlJrAlLqHIwafy1MDmlITmlLXGb+2pQY4pSY4pa6llAiASk2ASl1LKREAlZoAlbouhIwGgEpNgErd8xFT4lc+AFRqAlTqupJ+AxCIBKjUtZV+AxCIBKjUtXBMew2ASk2ASu2ACvcjgkgkQKVuXCTit1ZAVGpCVOqekBh8PlMNkEpNkErdSJEImEpNmErdSJEIqEpNqErtNqMwTwFglZpglbqROmfAVWrCVepG6pwBWKkJWKl7UGLwIVc1ICs1ISu124yC99PUgKzUhKzU7qAv7kcEkUjISrMQhokNICsNISuNIyt4iUUD0EpD0Erj0EoJx5kNQCsNQSuNhFYagFYaglYaCa00AK00BK00C+G9uQFspSFspVkIKw4bwFYawlaahbDisAFspSFspVkIKw4bwFYawlaahbDUpgFspSFspXFsBZ/X1gC20hC20ji2wsQBYCsNYSvNma3gOABspSFspXFsBZ8Y1wC20hC20vSsxMLVPg1gKw1hK41jK/jEuQawlYawlcaxFcYAiEOCVpozWsH1QRgSstK4D9TD9TINACsNASuN+z49bkeAqzSEqzTulC+427kBWKUhWKVxn0+Bp9Q3gKo0hKo056+n4PogAglVac4fT8H1QQASqNK4b6fApQINYCoNYSqNO+ALLndrAFJpCFJp3GYUHH+AqDSEqDTn471wfRB/BKk07rspOP4AUWkIUWnc4V44/gBQaQhQac4bUWB9wFMawlMax1Nw/AGc0hCc0hie6jWApjSEpjRnmoL1QfwRmNI4mAJPa2wAS2kIS2kcS8HxB1BKQ1BK41AKjj9AUhpCUhq3BwXHHwApDQEpjQMpiAg2AKM0BKM0DqPA5Y4NoCgNoShND0UKuNyxARClIRClcRAFH1jaAIjSEIjS9EwEf+mkAQylIQyl6ZGIxe0PIJSGIJSmJyLdZ0r8F/wGEJSGEJSmByL4KyUNACgNAShNz0PwWRcN4CcN4SdNj0Nq3P4APmkIPml6GlLj/A/oSUPoSdPDkBq3PwBPGgJPmp6F4HMuGsBOGsJOmp6F1Lj9AXbSEHbS9CgEn3LRAHTSEHTS9CSkxvEHyElDyEnjyAk+sLcB5KQh5KTpQUgBjw1qADhpCDhpHDipcAQDcNIQcNI4cFLhIQwgJw0hJ40jJxWOYYBOGoJOGodOKrgpvAHopCHopOlJiMGL9huAThqCThqHTvCq/Qagk4agk8ahE7zuvQHopCHopHHoBC88bwA6aQg6aSoXiDiSATppCDppHDqxeCgD0ElD0EnTkxBjcSQCdNIQdNK4z6PA814aQE4aQk4a93UUeN5LA8BJQ8BJcz7CC84WNwCcNAScNG7ziYWzhA0AJw0BJ43bfIJbEuAmDeEmjeMmFs4yNoCbNISbND0GYbIRwCYNwSaNwyZMNgLYpCHYpHHYhMlGAJs0BJs0DptwvyGIQoJNGodNmGwEsElDsEnjsAmTjQA2aQg2+f87O9clN3IcUb9L/+6YSF5AMucNzjNsbFTIVbKt6bKklVTu9m7Mu58QmUCSIMhGza+pUbahVCZIAvhwWQs2GexGAjdZGTdZCzcZ7EYCN1kZN1kLNxnsRgI3WRk3WQs3GexGAjdZGTdZCzcZ7EYCN1kZN1kLNxnsRgI3WRk3Wct4FHk3ErDJyrDJWqajyLuRQE1WRk3WMhxlsBsJ1GRl1GTNEMTJrbdXgZqsjJqsGYLIVRyrAE1WBk3WzEDEKo5VQCYrQyZrJiByFccqEJOVEZO1FKHIvpUATFYGTNbMP+RSslXgJSvjJes6bhSyCrhkZbhkzfRDLOVaBViyMliyruU4lsP0AixZGSxZM/sYvH6BlayMlawZfQxev6B9jJSsGXyMXr+gfQyUmGUZd6rZLrYS6g9RhBm9gu1aJ8FwCeVEFoPk29VOhuUycjvDRdzOt6udDMdl5OTrRdzRt6udDM9lwFAhtoudCOAiwkgntmudhMAlxNlb7dWy/hBF5Jj1IkK87WonI3EZOW5txNFV29VOBlfQAlDkJtrbVS7DcA3dBtGL9Zbb1U4G19Eyi16umNyudjK4jppJy83taieD62jp7SVnNW9XOxlcRwtQkbt6b1c7GVxJJx2+toudCK6l4yZf27VOAlfSSZ+v7WIngutoafUlHoDbxU4EV9GMS+QzcLvIRViuoXZc0bxd7ERwBbXDoubtWieBq2cpXpFbrW9XOxlcPUvjr4FaCKyl/hBFwFgtBNpSf4gSwkQtBOBSf4gixiX228VOBFdOO66y3y52IrhyZpAyVAtJOS1XzsxSBmohsJf6Q5SQ/Ry59/t2tZPBldONa523i50Irp1uWO68XeskcN1044rn7WIngutmJisjtRBQTP0higgTtRBoTP0hipgd7wKQqT9EEWmiFpJuOq6bhcrIHf23q50Mrpx+3Alnu8hFeK6dftgMZ7vWSeC66cf9cLaLnQium37cEme72IngyunHXXG2i50Irpx+XJG/XexEcOUsU1dGVp/AauoPUUYcq5ZAa+oPUUKa2Y0Csak/RBlFPcUw43a1k8HVE2bqKYCb+kMUMVFPAd3UH6KEmXoK9Kb+EEXM1FMAOPWHKGKmngLCqT9EETP1FChO/SGKyO66PEFju9rJ4OpZJt0/s3n6bIDtaieDK2hpITZSDEk/getnGXcvJwVtVzsZXD/DMHa0XeMSAlfPMvJeTi3arnYyuIJO+oltFzsRXEEnLcW2i50IrqCTrmLbxU4EV9BJY7HtYieCK2ipjHmmWknKJfCd+kOUMdk/BcJTf4gS8v4pJ2xtVzsZXD9LgYw8a2a72sng+hln+6eAeuoPUcRk/xRgT/0hSpipp4B76g9RxEw9BeJTf4giZuopMJ/6QxQxU0+B+tQfooiiniL32a52Mrh6xol6CuSn/hAllHQgMei6Xe1kcPUs+CcNQoYC/6k/3GQUAiQP79iuchmJ62eBQPL0iu1qJ4NraOFAaeB3CyCo/hBlZN9dHgCxXe1kcB0tNEge4bBd7WRwJS2FNOvA7BKQUP0hysin/Do45QUsVH+IMjKgXAfbl0CG6g9RRtlGRUa5Xe1kcD0t813k3M/taieD62lmPkbO/9yuchkr19N1FmASQFH9IYqwM99AgEX1hygjR0DlVNTtaieDq2lGQEPvQIBG9Ycoo6jpYAsSyFH9IcoIM0NSgEf1hygjG6Nyaux2tZPB1XSdGaMCRKo/RBHr+JQVMFL9YZFgCkeST1kjcSTDOZLJWGhwyhoJJBkOkkymQoNT1kgcyXCOZDIUGiwUI2EkwzGSKRhpYAQaCSMZjpHMMuSa27VOAnAJZReVT0gjcSTDOZJZinqKiSbb1U5G5DIm6mkkjmQ4RzLLWD2NRJEMp0gmIyEjp3BvV7kMTpGMGaP27WInguunGdP27WInguunGQP37WInguunGTP37WIngqtnxkHGiSm129VOBldQM+zDvF3rJHD1LHU5g5PASAjJcIRkStczeV7QdrWTwfWz1OcM+KKRIJLhEMmUGh0/+C0SRTKcIpnMhJw8tme72sngKmpnnNNIIMlwkGQKSJLHz2xXOxlcSTMW8vIEmO1qJ4NrqZ2weCOhJMNRkrFjFm8kkmQ4STKFJA22DYkkGU6SjB13rN8udiK4imYuNFhsEkgyHCQZV6ooZO/ASCjJcJRkMhcyciXJdrWTwRV0hpKMhJIMR0lmgpKMhJIMR0lmhpKMhJIMR0nGTdx5I6Ekw1GScZMdVCJJhpMkk7mQl0cEbVc7GVw7Mxny8pCd7Wong6tnJkNyL+btYieC66cvR7wcyjQSTDIcJhlfEkVkc9xIOMlwnGQyHDJeDr4ZiScZzpOMH/e33y52IriG+mGL++1aJ4ErqB93ud8udiK4ghac5Af2o4STDMdJxk9IvJF4kuE8yfgJiTcSTjIcJxk/IfFGokmG0yST2ZDxAxtUwkmG4yRT5s/4gd0lASXDgZKBcaKIkXiS4TzJZDo0tLskoGQ4UDJQznc5QGMkomQ4UTKlLGiRvXgjISXDkZKBSeOW7Wong6soTHq3bFc7GVxHYdK+ZbvayeBKCpMOLtvVTgbX0lCO+YHbKFElw6mSyYjILwObWqJKhlMlkxmRX9Lvfu03MIkqGU6VTGZEflllEZKWcqpkMiPy8sCo7Wong2tpKMVrRr4NSUk5VjKZEXl55NB2tZPBlTRTIi/PrdmudjK4kmZK5M1g0UpgyXCwZDIl8vLwme1qJ4MracZEg2bZ21Uug5Mlk0GRN2JV5na1k8GVNJMiL3eG2K52MriWbtVEckjUSHTJcLpk4qQl4Ha1k8HVNBY1HdhPEl8ynC+ZDIu83Gliu9rJ4HqacZGXO/JvVzsZXE8zLhrrh6SnnDCZuE71Q9JTTphMxkVD/ZAIk+GEySQz0w+JMBlOmEzGRUP9kAiT4YTJZFzk7WAPkgiT4YTJJD/TMYkwGU6YTMZFQx2TCJPhhMmkoqeDvVAiTIYTJlNKj5JMdoxEmAwnTKYQplXsV79d7WRwPS2EKUolWNvFTgRX00yLvDy/YbvKZXDAZDIu8vIAhO1qJ4OracZFXh4gsF3tZHA1LYQpOdkGkgiT4YTJFMKUQN4+JMJkOGEya1HTgQ0kESbDCZMphCnY3735R3DdfUhqygmTybhoGFeUCJPhhMlkXuTlmQLb1U4GV9NMjLw8VmC72slgemozMvLyaIDtKpNhOWWymRkNZqNvVzsZhsvIeioPCNiudjIsl5G3U7nF/3a1k+G4jLydyl3+t6udDM9lZD2VG/1vVzsZwGXk7VRulL9d7WQELiMf+3Kn+u1qJyNyGVlP5Wb129VORuIySiw/ibEXK9Emy2mTNUVP5fViJdpkOW2ymR15ueX7drWTwfU0wyMrj4nbrnYyuJ5meuTlvuvb1U4G11Pjx76clYCT5cDJGhj7clbiTZbzJmvC2A+zEnCyHDjZTI+8Hyx8CThZDpysSbOHIeko5002w6Phw5BUlOMma5fJw5Bok+W0yWZ05P1gB5Nok+W0ydqJl28l2GQ5bLJ24uVbiTVZzppsYU2jhyHpJ0dNNoMj7wdbscSaLGdNNqOj4cOQFJTDJmvj7GFI+slhk7Vp9jAk/eSwyWZ25OU2/9vVTgZX0A03yQ9Dok2W0ybrzORhSLDJcthknZ08DAk2WQ6brCsb6OBwlHCT5bjJutkGKuEmy3GTdbMNVMJNluMm62YbqMSbLOdNtvAmufH/drWTwRXUzTZQCTdZjpusm22gEm6yHDdZP9tAJdpkOW2yvmygA3NFok2W0ybrZxuoBJssh03WzzZQCTZZDpusn22gEm2ynDZZXzbQgc0k4SbLcZP1sw1Uok2W0ybrZxuoRJssp03WzzZQiTZZTpusLxvowPiTcJPluMnCbAOVaJPltMnCbAOVYJPlsMnCbAOVaJPltMlmdOTlAQfb1U4GV1CYbaASbLIcNlmYbaASa7KcNVmYbaASarIcNdnMjbw8qGC72sngCpq5kZf79G9XOxlcQzM38nKr/u1qJ4NraEFNcqP57SqXwVGTLahJ7rO+Xe1kcB0tqEnu0b1d7WRwJS2sCaIYLbYSbLIcNtlMjoyPInG3EmyyHDbZApvkXtnb1U4GV9NSxDRIAbMSbbKcNtmMjoZutESbLKdNtrSqG7mvEm2ynDbZQptAjjhbiTZZTptsRkdebl+5XeUyOG2yhTaN9EOiTZbTJpvR0SgcaCXaZDltshkdDXVMok2W0yab0dEwhCbRJstpk83oaKhjEm2ynDbZUs000jGJNllOm2xGRwaSmBtiJdpkOW2ycaqnEm2ynDbZjI6sib97/w8PkcuQ9JTTJlto00jXJdpkOW2yhTaFwfki0SbLaZNNdqbrEm2ynDbZNNVTiTZZTpts8jP9kGiT5bTJlgZ3o3cr0SbLaZMttCkMzluJNllOm2xGR/7ZsVF8ppKectpkC20arTmJNllOm2xmR15u/Lhd7WRwPS31TKP3IuEmy3GTzezIBJF6WYk2WU6bbKFNYWA6SLTJctpkMzoavhaJNllOm2yhTaNtXaJNltMmu5btVM5ishJtspw22UKbRtu6RJssp0221DONVEyiTZbTJlto00jFJNpkOW2y6zSKL9Emy2mTK0OEBkeDk2iT47TJFdr0TD00/1hX4DIEPXWcNrnFjlXdSbDJcdjkMjkanS5Ogk2OwyZXYFOQrWQnwSbHYZMrsGmwXJwEmxyHTa7ApoF6OAk2OQ6b3DKzTp0EmxyHTa40yBu9FkFLHWdNbimbqRwAchJrcpw1uVLZNDgoncSaHGdNrvTHG6xaJ7Emx1mTK/3xRo9UYk2OsyZXWJPcUXe72sngalpYU5BDJ06CTY7DJleqmwY7spNok+O0yZWZQ8P3Iqkpx02u1DcNdnUn4SbHcZMrs4cGu7qTeJPjvMmV+qahfkh6yoGTs7ND30nEyXHi5ApxirIj5iTi5DhxcoU4RdnAdRJychw5uQyQhieDxJwcZ07O+tnJIEEnx6GTK9BptF4k6OQ4dHIFOsnt2LernQyup2U+0eh4kbCT49jJFewkd2XfrnYyuJ5miDQY8b1d7WRwPS2zisQR2dtFLoJzJ1ca5olTsreLnQiupZkijTqFOgk8OQ6eXAFPcmvr7Wong2tpAU9yf+TtaieDa2khT4Puvk5CT46jJ1cmGI3erMSeHGdPrkwxGr1ZSUk5enJlkNHozUo6ytGTK+hp0M/WSezJcfbkCnsa9G91EnxyHD65Ap8GzT6dBJ8ch0/OzwJSTqJPjtMn593sjJPwk+P4yflZQMpJ/Mlx/uQyTBpqmMSfHOdPrvCnJKemOglAOQ6gXAFQ8rCl7Wong6tp6Z83Op8kBOU4gnKZJw3PJwlBOY6gHMz2UglBOY6gXEFQSa4gcxKDcpxBuUyUrBt4DBKEchxCuUyURitfYlCOMyhXGFSS67+cBKEch1CuQCh5lNV2tZPBtTQzpeHZImEoxzGUKxhKHom1Xe1kcC0tFU8exNCakzCU4xjKwSxs6iQM5TiGcgVDDVpJOQlDOY6hXOmjN9oJJQzlOIZywc52QglDOY6hXHCznVDCUI5jKFeGJI12QglDOY6hXMFQo51QwlCOYyhXip5GO6GEoRzHUC7MwvtOwlCOYyhXuumNdkIJQzmOoVzppjfYCSUK5TiFcoVCjXZCiUI5TqFcRkrDnVCiUI5TKFfGJw12QglCOQ6hXCl5Gu2EEoRyHEK56Gc7oQShHIdQrkCo0U4oQSjHIZQrJU+jnVCCUI5DKBfjbCeUIJTjEMoVCDXaCSUI5TiEcqXkadAQz0kQynEI5dIy6YXiJAjlOIRyycxiJxKEchxCuTTrY+IkCOU4hHIbhBrELCQI5TiEcqXk6Tl8USjxcRKEchxCuUyUjF9/B/uP0N+HpKccQrlUovvLQIakpxxCuQKhBo0KnQShHIdQLhMlvy5ibY2TIJTjEMqlWb8dJ0EoxyGUW6dxUwlCOQ6h3DqNm0oUynEK5dZp3FSiUI5TKFco1KBxo5MolOMUymWkNHwvEoVynEK5QqFG70WiUI5TKDeteXIShXKcQrlCoYbvVtJTTqHcmmbWmEShHKdQrlCokTUmUSjHKZTfKJSsY16iUJ5TKF8o1EDHvEShPKdQvlCogSXlJQzlOYbyZUbTwJLyEobyHEP5pZQ6e3Ef8xKG8hxD+cyURmellzCU5xjKFww1aHTqJQzlOYbypeZpsOa8hKE8x1C+YKjBmvMSh/KcQ/mt5kleL17iUJ5zKG9m8X0vcSjPOZQvNU+Dxq9e4lCecyi/cajB85A4lOccypc5TYM9yEscynMO5c0smc9LHMpzDuXNjOp7iUN5zqG8mVF9L3EozzmUNzOq7yUO5TmH8oVDDfVD0lPOofzGoQZ7kMShPOdQvhQ+DRoDe4lDec6hvJ1RfS9xKM85lLd2to9JHMpzDuXtDOt7iUN5zqG8ndmnXuJQnnMob2f2qZc4lOccytuZfeolDuU5h/Kl+mnQ1ddLHMpzDuXtdD+VOJTnHMrb6X4qcSjPOZR30/1UAlGegyhfCqBG71YiUZ6TKF9I1OjdSiTKcxLlnZu9W4lEeU6ifCFRg3a2XiJRnpMo72D2XiQS5TmJ8m6WHO0lEuU5ifKZK41m+HkJRXmOonypghr0LfUSi/KcRfnCogb9Qr3EojxnUb603RudlRKL8pxFeT/z973EojxnUd7PoqdeYlGesyjvZ9FTL7Eoz1mU31jUQD8kFuU5i/IeZuecxKI8Z1G+tN4bnVESi/KcRXkfZ2eUxKI8Z1G+VEMNesF6iUV5zqL8xqIG60ViUZ6zKJ/J0vCslGCU5zDKl2FOg560XoJRnsMoD3am6xKM8hxG+dJ/b/Q8JBrlOY3yGS3BoJ2rl2iU5zTKFxo18l8kGuU5jfKFRo3OW4lGeU6jPMz8fS/RKM9plIdZcrSXaJTnNMrDLOvUSzTKcxrly0ynxcpntkSjPKdRPpQEFFk9JBjlOYzyZajT4ga3Iakph1G+THVa/ECGpKYcRvmtJmpgfkgwynMY5QPMzA8JRnkOo3wmS7DA4LdIasphlM9kCQatFb0EozyHUT5MzVMJRnkOo3yYpfN5iUZ5TqN8XCYdxbxEozynUT6jpRF+8RKN8pxG+TLdadBq0ks4ynMc5beaqMEzlXCU5zjKx1kSv5dwlOc4ysepuy/hKM9xlI9Td1/CUZ7jKB+n7r6EozzHUT7OUlC8hKM8x1E+zlJQvISjPMdRPpXtVE6R9BKO8hxH+cyWhrou4SjPcZRPU3dfwlGe4yhfcNRovUg4ynMc5TNbGqFGL+Eoz3GUT9PwqYSjPMdRPpX9dGAWSjjKcxzlU5ytWwlHeY6jfKmJGq1bCUd5jqN8wVGjdSvhKM9xlC84arRuJRzlOY7yUxzlJRzlOY7y6zTML+Eoz3GUX6dhfglHeY6j/Opn61bCUZ7jKL/CbN1KOMpzHOUzWxquWwlHeY6jfMFRo3Ur4SjPcZRfZ8lSXsJRnuMov86SpbyEozzHUVDmPA0aIoOEo4DjKNhwlLxuQcJRwHEUZLYERnZfQMJRwHEUlFFPg67KIOEo4DgKlhk2BQlHAcdRsMywKUg4CjiOgmWGTUHCUcBxFCwzNwokHAUcR8Eyw6Yg4SjgOAqWGTYFCUcBx1FgZtgUJBwFHEeBmWFTkHAUcBwFZrafgoSjgOMoMLP9FCQcBRxHQZn5NHArQcJRwHEUGBi7lSDRKOA0CkyYuJUg0SjgNArMrNoEJBoFnEaBSRPXFCQaBZxGwTb1SXZNQaJRwGkUlKqogWsKEo0CTqPAmolrChKNAk6jwJbtVCavINEo4DQKSiO+0VYo0SjgNApKVdRoK5RoFHAaBXYW5QeJRgGnUWBnrSVAolHAaRSUwU+jJSfRKOA0CmyaLDkJRgGHUZDJ0nDJSTAKOIwCt8yWiwSjgMMoKLOfRstFglHAYRQUGDVaLhKMAg6joAx/Gi0XCUYBh1FQxj8N5iCABKOAwyhw01NfglHAYRS4WZEpSDAKOIyCTJbAyM2uQYJR1YcoI2+nJgxkSHrKYRS4WVQKJBgFHEaBn0FTkGAUcBgFmSyBifJvkWAUcBgFvmynScqRBolFAWdRUEZAmVUWIWkpR1FQRkDZga0uoSjgKAr8VEslFAUcRYGf2qYSigKOosBPbVMJRQFHUeCntqmEooCjKChzoEarRUJRwFEUwDJbLRKKAo6iAGZtzEFCUcBRFMAsRRokFAUcRQHMUqRBQlHAURSAn9nIEooCjqIgc6XhqpVQFHAUBTBDpiChKOAoCiBOYg4goSjgKApKYdQg5gASigKOomBaGAUSigKOoqCgqMEkFpBQFHAUBWHq60ssCjiLgjBDpiCxKOAsCgqLGq1biUUBZ1EQ/GzdSiwKOIuCwqJG60ViUcBZFBQWNdJ1iUUBZ1FQWNRgmgtILAo4i4IwS+UHiUUBZ1EQZqn8ILEo4CwK4iyVHyQWBZxFQZz6+hKLAs6iYGNRA4NfYlHAWRRENzH4JRQFHEVB9DODX0JRwFEUZK40NPglFAUcRcHWnm9g8EsoCjiKgg1FDQx+CUUBR1EQ08zgl1AUcBQFmSvBYGAQSCgKOIqCzJVsWsW6SpBQFHAUBQVFDaYEgoSigKMoSLPeEiChKOAoCjJXcov5HZZ/RMPfi4SigKMoSMU8HThREooCjqIgzTr1gISigKMo2CqjBmahhKKAoygoKGpkjkkoCjiKgjRDpiChKOAoCtIMmYKEooCjKFineiqhKOAoCtapnkooCjiKgnWqpxKKAo6iYJ3qqYSigKMoKChqMNkKJBQFHEXBOtVTCUUBR1GwTvVUQlHAURSsUz2VUBRwFAXrVE8lFAUcRcE61VMJRQFHUWGZ6WmQUFTgKCpkrmS9fM4FCUUFjqLCYie6HiQUFTiKCqVBnwPJ2w8SiQqcRIXFT5ZLkEhU4CQqlMKoAWUMEokKnESFjJVGSy5IJCpwEhWWYp3KmVJBIlGBk6iQsRIMBrAFiUQFTqJCxkpjFRPUNHASFTJWGqqHRKICJ1HBzDKlgkSiAidRIWOl4XuRSFTgJCpkrASDQXBBIlGBk6hgZiH+IJGowElUMLMQf5BQVOAoKhQUNfAIg4SiAkdRwcSJRxgkFBU4igpmlngaJBQVOIoKZpZ4GiQUFTiKCnaZeJVBQlGBo6hQUJQc9wwSiQqcRIXSn29QsxIkEhU4iQp2EjsNEogKHEQFWw59OT8pSCAqcBAV7Cx2GiQQFTiICnYW4Q8SiAocRAU7i/AHCUQFDqKCnUX4g0SiAidRwc4i/EEiUYGTqDAtiwoSiQqcRAU3i/AHiUQFTqKCs5M4X5BIVOAkKhQSNVgtEogKHESFDUTJmi5xqMA5VMhQCQZDNYPEoQLnUKG05zNyM5YgcajAOVQoHGowVDNIHCpwDhUKhxoM1QwShwqcQwU3i0gFiUMFzqHCtCgqSBwqcA4VpkVRQeJQgXOoMC2KChKIChxEBT+LnAaJRAVOooKfRU6DRKICJ1FhK4qSXZcgkajASVTws+K9IJGowElU8LPe0UEiUYGTqDBt0BckEhU4iQobiRrsYhKJCpxEBVgmbliQSFTgJCqAmZCGIJGowElUgAkvDRKIChxEBZid+RKHCpxDhVISNRinGyQOFTiHCjA98yUOFTiHCjA98yUOFTiHCjA98yUOFTiHCjA98yUOFTiHCtOSqCBxqMA5VAhTy1TiUIFzqBBmlqmEoQLHUKGURA00TKJQgVOoUCjUYNhykChU4BQqZKRkwYg93IJEoQKnUKFQqMGQ9CBRqMApVMhIaXViZD5IECpwCBUKhBrMjQ4ShAocQoVQjvxBqECCUIFDqDCFUEGCUIFDqDCFUEGCUIFDqBBnCfxBglCBQ6gQZ/2kggShAodQIRY1HYROJAoVOIUKcermSxQqcAoVpkOigkShAqdQISMlGMziDhKFCpxChTgrNAkShQqcQoU4KzQJEoUKnEKFOOsrESQKFTiFCqU/38gklChU4BQqpFnySZAoVOAUKkz78wWJQgVOoUIqejpw0iUKFTiFCtMhUUGiUIFTqJBm9fpBolCBU6iQZsknQaJQgVOokGaZ0UGiUIFTqJCREgzmvQeJQgVOocK0P1+QKFTgFCpM+/MFiUIFTqHCOoP6QaJQgVOokJESDEa+B4lCBU6hwjorMA0ShQqcQoW1FO4tYmZAkChU4BQqlIKoZxdayZCSKFTgFCqsUxdKolCBU6iwln6nbnAfkp5yChXWoqcDV1+iUIFTqJCREgyGtgeJQgVOoWIpiBrMOo8ShYqcQsVlUq8fJQgVOYSKmSgNrLEoMajIGVRcZuWlUYJQkUOomIkSDIadRwlCRQ6hYiZK4IMYTIoShIocQsVl1lUiShAqcggVSznU4MSOEoSKHELFJU1WbZQgVOQQKi6z8tIoQajIIVQsEGqw8qMEoSKHUNHMTv0oQajIIVQ0s1M/ShAqcggVM1Ea7R5RglCRQ6hoZimnUYJQkUOouE2Jkk/sKEGoyCFUNGGy8iUGFTmDitNyqCgxqMgZVCzlUINJ9FFiUJEzqGjW2bKVGFTkDCraWfPoKDGoyBlUtLNW/FGCUJFDqFia842WrQShIodQ0c4Gm0SJQkVOoaL1s2UrUajIKVS0s7hplChU5BQq2tmhHyUKFTmFinZ26EeJQkVOoaKdxU2jRKEip1DRzlJPokShIqdQcRsSJauHBKEih1DRzcKmUYJQkUOo6IptKvu2UYJQkUOo6NwkPSFKFCpyChXdLPUkShgqcgwVC4bysi8XJQwVOYaKbnrqSxgqcgwVXZwtfQlDRY6hokuzZSthqMgxVMxMabhcJAwVOYaKmSkByFM4ooShIsdQsZRDgTyFI0oYKnIMFUs5FMijK6KEoSLHULFgKJBnRkQJQ0WOoWLBUCBjyihhqMgxVMxMCUCe9xAlDBU5hoqZKQEMjkoJQ0WOoWJmSm4wBjVKGCpyDBUzUwIYHPsShoocQ8WCoWCwB0kYKnIMFUtBFAzWvoShIsdQsfTmC3LcIkoYKnIMFQuGGgw/jxKHipxDxcKhBsO+owSiIgdRsYCoMNB1CURFDqJiKYgKA12XQFTkICpmqgRhoOsSiIocRMUCosJA1yUQFTmIigVEhTiQIekpB1ExUyUIAz2VQFTkICoWEDWYLRslEBU5iIoFRA1mmEaJREVOomIhUYMZplFCUZGjqFhQ1GDuZ5RQVOQoKpaCqMHMziihqMhRVMxcCQZTKqOEoiJHUbEURA2mVEaJRUXOomKZFCWPc44SioocRcWCouJA1SUUFTmKipkrQRyouoSiIkdRMU6PfQlFRY6iYuZKz/ld0ukikajISVQs5VCDKZVRIlGRk6hYSNRgSmWUSFTkJCqWeqg0WHESiYqcRMVSDzWygiQSFTmJioVEpcGqlUhU5CQqZqwEabBqJRIVOYmKpR4qDVatRKIiJ1Gx1EOlwaqVSFTkJCqmZTJnLkokKnISFTNWgjRY+RKJipxExYyVYDD/L0okKnISFQuJGkzOihKJipxExVIPNbKSJRIVOYmKGSs9Z8RJy1YCUZGDqJipUgoDEZKWcg4VM1R6pvCKIiQl5RgqFgyV5P5vUcJQkWOomNaZyyBhqMgxVMxMaXgfEoaKHEPFgqGSnIsTJQwVOYaKBUONXBcJQ0WOoeJalHSwmUoYKnIMFUsx1DrYTCUMFTmGipkpeTNQMQlDRY6h4hpmbpiEoSLHUDEzJRiMzYoShoocQ8WCoQZjgKKEoSLHULFgqJE7KGGoyDFUKhhqMDonSRgqcQyVMlSCwWiUJHGoxDlUKn35Bq5LkkBU4iAqlb58q/xukwSiEgdRqYCogfuTJBCVOIhKBUQN70PQ08RBVFpmLlSSQFTiICqVaqjB6IskgajEQVQq1VCDcRFJAlGJg6iUqRIMxkUkCUQlDqKSKXoq70FJAlGJg6hkzMSlTBKIShxEpQKiRvohgajEQVTKVCkMxgEkCUQlDqJSpkpyqX6SMFTiGCoZmDjHScJQiWOotNVCPcP7/HxKEoVKnEKlUgllxWyNJEGoxCFUykQpDCYSJAlCJQ6hUiZKYZG34yRBqMQhVMpEKSyDrVSCUIlDqJSJUlgGW6kEoRKHUCkTpbDItm2SIFTiECrZoqKDrUOCUIlDqFRKoQZubZIgVOIQKmWiFAZt2pMEoRKHUCkTpbAMth8JQiUOoVImSmHQdjpJECpxCJUyUQqDFrhJglCJQ6hkZ25+kiBU4hAqZaQUBi1wk0ShEqdQKSOlMGiBmyQKhR/+9++/nc4/j7fH8e3/nd+Of/32z//6r99e7oefx8P19Mfx1+H19Xi/n768H++vl+vxt9//77eXU/kPPfyev/+3f/7fb7D89s//+/e/f8dvff6/3+nr8rXn9xdpL+/Hn8f3WpSBStZzwHP+589Jvjqpj9Pl3MiLdpf3HHKY/+GzeV/+45nmmv94xo7zH8+dMP9hTFzor/SJr3/5drt8XO/1XTx7EtNd5KbDnxB3+fKv4+uj+VHrUv0op33iT2lf3i+vfxzfTo/Dl/fmHZr6JTpYPyvzdjy8tS/SVPICfEJe//xMqB5fLP94LS9KKbMR5+vnl8cRl/f8HIBb/nqO5dz+Atj+evZ53v6yDv8Kes34eXy5Xt5Pr79ebsfr5eX01i6hWN2SDfgFNhr8S7sG3t5Oz198eH85nb9e6i+xqXonz3oIpbyP+/HWvA5XqbNb8PGZ8tAUEn+cmkX6NIX3H5+0Yq6nWkhM9QPc7mn1yod2Pb2+n56fNEuiXrRqOZfz4/hXI8hXj73c0O+/rahXa1TuBiS62zQrbVbuBXlHf70dD492EwBf777qG/vj+Ku7qfpM+IScy5/n4+3xqz1gnrHvagPwuDHH+Jnf221Rod6iknI5ZFHt7lQvXVQ8o1bipzimy36tHp7/jKDn0dz/zuoGn8O1lfI+bs0LdfXjWiGg+mrv73q7/Gy1zdX35SxuI077JrLE5qc+rafqXWiPxtvt8KvRt3qjzFF7lZj7/fSttT5stQpswk19ScpTIws8vr3cLu/HRuVsvWM+s2X14p4f3V/K2m+enV1qU8l/5haLzNvxB38fdqk2FK+1DbPM6/H243S/87Pb1KvN4iZq6eReAE/uRavp+euej7g5TmoNMNsh7HD3fsaEUVuVplL+Fn6S1tapMSRcuQDu98vr6fkaXx7H8+H8aG1O3xhNC5oxzyRNlfTH43b68vE4jk3GUB25zyH1nxfbbVWxtmy1djKKbBWl/v0ubO/LhW3fAth8gSdz2RQGX7MxZkWTMC30F3224rP0ZPt4fHl5ejCajuhK+ECfocORRxehYWnoLzI2LRmbjj7z9FegfxHwrp5Ndba/LP53wdFVMmPD/i8i/YuI9xLoVz4rVjaNWfB3PJNzt7+ccnHhu+mP9GaL9fiDnphVJfjj7fR4v3z7cXljHmS9crcXpJZWfK17LzSttQmnXEGb0P/5ON5+9b/fNr8f1WdTR7XwVudrG3hFS+Rzj4DbIlAto/DJe7vcHn8c25MVXPOzSceS9pk+vr/8OL5+P5xP9x+NzRRqyZZWlyU9dtpz8uPxXfwKqM3jnEq43fyq9DI+Hpdvx/Px1h29tdnynLuZ/72PynPg5xU9y/vjcjsy19LGygh5NgIqkQ+v3K9/Xo/nb6fz8e34enqexu+Xb20soj4EtEL/Ol3up/P9cTi/Hlsb09Y2Jrr6yj3hy+H1j8vXrz8+3h+n6/upPWpdqs/DJer07cvhfnptTcO11oFVd0R9OR5u7e1AE4OIq25lfblcWicrNbtI1DkdXz5O74+X1gf39XvMY8F1kt7/kMzeUJu9dL4q1/hT6Ov34+sftczGInfbabF6pWI8JWaL93K7Ha/vh1fmiFTvwtLpvqzax/n+x+34fshxpu+n6+Pjysx1szQuIhoDi9LAyV9weT/uxvYzgnR7tJZ2vYX4T9z55f34cZ6LdrVo/UtEsa1u1PZ72p+1bucoYv/uadeqTAbNsijX2PMr7sebEB5x1dp3dHYZ5a6Hgt+O70cm2C+1YE+CdQcACpZUu449OTIgjTIu9vrcoN/fmZPdarPVrcF+RddbF3r/qydbM31C7uH9XXCBUm0ROIffoFsbWe7r5fz19K1dDNVp6kH3grIsFk5JtS2BPGJVut0oULq/2lIF5TO8vDVas9abLZmmgMY/UPib3Ibtk6CMh79eziVK3UY1akziUeZzvnNx2Yxune3Cj49+EVtTu5jKIHgtkvus1tQaoYxINgI/3o/SfdaGVdK5W1xsd6+2jscozdZe6A8WybO2IYC6U42LbffwSovR6VyVkYtOMPdoqu3rP3hdrcrWlgNaJfY/EMrvsXr5SquuFtd7m1DbiXQORGWMrJb9cX3jqlrbe7Co3xLbumJtWVt0X71am76+n14fL/fH07361nidtn7lQWkHvF7O98ft4/VxaeFX/SS3wwpNAQyyhO1/Ed7FzeJL9KPwHMYt1eImawk8YkTEowEDtBHjGYlRLYMuown4z/ErDTnC6/aJRQpucWFZtKctmh4W8A+E4Bt+fIZatx/rkJE6vHnnKE6q3lYfxxa62YZ96NWTMzcTa6MVnzOF5ACjZRReo2gYhcAiPnC1KTLgc74JrCtFXRsNDpXWoYMSlfGBp6zD/de58WNDtWTXgAKVB0J3WNV8Dh9xpHD2pvSoiAbNB4qK4n9iKKy+oo7im7O4u1o0FS3uYha/kWC5xV/kUNcdInuHdqBDSzPiKo5057iuIqWHrGif0hKmn7NQ0Hah3JGFwrcLca2FsOUC+1/kC1K2ybLuQJ3+opCu2TmZdmfsUY+r0Xak1xCUQd1N4suhXXF17MYh7PIYVPe4OVAI3ONOAg5XJepMwCB6oG3Q4Ds1NtJmSRupM/iAiNEYR1FyR//Wk/J5eh2e4uCeXHOgmDeQRwLkrQLFCAJJCbTjRkoeiVa5QrcH+uXXy4/jjy8s26IObDpleLhIfPr2b8fb6eehy4uqrUu7MzNl4s/rx/1x+fHy5XY4v35/yXKaiGOdZ4KnTMAjPeAbClr3pHxbjnGeGAitoXRQRvvfDo9Dsz83AYP9MLWEVCxyfWP3k9qSQjo6xh39C0f/ghTSkipZ2gGsku9j+LU942prHgnUc5rrdqJtWpqUyQj4HTyAXEdOQ6T8uKSVysMdNfpB1cNNAXnbvgkSpMJDgpDcitv9gocEbjb0lixu9/TsLW65tI1Y3ModHjYOt2+H79N5vE/MP4t057jNRNxHIm5sK55n67rH/OiMMLTqaHdfHOUI0Ma3AP1F9t5CaWELnpTGLPQXaSZFPYyhqFJSJs6V9zbbQmofDSjMpnSpi/gStekTzOotr8KyOscq3+/x7XnrA9+6DkKCMreLSe3V2tZpcaB0ApnUzmGvnwQoQ21vx/vr7XTtXpiv821Qax26DB4xtMdERx/wD9RswHcR0BwLuPcFdIICuSc20G5I2HvPgqHVZhzZTVsWVj6y6SpZWpS/azztCt7SZwTK/e47kc/kYcft9BetO7JA8pTh7S86B4Bss0BmRqA1tpso+y8P+7+IO1DXasTjcGIhV1fn0UT8oVEZxUWJQ2ZuXe3AO51d+fbx48evwgYFgdWJCspj/vh+fP7/lwLLXh6XP47n1ouvvQwlnNmEtnHhJv0Xt+gd5yr9KhR9uJ6Ot9vl1nxHHcvQvXcU1yei1oa1MnUMhT131tP55+lxFBLwbM0zAP5TycL+WlOHbR39B4K7zbBO6YFPvqVdrBDAqndGUMZajz8Op1bpfeMFb3oFGMcG3AOBQjKG8mkMbXKBfJpI7l8kozM6pdo/b+7l5/F2+npqtxJvG2N3Vb71H1+Ob2/Ht/fLt9P5dvyfj+P9cfl4XD8ef54e38U4Tr0DrMod4PzMMWt3vlTDpiUp11LeltqAcs1FcMsG3LH3DCijXWHn+8ftWOpYuohPvbDQQ0S7EzPQ8EzFI2+3FfFO8KyhcgM6VeiYxLiExcPbohtg8V+RT2LxaLOom3Qs24TWMRqqDuU4PCQdHjvOY5KzMkugPCopMb5GMfhK0EskO3t7TBiBIcuX1g7ZG7Ry8L/Bf2TQIrcLPh4MBFj8VxZ/n8XfZ9FGsviuKK3I4ltyKMehQeDQlnCewr1arf3ZOv51Nj4FH5JR7qfnn8yRM3UmEEVCwGkV/ufpdsk5Ao3QanmWf6lMyqjk8fusc84cKoBDHSWD0OMlj3smUChnT+Nw5GftyN6RbefIM/Nmtx/Jaoz0GeURAG3L4OmvRPbjutuFFJQnjzWSBRutzsqqn1LeZl4O19MLy6qr/fNPS5Xqy+pcEqdWNxQprfQ6Gv/pe+TRcNskJSp5I5OHwEjiRQBN7vSek7BqN7zmq7qCSRuW+v6VR7og9Ovp/XG8sYhYtWsE8x89m8fh9u3YHud1DUlQRhBqqb2NWKd6ByXarSR2xmEdDNu8s8/IY5kIVWgDDx5lMLeWyahu/WqUmYO1tMeB3WWsl4H6MCaBgiFcM9igDE1m56ddnrX5v5LdQ56wMo84C37hySm2zpwGPIeD1st4yiwOcfssa6cwBOWB/dfr+we7u5rUbTn5Cjmn++N0bhN56uqKoIzgHv96HM9vrPa4BtYUHDawc2WqNg1kSlGesKG4Th4opryJ26F9Y67e7nTP9uvh9XF/UsvH6cfx8tHsRq5GIisa1quyTotLLrnTrfx6oQIBTOI6yhyyr8xDfPbzqTLn1E/i9P5xa7QstCmOyt3u6+HH6f1Xh2u8rYMVRnnGlaNnK5hooiu1vqFNvSrTRr+ebvdHD5Rqgg6BjL1NOBC2C2T1RYouxt0tUFq6+Sb4PbgmQdooD4Ovl9uX09vb8fxSPMU2T7UWqBX34/B4HN9yBn238a51TiHi8RB0yporE06v02x/W7/coEwXYKZEvX2jI4oIei+RpJj/zlK3PxK5cvgHBoMtuqoWXTCLm5xFg9+SO4H+o8N/7nDPc7hJOsR0EflfRK86osCIAiM6ISu6qCu58gvxw4XixguxwoU8hYXi1Qt5KAv98srl3ZkIbdSURGro1Rst+ft2fJQC4maTaSIv9HN1e81T4la+2lWvmno5O8JbRukYPEV/PL5fbqf/PebeBO32U5vuqAcr8daojO59Oz6+/GrdUqi2yb2ogWIzpJaojehPEii2qFeEf6nRg0Ws6lDzKaPBURoS/scRD6J1JSWhisWFFGIhILLQGb5Q7u5Cp/5CcKZadlTPaJRnXX5gXIOqHW5P9aftGB8UJtBYND8s/gai6Ba1hJiSxYfgUDUJIzmgRYpEFpMzVqoGWyj2ulDF5kIYaCEasAD9RThroTADrQuzpzUZZRL3t2N2tm7H+8d7G++vTxp8OFFZsfTt+Hi/vB7e24KRdonUCxt1clXmsn87Pjp/trHvkIYrXbqnPO7YhIaeYLxUGfv9dsw8eVA/nupni9q10rYblUkN/ZcIqfj1cw7KsPImWKpmqB8KFvauoHMjv51+Hs+95VcXPhmrtEe/3Q7nXHR+af2M0PgZFBrbywZo/QQ61SnRKw8I3/5SkqjcJ+gFywh5TMyu1SETcWOjWuaotLjKl9yO98vH7fX48kys7r/J1d+EuzVi5qiM15ZvKi++FV+zXzxvCA5FZYgniz+8vfFGB7ZeEUEZlSjCxJYGti5sDEq8lOUJMaI6EBnV6nn5uHbRoRVqSTq3nCTdX78ff7Qu7VoXESgJb9/YylY6ipblaj+hLzzCVAfVjDIT/zt7VmFpmqgo68efUpgp5pstYacye75vVILB74/H9eXH8fH90rLMpvXO7iIY5VFx6hvGQdOIKyqP8pPcx8fWPmNU5hmdRpX4tkaYUaklp9ZU3i2CNr1kqSWr77Mxwns7xtUdZaKyGc/py+F+3E7BznNwdSlqdLplnCW+n+6PiUnk6oBKVJYvnHIZXm7v0GZX109T2fTm9HdVS67uERCVKTWnWY2Rq8vtojLz94R11CV4XMpOuxdv6tekjD9wBlj7iBgfcMhfPZrFlAnmMdXRoyvlMRgEaC0BXgqYjE5WRyDnak/6JW/IVliRUtXIpd8Ldh35VG7dU9Uo95y8MLpF4ynNDQgNAnnEe6YI7Pkh5NwHygKIFA5QL9634/lxerBsau9MYw8qt5g3vpp804zPKfH3qUIT17eneh1ux6+34/37lnDS7tOp2aeV2juBM64OlGs7y53qMGgrre7QlXRm1Wm07wE0XSe0e4poIrj60NT2XTk9989Re05XFxNEpclXSWyF1SWVSauCWVjfms/VIC8tutBPESY2lXJ1/WxSuhBFntSvx9V1s0lrHzzFTYtnXe3WJfuJ9zGsc3Wu/uHag/cpcoRYnat/uzIynyUKClh3EkzKrNgsizpJtOKaSN8nbm3emML5Jh72qdss/ic6u5jRez3cDj/Yd9SPVZmLL36HJDvUspXHuiS7i9q6OgMzKcFCI7q3FetK0qQMW5/+xk6E0LTtUcbMJKlSmjeEpinaZzRkCxgJL63Omk5ax2gX2b+qmu4nZWlsFrin4DKBlbWYlM0PT0KQsxVab1jKZHFJ6L237+ti+lV7Qp2FVIE6fUO7+xc5fEF12u/rPiXGaP2FIv1xeRzeXy8f3EusDSQMlVMPt6TsoHs6nx6nw/vL6GDwjWVnla3DT+frBysAr54u5fZRah9gWu5et2m0ttD2zFkY0NUZz0nZPPl0/nl4P7297IFkoSd+Y5RrxZ4eLNRbt9uxypy50/Xw7XTuSr9cnR+3KqNflaySpsL3vqaVmTKufbq+9QZuHcJZleHRU34Dj05UqkUpVbGI6us4XG3Fr9ogwyatwwuuPopWZa7WJq0qXWlE1v1oV60LVERerr0dVfdgWLWH+vV2yTkl3b3VOTlKmvIU9tev8ux6gfU2ruw0ceotvE5s02dQezzght6Kagi8dp2hqNpd626yQYxaxW4l90IbbKdMcN6FksfF5Tb1WouyPfiJH5G9WNOIVW7+ZG+iInRi631s0QYmGjO2E1mnjS2gVtUishdXpwktQX2Hj9svYRtq8r0W5aiUEzOy+C02mUyLEsqexIe3NvenBA6n+8vl/OVyuL2xtEzvmjazSpJ0ur9IC9zWJdTUEBo+IZTDvDp4Qt0sQNn49nR/uX9cjzeO9Hzt/Burlba5JN37aKCQNibD78mtDfpRQqosZrjR+KXJyLPK11C5NZ3Apou8loBM0hf80nSMV1YDZon9zblG1Cee4P3pzfWupq+rlI1RmiT/ujMC1+x2Ubmh/OvPP1hufJ1miDn8AbvnUBRdm9TMjH1T+6wOM9s9Zhd47ADmMUvJIzig3u2A/w3gfwNYYxSQBQeEGoG6FVGl0bKnaO09SbC40FCeo7GUHUuNLszeU8FVre73miiqn6eMQ08pG97tQIOq8KmPkacsf/rpxpM8oKxcYjIGKPkmEFKhXjGGfrgJxI+psYkJdM+BwEyk5xKVedHvhy/HthrA20aTlZX774f742Wb2tX2RoI6omiCEgdkeadruxVDsxVrf+D98ZJLd1tZoZGlWwhZVp+gXbepoBkL6FoDUa5AKhgpXy5SxmJUGmH5Hj7uQguqeoiZ0kd4CuuTvZuUeKUp+356ulZvm597fCtgdNh1wTd9dI0yVvt+Ov9RWkWhBdoaAHXZNaJHwG4doF0RJ0bbmtqqbUvCNnnbl+wb015Kje+V8pFxw1gp9xNTPnF/sZgRZnGHsLhBWNwxLSoW7W0O86Ko2tOhHIepaA4zOWmMBZUGRNy/IrVuRLgakSKv+4wZ2hUX+q0LPmKz0N61ULHNQtB2oUEcS6C/6PkstFPuicV7ByQaa2aorsIYpYPxfKNSyNnU/YIN/laL0TFbtc+mLFnakhdlB9lJNNnUtuXO1I3SJWX1Ca7pk4jVBavShsg75KHNRK0jGFgIqOw8sYnrk8d8Mw7SBOWafIq7v3RhWe+a0YHKHmg/Dtfr6fztpYOHPjTGPr1/6gxgnPLU2b7i+Q3tr28i00r3sxLWly1629jZyoa5nciP2/szv/N4/mjHfjSTRSLlg2vhdP09o29oBovQFpGUnuCPw19vx/d2hplrMp0XZXD+x+Gvp5/P8kJck3u8KCdR9q0MoQk7aduNFjmDThsQms7G1IFJC/tr4Zcv/2pFN1Xg1EBKy/1/HO/3wzeWbFt7JZgPHZSR1pIAyXhkk65IZrg2meDH82W/Mtu3WZ9KHpeHruQ9npdSNo1msTJKWczA7TJTMxZq4uCwL4qjKhrctjzaop5sUXQPAh7+gaYBY4OUQM+RmiUbS62VqVbH7LNNLFm41BnEUINkQ81UjKOqE7c3QqMqHmrBZqhjsfF0JnpqM+mp2x41ZDNAhWWEtgzsnfrJ2IDdjSLXj5q4GXoEJtB3BMqrDfR7g1ItzofH/fp27cOG0ASLoxKXnY9/tgS1LldXxoDOl5e30+34+ihjFV/EEcu+aZhulbb5+dJXeUITqErK4/l8adsXQbObR3Lpo9I1PX90e3ETBdZWFwmJbnWvr0QK58gKpn44Zp8/4qgURFvVU774Rajc9207NzJOtUOnN8lsHnM7b4hWhVMaa5tQKejrmxx9pywkZgL57TbjKp0yN3yTyYcFmJqfOiqzU2paESqMVG3OaaU5IpSX29rcBSVELXL4D3V1+UXC3Top45aXsxzTr6vpAb1RwBAdWJ1xutOHl/vjyGJATYKEEgterofJ2LWamOOxumqX5vUwLRr3tgk0Kwtwn4OM+9Q8H5vuAspERIFNhyaQnpTFipfbt1bI0gjRHWKX27euMVf1/ClhHJSJjJfbt8P59L99LGiXSRMFPy2wa81VG2BoU1HAmLppeSzx8RjwA/wk0MQFap9FtbyGqvINdew31G/OUK9a46nu1pMV4+l4IWPPeLKtyO4zQB7c3jiCutSY/a4ClSzvNQFRmU3bPMJh3646EfvzYqXGXfWkCe3iuH0rThCvmfO2iU8qyenldnqGPd775hT1glPOLrj8PN7+vLFUJmjgcFqUR8BzsLxw1tUj3VBFnTKudWXunVvqpH+M/tGg0IiuQcLgXsKgWkLtTGjuJzSgEq6XhAHRRCl32N4iYcgg4eadqKUG9ZnERZYQmiQM2SYKbeGNrXuDCWW6wfNZCMGpJrxIc8KM3Ztb0vqljpWG6v8NjaYx1J7RUGDYWKqood6WhjoFGKtMeuTx+lxG0C0G35RKK7d6JvrvW9x63yT7Kdt3sK+Z1K1636QBKo1PJr/LgcLAcv9rmmQJZW1S921y7nv/ZU3gUjmkefBlvfDGH1S2yObCm5yX8e9osJwS8U+/qv+KJmSsNKKFr+gFN6apshMoE1xIQS+6GQ+mxB5MdClXZIKhWdnKxNM9mVXY9NrOTspud9fDrW+Fak3TOBOTCbChKKj3oads1s6maTOirf+8Hh6v31sbuOlpphx7cD08vre2RpMVpD1/366tG1Nn6+JZsyp9zevb9aXEqTrrvJ7ESB6d0oSpxEoGW/16nXK5kESW8VK3G9Guj7fry+mN5d83R4SyGYcc5GtCM9t8FI2opvbzfn3Wo7W32JySyhSe69u1fbGuVjqtC3h9u+ZMyFbx6sRujG2tSk7yTGFvIxyV44aylCkIQjp84zFrD/zjmSc+hgZaJmUW7p7G1sZI6gbDFKtHHwyU7KYqmuCgwLet8LS7EgnktR11YXRS5vENUvigaVoBND0ECPtRAo2h4VmGKtZNoMad2jalJUG/0Ynm/P/E037gsIvGs6tXubLYu0j7cnj949mwNNupGynv5uzg8KHnXNPT+RvbrBqj71MP5PVyPh9ztlb/i+rnoywAJaHP3tev3w/nb8debn3kKosHG7m9xNoq0jo8pQaEizJNNEtrD2RZz23ncdhq15nQeqtWcpQi9NnmUoa+taWvfzu9t17HXzBLiIbjJgxFJexYlxAGJsxdS7g+Ey7PhLQjIYVL6P4n7ISVgFKmUA4mUyUad0AzY5ETJswPTzReDG9s3VNBtWfh6fXBesr6JkfRKiH39dJmioUmBzhpz5vb6XI7PZo915um4erepFBrz90uT+V5eXb5fWkTlW2t6dSWIygZ2CaYn49NpCMpw/xbsVOjllVACg/G37awFD6DpGwsvYnnBm1dOebQl3CY30a9Swg9e0yG83gJUKkB/3lAxQ/U8I16WRoaqGdoKIahpi7GU66bpyw6TxyPQsmGBoYaoORRmuBiYJ/QQAh+v5dA6YmRQk9RGyPYnuIwjlsXfn5KouQR1HubciDrJq5voOabQQZW2SN9E9fZQLW1rI0ZFFGdz92U0Vtl/gtWBraZx5WxjJmaysqNQaWhabYwJfDdZAm5aU1Nv9VvXv/izkpdJa+EflX5o6AcTcWtVXK5SmT/VhtXQ+vEVyWazZuthGFuy6oNIY7LPk1TGK9MFazkSW+4aTmszNnLInMr+p+nAw9k1CkCK6burMqyAVYIH5ofnJS5AV3XA1Mn7BB0A6qjwXNAe+TfDn++8EG8po4XeLStQNkX+nb4kwuEppNsVLoHmyDT5is1oQylIctXCDQOQFI2aLwdD6xGytTpKXRogpLv3o5bAtTHrR1g16T5K7naFqZpvMvm0EHtVZost+O341/tM2v0l2yFpKxDlMokXI1BEmV2OsqDoxbwxu3mjDJVGb9QTlaq99y997lTHoEkm4WJ6yx6oDIBah1unDJnHeVLp0XTNVqtukVef1Q03YzVuiF0a4Imk8PTjGQgaA+EE0GZclwTLvZl9QKmOLzZJpB9SnBGZ8KDrrsmGKdMOBgI/vLx/gdl0rTfUhs5Tgm0BPLHpyD7ZvU7ZUx7IHhy+402KuvG9OCyyU51SmO3E9+JZcMJPrfm5aZidQwb9XxVhvT+tpmFqRMatJlbt+OPy8/jIPpp6gp1Kld1NBRgodinURpS5et4JXyziNBaicouH0UkLzmPbRU8itSeudf3Q5t1Z5pAP3m5i7JVmdAUszkptVaT2Jeg7p2E6SI0mTaiOR4x6hWBMlIoEYXSTrAKC1u2GrOPT6D6XU+zTSnYYKiBqwE6ooNyHOEgUdaa2r0OFN/AWZj7NHHSSE/V1Z6STPx+31R3rB2gvN+ZkIlp60obmmaUKDuNwi2mqqld9r+0+yC7Bf6U6gArIHUGfDFAVYp6I5F/Yd/itEnf0DZ7J8EsWOGbuLhXBolJ2p1NP6wThallLyz0h3YP2MWzPbyZifTJl9jltNU2JmkvDSsNyhBEO/NAilTV02SVaSptByHB+GGzST73KKqOR5Lo5kxX9pQRRHen+tok3ytHKCi6NJmm85v6oOnkCiGLNhlTyVtb0f1jqI9cr+QHrKVUm9BQHY84qUUZV593qjI1y9ZWzLYipWfanL6fvVFsSiMobtMxR5vW2wnu31cDOZX9X/puXe3xVT1XHFGj9mD+pg+YqXOhrDJdo5PavzhouKdXYlkU3L8vaJCnV5aTUJpjGzBqCnuiMoDPUyZb6llPkUDKsn5yC0DJ0q9vtFXZJVib5AlNzwyvdudZt9ROamMtqP0c1mCuWQl1XjlawEre9Hed60xtxFplNkrXgrlfB03aInzSAuO0qG5tlhAEJvQBkiEojpc+edZ377A5LEFZm99182uXSvUOsXL5k4971CbQ1F0QrDKXcBfaOZNQb44GlFH+uuugsJRrPTPwyYNHyg8G26iY/7xENnigekFYwqDMTJs1XDS1/6vNCK4FCouraVEB6tDP1sKxJYHVr8bcBUP4hZ7D51SgewbNbCp16HsTxka+NhayPmRCwjoUXYfvP/lDpXdjm3ejvr1rRtuP26/D1wdvT9j0LFWSOynXtTX+9Lf2lPPl8tYyvCZUrsxL78f7mLpDn8eqHeoGR5PF9+5shjI3grIqu8+xrS2hFaOEa9L+iOdb+vJ+fCl5anmqPCsIbUKdynxbbIpapma0GtC0l/3MfZK8r21jxNh0yA6fuMO+O0zjAC7KLv5ZltCFxDWu36K2nx4ft3Mz84aHMqAJ40a1xj4F/90khyacG/Vq+XE778Uf/Q032QXK5JGujWtteQBmYQGuNECDkpoeUgu96KnID/MHMWqbMCtq3Ru0wR5XpDTkKri3N2ak8claUHR5P76MnnxTg6YdEZklcupZPWxACw0wqgu4/QAVAQdl3/tWbwTLqClpB63pqqr/gqb3JGg3jmnBFzQ9fUALK5nMJxRppdbOWNDGUSZT+OrcR8xt/YTGjRtKmyZPTBsBla3iOshhgrICa5f1ZJqtvKY3qDJ3rZVHjLQ/rKGZ8Ru0PFYy3psREkEbMOrn8lQvGbOHDLlXhF0C7UiUsLlnNgClA9NoXxNp0p521qRo+9evQ5vDNrD5m17hQRsIujy4nGrx0phCZZpVN6vb1h0cgjKH5n483NqyP1c3IUmeEtrRv8dOUQmzchPBPG1pQfnSotptUYFvbDWjdKbuzwXD+sVWchzdoKUjkGbLG0ftL7XzLO/HevZZzh3eijjaRJj6pNcKrvtADCXXfXJ0anw/PrY81qHQur2sbueTynZsbdcFTBELmHQVMCi0NyGzVOJgKW+c2sAaqzRg798vH+9vL0LWSuMCGqW/dr/cHl9au7o+ErVOxNMlYY+nXqPal5cdm8Z1bIAMZUPt3U/QYMJkTsLgK5VEkDFIeRlRGVor9/P0s1oXtN0TlaJurNoCmkyaqKy0vH8I7cvqtGqyhx2V21H7YOP25mbKuPP2fXIiYJPlRS/FKTvhoWjetqzJ6qKKQqcsvUWpYt+ypl7cUQWGU+Zkc9ldC7MmM1KZwbQJ7Tp71ckESXvefHTN+0ITEteO0rx/XK+X2+Pl2aq7pWP1rqfV/V/n12YB1Qq7v2GjnAn7ONy+HR/P4WutUVCnnShZ0ONw/4O9RGja0wflSfkUtDVI2Q/M3vpsqzJ0y+Qput8YoclRjHSgJKXxXTpUtCGxOq8Iq52oI5XH/CXAbOKAey11xA/on0e0ciPGtCN2vImYxBGpGBC/K5HnjxmwCbfshLt4Wgn3UVIWdfXeF7Qjo4eKqxy1KPd0JFDWlKEmX4Z8blM73dQ1dJ9TTWnc2inu5ZnLW2nTE27P5lYm0m2SeQpUHVvA5DRAsxaoGbzbz4x94AX1SfV7XzGlqb3dzfnyePl6+Ti3hXvNFvkZcVL6Tp3jp3TmijTBJ25GSYTwGWnCG4WmpXlQHolFHDtVGixmtBtSlsShQ90XIym7Ycq9bKDp4Bg+padsdGp1FuDaVrr48ngm0zA17UlQevv3DnDTNCsoB3I8vt8ufwpF+bb2+jyWNtDomYB5eSsmLK5Kr+BZIdwal01TbaUz8JRyaUuvbJ2t4NF8pO7NAf3MFU+gVRk6f37X/XH4cW3PoDohD50qKqQFdKoomXZv50zzOExUNnamO/h6uzS97F0dHktK25CkPS6trDqJQGkSPk4PFk2vz+agDMk/Ln8c254lTRQG4wIr+k6rMp8wj9aVWkY1EwyoW7elmJalViCWiqlpVoqxdGZbardMQzyMJefP7j03qTbIKjv8dXmmdQ0PNeT0SBdoEhSdhtS2Ou2DUahIx9NnnkrEvTLEkDNU5Yw0aPxNH8g8oQe753yD0kv6OJdAc3s0N6lvNCBGmQ2KIjkJMr6JllJthDJU1G/JdTVyorewx7a2P7D1qcW3aZFCWXxcFjvXUGd8S60EMM2HpotRO3CHpizZaRHN1Ii240qRuIWCuwtl4S9UpLeQa75QZv5CLWIXMsfMXnlAb93QWzduf6o6t748Ve6/QtPrUOlzFlHMOGg6pigTqzdBbCCWrXsNeXypgE8VEkXe8BClGMdekEKzlYyjQjpHgTm399qlx0w5AcbDXtZBV6k9A7XHNrBPG6CayED6Gem/i8rsnvI4nqtp7x9EWJ0VJFWPe48tLkoblpXQetP0OyWvySgx3sftvcvn903S1L5GjdK8+bi1aQRNewNPLVmJMxviywai+ityC677laWleWiaytBwQKvsLf5xP16uh9amqrvxYdyMyj6Dkth080TrpN1oyd/GMi88k2j8T6STH1fTSrNCKJBqYE98wUlnJiiHuD9v8eX443Bqp8HXkU9vybjDIi2tUjyFs+BN04MxKItasiA+HbM2oL2l2AeGPJRWbhadxTSy6/ePBhD19A5KO6zIFp3sxmDQC5Nc7PoxKGtUs6yu/qhOuEKvAdDkAiV5R9Gs9qgOSn5CNWV7qw4EoEW3KtvYTIfzmsbXVdLPp0QhWtE0Wf7MjsGDC82UUO2JkZs/9yFEaJolb9FApbRnK+nD9Xq7/Dy8d8GGpnVxVFbVVkON2yy86iWg06o1UYZzkk2jNUp4X4kTAryNB0/HTlJm4Et9gqFpmhyV04Ywta2V1HTeVeavdqMT6yASBYjxDIqYGZyoKFwZ45NmRZvmu5QtHrMgngjcpDAqU782QV0ScE3ulFlCT1FSnKppE6MMoP00r5cf18Nj5Hk2/eu2YR65pycZuI6Mg30GsrKzDH356f7y5eP0/nhhw32bgVFuD0jb3eGm+1BWC9B3dmdy/fwcWpSOSIHbbX9Lf1HEwtMwKKBZAJTNZ0AZHaWb462lTd3fmwZPORpq5qgzHFlTxtOb8fvgNArAAN06KPtH0c1JyRDQ+AxAMw1oCrihCXVm98+CshaMvrpLVV3abgF7PIQePT0FUE5Q/fNwelpUt5fTuW04W9OxbTtSC/x6uXUQtOGySLUsrjFK4KFxezulWchKXygWtlD405CnaZSxpz+/szhh7b6TQgMuO1Du9sLUk6a/pKYB3H///tv1dD2+n87H3/75X//973//f6O+2Bk="; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css index 18b4f8fe..ec257d51 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -1,98 +1,288 @@ -:root { - /* Light */ - --light-color-background: #f2f4f8; - --light-color-background-secondary: #eff0f1; - --light-color-warning-text: #222; - --light-color-background-warning: #e6e600; - --light-color-icon-background: var(--light-color-background); - --light-color-accent: #c5c7c9; - --light-color-active-menu-item: var(--light-color-accent); - --light-color-text: #222; - --light-color-text-aside: #6e6e6e; - --light-color-link: #1f70c2; - - --light-color-ts-project: #b111c9; - --light-color-ts-module: var(--light-color-ts-project); - --light-color-ts-namespace: var(--light-color-ts-project); - --light-color-ts-enum: #7e6f15; - --light-color-ts-enum-member: var(--light-color-ts-enum); - --light-color-ts-variable: #4760ec; - --light-color-ts-function: #572be7; - --light-color-ts-class: #1f70c2; - --light-color-ts-interface: #108024; - --light-color-ts-constructor: var(--light-color-ts-class); - --light-color-ts-property: var(--light-color-ts-variable); - --light-color-ts-method: var(--light-color-ts-function); - --light-color-ts-call-signature: var(--light-color-ts-method); - --light-color-ts-index-signature: var(--light-color-ts-property); - --light-color-ts-constructor-signature: var(--light-color-ts-constructor); - --light-color-ts-parameter: var(--light-color-ts-variable); - /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); - --light-color-ts-accessor: var(--light-color-ts-property); - --light-color-ts-get-signature: var(--light-color-ts-accessor); - --light-color-ts-set-signature: var(--light-color-ts-accessor); - /* object literal not included as it is not used and will be removed in 0.25 */ - --light-color-ts-type-alias: #d51270; - /* reference not included as links will be colored with the kind that it points to */ - - --light-external-icon: url("data:image/svg+xml;utf8,"); - --light-color-scheme: light; - - /* Dark */ - --dark-color-background: #2b2e33; - --dark-color-background-secondary: #1e2024; - --dark-color-background-warning: #bebe00; - --dark-color-warning-text: #222; - --dark-color-icon-background: var(--dark-color-background-secondary); - --dark-color-accent: #9096a2; - --dark-color-active-menu-item: #5d5d6a; - --dark-color-text: #f5f5f5; - --dark-color-text-aside: #dddddd; - --dark-color-link: #00aff4; - - --dark-color-ts-project: #e358ff; - --dark-color-ts-module: var(--dark-color-ts-project); - --dark-color-ts-namespace: var(--dark-color-ts-project); - --dark-color-ts-enum: #f4d93e; - --dark-color-ts-enum-member: var(--dark-color-ts-enum); - --dark-color-ts-variable: #798dff; - --dark-color-ts-function: #a280ff; - --dark-color-ts-class: #8ac4ff; - --dark-color-ts-interface: #6cff87; - --dark-color-ts-constructor: var(--dark-color-ts-class); - --dark-color-ts-property: var(--dark-color-ts-variable); - --dark-color-ts-method: var(--dark-color-ts-function); - --dark-color-ts-call-signature: var(--dark-color-ts-method); - --dark-color-ts-index-signature: var(--dark-color-ts-property); - --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); - --dark-color-ts-parameter: var(--dark-color-ts-variable); - /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); - --dark-color-ts-accessor: var(--dark-color-ts-property); - --dark-color-ts-get-signature: var(--dark-color-ts-accessor); - --dark-color-ts-set-signature: var(--dark-color-ts-accessor); - /* object literal not included as it is not used and will be removed in 0.25 */ - --dark-color-ts-type-alias: #ff6492; - /* reference not included as links will be colored with the kind that it points to */ - - --dark-external-icon: url("data:image/svg+xml;utf8,"); - --dark-color-scheme: dark; -} +@layer typedoc { + :root { + --dim-toolbar-contents-height: 2.5rem; + --dim-toolbar-border-bottom-width: 1px; + --dim-header-height: calc( + var(--dim-toolbar-border-bottom-width) + + var(--dim-toolbar-contents-height) + ); + + /* 0rem For mobile; unit is required for calculation in `calc` */ + --dim-container-main-margin-y: 0rem; + + --dim-footer-height: 3.5rem; + + --modal-animation-duration: 0.2s; + } + + :root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + /* Not to be confused with [:active](https://developer.mozilla.org/en-US/docs/Web/CSS/:active) */ + --light-color-background-active: #d6d8da; + --light-color-background-warning: #e6e600; + --light-color-warning-text: #222; + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-background-active); + --light-color-text: #222; + --light-color-contrast-text: #000; + --light-color-text-aside: #5e5e5e; + + --light-color-icon-background: var(--light-color-background); + --light-color-icon-text: var(--light-color-text); + + --light-color-comment-tag-text: var(--light-color-text); + --light-color-comment-tag: var(--light-color-background); + + --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: #9f5f30; + --light-color-ts-method: #be3989; + --light-color-ts-reference: #ff4d82; + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var( + --light-color-ts-constructor + ); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: #c73c3c; + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + --light-color-document: #000000; + + --light-color-alert-note: #0969d9; + --light-color-alert-tip: #1a7f37; + --light-color-alert-important: #8250df; + --light-color-alert-warning: #9a6700; + --light-color-alert-caution: #cf222e; + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + } -@media (prefers-color-scheme: light) { :root { + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + /* Not to be confused with [:active](https://developer.mozilla.org/en-US/docs/Web/CSS/:active) */ + --dark-color-background-active: #5d5d6a; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: var(--dark-color-background-active); + --dark-color-text: #f5f5f5; + --dark-color-contrast-text: #ffffff; + --dark-color-text-aside: #dddddd; + + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-icon-text: var(--dark-color-text); + + --dark-color-comment-tag-text: var(--dark-color-text); + --dark-color-comment-tag: var(--dark-color-background); + + --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: #ff984d; + --dark-color-ts-method: #ff4db8; + --dark-color-ts-reference: #ff4d82; + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: #ff6060; + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + --dark-color-document: #ffffff; + + --dark-color-alert-note: #0969d9; + --dark-color-alert-tip: #1a7f37; + --dark-color-alert-important: #8250df; + --dark-color-alert-warning: #9a6700; + --dark-color-alert-caution: #cf222e; + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; + } + + @media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var( + --light-color-background-secondary + ); + --color-background-active: var(--light-color-background-active); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-contrast-text: var(--light-color-contrast-text); + --color-text-aside: var(--light-color-text-aside); + + --color-icon-background: var(--light-color-icon-background); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --color-alert-note: var(--light-color-alert-note); + --color-alert-tip: var(--light-color-alert-tip); + --color-alert-important: var(--light-color-alert-important); + --color-alert-warning: var(--light-color-alert-warning); + --color-alert-caution: var(--light-color-alert-caution); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } + } + + @media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var( + --dark-color-background-secondary + ); + --color-background-active: var(--dark-color-background-active); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-contrast-text: var(--dark-color-contrast-text); + --color-text-aside: var(--dark-color-text-aside); + + --color-icon-background: var(--dark-color-icon-background); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --color-alert-note: var(--dark-color-alert-note); + --color-alert-tip: var(--dark-color-alert-tip); + --color-alert-important: var(--dark-color-alert-important); + --color-alert-warning: var(--dark-color-alert-warning); + --color-alert-caution: var(--dark-color-alert-caution); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } + } + + :root[data-theme="light"] { --color-background: var(--light-color-background); --color-background-secondary: var(--light-color-background-secondary); + --color-background-active: var(--light-color-background-active); --color-background-warning: var(--light-color-background-warning); --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); + --color-contrast-text: var(--light-color-contrast-text); --color-text-aside: var(--light-color-text-aside); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -104,6 +294,7 @@ --color-ts-constructor: var(--light-color-ts-constructor); --color-ts-property: var(--light-color-ts-property); --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); --color-ts-call-signature: var(--light-color-ts-call-signature); --color-ts-index-signature: var(--light-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -115,25 +306,40 @@ --color-ts-get-signature: var(--light-color-ts-get-signature); --color-ts-set-signature: var(--light-color-ts-set-signature); --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --color-note: var(--light-color-note); + --color-tip: var(--light-color-tip); + --color-important: var(--light-color-important); + --color-warning: var(--light-color-warning); + --color-caution: var(--light-color-caution); --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); } -} -@media (prefers-color-scheme: dark) { - :root { + :root[data-theme="dark"] { --color-background: var(--dark-color-background); --color-background-secondary: var(--dark-color-background-secondary); + --color-background-active: var(--dark-color-background-active); --color-background-warning: var(--dark-color-background-warning); --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); + --color-contrast-text: var(--dark-color-contrast-text); --color-text-aside: var(--dark-color-text-aside); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -145,6 +351,7 @@ --color-ts-constructor: var(--dark-color-ts-constructor); --color-ts-property: var(--dark-color-ts-property); --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); --color-ts-call-signature: var(--dark-color-ts-call-signature); --color-ts-index-signature: var(--dark-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -156,1212 +363,1286 @@ --color-ts-get-signature: var(--dark-color-ts-get-signature); --color-ts-set-signature: var(--dark-color-ts-set-signature); --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --color-note: var(--dark-color-note); + --color-tip: var(--dark-color-tip); + --color-important: var(--dark-color-important); + --color-warning: var(--dark-color-warning); + --color-caution: var(--dark-color-caution); --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); } -} - -html { - color-scheme: var(--color-scheme); -} -body { - margin: 0; -} + html { + color-scheme: var(--color-scheme); + @media (prefers-reduced-motion: no-preference) { + scroll-behavior: smooth; + } + } -:root[data-theme="light"] { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-background-warning: var(--light-color-background-warning); - --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-active-menu-item: var(--light-color-active-menu-item); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - - --color-ts-module: var(--light-color-ts-module); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-enum-member: var(--light-color-ts-enum-member); - --color-ts-variable: var(--light-color-ts-variable); - --color-ts-function: var(--light-color-ts-function); - --color-ts-class: var(--light-color-ts-class); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-constructor: var(--light-color-ts-constructor); - --color-ts-property: var(--light-color-ts-property); - --color-ts-method: var(--light-color-ts-method); - --color-ts-call-signature: var(--light-color-ts-call-signature); - --color-ts-index-signature: var(--light-color-ts-index-signature); - --color-ts-constructor-signature: var( - --light-color-ts-constructor-signature - ); - --color-ts-parameter: var(--light-color-ts-parameter); - --color-ts-type-parameter: var(--light-color-ts-type-parameter); - --color-ts-accessor: var(--light-color-ts-accessor); - --color-ts-get-signature: var(--light-color-ts-get-signature); - --color-ts-set-signature: var(--light-color-ts-set-signature); - --color-ts-type-alias: var(--light-color-ts-type-alias); - - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); -} + *:focus-visible, + .tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); + } -:root[data-theme="dark"] { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-background-warning: var(--dark-color-background-warning); - --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-active-menu-item: var(--dark-color-active-menu-item); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - - --color-ts-module: var(--dark-color-ts-module); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-enum-member: var(--dark-color-ts-enum-member); - --color-ts-variable: var(--dark-color-ts-variable); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-constructor: var(--dark-color-ts-constructor); - --color-ts-property: var(--dark-color-ts-property); - --color-ts-method: var(--dark-color-ts-method); - --color-ts-call-signature: var(--dark-color-ts-call-signature); - --color-ts-index-signature: var(--dark-color-ts-index-signature); - --color-ts-constructor-signature: var( - --dark-color-ts-constructor-signature - ); - --color-ts-parameter: var(--dark-color-ts-parameter); - --color-ts-type-parameter: var(--dark-color-ts-type-parameter); - --color-ts-accessor: var(--dark-color-ts-accessor); - --color-ts-get-signature: var(--dark-color-ts-get-signature); - --color-ts-set-signature: var(--dark-color-ts-set-signature); - --color-ts-type-alias: var(--dark-color-ts-type-alias); - - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); -} + .always-visible, + .always-visible .tsd-signatures { + display: inherit !important; + } -.always-visible, -.always-visible .tsd-signatures { - display: inherit !important; -} + h1, + h2, + h3, + h4, + h5, + h6 { + line-height: 1.2; + } -h1, -h2, -h3, -h4, -h5, -h6 { - line-height: 1.2; -} + h1 { + font-size: 1.875rem; + margin: 0.67rem 0; + } -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { - text-decoration: none; - color: var(--color-text); -} + h2 { + font-size: 1.5rem; + margin: 0.83rem 0; + } -h1 { - font-size: 1.875rem; - margin: 0.67rem 0; -} + h3 { + font-size: 1.25rem; + margin: 1rem 0; + } -h2 { - font-size: 1.5rem; - margin: 0.83rem 0; -} + h4 { + font-size: 1.05rem; + margin: 1.33rem 0; + } -h3 { - font-size: 1.25rem; - margin: 1rem 0; -} + h5 { + font-size: 1rem; + margin: 1.5rem 0; + } -h4 { - font-size: 1.05rem; - margin: 1.33rem 0; -} + h6 { + font-size: 0.875rem; + margin: 2.33rem 0; + } -h5 { - font-size: 1rem; - margin: 1.5rem 0; -} + dl, + menu, + ol, + ul { + margin: 1em 0; + } -h6 { - font-size: 0.875rem; - margin: 2.33rem 0; -} + dd { + margin: 0 0 0 34px; + } -.uppercase { - text-transform: uppercase; -} + .container { + max-width: 1700px; + padding: 0 2rem; + } -dl, -menu, -ol, -ul { - margin: 1em 0; -} + /* Footer */ + footer { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: var(--dim-footer-height); + } + footer > p { + margin: 0 1em; + } -dd { - margin: 0 0 0 40px; -} + .container-main { + margin: var(--dim-container-main-margin-y) auto; + /* toolbar, footer, margin */ + min-height: calc( + 100svh - var(--dim-header-height) - var(--dim-footer-height) - + 2 * var(--dim-container-main-margin-y) + ); + } -.container { - max-width: 1700px; - padding: 0 2rem; -} + @keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + @keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } + } + @keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } + } + @keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } + } + body { + background: var(--color-background); + font-family: + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + "Noto Sans", + Helvetica, + Arial, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji"; + font-size: 16px; + color: var(--color-text); + margin: 0; + } -/* Footer */ -.tsd-generator { - border-top: 1px solid var(--color-accent); - padding-top: 1rem; - padding-bottom: 1rem; - max-height: 3.5rem; -} + a { + color: var(--color-link); + text-decoration: none; + } + a:hover { + text-decoration: underline; + } + a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; + } + a.tsd-anchor-link { + color: var(--color-text); + } + :target { + scroll-margin-block: calc(var(--dim-header-height) + 0.5rem); + } -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; -} + math[display="block"] { + position: relative; + padding: 10px; + border: 1px solid var(--color-accent); + border-radius: 0.8em; + margin-bottom: 8px; + } -.container-main { - margin: 0 auto; - /* toolbar, footer, margin */ - min-height: calc(100vh - 41px - 56px - 4rem); -} + code, + pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; + } -@keyframes fade-in { - from { + pre { + position: relative; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); + margin-bottom: 8px; + } + pre code { + padding: 0; + font-size: 100%; + } + pre > button { + position: absolute; + top: 10px; + right: 10px; opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; } - to { + pre:hover > button, + pre > button.visible, + pre > button:focus-visible { opacity: 1; } -} -@keyframes fade-out { - from { - opacity: 1; - visibility: visible; + + blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; } - to { - opacity: 0; + + img { + max-width: 100%; } -} -@keyframes fade-in-delayed { - 0% { - opacity: 0; + + * { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); } - 33% { - opacity: 0; + + *::-webkit-scrollbar { + width: 0.75rem; } - 100% { - opacity: 1; + + *::-webkit-scrollbar-track { + background: var(--color-icon-background); } -} -@keyframes fade-out-delayed { - 0% { - opacity: 1; - visibility: visible; + + *::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); } - 66% { - opacity: 0; + + dialog { + border: none; + outline: none; + padding: 0; + background-color: var(--color-background); } - 100% { - opacity: 0; + dialog::backdrop { + display: none; } -} -@keyframes pop-in-from-right { - from { - transform: translate(100%, 0); + #tsd-overlay { + background-color: rgba(0, 0, 0, 0.5); + position: fixed; + z-index: 9999; + top: 0; + left: 0; + right: 0; + bottom: 0; + animation: fade-in var(--modal-animation-duration) forwards; } - to { - transform: translate(0, 0); + #tsd-overlay.closing { + animation-name: fade-out; } -} -@keyframes pop-out-to-right { - from { - transform: translate(0, 0); - visibility: visible; + + .tsd-typography { + line-height: 1.333em; } - to { - transform: translate(100%, 0); + .tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; + } + .tsd-typography .tsd-index-panel h3, + .tsd-index-panel .tsd-typography h3, + .tsd-typography h4, + .tsd-typography h5, + .tsd-typography h6 { + font-size: 1em; + } + .tsd-typography h5, + .tsd-typography h6 { + font-weight: normal; + } + .tsd-typography p, + .tsd-typography ul, + .tsd-typography ol { + margin: 1em 0; + } + .tsd-typography table { + border-collapse: collapse; + border: none; + } + .tsd-typography td, + .tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); + } + .tsd-typography thead, + .tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); } -} -body { - background: var(--color-background); - font-family: "Segoe UI", sans-serif; - font-size: 16px; - color: var(--color-text); -} -a { - color: var(--color-link); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a.external[target="_blank"] { - background-image: var(--external-icon); - background-position: top 3px right; - background-repeat: no-repeat; - padding-right: 13px; -} + .tsd-alert { + padding: 8px 16px; + margin-bottom: 16px; + border-left: 0.25em solid var(--alert-color); + } + .tsd-alert blockquote > :last-child, + .tsd-alert > :last-child { + margin-bottom: 0; + } + .tsd-alert-title { + color: var(--alert-color); + display: inline-flex; + align-items: center; + } + .tsd-alert-title span { + margin-left: 4px; + } -code, -pre { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - padding: 0.2em; - margin: 0; - font-size: 0.875rem; - border-radius: 0.8em; -} + .tsd-alert-note { + --alert-color: var(--color-alert-note); + } + .tsd-alert-tip { + --alert-color: var(--color-alert-tip); + } + .tsd-alert-important { + --alert-color: var(--color-alert-important); + } + .tsd-alert-warning { + --alert-color: var(--color-alert-warning); + } + .tsd-alert-caution { + --alert-color: var(--color-alert-caution); + } -pre { - position: relative; - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; - padding: 10px; - border: 1px solid var(--color-accent); -} -pre code { - padding: 0; - font-size: 100%; -} -pre > button { - position: absolute; - top: 10px; - right: 10px; - opacity: 0; - transition: opacity 0.1s; - box-sizing: border-box; -} -pre:hover > button, -pre > button.visible { - opacity: 1; -} + .tsd-breadcrumb { + margin: 0; + margin-top: 1rem; + padding: 0; + color: var(--color-text-aside); + } + .tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; + } + .tsd-breadcrumb a:hover { + text-decoration: underline; + } + .tsd-breadcrumb li { + display: inline; + } + .tsd-breadcrumb li:after { + content: " / "; + } -blockquote { - margin: 1em 0; - padding-left: 1em; - border-left: 4px solid gray; -} + .tsd-comment-tags { + display: flex; + flex-direction: column; + } + dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; + } + dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; + } + dl.tsd-comment-tag-group dd { + margin: 0; + } + code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; + } + h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; + } -.tsd-typography { - line-height: 1.333em; -} -.tsd-typography ul { - list-style: square; - padding: 0 0 0 20px; - margin: 0; -} -.tsd-typography h4, -.tsd-typography .tsd-index-panel h3, -.tsd-index-panel .tsd-typography h3, -.tsd-typography h5, -.tsd-typography h6 { - font-size: 1em; - margin: 0; -} -.tsd-typography h5, -.tsd-typography h6 { - font-weight: normal; -} -.tsd-typography p, -.tsd-typography ul, -.tsd-typography ol { - margin: 1em 0; -} + dl.tsd-comment-tag-group dd:before, + dl.tsd-comment-tag-group dd:after { + content: " "; + } + dl.tsd-comment-tag-group dd pre, + dl.tsd-comment-tag-group dd:after { + clear: both; + } + dl.tsd-comment-tag-group p { + margin: 0; + } -.tsd-breadcrumb { - margin: 0; - padding: 0; - color: var(--color-text-aside); -} -.tsd-breadcrumb a { - color: var(--color-text-aside); - text-decoration: none; -} -.tsd-breadcrumb a:hover { - text-decoration: underline; -} -.tsd-breadcrumb li { - display: inline; -} -.tsd-breadcrumb li:after { - content: " / "; -} + .tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; + } + .tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; + } -.tsd-comment-tags { - display: flex; - flex-direction: column; -} -dl.tsd-comment-tag-group { - display: flex; - align-items: center; - overflow: hidden; - margin: 0.5em 0; -} -dl.tsd-comment-tag-group dt { - display: flex; - margin-right: 0.5em; - font-size: 0.875em; - font-weight: normal; -} -dl.tsd-comment-tag-group dd { - margin: 0; -} -code.tsd-tag { - padding: 0.25em 0.4em; - border: 0.1em solid var(--color-accent); - margin-right: 0.25em; - font-size: 70%; -} -h1 code.tsd-tag:first-of-type { - margin-left: 0.25em; -} + .tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; + } + .tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; + } + .tsd-filter-input { + display: flex; + width: -moz-fit-content; + width: fit-content; + align-items: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + } + .tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; + } + .tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; + } + .tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; + } + .tsd-filter-input input[type="checkbox"]:focus-visible + svg { + outline: 2px solid var(--color-focus-outline); + } + .tsd-checkbox-background { + fill: var(--color-accent); + } + input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); + } + .tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; + } + .tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); + } -dl.tsd-comment-tag-group dd:before, -dl.tsd-comment-tag-group dd:after { - content: " "; -} -dl.tsd-comment-tag-group dd pre, -dl.tsd-comment-tag-group dd:after { - clear: both; -} -dl.tsd-comment-tag-group p { - margin: 0; -} + .settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; + } -.tsd-panel.tsd-comment .lead { - font-size: 1.1em; - line-height: 1.333em; - margin-bottom: 2em; -} -.tsd-panel.tsd-comment .lead:last-child { - margin-bottom: 0; -} + .tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; + } -.tsd-filter-visibility h4 { - font-size: 1rem; - padding-top: 0.75rem; - padding-bottom: 0.5rem; - margin: 0; -} -.tsd-filter-item:not(:last-child) { - margin-bottom: 0.5rem; -} -.tsd-filter-input { - display: flex; - width: fit-content; - width: -moz-fit-content; - align-items: center; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - cursor: pointer; -} -.tsd-filter-input input[type="checkbox"] { - cursor: pointer; - position: absolute; - width: 1.5em; - height: 1.5em; - opacity: 0; -} -.tsd-filter-input input[type="checkbox"]:disabled { - pointer-events: none; -} -.tsd-filter-input svg { - cursor: pointer; - width: 1.5em; - height: 1.5em; - margin-right: 0.5em; - border-radius: 0.33em; - /* Leaving this at full opacity breaks event listeners on Firefox. - Don't remove unless you know what you're doing. */ - opacity: 0.99; -} -.tsd-filter-input input[type="checkbox"]:focus + svg { - transform: scale(0.95); -} -.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { - transform: scale(1); -} -.tsd-checkbox-background { - fill: var(--color-accent); -} -input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { - stroke: var(--color-text); -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { - fill: var(--color-background); - stroke: var(--color-accent); - stroke-width: 0.25rem; -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { - stroke: var(--color-accent); -} + .tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; + } -.tsd-theme-toggle { - padding-top: 0.75rem; -} -.tsd-theme-toggle > h4 { - display: inline; - vertical-align: middle; - margin-right: 0.75rem; -} + .tsd-hierarchy h4 label:hover span { + text-decoration: underline; + } -.tsd-hierarchy { - list-style: square; - margin: 0; -} -.tsd-hierarchy .target { - font-weight: bold; -} + .tsd-hierarchy { + list-style: square; + margin: 0; + } + .tsd-hierarchy-target { + font-weight: bold; + } + .tsd-hierarchy-toggle { + color: var(--color-link); + cursor: pointer; + } -.tsd-panel-group.tsd-index-group { - margin-bottom: 0; -} -.tsd-index-panel .tsd-index-list { - list-style: none; - line-height: 1.333em; - margin: 0; - padding: 0.25rem 0 0 0; - overflow: hidden; - display: grid; - grid-template-columns: repeat(3, 1fr); - column-gap: 1rem; - grid-template-rows: auto; -} -@media (max-width: 1024px) { - .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(2, 1fr); + .tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); + } + .tsd-full-hierarchy, + .tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; + } + .tsd-full-hierarchy ul { + padding-left: 1.5rem; + } + .tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); + } + .tsd-full-hierarchy svg[data-dropdown] { + cursor: pointer; + } + .tsd-full-hierarchy svg[data-dropdown="false"] { + transform: rotate(-90deg); + } + .tsd-full-hierarchy svg[data-dropdown="false"] ~ ul { + display: none; + } + + .tsd-panel-group.tsd-index-group { + margin-bottom: 0; } -} -@media (max-width: 768px) { .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(1, 1fr); + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; + } + @media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } + } + @media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } + } + .tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; } -} -.tsd-index-panel .tsd-index-list li { - -webkit-page-break-inside: avoid; - -moz-page-break-inside: avoid; - -ms-page-break-inside: avoid; - -o-page-break-inside: avoid; - page-break-inside: avoid; -} -.tsd-flag { - display: inline-block; - padding: 0.25em 0.4em; - border-radius: 4px; - color: var(--color-comment-tag-text); - background-color: var(--color-comment-tag); - text-indent: 0; - font-size: 75%; - line-height: 1; - font-weight: normal; -} + .tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; + } -.tsd-anchor { - position: relative; - top: -100px; -} + .tsd-anchor { + position: relative; + top: -100px; + } -.tsd-member { - position: relative; -} -.tsd-member .tsd-anchor + h3 { - display: flex; - align-items: center; - margin-top: 0; - margin-bottom: 0; - border-bottom: none; -} + .tsd-member { + position: relative; + } + .tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; + } -.tsd-navigation.settings { - margin: 1rem 0; -} -.tsd-navigation > a, -.tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); -} -.tsd-navigation a, -.tsd-navigation summary > span, -.tsd-page-navigation a { - display: inline-flex; - align-items: center; - padding: 0.25rem; - color: var(--color-text); - text-decoration: none; - box-sizing: border-box; -} -.tsd-navigation a.current, -.tsd-page-navigation a.current { - background: var(--color-active-menu-item); -} -.tsd-navigation a:hover, -.tsd-page-navigation a:hover { - text-decoration: underline; -} -.tsd-navigation ul, -.tsd-page-navigation ul { - margin-top: 0; - margin-bottom: 0; - padding: 0; - list-style: none; -} -.tsd-navigation li, -.tsd-page-navigation li { - padding: 0; - max-width: 100%; -} -.tsd-nested-navigation { - margin-left: 3rem; -} -.tsd-nested-navigation > li > details { - margin-left: -1.5rem; -} -.tsd-small-nested-navigation { - margin-left: 1.5rem; -} -.tsd-small-nested-navigation > li > details { - margin-left: -1.5rem; -} - -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); -} - -.tsd-page-navigation ul { - padding-left: 1.75rem; -} - -#tsd-sidebar-links a { - margin-top: 0; - margin-bottom: 0.5rem; - line-height: 1.25rem; -} -#tsd-sidebar-links a:last-of-type { - margin-bottom: 0; -} - -a.tsd-index-link { - padding: 0.25rem 0 !important; - font-size: 1rem; - line-height: 1.25rem; - display: inline-flex; - align-items: center; - color: var(--color-text); -} -.tsd-accordion-summary { - list-style-type: none; /* hide marker on non-safari */ - outline: none; /* broken on safari, so just hide it */ -} -.tsd-accordion-summary::-webkit-details-marker { - display: none; /* hide marker on safari */ -} -.tsd-accordion-summary, -.tsd-accordion-summary a { - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - - cursor: pointer; -} -.tsd-accordion-summary a { - width: calc(100% - 1.5rem); -} -.tsd-accordion-summary > * { - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} -.tsd-index-accordion .tsd-accordion-summary > svg { - margin-left: 0.25rem; -} -.tsd-index-content > :not(:first-child) { - margin-top: 0.75rem; -} -.tsd-index-heading { - margin-top: 1.5rem; - margin-bottom: 0.75rem; -} - -.tsd-kind-icon { - margin-right: 0.5rem; - width: 1.25rem; - height: 1.25rem; - min-width: 1.25rem; - min-height: 1.25rem; -} -.tsd-kind-icon path { - transform-origin: center; - transform: scale(1.1); -} -.tsd-signature > .tsd-kind-icon { - margin-right: 0.8rem; -} - -.tsd-panel { - margin-bottom: 2.5rem; -} -.tsd-panel.tsd-member { - margin-bottom: 4rem; -} -.tsd-panel:empty { - display: none; -} -.tsd-panel > h1, -.tsd-panel > h2, -.tsd-panel > h3 { - margin: 1.5rem -1.5rem 0.75rem -1.5rem; - padding: 0 1.5rem 0.75rem 1.5rem; -} -.tsd-panel > h1.tsd-before-signature, -.tsd-panel > h2.tsd-before-signature, -.tsd-panel > h3.tsd-before-signature { - margin-bottom: 0; - border-bottom: none; -} - -.tsd-panel-group { - margin: 4rem 0; -} -.tsd-panel-group.tsd-index-group { - margin: 2rem 0; -} -.tsd-panel-group.tsd-index-group details { - margin: 2rem 0; -} - -#tsd-search { - transition: background-color 0.2s; -} -#tsd-search .title { - position: relative; - z-index: 2; -} -#tsd-search .field { - position: absolute; - left: 0; - top: 0; - right: 2.5rem; - height: 100%; -} -#tsd-search .field input { - box-sizing: border-box; - position: relative; - top: -50px; - z-index: 1; - width: 100%; - padding: 0 10px; - opacity: 0; - outline: 0; - border: 0; - background: transparent; - color: var(--color-text); -} -#tsd-search .field label { - position: absolute; - overflow: hidden; - right: -40px; -} -#tsd-search .field input, -#tsd-search .title, -#tsd-toolbar-links a { - transition: opacity 0.2s; -} -#tsd-search .results { - position: absolute; - visibility: hidden; - top: 40px; - width: 100%; - margin: 0; - padding: 0; - list-style: none; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); -} -#tsd-search .results li { - padding: 0 10px; - background-color: var(--color-background); -} -#tsd-search .results li:nth-child(even) { - background-color: var(--color-background-secondary); -} -#tsd-search .results li.state { - display: none; -} -#tsd-search .results li.current, -#tsd-search .results li:hover { - background-color: var(--color-accent); -} -#tsd-search .results a { - display: block; -} -#tsd-search .results a:before { - top: 10px; -} -#tsd-search .results span.parent { - color: var(--color-text-aside); - font-weight: normal; -} -#tsd-search.has-focus { - background-color: var(--color-accent); -} -#tsd-search.has-focus .field input { - top: 0; - opacity: 1; -} -#tsd-search.has-focus .title, -#tsd-search.has-focus #tsd-toolbar-links a { - z-index: 0; - opacity: 0; -} -#tsd-search.has-focus .results { - visibility: visible; -} -#tsd-search.loading .results li.state.loading { - display: block; -} -#tsd-search.failure .results li.state.failure { - display: block; -} - -#tsd-toolbar-links { - position: absolute; - top: 0; - right: 2rem; - height: 100%; - display: flex; - align-items: center; - justify-content: flex-end; -} -#tsd-toolbar-links a { - margin-left: 1.5rem; -} -#tsd-toolbar-links a:hover { - text-decoration: underline; -} - -.tsd-signature { - margin: 0 0 1rem 0; - padding: 1rem 0.5rem; - border: 1px solid var(--color-accent); - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - font-size: 14px; - overflow-x: auto; -} - -.tsd-signature-symbol { - color: var(--color-text-aside); - font-weight: normal; -} - -.tsd-signature-type { - font-style: italic; - font-weight: normal; -} - -.tsd-signatures { - padding: 0; - margin: 0 0 1em 0; - list-style-type: none; -} -.tsd-signatures .tsd-signature { - margin: 0; - border-color: var(--color-accent); - border-width: 1px 0; - transition: background-color 0.1s; -} -.tsd-description .tsd-signatures .tsd-signature { - border-width: 1px; -} - -ul.tsd-parameter-list, -ul.tsd-type-parameter-list { - list-style: square; - margin: 0; - padding-left: 20px; -} -ul.tsd-parameter-list > li.tsd-parameter-signature, -ul.tsd-type-parameter-list > li.tsd-parameter-signature { - list-style: none; - margin-left: -20px; -} -ul.tsd-parameter-list h5, -ul.tsd-type-parameter-list h5 { - font-size: 16px; - margin: 1em 0 0.5em 0; -} -.tsd-sources { - margin-top: 1rem; - font-size: 0.875em; -} -.tsd-sources a { - color: var(--color-text-aside); - text-decoration: underline; -} -.tsd-sources ul { - list-style: none; - padding: 0; -} - -.tsd-page-toolbar { - position: sticky; - z-index: 1; - top: 0; - left: 0; - width: 100%; - color: var(--color-text); - background: var(--color-background-secondary); - border-bottom: 1px var(--color-accent) solid; - transition: transform 0.3s ease-in-out; -} -.tsd-page-toolbar a { - color: var(--color-text); - text-decoration: none; -} -.tsd-page-toolbar a.title { - font-weight: bold; -} -.tsd-page-toolbar a.title:hover { - text-decoration: underline; -} -.tsd-page-toolbar .tsd-toolbar-contents { - display: flex; - justify-content: space-between; - height: 2.5rem; - margin: 0 auto; -} -.tsd-page-toolbar .table-cell { - position: relative; - white-space: nowrap; - line-height: 40px; -} -.tsd-page-toolbar .table-cell:first-child { - width: 100%; -} -.tsd-page-toolbar .tsd-toolbar-icon { - box-sizing: border-box; - line-height: 0; - padding: 12px 0; -} - -.tsd-widget { - display: inline-block; - overflow: hidden; - opacity: 0.8; - height: 40px; - transition: opacity 0.1s, background-color 0.2s; - vertical-align: bottom; - cursor: pointer; -} -.tsd-widget:hover { - opacity: 0.9; -} -.tsd-widget.active { - opacity: 1; - background-color: var(--color-accent); -} -.tsd-widget.no-caption { - width: 40px; -} -.tsd-widget.no-caption:before { - margin: 0; -} - -.tsd-widget.options, -.tsd-widget.menu { - display: none; -} -input[type="checkbox"] + .tsd-widget:before { - background-position: -120px 0; -} -input[type="checkbox"]:checked + .tsd-widget:before { - background-position: -160px 0; -} - -img { - max-width: 100%; -} - -.tsd-anchor-icon { - display: inline-flex; - align-items: center; - margin-left: 0.5rem; - vertical-align: middle; - color: var(--color-text); -} - -.tsd-anchor-icon svg { - width: 1em; - height: 1em; - visibility: hidden; -} - -.tsd-anchor-link:hover > .tsd-anchor-icon svg { - visibility: visible; -} - -.deprecated { - text-decoration: line-through; -} - -.warning { - padding: 1rem; - color: var(--color-warning-text); - background: var(--color-background-warning); -} + .tsd-navigation.settings { + margin: 0; + margin-bottom: 1rem; + } + .tsd-navigation > a, + .tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; + } + .tsd-navigation a, + .tsd-navigation summary > span, + .tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; + } + .tsd-navigation a.current, + .tsd-page-navigation a.current { + background: var(--color-active-menu-item); + color: var(--color-contrast-text); + } + .tsd-navigation a:hover, + .tsd-page-navigation a:hover { + text-decoration: underline; + } + .tsd-navigation ul, + .tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; + } + .tsd-navigation li, + .tsd-page-navigation li { + padding: 0; + max-width: 100%; + } + .tsd-navigation .tsd-nav-link { + display: none; + } + .tsd-nested-navigation { + margin-left: 3rem; + } + .tsd-nested-navigation > li > details { + margin-left: -1.5rem; + } + .tsd-small-nested-navigation { + margin-left: 1.5rem; + } + .tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; + } -.tsd-kind-project { - color: var(--color-ts-project); -} -.tsd-kind-module { - color: var(--color-ts-module); -} -.tsd-kind-namespace { - color: var(--color-ts-namespace); -} -.tsd-kind-enum { - color: var(--color-ts-enum); -} -.tsd-kind-enum-member { - color: var(--color-ts-enum-member); -} -.tsd-kind-variable { - color: var(--color-ts-variable); -} -.tsd-kind-function { - color: var(--color-ts-function); -} -.tsd-kind-class { - color: var(--color-ts-class); -} -.tsd-kind-interface { - color: var(--color-ts-interface); -} -.tsd-kind-constructor { - color: var(--color-ts-constructor); -} -.tsd-kind-property { - color: var(--color-ts-property); -} -.tsd-kind-method { - color: var(--color-ts-method); -} -.tsd-kind-call-signature { - color: var(--color-ts-call-signature); -} -.tsd-kind-index-signature { - color: var(--color-ts-index-signature); -} -.tsd-kind-constructor-signature { - color: var(--color-ts-constructor-signature); -} -.tsd-kind-parameter { - color: var(--color-ts-parameter); -} -.tsd-kind-type-literal { - color: var(--color-ts-type-literal); -} -.tsd-kind-type-parameter { - color: var(--color-ts-type-parameter); -} -.tsd-kind-accessor { - color: var(--color-ts-accessor); -} -.tsd-kind-get-signature { - color: var(--color-ts-get-signature); -} -.tsd-kind-set-signature { - color: var(--color-ts-set-signature); -} -.tsd-kind-type-alias { - color: var(--color-ts-type-alias); -} + .tsd-page-navigation-section > summary { + padding: 0.25rem; + } + .tsd-page-navigation-section > summary > svg { + margin-right: 0.25rem; + } + .tsd-page-navigation-section > div { + margin-left: 30px; + } + .tsd-page-navigation ul { + padding-left: 1.75rem; + } -/* if we have a kind icon, don't color the text by kind */ -.tsd-kind-icon ~ span { - color: var(--color-text); -} + #tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; + } + #tsd-sidebar-links a:last-of-type { + margin-bottom: 0; + } -* { - scrollbar-width: thin; - scrollbar-color: var(--color-accent) var(--color-icon-background); -} + a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); + } + .tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ + display: flex; + align-items: center; + gap: 0.25rem; + box-sizing: border-box; + } + .tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ + } + .tsd-accordion-summary, + .tsd-accordion-summary a { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + + cursor: pointer; + } + .tsd-accordion-summary > a { + width: calc(100% - 1.5rem); + } + .tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; + } + /* + * We need to be careful to target the arrow indicating whether the accordion + * is open, but not any other SVGs included in the details element. + */ + .tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child { + transform: rotate(-90deg); + } + .tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; + } + .tsd-index-summary { + margin-top: 1.5rem; + margin-bottom: 0.75rem; + display: flex; + align-content: center; + } -*::-webkit-scrollbar { - width: 0.75rem; -} + .tsd-no-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + .tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; + } + .tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; + } -*::-webkit-scrollbar-track { - background: var(--color-icon-background); -} + .tsd-panel { + margin-bottom: 2.5rem; + } + .tsd-panel.tsd-member { + margin-bottom: 4rem; + } + .tsd-panel:empty { + display: none; + } + .tsd-panel > h1, + .tsd-panel > h2, + .tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; + } + .tsd-panel > h1.tsd-before-signature, + .tsd-panel > h2.tsd-before-signature, + .tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; + } -*::-webkit-scrollbar-thumb { - background-color: var(--color-accent); - border-radius: 999rem; - border: 0.25rem solid var(--color-icon-background); -} + .tsd-panel-group { + margin: 2rem 0; + } + .tsd-panel-group.tsd-index-group { + margin: 2rem 0; + } + .tsd-panel-group.tsd-index-group details { + margin: 2rem 0; + } + .tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; + } -/* mobile */ -@media (max-width: 769px) { - .tsd-widget.options, - .tsd-widget.menu { - display: inline-block; + #tsd-search[open] { + animation: fade-in var(--modal-animation-duration) ease-out forwards; + } + #tsd-search[open].closing { + animation-name: fade-out; } - .container-main { + /* Avoid setting `display` on closed dialog */ + #tsd-search[open] { display: flex; + flex-direction: column; + padding: 1rem; + width: 32rem; + max-width: 90vw; + max-height: calc(100vh - env(keyboard-inset-height, 0px) - 25vh); + /* Anchor dialog to top */ + margin-top: 10vh; + border-radius: 6px; + will-change: max-height; } - html .col-content { - float: none; - max-width: 100%; + #tsd-search-input { + box-sizing: border-box; width: 100%; + padding: 0 0.625rem; /* 10px */ + outline: 0; + border: 2px solid var(--color-accent); + background-color: transparent; + color: var(--color-text); + border-radius: 4px; + height: 2.5rem; + flex: 0 0 auto; + font-size: 0.875rem; + transition: border-color 0.2s, background-color 0.2s; + } + #tsd-search-input:focus-visible { + background-color: var(--color-background-active); + border-color: transparent; + color: var(--color-contrast-text); + } + #tsd-search-input::placeholder { + color: inherit; + opacity: 0.8; } - html .col-sidebar { - position: fixed !important; + #tsd-search-results { + margin: 0; + padding: 0; + list-style: none; + flex: 1 1 auto; + display: flex; + flex-direction: column; overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - padding: 1.5rem 1.5rem 0 0; - width: 75vw; - visibility: hidden; + } + #tsd-search-results:not(:empty) { + margin-top: 0.5rem; + } + #tsd-search-results > li { background-color: var(--color-background); - transform: translate(100%, 0); + line-height: 1.5; + box-sizing: border-box; + border-radius: 4px; } - html .col-sidebar > *:last-child { - padding-bottom: 20px; + #tsd-search-results > li:nth-child(even) { + background-color: var(--color-background-secondary); } - html .overlay { - content: ""; - display: block; - position: fixed; - z-index: 1023; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.75); - visibility: hidden; + #tsd-search-results > li:is(:hover, [aria-selected="true"]) { + background-color: var(--color-background-active); + color: var(--color-contrast-text); + } + /* It's important that this takes full size of parent `li`, to capture a click on `li` */ + #tsd-search-results > li > a { + display: flex; + align-items: center; + padding: 0.5rem 0.25rem; + box-sizing: border-box; + width: 100%; + } + #tsd-search-results > li > a > .text { + flex: 1 1 auto; + min-width: 0; + overflow-wrap: anywhere; + } + #tsd-search-results > li > a .parent { + color: var(--color-text-aside); + } + #tsd-search-results > li > a mark { + color: inherit; + background-color: inherit; + font-weight: bold; + } + #tsd-search-status { + flex: 1; + display: grid; + place-content: center; + text-align: center; + overflow-wrap: anywhere; + } + #tsd-search-status:not(:empty) { + min-height: 6rem; } - .to-has-menu .overlay { - animation: fade-in 0.4s; + .tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; } - .to-has-menu .col-sidebar { - animation: pop-in-from-right 0.4s; + .tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; } - .from-has-menu .overlay { - animation: fade-out 0.4s; + .tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; } - .from-has-menu .col-sidebar { - animation: pop-out-to-right 0.4s; + .tsd-signature-type { + font-style: italic; + font-weight: normal; } - .has-menu body { - overflow: hidden; + .tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; } - .has-menu .overlay { - visibility: visible; + .tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; } - .has-menu .col-sidebar { - visibility: visible; - transform: translate(0, 0); + .tsd-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; + } + .tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; + } + .tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; + } + + ul.tsd-parameter-list, + ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; + } + ul.tsd-parameter-list > li.tsd-parameter-signature, + ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; + } + ul.tsd-parameter-list h5, + ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; + } + .tsd-sources { + margin-top: 1rem; + font-size: 0.875em; + } + .tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; + } + .tsd-sources ul { + list-style: none; + padding: 0; + } + + .tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: var(--dim-toolbar-border-bottom-width) + var(--color-accent) solid; + transition: transform 0.3s ease-in-out; + } + .tsd-page-toolbar a { + color: var(--color-text); + } + .tsd-toolbar-contents { display: flex; - flex-direction: column; + align-items: center; + height: var(--dim-toolbar-contents-height); + margin: 0 auto; + } + .tsd-toolbar-contents > .title { + font-weight: bold; + margin-right: auto; + } + #tsd-toolbar-links { + display: flex; + align-items: center; gap: 1.5rem; - max-height: 100vh; - padding: 1rem 2rem; + margin-right: 1rem; } - .has-menu .tsd-navigation { - max-height: 100%; + + .tsd-widget { + box-sizing: border-box; + display: inline-block; + opacity: 0.8; + height: 2.5rem; + width: 2.5rem; + transition: opacity 0.1s, background-color 0.1s; + text-align: center; + cursor: pointer; + border: none; + background-color: transparent; + } + .tsd-widget:hover { + opacity: 0.9; + } + .tsd-widget:active { + opacity: 1; + background-color: var(--color-accent); + } + #tsd-toolbar-menu-trigger { + display: none; } -} -/* one sidebar */ -@media (min-width: 770px) { - .container-main { - display: grid; - grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); - grid-template-areas: "sidebar content"; - margin: 2rem auto; + .tsd-member-summary-name { + display: inline-flex; + align-items: center; + padding: 0.25rem; + text-decoration: none; } - .col-sidebar { - grid-area: sidebar; + .tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + color: var(--color-text); + vertical-align: middle; } - .col-content { - grid-area: content; - padding: 0 1rem; + + .tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; } -} -@media (min-width: 770px) and (max-width: 1399px) { - .col-sidebar { - max-height: calc(100vh - 2rem - 42px); - overflow: auto; - position: sticky; - top: 42px; - padding-top: 1rem; + + .tsd-member-summary-name:hover > .tsd-anchor-icon svg, + .tsd-anchor-link:hover > .tsd-anchor-icon svg, + .tsd-anchor-icon:focus-visible svg { + visibility: visible; } - .site-menu { - margin-top: 1rem; + + .deprecated { + text-decoration: line-through !important; } -} -/* two sidebars */ -@media (min-width: 1200px) { - .container-main { - grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); - grid-template-areas: "sidebar content toc"; + .warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); } - .col-sidebar { - display: contents; + .tsd-kind-project { + color: var(--color-ts-project); + } + .tsd-kind-module { + color: var(--color-ts-module); + } + .tsd-kind-namespace { + color: var(--color-ts-namespace); + } + .tsd-kind-enum { + color: var(--color-ts-enum); + } + .tsd-kind-enum-member { + color: var(--color-ts-enum-member); + } + .tsd-kind-variable { + color: var(--color-ts-variable); + } + .tsd-kind-function { + color: var(--color-ts-function); + } + .tsd-kind-class { + color: var(--color-ts-class); + } + .tsd-kind-interface { + color: var(--color-ts-interface); + } + .tsd-kind-constructor { + color: var(--color-ts-constructor); + } + .tsd-kind-property { + color: var(--color-ts-property); + } + .tsd-kind-method { + color: var(--color-ts-method); + } + .tsd-kind-reference { + color: var(--color-ts-reference); + } + .tsd-kind-call-signature { + color: var(--color-ts-call-signature); + } + .tsd-kind-index-signature { + color: var(--color-ts-index-signature); + } + .tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); + } + .tsd-kind-parameter { + color: var(--color-ts-parameter); + } + .tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); + } + .tsd-kind-accessor { + color: var(--color-ts-accessor); + } + .tsd-kind-get-signature { + color: var(--color-ts-get-signature); + } + .tsd-kind-set-signature { + color: var(--color-ts-set-signature); + } + .tsd-kind-type-alias { + color: var(--color-ts-type-alias); } - .page-menu { - grid-area: toc; - padding-left: 1rem; + /* if we have a kind icon, don't color the text by kind */ + .tsd-kind-icon ~ span { + color: var(--color-text); } - .site-menu { - grid-area: sidebar; + + /* mobile */ + @media (max-width: 769px) { + #tsd-toolbar-menu-trigger { + display: inline-block; + /* temporary fix to vertically align, for compatibility */ + line-height: 2.5; + } + #tsd-toolbar-links { + display: none; + } + + .container-main { + display: flex; + } + .col-content { + float: none; + max-width: 100%; + width: 100%; + } + .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + .col-sidebar > *:last-child { + padding-bottom: 20px; + } + .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } } - .site-menu { - margin-top: 1rem 0; + /* one sidebar */ + @media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + --dim-container-main-margin-y: 2rem; + } + + .tsd-breadcrumb { + margin-top: 0; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } + } + @media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc( + 100vh - var(--dim-header-height) - var(--dim-footer-height) - + 2 * var(--dim-container-main-margin-y) + ); + overflow: auto; + position: sticky; + top: calc( + var(--dim-header-height) + var(--dim-container-main-margin-y) + ); + } + .site-menu { + margin-top: 1rem; + } } - .page-menu, - .site-menu { - max-height: calc(100vh - 2rem - 42px); - overflow: auto; - position: sticky; - top: 42px; + /* two sidebars */ + @media (min-width: 1200px) { + .container-main { + grid-template-columns: + minmax(0, 1fr) minmax(0, 2.5fr) minmax( + 0, + 20rem + ); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 0rem; + } + + .page-menu, + .site-menu { + max-height: calc( + 100vh - var(--dim-header-height) - var(--dim-footer-height) - + 2 * var(--dim-container-main-margin-y) + ); + overflow: auto; + position: sticky; + top: calc( + var(--dim-header-height) + var(--dim-container-main-margin-y) + ); + } } } diff --git a/docs/classes/ApiClient.html b/docs/classes/ApiClient.html index 609fa492..d08af6e0 100644 --- a/docs/classes/ApiClient.html +++ b/docs/classes/ApiClient.html @@ -1,1398 +1,415 @@ -ApiClient | permitio
-
- -
+ApiClient | permitio
+
permitio + +
    +
    +
    Preparing search index...
    - +

    Class ApiClient

    -
    -

    This interface contains read actions that goes outside -of your local network and queries permit.io cloud api. -You should be aware that these actions incur some cross-cloud latency.

    -
    -
    -

    See

    DeprecatedApiClient for implementation and docs.

    -
    -
    +

    Hierarchy

    +
  • ApiClient
  • Implements

    +
  • Defined in src/api/api-client.ts:168
  • -
    - +
    +
    Index
    -
    -

    Constructors

    -
    - +
    + +
    +
    +
      - -
    • +
    • + +

      Constructs a new instance of the ApiClient class with the specified configuration and logger.

      Parameters

        -
      • -
        config: IPermitConfig
        +
      • config: IPermitConfig

        The configuration for the Permit API client.

        -
        -
      • -
      • -
        logger: Logger<LoggerOptions>
        +
    • +
    • logger: Logger

      The logger instance.

      -
      -
    -

    Returns ApiClient

    -
    -
    -

    Properties

    -
    - - +
    +

    Returns ApiClient

    +
    + +
    +
    + +

    API for managing resource action groups.

    +
    + +
    apiKeys: IApiKeysApi
    +

    Direct API-key management and scope discovery; server authorization governs access.

    -
    - -
    conditionSetRules: IConditionSetRulesApi
    +
  • Defined in src/api/api-client.ts:170
  • +
    + +
    auditLogs: IAuditLogsApi
    +

    Reads complete authorization audit pages and detailed engine data.

    +
    +
    + +
    conditionSetRules: IConditionSetRulesApi

    API for managing condition set rules.

    -
    - -
    conditionSets: IConditionSetsApi
    +
  • Defined in src/api/api-client.ts:194
  • +
    + +
    conditionSets: IConditionSetsApi

    API for managing condition sets.

    -
    - +
  • Defined in src/api/api-client.ts:200
  • +
    +
    environments: IEnvironmentsApi

    API for managing environments.

    -
    - +
  • Defined in src/api/api-client.ts:212
  • +
    + +
    groups: IGroupsApi
    +

    API for managing groups, user membership, and resource role grants.

    +
    +
    + +
    pdps: IPdpsApi
    +

    API for requesting environment-wide PDP data refreshes.

    +
    +
    +
    projects: IProjectsApi

    API for managing projects.

    -
    - -
    relationshipTuples: IRelationshipTuplesApi
    +
  • Defined in src/api/api-client.ts:206
  • +
    + +
    proxyConfigs: IProxyConfigsApi
    +

    Direct API for environment proxy configurations and complete URL mapping rules.

    +
    +
    + +
    relationshipTuples: IRelationshipTuplesApi

    API for managing relationship tuples.

    -
    - -
    resourceActions: IResourceActionsApi
    +
  • Defined in src/api/api-client.ts:266
  • +
    + +
    resourceActions: IResourceActionsApi

    API for managing resource actions.

    -
    - -
    resourceAttributes: IResourceAttributesApi
    +
  • Defined in src/api/api-client.ts:224
  • +
    + +
    resourceAttributes: IResourceAttributesApi

    API for managing resource attributes.

    -
    - -
    resourceInstances: IResourceInstancesApi
    +
  • Defined in src/api/api-client.ts:230
  • +
    + +
    resourceInstances: IResourceInstancesApi

    API for managing resource instances.

    -
    - -
    resourceRelations: IResourceRelationsApi
    +
  • Defined in src/api/api-client.ts:248
  • +
    + +
    resourceRelations: IResourceRelationsApi

    API for managing resource relations.

    -
    - -
    resourceRoles: IResourceRolesApi
    +
  • Defined in src/api/api-client.ts:242
  • +
    + +
    resourceRoles: IResourceRolesApi

    API for managing resource roles.

    -
    - +
  • Defined in src/api/api-client.ts:236
  • +
    +
    resources: IResourcesApi

    API for managing resources.

    -
    - -
    roleAssignments: IRoleAssignmentsApi
    +
  • Defined in src/api/api-client.ts:254
  • +
    + +
    roleAssignments: IRoleAssignmentsApi

    API for managing role assignments.

    -
    - +
  • Defined in src/api/api-client.ts:260
  • +
    +
    roles: IRolesApi

    API for managing roles.

    -
    - +
  • Defined in src/api/api-client.ts:272
  • +
    +
    tenants: ITenantsApi

    API for managing tenants.

    -
    - -
    users: IUsersApi
    -

    API for managing users.

    -
    -
    -
    -

    Methods

    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
      - -
    • -

      Deletes a condition set.

      -
      -
      -

      Parameters

      -
        -
      • -
        conditionSetId: string
        -

        The ID or key of the condition set to delete.

        -
        -
      -

      Returns Promise<AxiosResponse<void, any>>

      A promise that resolves when the condition set is deleted.

      - -
      -

      Throws

      PermitApiError If the API returns an error HTTP status code.

      - -

      Throws

      PermitContextError If the configured ApiContext does not match the required endpoint context.

      - -

      Deprecated

      replaced with permit.api.conditionSets.delete()

      -
    -
    - -
      - -
    • -

      Deletes a resource.

      -
      -
      -

      Parameters

      -
        -
      • -
        resourceId: string
        -

        The ID or key of the resource to delete.

        -
        -
      -

      Returns Promise<AxiosResponse<void, any>>

      A promise that resolves when the resource is deleted.

      - -
      -

      Throws

      PermitApiError If the API returns an error HTTP status code.

      - -

      Throws

      PermitContextError If the configured ApiContext does not match the required endpoint context.

      - -

      Deprecated

      replaced with permit.api.resources.delete()

      -
    -
    - -
      - -
    • -

      Deletes a role.

      -
      -
      -

      Parameters

      -
        -
      • -
        roleId: string
        -

        The ID or key of the role to delete.

        -
        -
      -

      Returns Promise<AxiosResponse<void, any>>

      A promise that resolves when the role is deleted.

      - -
      -

      Throws

      PermitApiError If the API returns an error HTTP status code.

      - -

      Throws

      PermitContextError If the configured ApiContext does not match the required endpoint context.

      - -

      Deprecated

      replaced with permit.api.roles.delete()

      +
    • Defined in src/api/api-client.ts:278
    +
    + +
    userAttributes: IUserAttributesApi
    +

    API for user attribute definitions; individual user values belong to users.

    -
    - -
      - -
    • -

      Deletes a tenant.

      -
      -
      -

      Parameters

      -
        -
      • -
        tenantId: string
        -

        The ID or key of the tenant to delete.

        -
        -
      -

      Returns Promise<AxiosResponse<void, any>>

      A promise that resolves when the tenant is deleted.

      - -
      -

      Throws

      PermitApiError If the API returns an error HTTP status code.

      - -

      Throws

      PermitContextError If the configured ApiContext does not match the required endpoint context.

      - -

      Deprecated

      replaced with permit.api.tenants.delete()

      +
    • Defined in src/api/api-client.ts:179
    +
    + +
    userInvites: IUserInvitesApi
    +

    Direct API for stored user invites and their approval; no mail delivery or PDP sync.

    -
    - -
      - -
    • -

      Deletes a user.

      -
      -
      -

      Parameters

      -
        -
      • -
        userId: string
        -

        The ID or key of the user to delete.

        +
      • Defined in src/api/api-client.ts:182
    +
    + +
    users: IUsersApi
    +

    API for managing users.

    -
    -

    Returns Promise<AxiosResponse<void, any>>

    A promise that resolves when the user is deleted.

    -
    -

    Throws

    PermitApiError If the API returns an error HTTP status code.

    - -

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

    - -

    Deprecated

    replaced with permit.api.users.delete()

    -
    -
    - +
  • Defined in src/api/api-client.ts:284
  • +
    + +
    +
    +
      - -
    • +
    • + +

      Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

      Parameters

        -
      • -
        requiredAccessLevel: ApiKeyLevel
        +
      • requiredAccessLevel: ApiKeyLevel

        The required API Key Access level for the endpoint.

        -
        -
      -

      Returns Promise<void>

      -
      -

      Throws

      PermitContextError If the currently set API key access level does not match the required access level.

      -
    -
    - -
      - -
    • +
    +

    Returns Promise<void>

    +
    +
    +

    PermitContextError If the currently set API key access level does not match the required access level.

    +
    +
    + +
      +
    • + +

      Ensure that the API context matches the required endpoint context.

      Parameters

        -
      • -
        requiredContext: ApiContextLevel
        +
      • requiredContext: ApiContextLevel

        The required API context level for the endpoint.

        -
        -
      -

      Returns Promise<void>

      +
    +

    Returns Promise<void>

    -

    Throws

    PermitContextError If the currently set API context level does not match the required context level.

    -
    -
    - -
      - -
    • -

      Retrieves the assigned roles for a user (either in a single tenant or in all tenants).

      -
      -
      -

      Parameters

      -
        -
      • -
        user: string
        -

        The ID or key of the user.

        -
        -
      • -
      • -
        Optional tenant: string
        -

        The ID or key of the tenant, optional. If provided, only roles assigned within this tenant will be returned.

        -
        -
      -

      Returns Promise<RoleAssignmentRead[]>

      A promise that resolves to an array of RoleAssignmentRead objects representing the assigned roles.

      - -
      -

      Throws

      PermitApiError If the API returns an error HTTP status code.

      - -

      Throws

      PermitContextError If the configured ApiContext does not match the required endpoint context.

      - -

      Deprecated

      replaced with permit.api.users.getAssignedRoles()

      -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    +
  • Defined in src/api/base.ts:189
  • +
    +
    +

    On This Page

    +
    Constructors +
    +
    Properties +
    +
    Methods +
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file + +
    diff --git a/docs/classes/ApiContext.html b/docs/classes/ApiContext.html index bf205477..351acd65 100644 --- a/docs/classes/ApiContext.html +++ b/docs/classes/ApiContext.html @@ -1,423 +1,263 @@ -ApiContext | permitio
    -
    - -
    +ApiContext | permitio
    +
    permitio + +
      +
      +
      Preparing search index...
      - +

      Class ApiContext

      -

      The ApiContext class represents the required known context for an API method. -Since the Permit API hierarchy is deeply nested, it is less convenient to specify -the full object hierarchy in every request. -For example, in order to list roles, the user needs to specify the (id or key) of the:

      +

      Stores checked API-key permissions and the mutable routing selection for API methods.

      +
      -
      -
      -

      Hierarchy

      -
        -
      • ApiContext
      +
    • Defined in src/api/context.ts:310
    • -
      - +
      +
      Index
      -
      -

      Constructors

      -
      - +
      + +
      +
      +
      -
      -

      Accessors

      -
      - -
      -
      - +
    • Defined in src/api/context.ts:311
    • +
      + +
      +
      +
      -
      - +
    • Defined in src/api/context.ts:353
    • +
      +
        -
      • get environmentContext(): {
            envId: string;
            projId: string;
        }
      • -
      • -

        Get the API project and environment parameters from an environment-level context.

        +
      • +
        get environment(): string | null
        +
        +

        Returns the selected environment, or null outside environment context.

        -

        Returns {
            envId: string;
            projId: string;
        }

        An object containing the project and environment IDs.

        - -
          -
        • -
          envId: string
        • -
        • -
          projId: string
        -
        -

        Throws

        PermitContextError If the API context is not set to environment level or the project or environment is null.

        -
      -
      - +
    • Defined in src/api/context.ts:368
    • +
      +
        -
      • get level(): ApiKeyLevel
      • -
      • -

        Get the current API key level.

        +
      • +
        get environmentContext(): { envId: string; projId: string }
        +
        +

        Returns routing parameters for the selected environment; throws when none is selected.

        -

        Returns ApiKeyLevel

        -
        -

        Deprecated

        replaced with permit.config.apiContext.permittedAccessLevel

        -
      -
      - +
    • Defined in src/api/context.ts:431
    • +
      +
        -
      • get organization(): null | string
      • -
      • -

        Get the current organization in the context.

        +
      • +
        get organization(): string | null
        +
        +

        Returns the selected organization, or null before initialization.

        -

        Returns null | string

        -
      -
      - +
    • Defined in src/api/context.ts:358
    • +
      +
      -
      - +
    • Defined in src/api/context.ts:348
    • +
      +
        -
      • get project(): null | string
      • -
      • -

        Get the current project in the context.

        +
      • +
        get project(): string | null
        +
        +

        Returns the selected project, or null outside project/environment context.

        -

        Returns null | string

        -
      -
      -

      Methods

      -
      - +
    • Defined in src/api/context.ts:363
    • +
      + +
      +
      +
        - -
      • -

        Do not call this method directly!

        +
      • + +
        +

        Records validated API-key permissions for internal SDK use.

        Parameters

          -
        • -
          org: string
        • -
        • -
          Optional project: string
        • -
        • -
          Optional environment: string
        +
      • org: string +

        Accessible organization key or ID.

        +
      • +
      • Optionalproject: string +

        Accessible project key or ID, if restricted to a project.

        +
      • +
      • Optionalenvironment: string +

        Accessible environment key or ID, requiring a project.

        +

      Returns void

      -
      -
      - +
    • Defined in src/api/context.ts:335
    • +
      +
        - -
      • -

        Set the context to environment level.

        +
      • + +
        +

        Selects an environment allowed by the API key.

        Parameters

          -
        • -
          org: string
          -

          The organization key.

          -
          -
        • -
        • -
          project: string
          -

          The project key.

          -
          -
        • -
        • -
          environment: string
          -

          The environment key.

          -
          -
        +
      • org: string +

        Organization key or ID.

        +
      • +
      • project: string +

        Project key or ID.

        +
      • +
      • environment: string +

        Environment key or ID.

        +

      Returns void

      -
      -
      - +
    • Defined in src/api/context.ts:421
    • +
      +
        - -
      • -

        Set the context to organization level.

        +
      • + +
        +

        Selects an organization allowed by the API key, clearing project and environment.

        Parameters

          -
        • -
          org: string
          -

          The organization key.

          -
          -
        +
      • org: string +

        Organization key or ID.

        +

      Returns void

      -
      -
      - +
    • Defined in src/api/context.ts:386
    • +
      +
        - -
      • -

        Set the context to project level.

        +
      • + +
        +

        Selects an allowed project, clearing the environment.

        Parameters

          -
        • -
          org: string
          -

          The organization key.

          -
          -
        • -
        • -
          project: string
          -

          The project key.

          -
          -
        +
      • org: string +

        Organization key or ID.

        +
      • +
      • project: string +

        Project key or ID.

        +

      Returns void

      -
      +
    • Defined in src/api/context.ts:403
    • +
      +
      +

      On This Page

      +
      Constructors +
      +
      Accessors +
      +
      Methods +
      -
      -

      Generated using TypeDoc

      -
      \ No newline at end of file + +
      diff --git a/docs/classes/ApiKeysApi.html b/docs/classes/ApiKeysApi.html new file mode 100644 index 00000000..6e3162d8 --- /dev/null +++ b/docs/classes/ApiKeysApi.html @@ -0,0 +1,252 @@ +ApiKeysApi | permitio
      +
      permitio + +
        +
        +
        Preparing search index...
        +
        +
        +
        + +

        Class ApiKeysApi

        +
        +

        Direct control-plane client for the six published API-key operations.

        +
        +
        +

        Hierarchy

        +
          +
        • BasePermitApi +
            +
          • ApiKeysApi
        +
        +

        Implements

        +
        +
        +
        +
        +
        Index
        +
        +
        + +
        +
        + +
          +
        • + +
          +

          Creates the API-key management client.

          +
          +
          +

          Parameters

          +
            +
          • config: IPermitConfig +

            SDK configuration; management does not initialize selected scope.

            +
          • +
          • logger: Logger +

            SDK logger.

            +
          +

          Returns ApiKeysApi

        +
        + +
        +
        + +
          +
        • + +
          +

          Creates an API key with the supplied scope without injecting the client's context.

          +
          +
          +

          Parameters

          +
            +
          • apiKey: APIKeyCreate +

            Published creation body, including organization_id and optional scope.

            +
          +

          Returns Promise<APIKeyRead>

          The complete received record; retain its secret securely when present.

          +
        +
        + +
          +
        • + +
          +

          Deletes an API-key record and its related data.

          +
          +
          +

          Parameters

          +
            +
          • apiKeyId: string +

            API-key ID, not its name or secret.

            +
          +

          Returns Promise<void>

          A promise resolving to undefined after successful deletion.

          +
        +
        + +
          +
        • + +
          +

          Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

          +
          +
          +

          Parameters

          +
            +
          • requiredAccessLevel: ApiKeyLevel +

            The required API Key Access level for the endpoint.

            +
          +

          Returns Promise<void>

          +
          +
          +

          PermitContextError If the currently set API key access level does not match the required access level.

          +
        +
        + +
          +
        • + +
          +

          Ensure that the API context matches the required endpoint context.

          +
          +
          +

          Parameters

          +
            +
          • requiredContext: ApiContextLevel +

            The required API context level for the endpoint.

            +
          +

          Returns Promise<void>

          +
          +
          +

          PermitContextError If the currently set API context level does not match the required context level.

          +
        +
        + +
          +
        • + +
          +

          Gets an API-key record by its ID.

          +
          +
          +

          Parameters

          +
            +
          • apiKeyId: string +

            API-key ID, not its name or secret.

            +
          +

          Returns Promise<APIKeyRead>

          The complete record; the server may omit its secret or return null.

          +
        +
        + +
          +
        • + +
          +

          Discovers the configured credential's scope without initializing API context.

          +
          +

          Returns Promise<APIKeyScopeRead>

          The received organization ID and optional, nullable project/environment IDs.

          +
        +
        + +
        +
        + +
          +
        • + +
          +

          Rotates a key's secret with a bodyless POST; the SDK does not replay this request.

          +
          +
          +

          Parameters

          +
            +
          • apiKeyId: string +

            API-key UUID to rotate; use a disposable key for lifecycle tests.

            +
          +

          Returns Promise<APIKeyRead>

          The complete response; no stable record ID or always-present secret is promised. +Rotation does not replace this client's configured credential.

          +
        +
        + +
        +
        diff --git a/docs/classes/AuditLogsApi.html b/docs/classes/AuditLogsApi.html new file mode 100644 index 00000000..81db9a83 --- /dev/null +++ b/docs/classes/AuditLogsApi.html @@ -0,0 +1,177 @@ +AuditLogsApi | permitio
        +
        permitio + +
          +
          +
          Preparing search index...
          +
          +
          +
          + +

          Class AuditLogsApi

          +
          +

          Direct API transport for the two published authorization audit-log read operations.

          +
          +
          +

          Hierarchy

          +
            +
          • BasePermitApi +
              +
            • AuditLogsApi
          +
          +

          Implements

          +
          +
          +
          +
          +
          Index
          +
          +
          + +
          +
          + +
          +
          + +
          +
          + +
            +
          • + +
            +

            Creates the audit-log client.

            +
            +
            +

            Parameters

            +
              +
            • config: IPermitConfig +

              The SDK configuration and selected API context.

              +
            • +
            • logger: Logger +

              The SDK logger.

              +
            +

            Returns AuditLogsApi

          +
          + +
          +
          + +
            +
          • + +
            +

            Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

            +
            +
            +

            Parameters

            +
              +
            • requiredAccessLevel: ApiKeyLevel +

              The required API Key Access level for the endpoint.

              +
            +

            Returns Promise<void>

            +
            +
            +

            PermitContextError If the currently set API key access level does not match the required access level.

            +
          +
          + +
            +
          • + +
            +

            Ensure that the API context matches the required endpoint context.

            +
            +
            +

            Parameters

            +
              +
            • requiredContext: ApiContextLevel +

              The required API context level for the endpoint.

              +
            +

            Returns Promise<void>

            +
            +
            +

            PermitContextError If the currently set API context level does not match the required context level.

            +
          +
          + +
            +
          • + +
            +

            Gets the complete audit log and its raw engine data.

            +
            +
            +

            Parameters

            +
              +
            • logId: string +

              The audit-log UUID; the service determines record availability and retention.

              +
            +

            Returns Promise<DetailedAuditLogModel>

            The complete detailed log, retaining all published raw-data union branches.

            +
          +
          + +
          +
          + +
          +
          diff --git a/docs/classes/ConditionSetRulesApi.html b/docs/classes/ConditionSetRulesApi.html index 65999cd4..c64e971e 100644 --- a/docs/classes/ConditionSetRulesApi.html +++ b/docs/classes/ConditionSetRulesApi.html @@ -1,355 +1,221 @@ -ConditionSetRulesApi | permitio
          -
          - -
          +ConditionSetRulesApi | permitio
          +
          permitio + +
            +
            +
            Preparing search index...
            - +

            Class ConditionSetRulesApi

            The ConditionSetsApi class provides methods for interacting with condition sets using the Permit REST API.

            -
            -
            -
            +
            +

            Hierarchy

              -
            • BasePermitApi +
            • BasePermitApi
                -
              • ConditionSetRulesApi
            +
          • ConditionSetRulesApi
          • Implements

            +
          • Defined in src/api/condition-set-rules.ts:76
          • -
            - +
            +
            Index
            -
            -

            Constructors

            -
            - +
            + +
            +
            +
              - -
            • +
            • + +

              Creates an instance of the ConditionSetRulesApi.

              Parameters

                -
              • -
                config: IPermitConfig
                +
              • config: IPermitConfig

                The configuration object for the Permit SDK.

                -
                -
              • -
              • -
                logger: Logger<LoggerOptions>
                +
            • +
            • logger: Logger

              The logger instance for logging.

              -
              -
            -

            Returns ConditionSetRulesApi

            -
            +
            + +
            +
            + +

            Returns Promise<ConditionSetRuleRead>

            A promise that resolves to the created condition set rule.

            -

            Throws

            PermitApiError If the API returns an error HTTP status code.

            - -

            Throws

            PermitContextError If the configured ApiContext does not match the required endpoint context.

            -
            -
            - +
          • Defined in src/api/condition-set-rules.ts:129
          • +
            + +

            Returns Promise<void>

            A promise that resolves when the condition set rule is deleted.

            -

            Throws

            PermitApiError If the API returns an error HTTP status code.

            - -

            Throws

            PermitContextError If the configured ApiContext does not match the required endpoint context.

            -
            -
            - +
          • Defined in src/api/condition-set-rules.ts:158
          • +
            +
              - -
            • +
            • + +

              Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

              Parameters

                -
              • -
                requiredAccessLevel: ApiKeyLevel
                +
              • requiredAccessLevel: ApiKeyLevel

                The required API Key Access level for the endpoint.

                -
                -
              -

              Returns Promise<void>

              +
            +

            Returns Promise<void>

            -

            Throws

            PermitContextError If the currently set API key access level does not match the required access level.

            -
            -
            - +
          • Defined in src/api/base.ts:162
          • +
            +
              - -
            • +
            • + +

              Ensure that the API context matches the required endpoint context.

              Parameters

                -
              • -
                requiredContext: ApiContextLevel
                +
              • requiredContext: ApiContextLevel

                The required API context level for the endpoint.

                -
                -
              -

              Returns Promise<void>

              +
            +

            Returns Promise<void>

            -

            Throws

            PermitContextError If the currently set API context level does not match the required context level.

            -
            -
            - +
          • Defined in src/api/base.ts:189
          • +
            + +

            Returns Promise<ConditionSetRuleRead[]>

            A promise that resolves to an array of condition set rules.

            -

            See

            IListConditionSetRules

            - -

            Throws

            PermitApiError If the API returns an error HTTP status code.

            - -

            Throws

            PermitContextError If the configured ApiContext does not match the required endpoint context.

            -
            +
          • Defined in src/api/condition-set-rules.ts:101
          • +
            +
            +

            On This Page

            +
            Constructors +
            +
            Methods +
            -
            -

            Generated using TypeDoc

            -
            \ No newline at end of file + +
            diff --git a/docs/classes/ConditionSetsApi.html b/docs/classes/ConditionSetsApi.html index d3e24db8..bf09bc8f 100644 --- a/docs/classes/ConditionSetsApi.html +++ b/docs/classes/ConditionSetsApi.html @@ -1,470 +1,334 @@ -ConditionSetsApi | permitio
            -
            - -
            +ConditionSetsApi | permitio
            +
            permitio + +
              +
              +
              Preparing search index...
              - +

              Class ConditionSetsApi

              The ConditionSetsApi class provides methods for interacting with condition sets using the Permit REST API.

              -
              -
              -
              +
              +

              Hierarchy

                -
              • BasePermitApi +
              • BasePermitApi
                  -
                • ConditionSetsApi
              +
            • ConditionSetsApi
            • Implements

              +
            • Defined in src/api/condition-sets.ts:110
            • -
              - +
              +
              Index
              -
              -

              Constructors

              -
              - +
              + +
              +
              +
                - -
              • +
              • + +

                Creates an instance of the ConditionSetsApi.

                Parameters

                  -
                • -
                  config: IPermitConfig
                  +
                • config: IPermitConfig

                  The configuration object for the Permit SDK.

                  -
                  -
                • -
                • -
                  logger: Logger<LoggerOptions>
                  +
              • +
              • logger: Logger

                The logger instance for logging.

                -
                -
              -

              Returns ConditionSetsApi

              -
              +
              + +
              +
              + +

              Returns Promise<ConditionSetRead>

              A promise that resolves to the created condition set.

              -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              -
              - +
            • Defined in src/api/condition-sets.ts:211
            • +
              +
                - -
              • +
              • + +

                Deletes a condition set.

                Parameters

                  -
                • -
                  conditionSetKey: string
                  +
                • conditionSetKey: string

                  The key of the condition set to delete.

                  -
                  -
                -

                Returns Promise<void>

                A promise that resolves when the condition set is deleted.

                +
              +

              Returns Promise<void>

              A promise that resolves when the condition set is deleted.

              -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              -
              - +
            • Defined in src/api/condition-sets.ts:262
            • +
              +
                - -
              • +
              • + +

                Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                Parameters

                  -
                • -
                  requiredAccessLevel: ApiKeyLevel
                  +
                • requiredAccessLevel: ApiKeyLevel

                  The required API Key Access level for the endpoint.

                  -
                  -
                -

                Returns Promise<void>

                +
              +

              Returns Promise<void>

              -

              Throws

              PermitContextError If the currently set API key access level does not match the required access level.

              -
              -
              - +
            • Defined in src/api/base.ts:162
            • +
              +
                - -
              • +
              • + +

                Ensure that the API context matches the required endpoint context.

                Parameters

                  -
                • -
                  requiredContext: ApiContextLevel
                  +
                • requiredContext: ApiContextLevel

                  The required API context level for the endpoint.

                  -
                  -
                -

                Returns Promise<void>

                +
              +

              Returns Promise<void>

              -

              Throws

              PermitContextError If the currently set API context level does not match the required context level.

              -
              -
              - +
            • Defined in src/api/base.ts:189
            • +
              +
                - -
              • +
              • + +

                Retrieves a condition set by its key.

                Parameters

                  -
                • -
                  conditionSetKey: string
                  +
                • conditionSetKey: string

                  The key of the condition set.

                  -
                  -
                -

                Returns Promise<ConditionSetRead>

                A promise that resolves to the condition set.

                +
              +

              Returns Promise<ConditionSetRead>

              A promise that resolves to the condition set.

              -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              -
              - +
            • Defined in src/api/condition-sets.ts:162
            • +
              +
                - -
              • +
              • + +

                Retrieves a condition set by its ID. -Alias for the get method.

                +Alias for the get method.

                Parameters

                  -
                • -
                  conditionSetId: string
                  +
                • conditionSetId: string

                  The ID of the condition set.

                  -
                  -
                -

                Returns Promise<ConditionSetRead>

                A promise that resolves to the condition set.

                +
              +

              Returns Promise<ConditionSetRead>

              A promise that resolves to the condition set.

              -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              -
              - +
            • Defined in src/api/condition-sets.ts:199
            • +
              +
                - -
              • +
              • + +

                Retrieves a condition set by its key. -Alias for the get method.

                +Alias for the get method.

                Parameters

                  -
                • -
                  conditionSetKey: string
                  +
                • conditionSetKey: string

                  The key of the condition set.

                  -
                  -
                -

                Returns Promise<ConditionSetRead>

                A promise that resolves to the condition set.

                +
              +

              Returns Promise<ConditionSetRead>

              A promise that resolves to the condition set.

              -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              -
              - +
            • Defined in src/api/condition-sets.ts:186
            • +
              + +

              Returns Promise<ConditionSetRead[]>

              A promise that resolves to an array of condition sets.

              -

              See

              IPagination

              - -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              -
              - +
            • Defined in src/api/condition-sets.ts:135
            • +
              +
                - -
              • +
              • + +

                Updates a condition set.

                Parameters

                  -
                • -
                  conditionSetKey: string
                  +
                • conditionSetKey: string

                  The key of the condition set.

                  -
                  -
                • -
                • -
                  conditionSetData: ConditionSetUpdate
                  +
              • +
              • conditionSetData: ConditionSetUpdate

                The updated data for the condition set.

                -
                -
              -

              Returns Promise<ConditionSetRead>

              A promise that resolves to the updated condition set.

              + +

              Returns Promise<ConditionSetRead>

              A promise that resolves to the updated condition set.

              -

              Throws

              PermitApiError If the API returns an error HTTP status code.

              - -

              Throws

              PermitContextError If the configured ApiContext does not match the required endpoint context.

              -
              +
            • Defined in src/api/condition-sets.ts:235
            • +
              +
              +

              On This Page

              +
              Constructors +
              +
              Methods +
              -
              -

              Generated using TypeDoc

              -
              \ No newline at end of file + +
              diff --git a/docs/classes/DeprecatedApiClient.html b/docs/classes/DeprecatedApiClient.html deleted file mode 100644 index cb30cf3c..00000000 --- a/docs/classes/DeprecatedApiClient.html +++ /dev/null @@ -1,1154 +0,0 @@ -DeprecatedApiClient | permitio
              -
              - -
              -
              -
              -
              - -

              Class DeprecatedApiClient

              -
              -

              Contains all the deprecated permit.api. methods in one place. -The SDK now replaced all permit.api.createRole() with permit.api.roles.create() -due to the large number of API endpoints, trying to allow more user-friendly code -autocomplete behavior.

              -
              -
              -
              -

              Hierarchy

              -
                -
              • BasePermitApi -
              -
              -

              Implements

              -
              -
              -
              -
              - -
              -
              -

              Constructors

              -
              - -
              -
              -

              Methods

              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
                - -
              • -

                Deletes a condition set.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  conditionSetId: string
                  -

                  The ID or key of the condition set to delete.

                  -
                  -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the condition set is deleted.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.conditionSets.delete()

                -
              -
              - -
                - -
              • -

                Deletes a resource.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  resourceId: string
                  -

                  The ID or key of the resource to delete.

                  -
                  -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the resource is deleted.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.resources.delete()

                -
              -
              - -
                - -
              • -

                Deletes a role.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  roleId: string
                  -

                  The ID or key of the role to delete.

                  -
                  -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the role is deleted.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.roles.delete()

                -
              -
              - -
                - -
              • -

                Deletes a tenant.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  tenantId: string
                  -

                  The ID or key of the tenant to delete.

                  -
                  -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the tenant is deleted.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.tenants.delete()

                -
              -
              - -
                - -
              • -

                Deletes a user.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  userId: string
                  -

                  The ID or key of the user to delete.

                  -
                  -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the user is deleted.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.users.delete()

                -
              -
              - -
                - -
              • -

                Ensure that the API Key has the necessary permissions to successfully call the API endpoint. -Note that this check is not foolproof, and the API may still throw 401.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  requiredAccessLevel: ApiKeyLevel
                  -

                  The required API Key Access level for the endpoint.

                  -
                  -
                -

                Returns Promise<void>

                -
                -

                Throws

                PermitContextError If the currently set API key access level does not match the required access level.

                -
              -
              - -
                - -
              • -

                Ensure that the API context matches the required endpoint context.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  requiredContext: ApiContextLevel
                  -

                  The required API context level for the endpoint.

                  -
                  -
                -

                Returns Promise<void>

                -
                -

                Throws

                PermitContextError If the currently set API context level does not match the required context level.

                -
              -
              - -
                - -
              • -

                Retrieves the assigned roles for a user (either in a single tenant or in all tenants).

                -
                -
                -

                Parameters

                -
                  -
                • -
                  user: string
                  -

                  The ID or key of the user.

                  -
                  -
                • -
                • -
                  Optional tenant: string
                  -

                  The ID or key of the tenant, optional. If provided, only roles assigned within this tenant will be returned.

                  -
                  -
                -

                Returns Promise<RoleAssignmentRead[]>

                A promise that resolves to an array of RoleAssignmentRead objects representing the assigned roles.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.users.getAssignedRoles()

                -
              -
              - -
              -
              - -
                - -
              • -

                Retrieves a role by ID or key.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  roleId: string
                  -

                  The ID or the key of the role.

                  -
                  -
                -

                Returns Promise<RoleRead>

                A promise that resolves to a RoleRead object representing the role.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.roles.get()

                -
              -
              - -
              -
              - -
                - -
              • -

                Retrieves a user by ID or key

                -
                -
                -

                Parameters

                -
                  -
                • -
                  userId: string
                  -

                  The ID or the key of the user.

                  -
                  -
                -

                Returns Promise<UserRead>

                A promise that resolves to a UserRead object representing the user.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.users.get()

                -
              -
              - -
                - -
              • -

                Retrieves a list of condition sets.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  type: ConditionSetType
                  -

                  The type of the condition set, either userset or resourceset.

                  -
                  -
                • -
                • -
                  page: number
                  -

                  The page number.

                  -
                  -
                • -
                • -
                  perPage: number
                  -

                  The number of items per page.

                  -
                  -
                -

                Returns Promise<ConditionSetRead[]>

                A promise that resolves to an array of ConditionSetRead objects representing the condition sets.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.conditionSets.list()

                -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
                - -
              • -

                Removes a condition set rule (i.e: unassigns permission from a userset to act on a resourceset).

                -
                -
                -

                Parameters

                -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the condition set rule is deleted.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.conditionSetRules.delete()

                -
              -
              - -
                - -
              • -

                Unassigns a role from a user.

                -
                -
                -

                Parameters

                -
                -

                Returns Promise<AxiosResponse<void, any>>

                A promise that resolves when the role is unassigned.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.users.unassignRole()

                -
              -
              - -
              -
              - -
              -
              - -
                - -
              • -

                Updates an existing role.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  roleId: string
                  -

                  The ID or key of the role to update.

                  -
                  -
                • -
                • -
                  role: RoleUpdate
                  -

                  The updated role data.

                  -
                  -
                -

                Returns Promise<RoleRead>

                A promise that resolves to a RoleRead object representing the updated role.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.roles.update()

                -
              -
              - -
              -
              - -
                - -
              • -

                Updates an existing user.

                -
                -
                -

                Parameters

                -
                  -
                • -
                  userId: string
                  -

                  The ID or key of the user to update.

                  -
                  -
                • -
                • -
                  user: UserUpdate
                  -

                  The updated user data.

                  -
                  -
                -

                Returns Promise<UserRead>

                A promise that resolves to a UserRead object representing the updated user.

                - -
                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                - -

                Deprecated

                replaced with permit.api.users.update()

                -
              -
              - -
              -
              -

              Generated using TypeDoc

              -
              \ No newline at end of file diff --git a/docs/classes/ElementsClient.html b/docs/classes/ElementsClient.html index 2068bdec..e2ee4285 100644 --- a/docs/classes/ElementsClient.html +++ b/docs/classes/ElementsClient.html @@ -1,299 +1,164 @@ -ElementsClient | permitio
              -
              - -
              +ElementsClient | permitio
              +
              permitio + +
                +
                +
                Preparing search index...
                - +

                Class ElementsClient

                API client for interacting with the Permit Elements API.

                -
                -
                -
                +
                +

                Hierarchy

                  -
                • BasePermitApi +
                • BasePermitApi
                    -
                  • ElementsClient
                +
              • ElementsClient
              • Implements

                +
              • Defined in src/api/elements.ts:58
              • -
                - +
                +
                Index
                -
                -

                Constructors

                -
                - +
                + +
                +
                +
                  - -
                • +
                • + +

                  Creates an instance of the ElementsClient.

                  Parameters

                    -
                  • -
                    config: IPermitConfig
                    +
                  • config: IPermitConfig

                    The configuration object for the Permit SDK.

                    -
                    -
                  • -
                  • -
                    logger: Logger<LoggerOptions>
                    +
                • +
                • logger: Logger

                  The logger instance for logging.

                  -
                  -
                -

                Returns ElementsClient

                -
                +
                + +
                +
                +
                  - -
                • +
                • + +

                  Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                  Parameters

                    -
                  • -
                    requiredAccessLevel: ApiKeyLevel
                    +
                  • requiredAccessLevel: ApiKeyLevel

                    The required API Key Access level for the endpoint.

                    -
                    -
                  -

                  Returns Promise<void>

                  +
                +

                Returns Promise<void>

                -

                Throws

                PermitContextError If the currently set API key access level does not match the required access level.

                -
                -
                - +
              • Defined in src/api/base.ts:162
              • +
                +
                  - -
                • +
                • + +

                  Ensure that the API context matches the required endpoint context.

                  Parameters

                    -
                  • -
                    requiredContext: ApiContextLevel
                    +
                  • requiredContext: ApiContextLevel

                    The required API context level for the endpoint.

                    -
                    -
                  -

                  Returns Promise<void>

                  +
                +

                Returns Promise<void>

                -

                Throws

                PermitContextError If the currently set API context level does not match the required context level.

                -
                -
                - +
              • Defined in src/api/base.ts:189
              • +
                + +

                Returns Promise<EmbeddedLoginRequestOutputWithContent>

                The embedded login authentication session data.

                -

                Throws

                PermitApiError If the API returns an error HTTP status code.

                - -

                Throws

                PermitContextError If the configured ApiContext does not match the required endpoint context.

                -
                +
              • Defined in src/api/elements.ts:82
              • +
                +
                +

                On This Page

                +
                Constructors +
                +
                Methods +
                -
                -

                Generated using TypeDoc

                -
                \ No newline at end of file + +
                diff --git a/docs/classes/EnvironmentsApi.html b/docs/classes/EnvironmentsApi.html index 560ee883..f93b6b2a 100644 --- a/docs/classes/EnvironmentsApi.html +++ b/docs/classes/EnvironmentsApi.html @@ -1,94 +1,89 @@ -EnvironmentsApi | permitio
                -
                - -
                +EnvironmentsApi | permitio
                +
                permitio + +
                  +
                  +
                  Preparing search index...
                  - +

                  Class EnvironmentsApi

                  The EnvironmentsApi class provides methods for interacting with Permit Environments.

                  -
                  -
                  -
                  +
                  +

                  Hierarchy

                    -
                  • BasePermitApi +
                  • BasePermitApi
                      -
                    • EnvironmentsApi
                  +
                • EnvironmentsApi
                • Implements

                  +
                • Defined in src/api/environments.ts:215
                • -
                  - +
                  +
                  Index
                  -
                  -

                  Constructors

                  -
                  - +
                  + +
                  +
                  +
                    - -
                  • +
                  • + +

                    Creates an instance of the EnvironmentsApi.

                    Parameters

                      -
                    • -
                      config: IPermitConfig
                      +
                    • config: IPermitConfig

                      The configuration object for the Permit SDK.

                      -
                      -
                    • -
                    • -
                      logger: Logger<LoggerOptions>
                      +
                  • +
                  • logger: Logger

                    The logger instance for logging.

                    -
                    -
                  -

                  Returns EnvironmentsApi

                  -
                  +
                  + +
                  +
                  + -

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the copied environment.

                  + +

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the copied environment.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:436
                • +
                  + +
                    +
                  • + +
                    +

                    Submits a background copy from the explicit source environment in the same project. +The SDK requires a project or organization API key and does not replay submission or poll.

                    +
                    +
                    +

                    Parameters

                    +
                      +
                    • projectKey: string +

                      The source project key or ID.

                      +
                    • +
                    • environmentKey: string +

                      The source environment key or ID, not the target environment.

                      +
                    • +
                    • copyParams: EnvironmentCopy +

                      Complete target, conflict strategy and optional copy scope.

                      +
                    • +
                    • Optionalwait: number +

                      Optional finite server wait in seconds, from 0 through 60, including fractions.

                      +
                    +

                    Returns Promise<TaskResultEnvironmentRead>

                    The complete task response; processing, failure and cancelled statuses remain data.

                    +
                  +
                  + -

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the created environment.

                  + +

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the created environment.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:373
                • +
                  +
                    - -
                  • +
                  • + +

                    Deletes an environment.

                    Parameters

                      -
                    • -
                      projectKey: string
                      +
                    • projectKey: string

                      The project key.

                      -
                      -
                    • -
                    • -
                      environmentKey: string
                      +
                  • +
                  • environmentKey: string

                    The environment key.

                    -
                    -
                  -

                  Returns Promise<void>

                  A promise that resolves when the environment is successfully deleted.

                  + +

                  Returns Promise<void>

                  A promise that resolves when the environment is successfully deleted.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:535
                • +
                  +
                    - -
                  • +
                  • + +

                    Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                    Parameters

                      -
                    • -
                      requiredAccessLevel: ApiKeyLevel
                      +
                    • requiredAccessLevel: ApiKeyLevel

                      The required API Key Access level for the endpoint.

                      -
                      -
                    -

                    Returns Promise<void>

                    +
                  +

                  Returns Promise<void>

                  -

                  Throws

                  PermitContextError If the currently set API key access level does not match the required access level.

                  -
                  -
                  - +
                • Defined in src/api/base.ts:162
                • +
                  +
                    - -
                  • +
                  • + +

                    Ensure that the API context matches the required endpoint context.

                    Parameters

                      -
                    • -
                      requiredContext: ApiContextLevel
                      +
                    • requiredContext: ApiContextLevel

                      The required API context level for the endpoint.

                      -
                      -
                    -

                    Returns Promise<void>

                    +
                  +

                  Returns Promise<void>

                  -

                  Throws

                  PermitContextError If the currently set API context level does not match the required context level.

                  -
                  -
                  - +
                • Defined in src/api/base.ts:189
                • +
                  +
                    - -
                  • +
                  • + +

                    Gets an environment by project key and environment key.

                    Parameters

                      -
                    • -
                      projectKey: string
                      +
                    • projectKey: string

                      The project key.

                      -
                      -
                    • -
                    • -
                      environmentKey: string
                      +
                  • +
                  • environmentKey: string

                    The environment key.

                    -
                    -
                  -

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                  + +

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:272
                • +
                  +
                    - -
                  • +
                  • + +

                    Retrieves the API key that grants access for an environment (and only the requested environment). Must be requested with an organization-level api key.

                    Parameters

                      -
                    • -
                      projectKey: string
                      +
                    • projectKey: string

                      The project key.

                      -
                      -
                    • -
                    • -
                      environmentKey: string
                      +
                  • +
                  • environmentKey: string

                    The environment key.

                    -
                    -
                  -

                  Returns Promise<APIKeyRead>

                  A promise that resolves to an APIKeyRead object containing the API key and its metadata.

                  + +

                  Returns Promise<APIKeyRead>

                  A promise that resolves to an APIKeyRead object containing the API key and its metadata.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:349
                • +
                  +
                    - -
                  • +
                  • + +

                    Gets an environment by project ID and environment ID. -Alias for the get method.

                    +Alias for the get method.

                    Parameters

                      -
                    • -
                      projectId: string
                      +
                    • projectId: string

                      The project ID.

                      -
                      -
                    • -
                    • -
                      environmentId: string
                      +
                  • +
                  • environmentId: string

                    The environment ID.

                    -
                    -
                  -

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                  + +

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:311
                • +
                  +
                    - -
                  • +
                  • + +

                    Gets an environment by project key and environment key. -Alias for the get method.

                    +Alias for the get method.

                    Parameters

                      -
                    • -
                      projectKey: string
                      +
                    • projectKey: string

                      The project key.

                      -
                      -
                    • -
                    • -
                      environmentKey: string
                      +
                  • +
                  • environmentKey: string

                    The environment key.

                    -
                    -
                  -

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                  + +

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  +
                  + +
                    +
                  • + +
                    +

                    Reads one acknowledged copy task using its explicit source project and environment. +The SDK returns once, including a processing response; it does not poll or cancel the task.

                    +
                    +
                    +

                    Parameters

                    +
                      +
                    • projectKey: string +

                      The source project key or ID.

                      +
                    • +
                    • environmentKey: string +

                      The source environment key or ID.

                      +
                    • +
                    • taskId: string +

                      The acknowledged task ID.

                      +
                    • +
                    • Optionalwait: number +

                      Optional finite server wait in seconds, from 0 through 60, including fractions.

                      +
                    +

                    Returns Promise<TaskResultEnvironmentRead>

                    The complete task response, preserving nullable result and error data.

                    +
                  -
                  - +
                • Defined in src/api/environments.ts:492
                • +
                  +
                    - -
                  • +
                  • + +

                    Retrieves statistics and metadata for an environment.

                    Parameters

                      -
                    • -
                      projectKey: string
                      +
                    • projectKey: string

                      The project key.

                      -
                      -
                    • -
                    • -
                      environmentKey: string
                      +
                  • +
                  • environmentKey: string

                    The environment key.

                    -
                    -
                  -

                  Returns Promise<EnvironmentStats>

                  A promise that resolves to an EnvironmentStats object representing the statistics data.

                  + +

                  Returns Promise<EnvironmentStats>

                  A promise that resolves to an EnvironmentStats object representing the statistics data.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:324
                • +
                  + +

                  Returns Promise<EnvironmentRead[]>

                  A promise that resolves to an array of EnvironmentRead objects representing the listed environments.

                  -

                  See

                  IListEnvironments

                  - -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  -
                  - +
                • Defined in src/api/environments.ts:246
                • +
                  +
                    - -
                  • +
                  • + +

                    Updates an existing environment.

                    Parameters

                      -
                    • -
                      projectKey: string
                      +
                    • projectKey: string

                      The project key.

                      -
                      -
                    • -
                    • -
                      environmentKey: string
                      +
                  • +
                  • environmentKey: string

                    The environment key.

                    -
                    -
                  • -
                  • -
                    environmentData: EnvironmentUpdate
                    +
                  • +
                  • environmentData: EnvironmentUpdate

                    The data for updating the environment.

                    -
                    -
                  -

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the updated environment.

                  + +

                  Returns Promise<EnvironmentRead>

                  A promise that resolves to an EnvironmentRead object representing the updated environment.

                  -

                  Throws

                  PermitApiError If the API returns an error HTTP status code.

                  - -

                  Throws

                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                  -
                  +
                • Defined in src/api/environments.ts:401
                • +
                  +
                  +

                  On This Page

                  +
                  Constructors +
                  +
                  Methods +
                  -
                  -

                  Generated using TypeDoc

                  -
                  \ No newline at end of file + +
                  diff --git a/docs/classes/GroupsApi.html b/docs/classes/GroupsApi.html new file mode 100644 index 00000000..690e5e96 --- /dev/null +++ b/docs/classes/GroupsApi.html @@ -0,0 +1,315 @@ +GroupsApi | permitio
                  +
                  permitio + +
                    +
                    +
                    Preparing search index...
                    +
                    +
                    +
                    + +

                    Class GroupsApi

                    +
                    +

                    API client for the GA core Groups operations.

                    +
                    +
                    +

                    Hierarchy

                    +
                      +
                    • BasePermitApi +
                        +
                      • GroupsApi
                    +
                    +

                    Implements

                    +
                    +
                    +
                    +
                    +
                    Index
                    +
                    +
                    + +
                    +
                    + +
                      +
                    • + +
                      +

                      Creates the Groups API wrapper.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • config: IPermitConfig +

                        The SDK configuration.

                        +
                      • +
                      • logger: Logger +

                        The SDK logger.

                        +
                      +

                      Returns GroupsApi

                    +
                    + +
                    +
                    + +
                      +
                    • + +
                      +

                      Grants a group a resource role using relationships and role derivation through ReBAC.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • groupKeyOrId: string +

                        The qualified resource:instance key or internal instance ID.

                        +
                      • +
                      • assignment: GroupAddRole +

                        The role, resource type, resource instance, and tenant identifiers.

                        +
                      +

                      Returns Promise<GroupRead>

                      The updated group and its role membership.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Adds a user to a group so the user can inherit the group's resource roles through ReBAC.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • groupKeyOrId: string +

                        The qualified resource:instance key or internal instance ID.

                        +
                      • +
                      • userKeyOrId: string +

                        The user key or ID.

                        +
                      • +
                      • assignment: GroupAssignUser +

                        The required tenant body for the membership request.

                        +
                      +

                      Returns Promise<GroupRead>

                      The updated group and its membership.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Creates a group resource instance.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • group: GroupCreate +

                        The group instance key, tenant, and optional resource type.

                        +
                      +

                      Returns Promise<GroupRead>

                      The created group and its membership; this response does not contain an ID.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Deletes a group resource instance.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • groupKeyOrId: string +

                        The qualified resource:instance key or internal instance ID.

                        +
                      +

                      Returns Promise<void>

                      A promise that resolves when the group is deleted.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • requiredAccessLevel: ApiKeyLevel +

                        The required API Key Access level for the endpoint.

                        +
                      +

                      Returns Promise<void>

                      +
                      +
                      +

                      PermitContextError If the currently set API key access level does not match the required access level.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Ensure that the API context matches the required endpoint context.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • requiredContext: ApiContextLevel +

                        The required API context level for the endpoint.

                        +
                      +

                      Returns Promise<void>

                      +
                      +
                      +

                      PermitContextError If the currently set API context level does not match the required context level.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Gets a group through the direct endpoint.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • groupKeyOrId: string +

                        The qualified resource:instance key or internal instance ID.

                        +
                      +

                      Returns Promise<GroupReadSchema>

                      The group instance, including its internal ID.

                      +
                    +
                    + +
                    +
                    + +
                      +
                    • + +
                      +

                      Revokes a group's resource role grant.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • groupKeyOrId: string +

                        The qualified resource:instance key or internal instance ID.

                        +
                      • +
                      • assignment: GroupAddRole +

                        The role, resource type, resource instance, and tenant identifiers.

                        +
                      +

                      Returns Promise<void>

                      A promise that resolves when the role grant is removed.

                      +
                    +
                    + +
                      +
                    • + +
                      +

                      Removes a user's membership from a group.

                      +
                      +
                      +

                      Parameters

                      +
                        +
                      • groupKeyOrId: string +

                        The qualified resource:instance key or internal instance ID.

                        +
                      • +
                      • userKeyOrId: string +

                        The user key or ID.

                        +
                      • +
                      • assignment: GroupAssignUser +

                        The required tenant body, also sent for this DELETE request.

                        +
                      +

                      Returns Promise<void>

                      A promise that resolves when the membership is removed.

                      +
                    +
                    + +
                    +
                    diff --git a/docs/classes/PdpsApi.html b/docs/classes/PdpsApi.html new file mode 100644 index 00000000..b1261d17 --- /dev/null +++ b/docs/classes/PdpsApi.html @@ -0,0 +1,165 @@ +PdpsApi | permitio
                    +
                    permitio + +
                      +
                      +
                      Preparing search index...
                      +
                      +
                      +
                      + +

                      Class PdpsApi

                      +
                      +

                      Control-plane client for environment-wide PDP refresh.

                      +
                      +
                      +

                      Hierarchy

                      +
                        +
                      • BasePermitApi +
                          +
                        • PdpsApi
                      +
                      +

                      Implements

                      +
                      +
                      +
                      +
                      +
                      Index
                      +
                      +
                      + +
                      +
                      + +
                      +
                      + +
                      +
                      + +
                        +
                      • + +
                        +

                        Creates a PDP management client.

                        +
                        +
                        +

                        Parameters

                        +
                          +
                        • config: IPermitConfig +

                          The SDK configuration and selected API context.

                          +
                        • +
                        • logger: Logger +

                          The SDK logger.

                          +
                        +

                        Returns PdpsApi

                      +
                      + +
                      +
                      + +
                        +
                      • + +
                        +

                        Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                        +
                        +
                        +

                        Parameters

                        +
                          +
                        • requiredAccessLevel: ApiKeyLevel +

                          The required API Key Access level for the endpoint.

                          +
                        +

                        Returns Promise<void>

                        +
                        +
                        +

                        PermitContextError If the currently set API key access level does not match the required access level.

                        +
                      +
                      + +
                        +
                      • + +
                        +

                        Ensure that the API context matches the required endpoint context.

                        +
                        +
                        +

                        Parameters

                        +
                          +
                        • requiredContext: ApiContextLevel +

                          The required API context level for the endpoint.

                          +
                        +

                        Returns Promise<void>

                        +
                        +
                        +

                        PermitContextError If the currently set API context level does not match the required context level.

                        +
                      +
                      + +
                      +
                      + +
                      +
                      diff --git a/docs/classes/Permit.html b/docs/classes/Permit.html index 14f8045b..8e83c9f8 100644 --- a/docs/classes/Permit.html +++ b/docs/classes/Permit.html @@ -1,417 +1,464 @@ -Permit | permitio
                      -
                      - -
                      +Permit | permitio
                      +
                      permitio + +
                        +
                        +
                        Preparing search index...
                        - +

                        Class Permit

                        -

                        The Permit class represents the main entry point for interacting with the Permit.io SDK. -The SDK constructor expects an object implementing the IPermitConfig interface.

                        +

                        The Permit class represents the main entry point for interacting with the Permit.io SDK. +The SDK constructor expects IPermitOptions; effective settings are validated and frozen.

                        Example usage:

                        -
                        import { Permit } from 'permitio';

                        const permit = new Permit({
                        // this is typically the same API Key you would use for the PDP container
                        token: "[YOUR_API_KEY]",
                        // in production, you might need to change this url to fit your deployment
                        pdp: "http://localhost:7766",
                        ...
                        });

                        // creates (or updates) a user on that can be assigned roles and permissions
                        const { user } = await permit.api.users.sync({
                        // the user key must be a unique id of the user
                        key: 'auth0|elon',
                        // optional params
                        email: 'elonmusk@tesla.com',
                        first_name: 'Elon',
                        last_name: 'Musk',
                        // user attributes can be used in attribute-based access-control policies
                        attributes: {
                        age: 50,
                        favoriteColor: 'red',
                        },
                        });

                        // 'document' is the protected resource we are enforcing access to
                        const resource = 'document';
                        // the action the user is trying to do on the resource
                        const action = 'read';

                        const permitted = await permit.check(user, action, resource);
                        if (permitted) {
                        console.log('User is authorized to read a document.');
                        } else {
                        console.log('User is not authorized to read a document.');
                        } -
                        -
                        -
                        -
                        -

                        Hierarchy

                        -
                          -
                        • Permit
                        +
                        import { Permit } from 'permitio';

                        const permit = new Permit({
                        // this is typically the same API Key you would use for the PDP container
                        token: "[YOUR_API_KEY]",
                        // in production, you might need to change this url to fit your deployment
                        pdp: "http://localhost:7766",
                        ...
                        });

                        // creates (or updates) a user on that can be assigned roles and permissions
                        const { user } = await permit.api.users.sync({
                        // the user key must be a unique id of the user
                        key: 'auth0|elon',
                        // optional params
                        email: 'elonmusk@tesla.com',
                        first_name: 'Elon',
                        last_name: 'Musk',
                        // user attributes can be used in attribute-based access-control policies
                        attributes: {
                        age: 50,
                        favoriteColor: 'red',
                        },
                        });

                        // 'document' is the protected resource we are enforcing access to
                        const resource = 'document';
                        // the action the user is trying to do on the resource
                        const action = 'read';

                        const permitted = await permit.check(user, action, resource);
                        if (permitted) {
                        console.log('User is authorized to read a document.');
                        } else {
                        console.log('User is not authorized to read a document.');
                        } +
                        + +

                        Implements

                        +
                      • Defined in src/index.ts:129
                      • -
                        - +
                        +
                        Index
                        -
                        -

                        Constructors

                        -
                        - +
                        + +
                        +
                        +
                          - -
                        • -

                          Constructs a new instance of the Permit class with the specified configuration.

                          +
                        • + +
                          +

                          Constructs a new instance of the Permit class with the specified configuration.

                          Parameters

                          -

                          Returns Permit

                          -
                        +

                        Returns Permit

                        +
                        +
                        +

                        TypeError When effective constructor options are invalid.

                        +
                        -
                        -

                        Properties

                        -
                        - +
                      • Defined in src/index.ts:176
                      • +
                        + +
                        +
                        +

                        Access the Permit REST API using this property.

                        Usage example:

                        -
                        const permit = new Permit(config);
                        permit.api.roles.create(...); -
                        -
                        -
                        -
                        - +
                      • Defined in src/index.ts:156
                      • +
                        +

                        Access the SDK configuration using this property. Once the SDK is initialized, the configuration is read-only.

                        Usage example:

                        -
                        const permit = new Permit(config);
                        const pdpUrl = permit.config.pdp; -
                        -
                        -
                        -
                        - +
                      • Defined in src/index.ts:144
                      • +
                        +

                        Access the Permit Elements API using this property.

                        Usage example:

                        -
                        const permit = new Permit(config);
                        permit.elements.loginAs(user, tenant); -
                        -
                        -
                        -
                        -

                        Methods

                        -
                        - +
                      • Defined in src/index.ts:168
                      • +
                        + +
                        +
                        +
                          - -
                        • +
                        • + +

                          Checks multiple requests within the specified context.

                          Parameters

                            -
                          • -
                            checks: ICheckQuery[]
                            +
                          • checks: ICheckQuery[]

                            The check requests.

                            -
                            -
                          • -
                          • -
                            Optional context: Context
                            +
                        • +
                        • Optionalcontext: Context

                          The context object representing the context in which the action is performed.

                          -
                          -
                        • -
                        • -
                          Optional config: CheckConfig
                        -

                        Returns Promise<boolean[]>

                        array containing true if the user is authorized, false otherwise for each check request.

                        + +
                      • Optionalconfig: CheckConfig
                      • +

                        Returns Promise<boolean[]>

                        array containing true if the user is authorized, false otherwise for each check request.

                        -

                        Throws

                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                        - -

                        Throws

                        PermitPDPStatusError if received a response with unexpected status code from the PDP.

                        -
                        -
                        - +
                      • Defined in src/index.ts:255
                      • +
                        +
                          - -
                        • +
                        • + +

                          Checks if a user is authorized to perform an action on a resource within the specified context.

                          Parameters

                            -
                          • -
                            user: string | IUser
                            +
                          • user: string | IUser

                            The user object representing the user.

                            -
                            -
                          • -
                          • -
                            action: string
                            +
                        • +
                        • action: string

                          The action to be performed on the resource.

                          -
                          -
                        • -
                        • -
                          resource: string | IResource
                          +
                        • +
                        • resource: string | IResource

                          The resource object representing the resource.

                          -
                          -
                        • -
                        • -
                          Optional context: Context
                          +
                        • +
                        • Optionalcontext: Context

                          The context object representing the context in which the action is performed.

                          -
                          -
                        • -
                        • -
                          Optional config: CheckConfig
                        -

                        Returns Promise<boolean>

                        true if the user is authorized, false otherwise.

                        + +
                      • Optionalconfig: CheckConfig
                      • +

                        Returns Promise<boolean>

                        true if the user is authorized, false otherwise.

                        -

                        Throws

                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                        - -

                        Throws

                        PermitPDPStatusError if received a response with unexpected status code from the PDP.

                        -
                        -
                        - +
                      • Defined in src/index.ts:213
                      • +
                        +
                          - -
                        • +
                        • + +

                          Get all tenants available in the system.

                          Parameters

                            -
                          • -
                            user: string | IUser
                          • -
                          • -
                            action: string
                          • -
                          • -
                            resource: string | IResource
                          • -
                          • -
                            Optional context: Context
                          • -
                          • -
                            Optional sdk: string
                          -

                          Returns Promise<TenantDetails[]>

                          An array of TenantDetails representing all tenants.

                          +
                        • user: string | IUser
                        • +
                        • action: string
                        • +
                        • resource: string | IResource
                        • +
                        • Optionalcontext: Context
                        • +
                        • Optionalsdk: string
                        +

                        Returns Promise<TenantDetails[]>

                        An array of TenantDetails representing all tenants.

                        +
                        +
                        + +
                          +
                        • + +
                          +

                          Checks a full URL against URL mappings on a compatible Permit container PDP.

                          +
                          +
                          +

                          Parameters

                          +
                            +
                          • user: string | IUser +

                            User key or attributes.

                            +
                          • +
                          • httpMethod: string +

                            HTTP method string, sent unchanged without an invented method enum.

                            +
                          • +
                          • url: string +

                            Absolute URI, 1..65536 Unicode characters, sent unchanged; it is not fetched.

                            +
                          • +
                          • Optionalconfig: CheckUrlConfig +

                            Tenant, context, timeout/error policy; unsupported OPA always rejects.

                            +
                          +

                          Returns Promise<boolean>

                          Literal allow decision, or false for ordinary failures in non-throwing mode.

                          -
                        -
                        - +
                      • Defined in src/index.ts:237
                      • +
                        +
                          - -
                        • +
                        • + +
                          +

                          Filters objects through bulk authorization while retaining original references and order.

                          +
                          +
                          +

                          Type Parameters

                          +
                          +
                          +

                          Parameters

                          +
                            +
                          • user: string | IUser +

                            User key or attributes.

                            +
                          • +
                          • action: string +

                            Action to evaluate for every object.

                            +
                          • +
                          • objects: readonly T[] +

                            Dense readonly array; extra fields remain in returned objects only.

                            +
                          • +
                          • Optionalcontext: Context +

                            Shared request context; an object's context overrides it.

                            +
                          • +
                          • Optionalconfig: CheckConfig +

                            Bulk timeout/error policy; unsupported OPA queries always reject.

                            +
                          +

                          Returns Promise<T[]>

                          Authorized original objects from a synchronous snapshot, including duplicates.

                          + +
                          +
                          +

                          For unsupported OPA/invalid slots, or non-JSON inputs in throwing mode.

                          +
                          +
                          +

                          On an operational failure in throwing mode.

                          +
                          +
                          +

                          On rejected/malformed bulk responses in throwing mode.

                          +
                        +
                        + +
                          +
                        • + +
                          +

                          Returns the full PDP result for users authorized to perform an action on a resource.

                          +
                          +
                          +

                          Parameters

                          +
                            +
                          • action: string +

                            Action to evaluate.

                            +
                          • +
                          • resource: string | IResource +

                            Resource type, type:key string, or resource attributes and tenant.

                            +
                          • +
                          • Optionalcontext: Context +

                            Request context overriding existing global context.

                            +
                          • +
                          • Optionalconfig: CheckConfig +

                            Timeout/error policy; unsupported useOpa:true always rejects.

                            +
                          +

                          Returns Promise<IAuthorizedUsersResult>

                          The validated result or a normalized empty result in non-throwing mode.

                          + +
                          +
                          +

                          For unsupported OPA, invalid resource strings, or non-JSON inputs.

                          +
                          +
                          +

                          On an operational failure in throwing mode.

                          +
                          +
                          +

                          On a rejected or malformed response in throwing mode.

                          +
                        +
                        + +
                          +
                        • + +
                          +

                          Returns one page of role assignments cached by a compatible container PDP.

                          +
                          +
                          +

                          Parameters

                          +
                            +
                          • Optionalquery: ILocalRoleAssignmentsQuery +

                            Key filters and pagination; defaults to page 1 and page size 30, maximum 100.

                            +
                          • +
                          • Optionalconfig: CheckConfig +

                            Timeout/error policy; useOpa:true is unsupported and always rejects.

                            +
                          +

                          Returns Promise<ILocalRoleAssignment[]>

                          Complete local rows, or [] on ordinary operational failure in non-throwing mode. +Omitted tenant is unfiltered. There is no automatic pagination or cache synchronization.

                          + +
                          +
                          +

                          For invalid input or unsupported OPA, regardless of error policy.

                          +
                          +
                          +

                          For malformed responses or unavailable 404/405/501 endpoints +regardless of policy; for other rejected responses in throwing mode.

                          +
                          +
                          +

                          On operational failure in throwing mode.

                          +
                        +
                        + +
                          +
                        • + +

                          Get all permissions for the specified user.

                          Parameters

                            -
                          • -
                            user: string | IUser
                            +
                          • user: string | IUser

                            The user object representing the user.

                            -
                            -
                          • -
                          • -
                            Optional tenants: string[]
                            +
                        • +
                        • Optionaltenants: string[]

                          The list of tenants to filter the permissions on ( given by roles ).

                          -
                          -
                        • -
                        • -
                          Optional resources: string[]
                          +
                        • +
                        • Optionalresources: string[]

                          The list of resources to filter the permissions on ( given by resource roles ).

                          -
                          -
                        • -
                        • -
                          Optional resource_types: string[]
                          +
                        • +
                        • Optionalresource_types: string[]

                          The list of resource types to filter the permissions on ( given by resource roles ).

                          -
                          -
                        • -
                        • -
                          Optional config: CheckConfig
                        -

                        Returns Promise<IUserPermissions>

                        object with key as the resource identifier and value as the resource details and permissions.

                        + +
                      • Optionalconfig: GetUserPermissionsConfig +

                        Timeout/error policy and request context overriding existing global context.

                        +
                      • +

                        Returns Promise<IUserPermissions>

                        object with key as the resource identifier and value as the resource details and permissions.

                        -

                        Throws

                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                        +
                        +

                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                        +
                        +
                        +

                        PermitPDPStatusError if the PDP returned an unexpected status code or response body.

                        +
                        +
                        + +
                          +
                        • + +
                          +

                          Returns a user's role-derived tenants from a compatible container PDP; not published by cloud.

                          +
                          +
                          +

                          Parameters

                          +
                            +
                          • user: string | IUser +

                            User key or attributes.

                            +
                          • +
                          • Optionalcontext: Context +

                            Request context overriding existing global context.

                            +
                          • +
                          • Optionalconfig: CheckConfig +

                            Timeout/error policy; unsupported useOpa:true always rejects.

                            +
                          +

                          Returns Promise<TenantDetails[]>

                          Validated tenants, or [] on operational failure in non-throwing mode.

                          -

                          Throws

                          PermitPDPStatusError if received a response with unexpected status code from the PDP.

                          -
                        +
                      • Defined in src/index.ts:296
                      • +
                        +
                        +

                        On This Page

                        +
                        Constructors +
                        +
                        Properties +
                        +
                        Methods +
                        -
                        -

                        Generated using TypeDoc

                        -
                        \ No newline at end of file + +
                        diff --git a/docs/classes/PermitApiError.html b/docs/classes/PermitApiError.html index 00a23ddf..8833a10a 100644 --- a/docs/classes/PermitApiError.html +++ b/docs/classes/PermitApiError.html @@ -1,334 +1,247 @@ -PermitApiError | permitio
                        -
                        - -
                        +PermitApiError | permitio
                        +
                        permitio + +
                          +
                          +
                          Preparing search index...
                          - -

                          Class PermitApiError<T>

                          -
                          -

                          Type Parameters

                          -
                            -
                          • -

                            T

                          -
                          + +

                          Class PermitApiError

                          +

                          Hierarchy

                            -
                          • Error +
                          • Error
                              -
                            • PermitApiError
                          -
                          - +
                          +
                          Index
                          -
                          -

                          Constructors

                          -
                          - +
                          + +
                          +
                          +
                            - -
                          • -
                            -

                            Type Parameters

                            -
                              -
                            • -

                              T

                            +
                          • + +
                            +

                            Creates a named REST failure from a detached, bounded request-error snapshot.

                            +

                            Parameters

                              -
                            • -
                              message: string
                            • -
                            • -
                              originalError: AxiosError<T, any>
                            -

                            Returns PermitApiError<T>

                          +

                          Returns PermitApiError

                          -
                          -

                          Properties

                          -
                          - +
                        • Defined in src/api/base.ts:43
                        • +
                          + +
                          +
                          + +
                          cause?: unknown
                          +
                          + +
                          code: string | undefined
                          +
                          +
                          message: string
                          -
                          - +
                        • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
                        • +
                          +
                          name: string
                          -
                          - -
                          originalError: AxiosError<T, any>
                          +
                          + +
                          originalError: AxiosError<unknown>
                          -
                          - +
                        • Defined in src/api/base.ts:33
                        • +
                          +
                          stack?: string
                          -
                          - -
                          prepareStackTrace?: ((err, stackTraces) => any)
                          -
                          -

                          Type declaration

                          -
                          +
                          + +
                          status: number | undefined
                          -
                          - -
                          stackTraceLimit: number
                          +
                          + +
                          stackTraceLimit: number
                          +

                          The Error.stackTraceLimit property specifies the number of stack frames +collected by a stack trace (whether generated by new Error().stack or +Error.captureStackTrace(obj)).

                          +

                          The default value is 10 but may be set to any valid JavaScript number. Changes +will affect any stack trace captured after the value has been changed.

                          +

                          If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.

                          +
                          -
                          -

                          Accessors

                          -
                          - +
                        • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:68
                        • +
                          + +
                          +
                          + +
                          +
                          +
                            -
                          • get request(): any
                          • -
                          • -

                            Returns any

                          -
                          - +
                        • Defined in src/api/base.ts:64
                        • +
                          +
                            -
                          • get response(): undefined | AxiosResponse<T, any>
                          • -
                          • -

                            Returns undefined | AxiosResponse<T, any>

                          -
                          -

                          Methods

                          -
                          - +
                        • Defined in src/api/base.ts:69
                        • +
                          + +
                          +
                          +
                            - -
                          • -

                            Create .stack property on a target object

                            +
                          • + +
                            +

                            Creates a .stack property on targetObject, which when accessed returns +a string representing the location in the code at which +Error.captureStackTrace() was called.

                            +
                            const myObject = {};
                            Error.captureStackTrace(myObject);
                            myObject.stack; // Similar to `new Error().stack` +
                            + +

                            The first line of the trace will be prefixed with +${myObject.name}: ${myObject.message}.

                            +

                            The optional constructorOpt argument accepts a function. If given, all frames +above constructorOpt, including constructorOpt, will be omitted from the +generated stack trace.

                            +

                            The constructorOpt argument is useful for hiding implementation +details of error generation from the user. For instance:

                            +
                            function a() {
                            b();
                            }

                            function b() {
                            c();
                            }

                            function c() {
                            // Create an error without stack trace to avoid calculating the stack trace twice.
                            const { stackTraceLimit } = Error;
                            Error.stackTraceLimit = 0;
                            const error = new Error();
                            Error.stackTraceLimit = stackTraceLimit;

                            // Capture the stack trace above function b
                            Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
                            throw error;
                            }

                            a(); +
                            +

                            Parameters

                              -
                            • -
                              targetObject: object
                            • -
                            • -
                              Optional constructorOpt: Function
                            -

                            Returns void

                            -
                          +

                          Returns void

                          +
                        • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:52
                        • +
                          + +
                            +
                          • + +
                            +
                            +

                            Parameters

                            +
                              +
                            • err: Error
                            • +
                            • stackTraces: CallSite[]
                            +

                            Returns any

                            +
                          +
                          +
                          +

                          On This Page

                          +
                          Constructors +
                          +
                          Properties +
                          +
                          Accessors +
                          +
                          Methods +
                          -
                          -

                          Generated using TypeDoc

                          -
                          \ No newline at end of file + +
                          diff --git a/docs/classes/PermitConnectionError.html b/docs/classes/PermitConnectionError.html index 2bb37d4d..4677af3d 100644 --- a/docs/classes/PermitConnectionError.html +++ b/docs/classes/PermitConnectionError.html @@ -1,290 +1,189 @@ -PermitConnectionError | permitio
                          -
                          - -
                          +PermitConnectionError | permitio
                          +
                          permitio + +
                            +
                            +
                            Preparing search index...
                            - +

                            Class PermitConnectionError

                            -
                            -

                            Hierarchy

                            +
                            +

                            Hierarchy (View Summary)

                            +
                          • Defined in src/enforcement/enforcer.ts:67
                          • -
                            - +
                            +
                            Index
                            -
                            -

                            Constructors

                            -
                            - +
                            + +
                            +
                            +
                            +

                            Returns PermitConnectionError

                            -
                            -

                            Properties

                            -
                            - +
                          • Defined in src/enforcement/enforcer.ts:70
                          • +
                            + +
                            +
                            + +
                            cause?: unknown
                            +
                            + +
                            code: string | undefined
                            +
                            +
                            message: string
                            -
                            - +
                          • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
                          • +
                            +
                            name: string
                            -
                            - +
                          • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
                          • +
                            +
                            stack?: string
                            -
                            - -
                            prepareStackTrace?: ((err, stackTraces) => any)
                            -
                            -

                            Type declaration

                            -
                              -
                            • -
                                -
                              • (err, stackTraces): any
                              • -
                              • -

                                Optional override for formatting stack traces

                                +
                              • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
                            +
                            + +
                            stackTraceLimit: number
                            +

                            The Error.stackTraceLimit property specifies the number of stack frames +collected by a stack trace (whether generated by new Error().stack or +Error.captureStackTrace(obj)).

                            +

                            The default value is 10 but may be set to any valid JavaScript number. Changes +will affect any stack trace captured after the value has been changed.

                            +

                            If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.

                            +
                            +
                            + +
                            +
                            + +
                              +
                            • + +
                              +

                              Creates a .stack property on targetObject, which when accessed returns +a string representing the location in the code at which +Error.captureStackTrace() was called.

                              +
                              const myObject = {};
                              Error.captureStackTrace(myObject);
                              myObject.stack; // Similar to `new Error().stack` +
                              + +

                              The first line of the trace will be prefixed with +${myObject.name}: ${myObject.message}.

                              +

                              The optional constructorOpt argument accepts a function. If given, all frames +above constructorOpt, including constructorOpt, will be omitted from the +generated stack trace.

                              +

                              The constructorOpt argument is useful for hiding implementation +details of error generation from the user. For instance:

                              +
                              function a() {
                              b();
                              }

                              function b() {
                              c();
                              }

                              function c() {
                              // Create an error without stack trace to avoid calculating the stack trace twice.
                              const { stackTraceLimit } = Error;
                              Error.stackTraceLimit = 0;
                              const error = new Error();
                              Error.stackTraceLimit = stackTraceLimit;

                              // Capture the stack trace above function b
                              Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
                              throw error;
                              }

                              a(); +
                              +

                              Parameters

                                -
                              • -
                                err: Error
                              • -
                              • -
                                stackTraces: CallSite[]
                              -

                              Returns any

                              -
                            -
                            - -
                            stackTraceLimit: number
                            -
                            -

                            Methods

                            -
                            - +
                          • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:52
                          • +
                            +
                              - -
                            • -

                              Create .stack property on a target object

                              -
                              +
                            • + +

                              Parameters

                                -
                              • -
                                targetObject: object
                              • -
                              • -
                                Optional constructorOpt: Function
                              -

                              Returns void

                              -
                            +

                            Returns any

                            +
                            +
                          • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:56
                          • +
                            +
                            +

                            On This Page

                            +
                            Constructors +
                            +
                            Properties +
                            +
                            Methods +
                            -
                            -

                            Generated using TypeDoc

                            -
                            \ No newline at end of file + +
                            diff --git a/docs/classes/PermitContextChangeError.html b/docs/classes/PermitContextChangeError.html new file mode 100644 index 00000000..4cf7be44 --- /dev/null +++ b/docs/classes/PermitContextChangeError.html @@ -0,0 +1,198 @@ +PermitContextChangeError | permitio
                            +
                            permitio + +
                              +
                              +
                              Preparing search index...
                              +
                              +
                              +
                              + +

                              Class PermitContextChangeError

                              +
                              +

                              The PermitContextChangeError will be thrown when the user is trying to set the +SDK context to an object that the current API Key cannot access (and if allowed, +such API calls will result in 401). Instead, the SDK throws this exception.

                              +
                              +
                              +

                              Hierarchy

                              +
                                +
                              • Error +
                                  +
                                • PermitContextChangeError
                              +
                              +
                              +
                              +
                              Index
                              +
                              +
                              + +
                              +
                              + +
                              +
                              + +
                              +
                              + +
                              +
                              + +
                                +
                              • + +
                                +
                                +

                                Parameters

                                +
                                  +
                                • message: string
                                • +
                                • Optionaloptions: ErrorOptions
                                +

                                Returns PermitContextChangeError

                              +
                              + +
                              +
                              + +
                              cause?: unknown
                              +
                              + +
                              code: string | undefined
                              +
                              + +
                              message: string
                              +
                              + +
                              name: string
                              +
                              + +
                              stack?: string
                              +
                              + +
                              status: number | undefined
                              +
                              + +
                              stackTraceLimit: number
                              +

                              The Error.stackTraceLimit property specifies the number of stack frames +collected by a stack trace (whether generated by new Error().stack or +Error.captureStackTrace(obj)).

                              +

                              The default value is 10 but may be set to any valid JavaScript number. Changes +will affect any stack trace captured after the value has been changed.

                              +

                              If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.

                              +
                              +
                              + +
                              +
                              + +
                                +
                              • + +
                                +

                                Creates a .stack property on targetObject, which when accessed returns +a string representing the location in the code at which +Error.captureStackTrace() was called.

                                +
                                const myObject = {};
                                Error.captureStackTrace(myObject);
                                myObject.stack; // Similar to `new Error().stack` +
                                + +

                                The first line of the trace will be prefixed with +${myObject.name}: ${myObject.message}.

                                +

                                The optional constructorOpt argument accepts a function. If given, all frames +above constructorOpt, including constructorOpt, will be omitted from the +generated stack trace.

                                +

                                The constructorOpt argument is useful for hiding implementation +details of error generation from the user. For instance:

                                +
                                function a() {
                                b();
                                }

                                function b() {
                                c();
                                }

                                function c() {
                                // Create an error without stack trace to avoid calculating the stack trace twice.
                                const { stackTraceLimit } = Error;
                                Error.stackTraceLimit = 0;
                                const error = new Error();
                                Error.stackTraceLimit = stackTraceLimit;

                                // Capture the stack trace above function b
                                Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
                                throw error;
                                }

                                a(); +
                                + +
                                +
                                +

                                Parameters

                                +
                                  +
                                • targetObject: object
                                • +
                                • OptionalconstructorOpt: Function
                                +

                                Returns void

                              +
                              + +
                                +
                              • + +
                                +
                                +

                                Parameters

                                +
                                  +
                                • err: Error
                                • +
                                • stackTraces: CallSite[]
                                +

                                Returns any

                                +
                              +
                              + +
                              +
                              diff --git a/docs/classes/PermitContextError.html b/docs/classes/PermitContextError.html index 6c111f43..681bc12b 100644 --- a/docs/classes/PermitContextError.html +++ b/docs/classes/PermitContextError.html @@ -1,19 +1,14 @@ -PermitContextError | permitio
                              -
                              - -
                              +PermitContextError | permitio
                              +
                              permitio + +
                                +
                                +
                                Preparing search index...
                                - +

                                Class PermitContextError

                                The PermitContextError class represents an error that occurs when an API method @@ -21,278 +16,185 @@

                                Class PermitContextError

                                organization the API call is being made). Some of the input for the API method is provided via the SDK context. If the context is missing some data required for a method - the API call will fail.

                                -
                                -
                                -
                                +
                                +

                                Hierarchy

                                  -
                                • Error +
                                • Error
                                    -
                                  • PermitContextError
                                -
                                - +
                                +
                                Index
                                -
                                -

                                Constructors

                                -
                                - +
                                + +
                                +
                                + +

                                Returns PermitContextError

                                -
                                -

                                Properties

                                -
                                - +
                              • Defined in src/api/context.ts:78
                              • +
                                + +
                                +
                                + +
                                cause?: unknown
                                +
                                + +
                                code: string | undefined
                                +
                                +
                                message: string
                                -
                                - +
                              • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
                              • +
                                +
                                name: string
                                -
                                - +
                              • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
                              • +
                                +
                                stack?: string
                                -
                                - -
                                prepareStackTrace?: ((err, stackTraces) => any)
                                -
                                -

                                Type declaration

                                -
                                +
                                + +
                                status: number | undefined
                                -
                                - -
                                stackTraceLimit: number
                                +
                                + +
                                stackTraceLimit: number
                                +

                                The Error.stackTraceLimit property specifies the number of stack frames +collected by a stack trace (whether generated by new Error().stack or +Error.captureStackTrace(obj)).

                                +

                                The default value is 10 but may be set to any valid JavaScript number. Changes +will affect any stack trace captured after the value has been changed.

                                +

                                If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.

                                +
                                -
                                -

                                Methods

                                -
                                - +
                              • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:68
                              • +
                                + +
                                +
                                +
                                  - -
                                • -

                                  Create .stack property on a target object

                                  +
                                • + +
                                  +

                                  Creates a .stack property on targetObject, which when accessed returns +a string representing the location in the code at which +Error.captureStackTrace() was called.

                                  +
                                  const myObject = {};
                                  Error.captureStackTrace(myObject);
                                  myObject.stack; // Similar to `new Error().stack` +
                                  + +

                                  The first line of the trace will be prefixed with +${myObject.name}: ${myObject.message}.

                                  +

                                  The optional constructorOpt argument accepts a function. If given, all frames +above constructorOpt, including constructorOpt, will be omitted from the +generated stack trace.

                                  +

                                  The constructorOpt argument is useful for hiding implementation +details of error generation from the user. For instance:

                                  +
                                  function a() {
                                  b();
                                  }

                                  function b() {
                                  c();
                                  }

                                  function c() {
                                  // Create an error without stack trace to avoid calculating the stack trace twice.
                                  const { stackTraceLimit } = Error;
                                  Error.stackTraceLimit = 0;
                                  const error = new Error();
                                  Error.stackTraceLimit = stackTraceLimit;

                                  // Capture the stack trace above function b
                                  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
                                  throw error;
                                  }

                                  a(); +
                                  +

                                  Parameters

                                    -
                                  • -
                                    targetObject: object
                                  • -
                                  • -
                                    Optional constructorOpt: Function
                                  -

                                  Returns void

                                  -
                                +

                                Returns void

                                +
                              • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:52
                              • +
                                + +
                                  +
                                • + +
                                  +
                                  +

                                  Parameters

                                  +
                                    +
                                  • err: Error
                                  • +
                                  • stackTraces: CallSite[]
                                  +

                                  Returns any

                                  +
                                +
                                +
                                +

                                On This Page

                                +
                                Constructors +
                                +
                                Properties +
                                +
                                Methods +
                                -
                                -

                                Generated using TypeDoc

                                -
                                \ No newline at end of file + +
                                diff --git a/docs/classes/PermitError.html b/docs/classes/PermitError.html index 2344aa55..b97155c4 100644 --- a/docs/classes/PermitError.html +++ b/docs/classes/PermitError.html @@ -1,293 +1,183 @@ -PermitError | permitio
                                -
                                - -
                                +PermitError | permitio
                                +
                                permitio + +
                                  +
                                  +
                                  Preparing search index...
                                  - +

                                  Class PermitError

                                  -
                                  -

                                  Hierarchy

                                  +
                                  +

                                  Hierarchy (View Summary)

                                  +
                                • Defined in src/enforcement/enforcer.ts:58
                                • -
                                  - +
                                  +
                                  Index
                                  -
                                  -

                                  Constructors

                                  -
                                  - +
                                  + +
                                  +
                                  +
                                    - -
                                  • +
                                  • + +

                                    Parameters

                                      -
                                    • -
                                      message: string
                                    -

                                    Returns PermitError

                                  +

                                  Returns PermitError

                                  -
                                  -

                                  Properties

                                  -
                                  - +
                                • Defined in src/enforcement/enforcer.ts:59
                                • +
                                  + +
                                  +
                                  + +
                                  cause?: unknown
                                  +
                                  +
                                  message: string
                                  -
                                  - +
                                • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
                                • +
                                  +
                                  name: string
                                  -
                                  - +
                                • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
                                • +
                                  +
                                  stack?: string
                                  -
                                  - -
                                  prepareStackTrace?: ((err, stackTraces) => any)
                                  -
                                  -

                                  Type declaration

                                  -
                                    -
                                  • -
                                      -
                                    • (err, stackTraces): any
                                    • -
                                    • -

                                      Optional override for formatting stack traces

                                      +
                                    • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
                                  +
                                  + +
                                  stackTraceLimit: number
                                  +

                                  The Error.stackTraceLimit property specifies the number of stack frames +collected by a stack trace (whether generated by new Error().stack or +Error.captureStackTrace(obj)).

                                  +

                                  The default value is 10 but may be set to any valid JavaScript number. Changes +will affect any stack trace captured after the value has been changed.

                                  +

                                  If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.

                                  +
                                  +
                                  + +
                                  +
                                  + +
                                    +
                                  • + +
                                    +

                                    Creates a .stack property on targetObject, which when accessed returns +a string representing the location in the code at which +Error.captureStackTrace() was called.

                                    +
                                    const myObject = {};
                                    Error.captureStackTrace(myObject);
                                    myObject.stack; // Similar to `new Error().stack` +
                                    + +

                                    The first line of the trace will be prefixed with +${myObject.name}: ${myObject.message}.

                                    +

                                    The optional constructorOpt argument accepts a function. If given, all frames +above constructorOpt, including constructorOpt, will be omitted from the +generated stack trace.

                                    +

                                    The constructorOpt argument is useful for hiding implementation +details of error generation from the user. For instance:

                                    +
                                    function a() {
                                    b();
                                    }

                                    function b() {
                                    c();
                                    }

                                    function c() {
                                    // Create an error without stack trace to avoid calculating the stack trace twice.
                                    const { stackTraceLimit } = Error;
                                    Error.stackTraceLimit = 0;
                                    const error = new Error();
                                    Error.stackTraceLimit = stackTraceLimit;

                                    // Capture the stack trace above function b
                                    Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
                                    throw error;
                                    }

                                    a(); +
                                    +

                                    Parameters

                                      -
                                    • -
                                      err: Error
                                    • -
                                    • -
                                      stackTraces: CallSite[]
                                    -

                                    Returns any

                                    -
                                  -
                                  - -
                                  stackTraceLimit: number
                                  -
                                  -

                                  Methods

                                  -
                                  - +
                                • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:52
                                • +
                                  +
                                    - -
                                  • -

                                    Create .stack property on a target object

                                    -
                                    +
                                  • + +

                                    Parameters

                                      -
                                    • -
                                      targetObject: object
                                    • -
                                    • -
                                      Optional constructorOpt: Function
                                    -

                                    Returns void

                                    -
                                  +

                                  Returns any

                                  +
                                  +
                                • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:56
                                • +
                                  +
                                  +

                                  On This Page

                                  +
                                  Constructors +
                                  +
                                  Properties +
                                  +
                                  Methods +
                                  -
                                  -

                                  Generated using TypeDoc

                                  -
                                  \ No newline at end of file + +
                                  diff --git a/docs/classes/PermitPDPStatusError.html b/docs/classes/PermitPDPStatusError.html index 5f53362d..a3863842 100644 --- a/docs/classes/PermitPDPStatusError.html +++ b/docs/classes/PermitPDPStatusError.html @@ -1,290 +1,212 @@ -PermitPDPStatusError | permitio
                                  -
                                  - -
                                  +PermitPDPStatusError | permitio
                                  +
                                  permitio + +
                                    +
                                    +
                                    Preparing search index...
                                    - +

                                    Class PermitPDPStatusError

                                    -
                                    -

                                    Hierarchy

                                    +
                                    +

                                    Hierarchy (View Summary)

                                    +
                                  • Defined in src/enforcement/enforcer.ts:77
                                  • -
                                    - +
                                    +
                                    Index
                                    -
                                    -

                                    Constructors

                                    -
                                    - +
                                    + +
                                    +
                                    +
                                      - -
                                    • +
                                    • + +
                                      +

                                      Creates an error for an unexpected HTTP status code or response body from the PDP.

                                      +

                                      Parameters

                                        -
                                      • -
                                        message: string
                                      -

                                      Returns PermitPDPStatusError

                                    +

                                    Returns PermitPDPStatusError

                                    +
                                    + +
                                    +
                                    + +
                                    cause?: unknown
                                    -
                                    -

                                    Properties

                                    -
                                    - +
                                  • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
                                  • +
                                    + +
                                    code: string | undefined
                                    +
                                    +
                                    message: string
                                    -
                                    - +
                                  • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
                                  • +
                                    +
                                    name: string
                                    +
                                    + +
                                    responseBody: unknown
                                    -
                                    - +
                                  • Defined in src/enforcement/enforcer.ts:78
                                  • +
                                    +
                                    stack?: string
                                    -
                                    - -
                                    prepareStackTrace?: ((err, stackTraces) => any)
                                    -
                                    -

                                    Type declaration

                                    -
                                      -
                                    • -
                                        -
                                      • (err, stackTraces): any
                                      • -
                                      • -

                                        Optional override for formatting stack traces

                                        +
                                      • Defined in node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
                                    +
                                    + +
                                    statusCode?: number
                                    +
                                    + +
                                    stackTraceLimit: number
                                    +

                                    The Error.stackTraceLimit property specifies the number of stack frames +collected by a stack trace (whether generated by new Error().stack or +Error.captureStackTrace(obj)).

                                    +

                                    The default value is 10 but may be set to any valid JavaScript number. Changes +will affect any stack trace captured after the value has been changed.

                                    +

                                    If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.

                                    +
                                    +
                                    + +
                                    +
                                    + +
                                      +
                                    • + +
                                      +

                                      Creates a .stack property on targetObject, which when accessed returns +a string representing the location in the code at which +Error.captureStackTrace() was called.

                                      +
                                      const myObject = {};
                                      Error.captureStackTrace(myObject);
                                      myObject.stack; // Similar to `new Error().stack` +
                                      + +

                                      The first line of the trace will be prefixed with +${myObject.name}: ${myObject.message}.

                                      +

                                      The optional constructorOpt argument accepts a function. If given, all frames +above constructorOpt, including constructorOpt, will be omitted from the +generated stack trace.

                                      +

                                      The constructorOpt argument is useful for hiding implementation +details of error generation from the user. For instance:

                                      +
                                      function a() {
                                      b();
                                      }

                                      function b() {
                                      c();
                                      }

                                      function c() {
                                      // Create an error without stack trace to avoid calculating the stack trace twice.
                                      const { stackTraceLimit } = Error;
                                      Error.stackTraceLimit = 0;
                                      const error = new Error();
                                      Error.stackTraceLimit = stackTraceLimit;

                                      // Capture the stack trace above function b
                                      Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
                                      throw error;
                                      }

                                      a(); +
                                      +

                                      Parameters

                                        -
                                      • -
                                        err: Error
                                      • -
                                      • -
                                        stackTraces: CallSite[]
                                      -

                                      Returns any

                                      -
                                    -
                                    - -
                                    stackTraceLimit: number
                                    -
                                    -

                                    Methods

                                    -
                                    - +
                                  • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:52
                                  • +
                                    +
                                      - -
                                    • -

                                      Create .stack property on a target object

                                      -
                                      +
                                    • + +

                                      Parameters

                                        -
                                      • -
                                        targetObject: object
                                      • -
                                      • -
                                        Optional constructorOpt: Function
                                      -

                                      Returns void

                                      -
                                    +

                                    Returns any

                                    +
                                    +
                                  • Defined in node_modules/.pnpm/@types+node@22.20.4/node_modules/@types/node/globals.d.ts:56
                                  • +
                                    +
                                    +

                                    On This Page

                                    +
                                    Constructors +
                                    +
                                    Properties +
                                    +
                                    Methods +
                                    -
                                    -

                                    Generated using TypeDoc

                                    -
                                    \ No newline at end of file + +
                                    diff --git a/docs/classes/ProjectsApi.html b/docs/classes/ProjectsApi.html index e25c6267..b6472d6b 100644 --- a/docs/classes/ProjectsApi.html +++ b/docs/classes/ProjectsApi.html @@ -1,470 +1,334 @@ -ProjectsApi | permitio
                                    -
                                    - -
                                    +ProjectsApi | permitio
                                    +
                                    permitio + +
                                      +
                                      +
                                      Preparing search index...
                                      - +

                                      Class ProjectsApi

                                      The ProjectsApi class provides methods for interacting with Permit Projects.

                                      -
                                      -
                                      -
                                      +
                                      +

                                      Hierarchy

                                        -
                                      • BasePermitApi +
                                      • BasePermitApi
                                          -
                                        • ProjectsApi
                                      +
                                    • ProjectsApi
                                    • Implements

                                      +
                                    • Defined in src/api/projects.ts:95
                                    • -
                                      - +
                                      +
                                      Index
                                      -
                                      -

                                      Constructors

                                      -
                                      - +
                                      + +
                                      +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Creates an instance of the ProjectsApi.

                                        Parameters

                                          -
                                        • -
                                          config: IPermitConfig
                                          +
                                        • config: IPermitConfig

                                          The configuration object for the Permit SDK.

                                          -
                                          -
                                        • -
                                        • -
                                          logger: Logger<LoggerOptions>
                                          +
                                      • +
                                      • logger: Logger

                                        The logger instance for logging.

                                        -
                                        -
                                      -

                                      Returns ProjectsApi

                                      -
                                      +
                                      + +
                                      +
                                      + +

                                      Returns Promise<ProjectRead>

                                      A promise that resolves to the created project.

                                      -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/projects.ts:192
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Deletes a project.

                                        Parameters

                                          -
                                        • -
                                          projectKey: string
                                          +
                                        • projectKey: string

                                          The key of the project to delete.

                                          -
                                          -
                                        -

                                        Returns Promise<void>

                                        A promise that resolves when the project is deleted.

                                        +
                                      +

                                      Returns Promise<void>

                                      A promise that resolves when the project is deleted.

                                      -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/projects.ts:238
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                        Parameters

                                          -
                                        • -
                                          requiredAccessLevel: ApiKeyLevel
                                          +
                                        • requiredAccessLevel: ApiKeyLevel

                                          The required API Key Access level for the endpoint.

                                          -
                                          -
                                        -

                                        Returns Promise<void>

                                        +
                                      +

                                      Returns Promise<void>

                                      -

                                      Throws

                                      PermitContextError If the currently set API key access level does not match the required access level.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/base.ts:162
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Ensure that the API context matches the required endpoint context.

                                        Parameters

                                          -
                                        • -
                                          requiredContext: ApiContextLevel
                                          +
                                        • requiredContext: ApiContextLevel

                                          The required API context level for the endpoint.

                                          -
                                          -
                                        -

                                        Returns Promise<void>

                                        +
                                      +

                                      Returns Promise<void>

                                      -

                                      Throws

                                      PermitContextError If the currently set API context level does not match the required context level.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/base.ts:189
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Retrieves a project by its key.

                                        Parameters

                                          -
                                        • -
                                          projectKey: string
                                          +
                                        • projectKey: string

                                          The key of the project.

                                          -
                                          -
                                        -

                                        Returns Promise<ProjectRead>

                                        A promise that resolves to the project.

                                        +
                                      +

                                      Returns Promise<ProjectRead>

                                      A promise that resolves to the project.

                                      -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/projects.ts:144
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Retrieves a project by its ID. -Alias for the get method.

                                        +Alias for the get method.

                                        Parameters

                                          -
                                        • -
                                          projectId: string
                                          +
                                        • projectId: string

                                          The ID of the project.

                                          -
                                          -
                                        -

                                        Returns Promise<ProjectRead>

                                        A promise that resolves to the project.

                                        +
                                      +

                                      Returns Promise<ProjectRead>

                                      A promise that resolves to the project.

                                      -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/projects.ts:180
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Retrieves a project by its key. -Alias for the get method.

                                        +Alias for the get method.

                                        Parameters

                                          -
                                        • -
                                          projectKey: string
                                          +
                                        • projectKey: string

                                          The key of the project.

                                          -
                                          -
                                        -

                                        Returns Promise<ProjectRead>

                                        A promise that resolves to the project.

                                        +
                                      +

                                      Returns Promise<ProjectRead>

                                      A promise that resolves to the project.

                                      -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/projects.ts:167
                                    • +
                                      + +

                                      Returns Promise<ProjectRead[]>

                                      A promise that resolves to an array of projects.

                                      -

                                      See

                                      IPagination

                                      - -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      -
                                      - +
                                    • Defined in src/api/projects.ts:120
                                    • +
                                      +
                                        - -
                                      • +
                                      • + +

                                        Updates a project.

                                        Parameters

                                          -
                                        • -
                                          projectKey: string
                                          +
                                        • projectKey: string

                                          The key of the project.

                                          -
                                          -
                                        • -
                                        • -
                                          projectData: ProjectUpdate
                                          +
                                      • +
                                      • projectData: ProjectUpdate

                                        The updated data for the project.

                                        -
                                        -
                                      -

                                      Returns Promise<ProjectRead>

                                      A promise that resolves to the updated project.

                                      + +

                                      Returns Promise<ProjectRead>

                                      A promise that resolves to the updated project.

                                      -

                                      Throws

                                      PermitApiError If the API returns an error HTTP status code.

                                      - -

                                      Throws

                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                      -
                                      +
                                    • Defined in src/api/projects.ts:215
                                    • +
                                      +
                                      +

                                      On This Page

                                      +
                                      Constructors +
                                      +
                                      Methods +
                                      -
                                      -

                                      Generated using TypeDoc

                                      -
                                      \ No newline at end of file + +
                                      diff --git a/docs/classes/ProxyConfigsApi.html b/docs/classes/ProxyConfigsApi.html new file mode 100644 index 00000000..a7408a70 --- /dev/null +++ b/docs/classes/ProxyConfigsApi.html @@ -0,0 +1,240 @@ +ProxyConfigsApi | permitio
                                      +
                                      permitio + +
                                        +
                                        +
                                        Preparing search index...
                                        +
                                        +
                                        +
                                        + +

                                        Class ProxyConfigsApi

                                        +
                                        +

                                        Direct control-plane client for the five published proxy configuration operations.

                                        +
                                        +
                                        +

                                        Hierarchy

                                        +
                                          +
                                        • BasePermitApi +
                                            +
                                          • ProxyConfigsApi
                                        +
                                        +

                                        Implements

                                        +
                                        +
                                        +
                                        +
                                        +
                                        Index
                                        +
                                        +
                                        + +
                                        +
                                        + +
                                        +
                                        + +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Creates the proxy configuration client.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • config: IPermitConfig +

                                            The SDK configuration and selected API context.

                                            +
                                          • +
                                          • logger: Logger +

                                            The SDK logger.

                                            +
                                          +

                                          Returns ProxyConfigsApi

                                        +
                                        + +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Creates a proxy configuration; an existing key may return the existing configuration.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • proxyConfig: ProxyConfigCreate +

                                            The key, name, secret and optional authentication/mapping rules.

                                            +
                                          +

                                          Returns Promise<ProxyConfigRead>

                                          The complete API response, preserving its secret without merging submitted values.

                                          +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Deletes a proxy configuration by its key or UUID.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • proxyConfigKeyOrId: string +

                                            The proxy configuration key or UUID.

                                            +
                                          +

                                          Returns Promise<void>

                                          A promise that resolves to undefined after successful deletion.

                                          +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • requiredAccessLevel: ApiKeyLevel +

                                            The required API Key Access level for the endpoint.

                                            +
                                          +

                                          Returns Promise<void>

                                          +
                                          +
                                          +

                                          PermitContextError If the currently set API key access level does not match the required access level.

                                          +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Ensure that the API context matches the required endpoint context.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • requiredContext: ApiContextLevel +

                                            The required API context level for the endpoint.

                                            +
                                          +

                                          Returns Promise<void>

                                          +
                                          +
                                          +

                                          PermitContextError If the currently set API context level does not match the required context level.

                                          +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Gets a proxy configuration by its key or UUID.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • proxyConfigKeyOrId: string +

                                            The proxy configuration key or UUID.

                                            +
                                          +

                                          Returns Promise<ProxyConfigRead>

                                          The complete stored configuration; any returned secret mask is preserved.

                                          +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Lists proxy configurations in the selected environment.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • params: IPagination = {} +

                                            Pagination; page defaults to 1 and perPage to 100.

                                            +
                                          +

                                          Returns Promise<ProxyConfigRead[]>

                                          Complete stored rows in a plain array, including the received secret values.

                                          +
                                        +
                                        + +
                                          +
                                        • + +
                                          +

                                          Partially updates the supplied fields; mapping rules may use should_delete for removal.

                                          +
                                          +
                                          +

                                          Parameters

                                          +
                                            +
                                          • proxyConfigKeyOrId: string +

                                            The proxy configuration key or UUID.

                                            +
                                          • +
                                          • proxyConfig: ProxyConfigUpdate +

                                            The name, secret, authentication mechanism and/or mapping rule updates.

                                            +
                                          +

                                          Returns Promise<ProxyConfigRead>

                                          The complete API response, preserving its secret without merging submitted values.

                                          +
                                        +
                                        + +
                                        +
                                        diff --git a/docs/classes/RelationshipTuplesApi.html b/docs/classes/RelationshipTuplesApi.html new file mode 100644 index 00000000..5a02f5bc --- /dev/null +++ b/docs/classes/RelationshipTuplesApi.html @@ -0,0 +1,329 @@ +RelationshipTuplesApi | permitio
                                        +
                                        permitio + +
                                          +
                                          +
                                          Preparing search index...
                                          +
                                          +
                                          +
                                          + +

                                          Class RelationshipTuplesApi

                                          +
                                          +

                                          The RelationshipTuplesApi class provides methods for interacting with Role createments.

                                          +
                                          +
                                          +

                                          Hierarchy

                                          +
                                            +
                                          • BaseFactsPermitAPI +
                                              +
                                            • RelationshipTuplesApi
                                          +
                                          +

                                          Implements

                                          +
                                          +
                                          +
                                          +
                                          +
                                          Index
                                          +
                                          +
                                          + +
                                          +
                                          + +
                                            +
                                          • + +
                                            +

                                            Creates an instance of the RelationshipTuplesApi.

                                            +
                                            +
                                            +

                                            Parameters

                                            +
                                              +
                                            • config: IPermitConfig +

                                              The configuration object for the Permit SDK.

                                              +
                                            • +
                                            • logger: Logger +

                                              The logger instance for logging.

                                              +
                                            +

                                            Returns RelationshipTuplesApi

                                          +
                                          + +
                                          +
                                          + +
                                            +
                                          • + +
                                            +

                                            Creates a new relationship tuple, that states that a relationship (of type: relation) +exists between two resource instances: the subject and the object.

                                            +
                                            +
                                            +

                                            Parameters

                                            +
                                            +

                                            Returns Promise<object>

                                            The response object. Its fields are unspecified by the current API schema.

                                            + +
                                            +
                                            +

                                            PermitApiError If the API returns an error HTTP status code.

                                            +
                                            +
                                            +

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            +
                                          +
                                          + +
                                            +
                                          • + +
                                            +

                                            Deletes multiple relationship tuples at once using the provided tuple data. +Each tuple object is of type RelationshipTupleDelete and is essentially a tuple of (subject, relation, object).

                                            +
                                            +
                                            +

                                            Parameters

                                            +
                                            +

                                            Returns Promise<object>

                                            The response object. Its fields are unspecified by the current API schema.

                                            + +
                                            +
                                            +

                                            PermitApiError If the API returns an error HTTP status code.

                                            +
                                            +
                                            +

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            +
                                          +
                                          + +
                                          +
                                          + +
                                          +
                                          + +
                                            +
                                          • + +
                                            +

                                            Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                            +
                                            +
                                            +

                                            Parameters

                                            +
                                              +
                                            • requiredAccessLevel: ApiKeyLevel +

                                              The required API Key Access level for the endpoint.

                                              +
                                            +

                                            Returns Promise<void>

                                            +
                                            +
                                            +

                                            PermitContextError If the currently set API key access level does not match the required access level.

                                            +
                                          +
                                          + +
                                            +
                                          • + +
                                            +

                                            Ensure that the API context matches the required endpoint context.

                                            +
                                            +
                                            +

                                            Parameters

                                            +
                                              +
                                            • requiredContext: ApiContextLevel +

                                              The required API context level for the endpoint.

                                              +
                                            +

                                            Returns Promise<void>

                                            +
                                            +
                                            +

                                            PermitContextError If the currently set API context level does not match the required context level.

                                            +
                                          +
                                          + +
                                          +
                                          + +
                                          +
                                          + +
                                            +
                                          • + +
                                            +

                                            Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                            +
                                            +
                                            +

                                            Parameters

                                            +
                                              +
                                            • timeout: number | null +

                                              The maximum number of seconds to wait for the synchronization to complete. +Set to null to wait indefinitely.

                                              +
                                            • +
                                            • Optionalpolicy: FactsSyncTimeoutPolicy +

                                              Controls what happens when the timeout is reached during synchronization.

                                              +
                                                +
                                              • 'ignore': Respond immediately when data update did not apply within the timeout period
                                              • +
                                              • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                              • +
                                              +
                                            +

                                            Returns this

                                          +
                                          + +
                                          +
                                          diff --git a/docs/classes/ResourceActionGroupsApi.html b/docs/classes/ResourceActionGroupsApi.html index b7aa4222..9f475006 100644 --- a/docs/classes/ResourceActionGroupsApi.html +++ b/docs/classes/ResourceActionGroupsApi.html @@ -1,500 +1,352 @@ -ResourceActionGroupsApi | permitio
                                          -
                                          - -
                                          +ResourceActionGroupsApi | permitio
                                          +
                                          permitio + +
                                            +
                                            +
                                            Preparing search index...
                                            - +

                                            Class ResourceActionGroupsApi

                                            API client for interacting with the Resource Action Groups API.

                                            -
                                            -
                                            -
                                            +
                                            +

                                            Hierarchy

                                              -
                                            • BasePermitApi +
                                            • BasePermitApi
                                                -
                                              • ResourceActionGroupsApi
                                            +
                                          • ResourceActionGroupsApi
                                          • Implements

                                            +
                                          • Defined in src/api/resource-action-groups.ts:119
                                          • -
                                            - +
                                            +
                                            Index
                                            -
                                            -

                                            Constructors

                                            -
                                            - +
                                            + +
                                            +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Creates an instance of the ResourceActionGroupsApi.

                                              Parameters

                                                -
                                              • -
                                                config: IPermitConfig
                                                +
                                              • config: IPermitConfig

                                                The configuration object for the Permit SDK.

                                                -
                                                -
                                              • -
                                              • -
                                                logger: Logger<LoggerOptions>
                                                +
                                            • +
                                            • logger: Logger

                                              The logger instance for logging.

                                              -
                                              -
                                            -

                                            Returns ResourceActionGroupsApi

                                            -
                                            +
                                            + +
                                            +
                                            + -

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the created action group.

                                            + +

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the created action group.

                                            -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/resource-action-groups.ts:222
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Deletes a action group based on the resource key and group key.

                                              Parameters

                                                -
                                              • -
                                                resourceKey: string
                                                +
                                              • resourceKey: string

                                                The resource key.

                                                -
                                                -
                                              • -
                                              • -
                                                groupKey: string
                                                +
                                            • +
                                            • groupKey: string

                                              The group key.

                                              -
                                              -
                                            -

                                            Returns Promise<void>

                                            A promise that resolves when the action group is successfully deleted.

                                            + +

                                            Returns Promise<void>

                                            A promise that resolves when the action group is successfully deleted.

                                            -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/resource-action-groups.ts:279
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                              Parameters

                                                -
                                              • -
                                                requiredAccessLevel: ApiKeyLevel
                                                +
                                              • requiredAccessLevel: ApiKeyLevel

                                                The required API Key Access level for the endpoint.

                                                -
                                                -
                                              -

                                              Returns Promise<void>

                                              +
                                            +

                                            Returns Promise<void>

                                            -

                                            Throws

                                            PermitContextError If the currently set API key access level does not match the required access level.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/base.ts:162
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Ensure that the API context matches the required endpoint context.

                                              Parameters

                                                -
                                              • -
                                                requiredContext: ApiContextLevel
                                                +
                                              • requiredContext: ApiContextLevel

                                                The required API context level for the endpoint.

                                                -
                                                -
                                              -

                                              Returns Promise<void>

                                              +
                                            +

                                            Returns Promise<void>

                                            -

                                            Throws

                                            PermitContextError If the currently set API context level does not match the required context level.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/base.ts:189
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Retrieves an action group based on the resource key and the group key.

                                              Parameters

                                                -
                                              • -
                                                resourceKey: string
                                                +
                                              • resourceKey: string

                                                The resource key.

                                                -
                                                -
                                              • -
                                              • -
                                                groupKey: string
                                                +
                                            • +
                                            • groupKey: string

                                              The group key.

                                              -
                                              -
                                            -

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                            + +

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                            -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/resource-action-groups.ts:170
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Retrieves an action group based on the resource ID and the group ID. -Alias for the get method.

                                              +Alias for the get method.

                                              Parameters

                                                -
                                              • -
                                                resourceId: string
                                                +
                                              • resourceId: string

                                                The resource ID.

                                                -
                                                -
                                              • -
                                              • -
                                                groupId: string
                                                +
                                            • +
                                            • groupId: string

                                              The group ID.

                                              -
                                              -
                                            -

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                            + +

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                            -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/resource-action-groups.ts:210
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Retrieves an action group based on the resource key and the group key. -Alias for the get method.

                                              +Alias for the get method.

                                              Parameters

                                                -
                                              • -
                                                resourceKey: string
                                                +
                                              • resourceKey: string

                                                The resource key.

                                                -
                                                -
                                              • -
                                              • -
                                                groupKey: string
                                                +
                                            • +
                                            • groupKey: string

                                              The group key.

                                              -
                                              -
                                            -

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                            + +

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                            -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/resource-action-groups.ts:196
                                          • +
                                            + +

                                            Returns Promise<ResourceActionGroupRead[]>

                                            A promise that resolves to an array of ResourceActionGroupRead objects representing the action groups.

                                            -

                                            See

                                            IListActionGroups

                                            - -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            -
                                            - +
                                          • Defined in src/api/resource-action-groups.ts:143
                                          • +
                                            +
                                              - -
                                            • +
                                            • + +

                                              Updates an action group.

                                              Parameters

                                                -
                                              • -
                                                resourceKey: string
                                                +
                                              • resourceKey: string

                                                The resource key.

                                                -
                                                -
                                              • -
                                              • -
                                                groupKey: string
                                                +
                                            • +
                                            • groupKey: string

                                              The group key.

                                              -
                                              -
                                            • -
                                            • -
                                              groupData: ResourceActionGroupUpdate
                                              +
                                            • +
                                            • groupData: ResourceActionGroupUpdate

                                              The action group data.

                                              -
                                              -
                                            -

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the updated action group.

                                            + +

                                            Returns Promise<ResourceActionGroupRead>

                                            A promise that resolves to a ResourceActionGroupRead object representing the updated action group.

                                            -

                                            Throws

                                            PermitApiError If the API returns an error HTTP status code.

                                            - -

                                            Throws

                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                            -
                                            +
                                          • Defined in src/api/resource-action-groups.ts:250
                                          • +
                                            +
                                            +

                                            On This Page

                                            +
                                            Constructors +
                                            +
                                            Methods +
                                            -
                                            -

                                            Generated using TypeDoc

                                            -
                                            \ No newline at end of file + +
                                            diff --git a/docs/classes/ResourceActionsApi.html b/docs/classes/ResourceActionsApi.html index cd997b58..f4c6959c 100644 --- a/docs/classes/ResourceActionsApi.html +++ b/docs/classes/ResourceActionsApi.html @@ -1,500 +1,352 @@ -ResourceActionsApi | permitio
                                            -
                                            - -
                                            +ResourceActionsApi | permitio
                                            +
                                            permitio + +
                                              +
                                              +
                                              Preparing search index...
                                              - +

                                              Class ResourceActionsApi

                                              API client for interacting with the Resource Actions API.

                                              -
                                              -
                                              -
                                              +
                                              +

                                              Hierarchy

                                                -
                                              • BasePermitApi +
                                              • BasePermitApi
                                                  -
                                                • ResourceActionsApi
                                              +
                                            • ResourceActionsApi
                                            • Implements

                                              +
                                            • Defined in src/api/resource-actions.ts:118
                                            • -
                                              - +
                                              +
                                              Index
                                              -
                                              -

                                              Constructors

                                              -
                                              - +
                                              + +
                                              +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Creates an instance of the ResourceActionsApi.

                                                Parameters

                                                  -
                                                • -
                                                  config: IPermitConfig
                                                  +
                                                • config: IPermitConfig

                                                  The configuration object for the Permit SDK.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  logger: Logger<LoggerOptions>
                                                  +
                                              • +
                                              • logger: Logger

                                                The logger instance for logging.

                                                -
                                                -
                                              -

                                              Returns ResourceActionsApi

                                              -
                                              +
                                              + +
                                              +
                                              + -

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the created action.

                                              + +

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the created action.

                                              -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/resource-actions.ts:222
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Deletes a action based on the resource key and action key.

                                                Parameters

                                                  -
                                                • -
                                                  resourceKey: string
                                                  +
                                                • resourceKey: string

                                                  The resource key.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  actionKey: string
                                                  +
                                              • +
                                              • actionKey: string

                                                The action key.

                                                -
                                                -
                                              -

                                              Returns Promise<void>

                                              A promise that resolves when the action is successfully deleted.

                                              + +

                                              Returns Promise<void>

                                              A promise that resolves when the action is successfully deleted.

                                              -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/resource-actions.ts:280
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                Parameters

                                                  -
                                                • -
                                                  requiredAccessLevel: ApiKeyLevel
                                                  +
                                                • requiredAccessLevel: ApiKeyLevel

                                                  The required API Key Access level for the endpoint.

                                                  -
                                                  -
                                                -

                                                Returns Promise<void>

                                                +
                                              +

                                              Returns Promise<void>

                                              -

                                              Throws

                                              PermitContextError If the currently set API key access level does not match the required access level.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/base.ts:162
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Ensure that the API context matches the required endpoint context.

                                                Parameters

                                                  -
                                                • -
                                                  requiredContext: ApiContextLevel
                                                  +
                                                • requiredContext: ApiContextLevel

                                                  The required API context level for the endpoint.

                                                  -
                                                  -
                                                -

                                                Returns Promise<void>

                                                +
                                              +

                                              Returns Promise<void>

                                              -

                                              Throws

                                              PermitContextError If the currently set API context level does not match the required context level.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/base.ts:189
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Retrieves an action based on the resource key and the action key.

                                                Parameters

                                                  -
                                                • -
                                                  resourceKey: string
                                                  +
                                                • resourceKey: string

                                                  The resource key.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  actionKey: string
                                                  +
                                              • +
                                              • actionKey: string

                                                The action key.

                                                -
                                                -
                                              -

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the action.

                                              + +

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the action.

                                              -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/resource-actions.ts:169
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Retrieves an action based on the resource ID and the action ID. -Alias for the get method.

                                                +Alias for the get method.

                                                Parameters

                                                  -
                                                • -
                                                  resourceId: string
                                                  +
                                                • resourceId: string

                                                  The resource ID.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  actionId: string
                                                  +
                                              • +
                                              • actionId: string

                                                The action ID.

                                                -
                                                -
                                              -

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the action.

                                              + +

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the action.

                                              -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/resource-actions.ts:209
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Retrieves an action based on the resource key and the action key. -Alias for the get method.

                                                +Alias for the get method.

                                                Parameters

                                                  -
                                                • -
                                                  resourceKey: string
                                                  +
                                                • resourceKey: string

                                                  The resource key.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  actionKey: string
                                                  +
                                              • +
                                              • actionKey: string

                                                The action key.

                                                -
                                                -
                                              -

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the action.

                                              + +

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the action.

                                              -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/resource-actions.ts:195
                                            • +
                                              + +

                                              Returns Promise<ResourceActionRead[]>

                                              A promise that resolves to an array of ResourceActionRead objects representing the actions.

                                              -

                                              See

                                              IListActions

                                              - -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              -
                                              - +
                                            • Defined in src/api/resource-actions.ts:142
                                            • +
                                              +
                                                - -
                                              • +
                                              • + +

                                                Updates an existing action.

                                                Parameters

                                                  -
                                                • -
                                                  resourceKey: string
                                                  +
                                                • resourceKey: string

                                                  The resource key.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  actionKey: string
                                                  +
                                              • +
                                              • actionKey: string

                                                The key of the action to modify.

                                                -
                                                -
                                              • -
                                              • -
                                                actionData: ResourceActionUpdate
                                                +
                                              • +
                                              • actionData: ResourceActionUpdate

                                                The data for updating the action.

                                                -
                                                -
                                              -

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the updated action.

                                              + +

                                              Returns Promise<ResourceActionRead>

                                              A promise that resolves to a ResourceActionRead object representing the updated action.

                                              -

                                              Throws

                                              PermitApiError If the API returns an error HTTP status code.

                                              - -

                                              Throws

                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                              -
                                              +
                                            • Defined in src/api/resource-actions.ts:251
                                            • +
                                              +
                                              +

                                              On This Page

                                              +
                                              Constructors +
                                              +
                                              Methods +
                                              -
                                              -

                                              Generated using TypeDoc

                                              -
                                              \ No newline at end of file + +
                                              diff --git a/docs/classes/ResourceAttributesApi.html b/docs/classes/ResourceAttributesApi.html index b32a1d5e..2a2d668b 100644 --- a/docs/classes/ResourceAttributesApi.html +++ b/docs/classes/ResourceAttributesApi.html @@ -1,500 +1,352 @@ -ResourceAttributesApi | permitio
                                              -
                                              - -
                                              +ResourceAttributesApi | permitio
                                              +
                                              permitio + +
                                                +
                                                +
                                                Preparing search index...
                                                - +

                                                Class ResourceAttributesApi

                                                API client for interacting with the Resource Attributes API.

                                                -
                                                -
                                                -
                                                +
                                                +

                                                Hierarchy

                                                  -
                                                • BasePermitApi +
                                                • BasePermitApi
                                                    -
                                                  • ResourceAttributesApi
                                                +
                                              • ResourceAttributesApi
                                              • Implements

                                                +
                                              • Defined in src/api/resource-attributes.ts:121
                                              • -
                                                - +
                                                +
                                                Index
                                                -
                                                -

                                                Constructors

                                                -
                                                - +
                                                + +
                                                +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Creates an instance of the ResourceAttributesApi.

                                                  Parameters

                                                    -
                                                  • -
                                                    config: IPermitConfig
                                                    +
                                                  • config: IPermitConfig

                                                    The configuration object for the Permit SDK.

                                                    -
                                                    -
                                                  • -
                                                  • -
                                                    logger: Logger<LoggerOptions>
                                                    +
                                                • +
                                                • logger: Logger

                                                  The logger instance for logging.

                                                  -
                                                  -
                                                -

                                                Returns ResourceAttributesApi

                                                -
                                                +
                                                + +
                                                +
                                                + -

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the created attribute.

                                                + +

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the created attribute.

                                                -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/resource-attributes.ts:225
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Deletes a attribute based on the resource key and attribute key.

                                                  Parameters

                                                    -
                                                  • -
                                                    resourceKey: string
                                                    +
                                                  • resourceKey: string

                                                    The resource key.

                                                    -
                                                    -
                                                  • -
                                                  • -
                                                    attributeKey: string
                                                    +
                                                • +
                                                • attributeKey: string

                                                  The attribute key.

                                                  -
                                                  -
                                                -

                                                Returns Promise<void>

                                                A promise that resolves when the attribute is successfully deleted.

                                                + +

                                                Returns Promise<void>

                                                A promise that resolves when the attribute is successfully deleted.

                                                -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/resource-attributes.ts:283
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                  Parameters

                                                    -
                                                  • -
                                                    requiredAccessLevel: ApiKeyLevel
                                                    +
                                                  • requiredAccessLevel: ApiKeyLevel

                                                    The required API Key Access level for the endpoint.

                                                    -
                                                    -
                                                  -

                                                  Returns Promise<void>

                                                  +
                                                +

                                                Returns Promise<void>

                                                -

                                                Throws

                                                PermitContextError If the currently set API key access level does not match the required access level.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/base.ts:162
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Ensure that the API context matches the required endpoint context.

                                                  Parameters

                                                    -
                                                  • -
                                                    requiredContext: ApiContextLevel
                                                    +
                                                  • requiredContext: ApiContextLevel

                                                    The required API context level for the endpoint.

                                                    -
                                                    -
                                                  -

                                                  Returns Promise<void>

                                                  +
                                                +

                                                Returns Promise<void>

                                                -

                                                Throws

                                                PermitContextError If the currently set API context level does not match the required context level.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/base.ts:189
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Retrieves an attribute based on the resource key and the attribute key.

                                                  Parameters

                                                    -
                                                  • -
                                                    resourceKey: string
                                                    +
                                                  • resourceKey: string

                                                    The resource key.

                                                    -
                                                    -
                                                  • -
                                                  • -
                                                    attributeKey: string
                                                    +
                                                • +
                                                • attributeKey: string

                                                  The attribute key.

                                                  -
                                                  -
                                                -

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                + +

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/resource-attributes.ts:172
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Retrieves an attribute based on the resource ID and the attribute ID. -Alias for the get method.

                                                  +Alias for the get method.

                                                  Parameters

                                                    -
                                                  • -
                                                    resourceId: string
                                                    +
                                                  • resourceId: string

                                                    The resource ID.

                                                    -
                                                    -
                                                  • -
                                                  • -
                                                    attributeId: string
                                                    +
                                                • +
                                                • attributeId: string

                                                  The attribute ID.

                                                  -
                                                  -
                                                -

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                + +

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/resource-attributes.ts:212
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Retrieves an attribute based on the resource key and the attribute key. -Alias for the get method.

                                                  +Alias for the get method.

                                                  Parameters

                                                    -
                                                  • -
                                                    resourceKey: string
                                                    +
                                                  • resourceKey: string

                                                    The resource key.

                                                    -
                                                    -
                                                  • -
                                                  • -
                                                    attributeKey: string
                                                    +
                                                • +
                                                • attributeKey: string

                                                  The attribute key.

                                                  -
                                                  -
                                                -

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                + +

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/resource-attributes.ts:198
                                              • +
                                                + +

                                                Returns Promise<ResourceAttributeRead[]>

                                                A promise that resolves to an array of ResourceAttributeRead objects representing the attributes.

                                                -

                                                See

                                                IListAttributes

                                                - -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                -
                                                - +
                                              • Defined in src/api/resource-attributes.ts:145
                                              • +
                                                +
                                                  - -
                                                • +
                                                • + +

                                                  Updates an existing attribute.

                                                  Parameters

                                                    -
                                                  • -
                                                    resourceKey: string
                                                    +
                                                  • resourceKey: string

                                                    The resource key.

                                                    -
                                                    -
                                                  • -
                                                  • -
                                                    attributeKey: string
                                                    +
                                                • +
                                                • attributeKey: string

                                                  The key of the attribute to modify.

                                                  -
                                                  -
                                                • -
                                                • -
                                                  attributeData: ResourceAttributeUpdate
                                                  +
                                                • +
                                                • attributeData: ResourceAttributeUpdate

                                                  The data for updating the attribute.

                                                  -
                                                  -
                                                -

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the updated attribute.

                                                + +

                                                Returns Promise<ResourceAttributeRead>

                                                A promise that resolves to a ResourceAttributeRead object representing the updated attribute.

                                                -

                                                Throws

                                                PermitApiError If the API returns an error HTTP status code.

                                                - -

                                                Throws

                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                -
                                                +
                                              • Defined in src/api/resource-attributes.ts:254
                                              • +
                                                +
                                                +

                                                On This Page

                                                +
                                                Constructors +
                                                +
                                                Methods +
                                                -
                                                -

                                                Generated using TypeDoc

                                                -
                                                \ No newline at end of file + +
                                                diff --git a/docs/classes/ResourceInstancesApi.html b/docs/classes/ResourceInstancesApi.html new file mode 100644 index 00000000..4d774bdc --- /dev/null +++ b/docs/classes/ResourceInstancesApi.html @@ -0,0 +1,418 @@ +ResourceInstancesApi | permitio
                                                +
                                                permitio + +
                                                  +
                                                  +
                                                  Preparing search index...
                                                  +
                                                  +
                                                  +
                                                  + +

                                                  Class ResourceInstancesApi

                                                  +
                                                  +

                                                  The ResourceInstancesApi class provides methods for interacting with Permit ResourceInstances.

                                                  +
                                                  +
                                                  +

                                                  Hierarchy

                                                  +
                                                    +
                                                  • BaseFactsPermitAPI +
                                                      +
                                                    • ResourceInstancesApi
                                                  +
                                                  +

                                                  Implements

                                                  +
                                                  +
                                                  +
                                                  +
                                                  +
                                                  Index
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                    +
                                                  • + +
                                                    +

                                                    Creates an instance of the ResourceInstancesApi.

                                                    +
                                                    +
                                                    +

                                                    Parameters

                                                    +
                                                      +
                                                    • config: IPermitConfig +

                                                      The configuration object for the Permit SDK.

                                                      +
                                                    • +
                                                    • logger: Logger +

                                                      The logger instance for logging.

                                                      +
                                                    +

                                                    Returns ResourceInstancesApi

                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                    +
                                                  • + +
                                                    +

                                                    Deletes a instance.

                                                    +
                                                    +
                                                    +

                                                    Parameters

                                                    +
                                                      +
                                                    • instanceKey: string +

                                                      The key of the resource instance to delete.

                                                      +
                                                    +

                                                    Returns Promise<void>

                                                    A promise that resolves when the resource instance is deleted.

                                                    + +
                                                    +
                                                    +

                                                    PermitApiError If the API returns an error HTTP status code.

                                                    +
                                                    +
                                                    +

                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                    +
                                                  +
                                                  + +
                                                    +
                                                  • + +
                                                    +

                                                    Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                                    +
                                                    +
                                                    +

                                                    Parameters

                                                    +
                                                      +
                                                    • requiredAccessLevel: ApiKeyLevel +

                                                      The required API Key Access level for the endpoint.

                                                      +
                                                    +

                                                    Returns Promise<void>

                                                    +
                                                    +
                                                    +

                                                    PermitContextError If the currently set API key access level does not match the required access level.

                                                    +
                                                  +
                                                  + +
                                                    +
                                                  • + +
                                                    +

                                                    Ensure that the API context matches the required endpoint context.

                                                    +
                                                    +
                                                    +

                                                    Parameters

                                                    +
                                                      +
                                                    • requiredContext: ApiContextLevel +

                                                      The required API context level for the endpoint.

                                                      +
                                                    +

                                                    Returns Promise<void>

                                                    +
                                                    +
                                                    +

                                                    PermitContextError If the currently set API context level does not match the required context level.

                                                    +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                    +
                                                  • + +
                                                    +

                                                    Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                    +
                                                    +
                                                    +

                                                    Parameters

                                                    +
                                                      +
                                                    • timeout: number | null +

                                                      The maximum number of seconds to wait for the synchronization to complete. +Set to null to wait indefinitely.

                                                      +
                                                    • +
                                                    • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                      Controls what happens when the timeout is reached during synchronization.

                                                      +
                                                        +
                                                      • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                      • +
                                                      • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                      • +
                                                      +
                                                    +

                                                    Returns this

                                                  +
                                                  + +
                                                  +
                                                  diff --git a/docs/classes/ResourceRelationsApi.html b/docs/classes/ResourceRelationsApi.html new file mode 100644 index 00000000..28fe698a --- /dev/null +++ b/docs/classes/ResourceRelationsApi.html @@ -0,0 +1,319 @@ +ResourceRelationsApi | permitio
                                                  +
                                                  permitio + +
                                                    +
                                                    +
                                                    Preparing search index...
                                                    +
                                                    +
                                                    +
                                                    + +

                                                    Class ResourceRelationsApi

                                                    +
                                                    +

                                                    API client for interacting with the Resource Relations API.

                                                    +
                                                    +
                                                    +

                                                    Hierarchy

                                                    +
                                                      +
                                                    • BasePermitApi +
                                                        +
                                                      • ResourceRelationsApi
                                                    +
                                                    +

                                                    Implements

                                                    +
                                                    +
                                                    +
                                                    +
                                                    +
                                                    Index
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Creates an instance of the ResourceRelationsApi.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • config: IPermitConfig +

                                                        The configuration object for the Permit SDK.

                                                        +
                                                      • +
                                                      • logger: Logger +

                                                        The logger instance for logging.

                                                        +
                                                      +

                                                      Returns ResourceRelationsApi

                                                    +
                                                    + +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Creates a new resource relation.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • resourceKey: string +

                                                        The resource key.

                                                        +
                                                      • +
                                                      • RelationData: RelationCreate +

                                                        The relation data.

                                                        +
                                                      +

                                                      Returns Promise<RelationRead>

                                                      A promise that resolves to a RelationRead object representing the created relation.

                                                      + +
                                                      +
                                                      +

                                                      PermitApiError If the API returns an error HTTP status code.

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                      +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Deletes a relation based on the resource key and relation key.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • resourceKey: string +

                                                        The resource key.

                                                        +
                                                      • +
                                                      • relationKey: string +

                                                        The relation key.

                                                        +
                                                      +

                                                      Returns Promise<void>

                                                      A promise that resolves when the relation is successfully deleted.

                                                      + +
                                                      +
                                                      +

                                                      PermitApiError If the API returns an error HTTP status code.

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                      +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • requiredAccessLevel: ApiKeyLevel +

                                                        The required API Key Access level for the endpoint.

                                                        +
                                                      +

                                                      Returns Promise<void>

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the currently set API key access level does not match the required access level.

                                                      +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Ensure that the API context matches the required endpoint context.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • requiredContext: ApiContextLevel +

                                                        The required API context level for the endpoint.

                                                        +
                                                      +

                                                      Returns Promise<void>

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the currently set API context level does not match the required context level.

                                                      +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Retrieves a resource relation based on the resource key and the relation key.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • resourceKey: string +

                                                        The resource key.

                                                        +
                                                      • +
                                                      • relationKey: string +

                                                        The relation key.

                                                        +
                                                      +

                                                      Returns Promise<RelationRead>

                                                      A promise that resolves to a RelationRead object representing the relation.

                                                      + +
                                                      +
                                                      +

                                                      PermitApiError If the API returns an error HTTP status code.

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                      +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Retrieves an relation based on the resource ID and the relation ID. +Alias for the get method.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • resourceId: string +

                                                        The resource ID.

                                                        +
                                                      • +
                                                      • relationId: string +

                                                        The relation ID.

                                                        +
                                                      +

                                                      Returns Promise<RelationRead>

                                                      A promise that resolves to a RelationRead object representing the relation.

                                                      + +
                                                      +
                                                      +

                                                      PermitApiError If the API returns an error HTTP status code.

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                      +
                                                    +
                                                    + +
                                                      +
                                                    • + +
                                                      +

                                                      Retrieves an relation based on the resource key and the relation key. +Alias for the get method.

                                                      +
                                                      +
                                                      +

                                                      Parameters

                                                      +
                                                        +
                                                      • resourceKey: string +

                                                        The resource key.

                                                        +
                                                      • +
                                                      • relationKey: string +

                                                        The relation key.

                                                        +
                                                      +

                                                      Returns Promise<RelationRead>

                                                      A promise that resolves to a RelationRead object representing the relation.

                                                      + +
                                                      +
                                                      +

                                                      PermitApiError If the API returns an error HTTP status code.

                                                      +
                                                      +
                                                      +

                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                      +
                                                    +
                                                    + +
                                                    +
                                                    + +
                                                    +
                                                    diff --git a/docs/classes/ResourceRolesApi.html b/docs/classes/ResourceRolesApi.html new file mode 100644 index 00000000..0eec9e5f --- /dev/null +++ b/docs/classes/ResourceRolesApi.html @@ -0,0 +1,517 @@ +ResourceRolesApi | permitio
                                                    +
                                                    permitio + +
                                                      +
                                                      +
                                                      Preparing search index...
                                                      +
                                                      +
                                                      +
                                                      + +

                                                      Class ResourceRolesApi

                                                      +
                                                      +

                                                      The ResourceRolesApi class provides methods for interacting with Permit Roles.

                                                      +
                                                      +
                                                      +

                                                      Hierarchy

                                                      +
                                                        +
                                                      • BasePermitApi +
                                                          +
                                                        • ResourceRolesApi
                                                      +
                                                      +

                                                      Implements

                                                      +
                                                      +
                                                      +
                                                      +
                                                      +
                                                      Index
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Creates an instance of the ResourceRolesApi.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • config: IPermitConfig +

                                                          The configuration object for the Permit SDK.

                                                          +
                                                        • +
                                                        • logger: Logger +

                                                          The logger instance for logging.

                                                          +
                                                        +

                                                        Returns ResourceRolesApi

                                                      +
                                                      + +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Assigns permissions to a resource role.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        • +
                                                        • permissions: string[] +

                                                          An array of permission keys (resourceKey:actionKey) to be assigned to the role.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRoleRead>

                                                        A promise that resolves to a ResourceRoleRead object representing the updated role.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Create a conditional derivation from another role. +The derivation states that users with some other role on a related object will implicitly also be granted this role.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource the role belongs to.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        • +
                                                        • derivationRule: DerivedRoleRuleCreate +

                                                          A rule when to derived this role from another related role.

                                                          +
                                                        +

                                                        Returns Promise<DerivedRoleRuleRead>

                                                        A DerivedRoleRuleRead object representing the newly created role derivation.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError - If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError - If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Deletes a resource role.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role to delete.

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        A promise that resolves when the role is deleted.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Delete a role derivation.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource the role belongs to.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        • +
                                                        • derivationRule: DerivedRoleRuleDelete +

                                                          The details of the derivation rule to delete.

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        +
                                                        +
                                                        +

                                                        PermitApiError - If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError - If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • requiredAccessLevel: ApiKeyLevel +

                                                          The required API Key Access level for the endpoint.

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the currently set API key access level does not match the required access level.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Ensure that the API context matches the required endpoint context.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • requiredContext: ApiContextLevel +

                                                          The required API context level for the endpoint.

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the currently set API context level does not match the required context level.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Retrieves a resource role by its key.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRoleRead>

                                                        A promise that resolves to the role.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Retrieves a resource role by its ID. +Alias for the get method.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceId: string +

                                                          The ID of the resource.

                                                          +
                                                        • +
                                                        • roleId: string +

                                                          The ID of the role.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRoleRead>

                                                        A promise that resolves to the role.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Retrieves a resource role by its key. +Alias for the get method.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRoleRead>

                                                        A promise that resolves to the role.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Removes permissions from a resource role.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        • +
                                                        • permissions: string[] +

                                                          An array of permission keys (resourceKey:actionKey) to be removed from the role.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRoleRead>

                                                        A promise that resolves to a ResourceRoleRead object representing the updated role.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                        +
                                                      • + +
                                                        +

                                                        Updates a resource role.

                                                        +
                                                        +
                                                        +

                                                        Parameters

                                                        +
                                                          +
                                                        • resourceKey: string +

                                                          The key of the resource.

                                                          +
                                                        • +
                                                        • roleKey: string +

                                                          The key of the role.

                                                          +
                                                        • +
                                                        • roleData: ResourceRoleUpdate +

                                                          The updated data for the role.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRoleRead>

                                                        A promise that resolves to the updated role.

                                                        + +
                                                        +
                                                        +

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        +
                                                        +
                                                        +

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        +
                                                      +
                                                      + +
                                                      +
                                                      + +
                                                      +
                                                      diff --git a/docs/classes/ResourcesApi.html b/docs/classes/ResourcesApi.html index 90b02d61..a1a76ca6 100644 --- a/docs/classes/ResourcesApi.html +++ b/docs/classes/ResourcesApi.html @@ -1,502 +1,382 @@ -ResourcesApi | permitio
                                                      -
                                                      - -
                                                      +ResourcesApi | permitio
                                                      +
                                                      permitio + +
                                                        +
                                                        +
                                                        Preparing search index...
                                                        - +

                                                        Class ResourcesApi

                                                        The ResourcesApi class provides methods for interacting with Permit Resources.

                                                        -
                                                        -
                                                        -
                                                        +
                                                        +

                                                        Hierarchy

                                                          -
                                                        • BasePermitApi +
                                                        • BasePermitApi
                                                            -
                                                          • ResourcesApi
                                                        +
                                                      • ResourcesApi
                                                      • Implements

                                                        +
                                                      • Defined in src/api/resources.ts:117
                                                      • -
                                                        - +
                                                        +
                                                        Index
                                                        -
                                                        -

                                                        Constructors

                                                        -
                                                        - +
                                                        + +
                                                        +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Creates an instance of the ResourcesApi.

                                                          Parameters

                                                            -
                                                          • -
                                                            config: IPermitConfig
                                                            +
                                                          • config: IPermitConfig

                                                            The configuration object for the Permit SDK.

                                                            -
                                                            -
                                                          • -
                                                          • -
                                                            logger: Logger<LoggerOptions>
                                                            +
                                                        • +
                                                        • logger: Logger

                                                          The logger instance for logging.

                                                          -
                                                          -
                                                        -

                                                        Returns ResourcesApi

                                                        -
                                                        +
                                                        + +
                                                        +
                                                        + +

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the created resource.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:223
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Deletes a resource.

                                                          Parameters

                                                            -
                                                          • -
                                                            resourceKey: string
                                                            +
                                                          • resourceKey: string

                                                            The key of the resource to delete.

                                                            -
                                                            -
                                                          -

                                                          Returns Promise<void>

                                                          A promise that resolves when the resource is deleted.

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        A promise that resolves when the resource is deleted.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:296
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                          Parameters

                                                            -
                                                          • -
                                                            requiredAccessLevel: ApiKeyLevel
                                                            +
                                                          • requiredAccessLevel: ApiKeyLevel

                                                            The required API Key Access level for the endpoint.

                                                            -
                                                            -
                                                          -

                                                          Returns Promise<void>

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        -

                                                        Throws

                                                        PermitContextError If the currently set API key access level does not match the required access level.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/base.ts:162
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Ensure that the API context matches the required endpoint context.

                                                          Parameters

                                                            -
                                                          • -
                                                            requiredContext: ApiContextLevel
                                                            +
                                                          • requiredContext: ApiContextLevel

                                                            The required API context level for the endpoint.

                                                            -
                                                            -
                                                          -

                                                          Returns Promise<void>

                                                          +
                                                        +

                                                        Returns Promise<void>

                                                        -

                                                        Throws

                                                        PermitContextError If the currently set API context level does not match the required context level.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/base.ts:189
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Retrieves a resource by its key.

                                                          Parameters

                                                            -
                                                          • -
                                                            resourceKey: string
                                                            +
                                                          • resourceKey: string

                                                            The key of the resource.

                                                            -
                                                            -
                                                          -

                                                          Returns Promise<ResourceRead>

                                                          A promise that resolves to the resource.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the resource.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:174
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Retrieves a resource by its ID. -Alias for the get method.

                                                          +Alias for the get method.

                                                          Parameters

                                                            -
                                                          • -
                                                            resourceId: string
                                                            +
                                                          • resourceId: string

                                                            The ID of the resource.

                                                            -
                                                            -
                                                          -

                                                          Returns Promise<ResourceRead>

                                                          A promise that resolves to the resource.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the resource.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:211
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Retrieves a resource by its key. -Alias for the get method.

                                                          +Alias for the get method.

                                                          Parameters

                                                            -
                                                          • -
                                                            resourceKey: string
                                                            +
                                                          • resourceKey: string

                                                            The key of the resource.

                                                            -
                                                            -
                                                          -

                                                          Returns Promise<ResourceRead>

                                                          A promise that resolves to the resource.

                                                          +
                                                        +

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the resource.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:198
                                                      • +
                                                        + +

                                                        Returns Promise<ReturnPaginationType<T, PaginatedResultResourceRead, ResourceRead[]>>

                                                        A promise that resolves to an array of resources.

                                                        -

                                                        See

                                                        IPagination

                                                        - -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:143
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Creates a resource if such a resource does not exists, otherwise completely replaces the resource configuration.

                                                          Parameters

                                                            -
                                                          • -
                                                            resourceKey: string
                                                            +
                                                          • resourceKey: string

                                                            The key of the resource.

                                                            -
                                                            -
                                                          • -
                                                          • -
                                                            resourceData: ResourceReplace
                                                            +
                                                        • +
                                                        • resourceData: ResourceReplace

                                                          The updated data for the resource.

                                                          -
                                                          -
                                                        -

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the updated resource.

                                                        + +

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the updated resource.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        -
                                                        - +
                                                      • Defined in src/api/resources.ts:247
                                                      • +
                                                        +
                                                          - -
                                                        • +
                                                        • + +

                                                          Updates a resource.

                                                          Parameters

                                                            -
                                                          • -
                                                            resourceKey: string
                                                            +
                                                          • resourceKey: string

                                                            The key of the resource.

                                                            -
                                                            -
                                                          • -
                                                          • -
                                                            resourceData: ResourceUpdate
                                                            +
                                                        • +
                                                        • resourceData: ResourceUpdate

                                                          The updated data for the resource.

                                                          -
                                                          -
                                                        -

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the updated resource.

                                                        + +

                                                        Returns Promise<ResourceRead>

                                                        A promise that resolves to the updated resource.

                                                        -

                                                        Throws

                                                        PermitApiError If the API returns an error HTTP status code.

                                                        - -

                                                        Throws

                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                        -
                                                        +
                                                      • Defined in src/api/resources.ts:272
                                                      • +
                                                        +
                                                        +

                                                        On This Page

                                                        +
                                                        Constructors +
                                                        +
                                                        Methods +
                                                        -
                                                        -

                                                        Generated using TypeDoc

                                                        -
                                                        \ No newline at end of file + +
                                                        diff --git a/docs/classes/RoleAssignmentsApi.html b/docs/classes/RoleAssignmentsApi.html index 92e157ca..464ede2a 100644 --- a/docs/classes/RoleAssignmentsApi.html +++ b/docs/classes/RoleAssignmentsApi.html @@ -1,433 +1,334 @@ -RoleAssignmentsApi | permitio
                                                        -
                                                        - -
                                                        +RoleAssignmentsApi | permitio
                                                        +
                                                        permitio + +
                                                          +
                                                          +
                                                          Preparing search index...
                                                          - +

                                                          Class RoleAssignmentsApi

                                                          The RoleAssignmentsApi class provides methods for interacting with Role Assignments.

                                                          -
                                                          -
                                                          -
                                                          +
                                                          +

                                                          Hierarchy

                                                            -
                                                          • BaseFactsPermitAPI +
                                                          • BaseFactsPermitAPI
                                                              -
                                                            • RoleAssignmentsApi
                                                          +
                                                        • RoleAssignmentsApi
                                                        • Implements

                                                          +
                                                        • Defined in src/api/role-assignments.ts:160
                                                        • -
                                                          - +
                                                          +
                                                          Index
                                                          -
                                                          -

                                                          Constructors

                                                          -
                                                          - +
                                                          + +
                                                          +
                                                          +
                                                            - -
                                                          • +
                                                          • + +

                                                            Creates an instance of the RoleAssignmentsApi.

                                                            Parameters

                                                              -
                                                            • -
                                                              config: IPermitConfig
                                                              +
                                                            • config: IPermitConfig

                                                              The configuration object for the Permit SDK.

                                                              -
                                                              -
                                                            • -
                                                            • -
                                                              logger: Logger<LoggerOptions>
                                                              +
                                                          • +
                                                          • logger: Logger

                                                            The logger instance for logging.

                                                            -
                                                            -
                                                          -

                                                          Returns RoleAssignmentsApi

                                                          -
                                                          +
                                                          + +
                                                          +
                                                          + +

                                                          Returns Promise<RoleAssignmentRead>

                                                          A promise that resolves with the assigned role.

                                                          -

                                                          Throws

                                                          PermitApiError If the API returns an error HTTP status code.

                                                          - -

                                                          Throws

                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/role-assignments.ts:287
                                                        • +
                                                          + +

                                                          Returns Promise<BulkRoleAssignmentReport>

                                                          A promise that resolves with the bulk assignment report.

                                                          -

                                                          Throws

                                                          PermitApiError If the API returns an error HTTP status code.

                                                          - -

                                                          Throws

                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/role-assignments.ts:332
                                                        • +
                                                          + +

                                                          Returns Promise<BulkRoleUnAssignmentReport>

                                                          A promise that resolves with the bulk unassignment report.

                                                          -

                                                          Throws

                                                          PermitApiError If the API returns an error HTTP status code.

                                                          - -

                                                          Throws

                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/role-assignments.ts:356
                                                        • +
                                                          +
                                                            - -
                                                          • +
                                                          • + +

                                                            Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                            Parameters

                                                              -
                                                            • -
                                                              requiredAccessLevel: ApiKeyLevel
                                                              +
                                                            • requiredAccessLevel: ApiKeyLevel

                                                              The required API Key Access level for the endpoint.

                                                              -
                                                              -
                                                            -

                                                            Returns Promise<void>

                                                            +
                                                          +

                                                          Returns Promise<void>

                                                          -

                                                          Throws

                                                          PermitContextError If the currently set API key access level does not match the required access level.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/base.ts:162
                                                        • +
                                                          +
                                                            - -
                                                          • +
                                                          • + +

                                                            Ensure that the API context matches the required endpoint context.

                                                            Parameters

                                                              -
                                                            • -
                                                              requiredContext: ApiContextLevel
                                                              +
                                                            • requiredContext: ApiContextLevel

                                                              The required API context level for the endpoint.

                                                              -
                                                              -
                                                            -

                                                            Returns Promise<void>

                                                            +
                                                          +

                                                          Returns Promise<void>

                                                          -

                                                          Throws

                                                          PermitContextError If the currently set API context level does not match the required context level.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/base.ts:189
                                                        • +
                                                          + +

                                                          Returns Promise<ReturnListRoleAssignments<T>>

                                                          A promise that resolves with an array of role assignments.

                                                          -

                                                          Throws

                                                          PermitApiError If the API returns an error HTTP status code.

                                                          - -

                                                          Throws

                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/role-assignments.ts:237
                                                        • +
                                                          +
                                                          +
                                                          + +
                                                            +
                                                          • + +

                                                            Unassigns a role from a user in the scope of a given tenant.

                                                            Parameters

                                                            -

                                                            Returns Promise<void>

                                                            A promise that resolves when the role is successfully unassigned.

                                                            +
                                                          +

                                                          Returns Promise<void>

                                                          A promise that resolves when the role is successfully unassigned.

                                                          -

                                                          Throws

                                                          PermitApiError If the API returns an error HTTP status code.

                                                          - -

                                                          Throws

                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                          -
                                                          -
                                                          - +
                                                        • Defined in src/api/role-assignments.ts:310
                                                        • +
                                                          +
                                                            - -
                                                          • +
                                                          • + +

                                                            Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                            Parameters

                                                              -
                                                            • -
                                                              timeout: null | number
                                                              +
                                                            • timeout: number | null

                                                              The maximum number of seconds to wait for the synchronization to complete. Set to null to wait indefinitely.

                                                              -
                                                              -
                                                            -

                                                            Returns RoleAssignmentsApi

                                                            -
                                                          • +
                                                          • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                            Controls what happens when the timeout is reached during synchronization.

                                                            +
                                                              +
                                                            • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                            • +
                                                            • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                            • +
                                                            +
                                                          +

                                                          Returns this

                                                          +
                                                        • Defined in src/api/base.ts:265
                                                        • +
                                                          +
                                                          +

                                                          On This Page

                                                          +
                                                          Constructors +
                                                          +
                                                          Methods +
                                                          -
                                                          -

                                                          Generated using TypeDoc

                                                          -
                                                          \ No newline at end of file + +
                                                          diff --git a/docs/classes/RolesApi.html b/docs/classes/RolesApi.html index d66231fc..3dc347d7 100644 --- a/docs/classes/RolesApi.html +++ b/docs/classes/RolesApi.html @@ -1,534 +1,432 @@ -RolesApi | permitio
                                                          -
                                                          - -
                                                          +RolesApi | permitio
                                                          +
                                                          permitio + +
                                                            +
                                                            +
                                                            Preparing search index...
                                                            - +

                                                            Class RolesApi

                                                            The RolesApi class provides methods for interacting with Permit Roles.

                                                            -
                                                            -
                                                            -
                                                            +
                                                            +

                                                            Hierarchy

                                                              -
                                                            • BasePermitApi +
                                                            • BasePermitApi
                                                                -
                                                              • RolesApi
                                                            +
                                                          • RolesApi
                                                          • Implements

                                                            +
                                                          • Defined in src/api/roles.ts:138
                                                          • -
                                                            - +
                                                            +
                                                            Index
                                                            -
                                                            -

                                                            Constructors

                                                            -
                                                            - +
                                                            + +
                                                            +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Creates an instance of the RolesApi.

                                                              Parameters

                                                                -
                                                              • -
                                                                config: IPermitConfig
                                                                +
                                                              • config: IPermitConfig

                                                                The configuration object for the Permit SDK.

                                                                -
                                                                -
                                                              • -
                                                              • -
                                                                logger: Logger<LoggerOptions>
                                                                +
                                                            • +
                                                            • logger: Logger

                                                              The logger instance for logging.

                                                              -
                                                              -
                                                            -

                                                            Returns RolesApi

                                                            -
                                                            +
                                                            + +
                                                            +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Assigns permissions to a role.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleKey: string
                                                                +
                                                              • roleKey: string

                                                                The key of the role.

                                                                -
                                                                -
                                                              • -
                                                              • -
                                                                permissions: string[]
                                                                +
                                                            • +
                                                            • permissions: string[]

                                                              An array of permission keys (resourceKey:actionKey) to be assigned to the role.

                                                              -
                                                              -
                                                            -

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to a RoleRead object representing the updated role.

                                                            + +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to a RoleRead object representing the updated role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            +
                                                            + +
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:266
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Creates a new role.

                                                              Parameters

                                                              -

                                                              Returns Promise<RoleRead>

                                                              A promise that resolves to the created role.

                                                              +
                                                            +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to the created role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:250
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Deletes a role.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleKey: string
                                                                +
                                                              • roleKey: string

                                                                The key of the role to delete.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<void>

                                                              A promise that resolves when the role is deleted.

                                                              +
                                                            +

                                                            Returns Promise<void>

                                                            A promise that resolves when the role is deleted.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:316
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                              Parameters

                                                                -
                                                              • -
                                                                requiredAccessLevel: ApiKeyLevel
                                                                +
                                                              • requiredAccessLevel: ApiKeyLevel

                                                                The required API Key Access level for the endpoint.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<void>

                                                              +
                                                            +

                                                            Returns Promise<void>

                                                            -

                                                            Throws

                                                            PermitContextError If the currently set API key access level does not match the required access level.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/base.ts:162
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Ensure that the API context matches the required endpoint context.

                                                              Parameters

                                                                -
                                                              • -
                                                                requiredContext: ApiContextLevel
                                                                +
                                                              • requiredContext: ApiContextLevel

                                                                The required API context level for the endpoint.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<void>

                                                              +
                                                            +

                                                            Returns Promise<void>

                                                            -

                                                            Throws

                                                            PermitContextError If the currently set API context level does not match the required context level.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/base.ts:189
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Retrieves a role by its key.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleKey: string
                                                                +
                                                              • roleKey: string

                                                                The key of the role.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<RoleRead>

                                                              A promise that resolves to the role.

                                                              +
                                                            +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to the role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:201
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Retrieves a role by its ID. -Alias for the get method.

                                                              +Alias for the get method.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleId: string
                                                                +
                                                              • roleId: string

                                                                The ID of the role.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<RoleRead>

                                                              A promise that resolves to the role.

                                                              +
                                                            +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to the role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:238
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Retrieves a role by its key. -Alias for the get method.

                                                              +Alias for the get method.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleKey: string
                                                                +
                                                              • roleKey: string

                                                                The key of the role.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<RoleRead>

                                                              A promise that resolves to the role.

                                                              +
                                                            +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to the role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:225
                                                          • +
                                                            + +

                                                            Returns Promise<ReturnPaginationType<T, PaginatedResultRoleRead, RoleRead[]>>

                                                            A promise that resolves to an array of roles.

                                                            -

                                                            See

                                                            IPagination

                                                            - -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:170
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Removes permissions from a role.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleKey: string
                                                                +
                                                              • roleKey: string

                                                                The key of the role.

                                                                -
                                                                -
                                                              • -
                                                              • -
                                                                permissions: string[]
                                                                +
                                                            • +
                                                            • permissions: string[]

                                                              An array of permission keys (resourceKey:actionKey) to be removed from the role.

                                                              -
                                                              -
                                                            -

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to a RoleRead object representing the updated role.

                                                            + +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to a RoleRead object representing the updated role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            -
                                                            - +
                                                          • Defined in src/api/roles.ts:363
                                                          • +
                                                            +
                                                              - -
                                                            • +
                                                            • + +

                                                              Updates a role.

                                                              Parameters

                                                                -
                                                              • -
                                                                roleKey: string
                                                                +
                                                              • roleKey: string

                                                                The key of the role.

                                                                -
                                                                -
                                                              • -
                                                              • -
                                                                roleData: RoleUpdate
                                                                +
                                                            • +
                                                            • roleData: RoleUpdate

                                                              The updated data for the role.

                                                              -
                                                              -
                                                            -

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to the updated role.

                                                            + +

                                                            Returns Promise<RoleRead>

                                                            A promise that resolves to the updated role.

                                                            -

                                                            Throws

                                                            PermitApiError If the API returns an error HTTP status code.

                                                            - -

                                                            Throws

                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                            -
                                                            +
                                                          • Defined in src/api/roles.ts:292
                                                          • +
                                                            +
                                                            +

                                                            On This Page

                                                            +
                                                            Constructors +
                                                            +
                                                            Methods +
                                                            -
                                                            -

                                                            Generated using TypeDoc

                                                            -
                                                            \ No newline at end of file + +
                                                            diff --git a/docs/classes/TenantsApi.html b/docs/classes/TenantsApi.html index cb5dcd45..bdb13d25 100644 --- a/docs/classes/TenantsApi.html +++ b/docs/classes/TenantsApi.html @@ -1,550 +1,547 @@ -TenantsApi | permitio
                                                            -
                                                            - -
                                                            +TenantsApi | permitio
                                                            +
                                                            permitio + +
                                                              +
                                                              +
                                                              Preparing search index...
                                                              - +

                                                              Class TenantsApi

                                                              The TenantsApi class provides methods for interacting with Permit Tenants.

                                                              -
                                                              -
                                                              -
                                                              +
                                                              +

                                                              Hierarchy

                                                                -
                                                              • BaseFactsPermitAPI +
                                                              • BaseFactsPermitAPI
                                                                  -
                                                                • TenantsApi
                                                              +
                                                            • TenantsApi
                                                            • Implements

                                                              +
                                                            • Defined in src/api/tenants.ts:182
                                                            • -
                                                              - +
                                                              +
                                                              Index
                                                              -
                                                              -

                                                              Constructors

                                                              -
                                                              - +
                                                              + +
                                                              +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Creates an instance of the TenantsApi.

                                                                Parameters

                                                                  -
                                                                • -
                                                                  config: IPermitConfig
                                                                  +
                                                                • config: IPermitConfig

                                                                  The configuration object for the Permit SDK.

                                                                  -
                                                                  -
                                                                • -
                                                                • -
                                                                  logger: Logger<LoggerOptions>
                                                                  +
                                                              • +
                                                              • logger: Logger

                                                                The logger instance for logging.

                                                                -
                                                                -
                                                              -

                                                              Returns TenantsApi

                                                              -
                                                              +
                                                              + +
                                                              +
                                                              + +
                                                                +
                                                              • + +
                                                                +

                                                                Creates a new user and associates it with a tenant, without requiring a role assignment. +Uses the control-plane API even when facts proxying or waitForSync is enabled. +The acknowledgement does not guarantee that the PDP has synchronized the membership.

                                                                +
                                                                +
                                                                +

                                                                Type Parameters

                                                                +
                                                                  +
                                                                • Attributes extends object = object
                                                                +
                                                                +

                                                                Parameters

                                                                +
                                                                  +
                                                                • tenantKey: string +

                                                                  The existing tenant key or ID.

                                                                  +
                                                                • +
                                                                • userData: UserCreate +

                                                                  New user data; role_assignments is optional.

                                                                  +
                                                                +

                                                                Returns Promise<UserRead<Attributes>>

                                                                The created user, including its tenant membership.

                                                                + +
                                                                +
                                                                +

                                                                PermitApiError If the user already exists, the tenant is missing, +or the API rejects the request.

                                                                +
                                                                +
                                                                +

                                                                PermitContextError If the environment context or API key is insufficient.

                                                                +
                                                              +
                                                              + +

                                                              Returns Promise<TenantRead<Attributes>>

                                                              A promise that resolves to the created tenant.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:374
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Deletes a tenant.

                                                                Parameters

                                                                  -
                                                                • -
                                                                  tenantKey: string
                                                                  +
                                                                • tenantKey: string

                                                                  The key of the tenant to delete.

                                                                  -
                                                                  -
                                                                -

                                                                Returns Promise<void>

                                                                A promise that resolves when the tenant is deleted.

                                                                +
                                                              +

                                                              Returns Promise<void>

                                                              A promise that resolves when the tenant is deleted.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:427
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Deletes a user from a given tenant (also removes all roles granted to the user in that tenant).

                                                                Parameters

                                                                  -
                                                                • -
                                                                  tenantKey: string
                                                                  +
                                                                • tenantKey: string

                                                                  The key of the tenant from which the user will be deleted.

                                                                  -
                                                                  -
                                                                • -
                                                                • -
                                                                  userKey: string
                                                                  +
                                                              • +
                                                              • userKey: string

                                                                The key of the user to be deleted.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<void>

                                                              A promise that resolves when the user is successfully deleted.

                                                              + +

                                                              Returns Promise<void>

                                                              A promise that resolves when the user is successfully deleted.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:449
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                                Parameters

                                                                  -
                                                                • -
                                                                  requiredAccessLevel: ApiKeyLevel
                                                                  +
                                                                • requiredAccessLevel: ApiKeyLevel

                                                                  The required API Key Access level for the endpoint.

                                                                  -
                                                                  -
                                                                -

                                                                Returns Promise<void>

                                                                +
                                                              +

                                                              Returns Promise<void>

                                                              -

                                                              Throws

                                                              PermitContextError If the currently set API key access level does not match the required access level.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/base.ts:162
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Ensure that the API context matches the required endpoint context.

                                                                Parameters

                                                                  -
                                                                • -
                                                                  requiredContext: ApiContextLevel
                                                                  +
                                                                • requiredContext: ApiContextLevel

                                                                  The required API context level for the endpoint.

                                                                  -
                                                                  -
                                                                -

                                                                Returns Promise<void>

                                                                +
                                                              +

                                                              Returns Promise<void>

                                                              -

                                                              Throws

                                                              PermitContextError If the currently set API context level does not match the required context level.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/base.ts:189
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Retrieves a tenant by its key.

                                                                +
                                                                +

                                                                Type Parameters

                                                                +
                                                                  +
                                                                • Attributes extends object = object

                                                                Parameters

                                                                  -
                                                                • -
                                                                  tenantKey: string
                                                                  +
                                                                • tenantKey: string

                                                                  The key of the tenant.

                                                                  -
                                                                  -
                                                                -

                                                                Returns Promise<TenantRead>

                                                                A promise that resolves to the tenant.

                                                                +
                                                              +

                                                              Returns Promise<TenantRead<Attributes>>

                                                              A promise that resolves to the tenant.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:319
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Retrieves a tenant by its ID. -Alias for the get method.

                                                                +Alias for the get method.

                                                                +
                                                                +

                                                                Type Parameters

                                                                +
                                                                  +
                                                                • Attributes extends object = object

                                                                Parameters

                                                                  -
                                                                • -
                                                                  tenantId: string
                                                                  +
                                                                • tenantId: string

                                                                  The ID of the tenant.

                                                                  -
                                                                  -
                                                                -

                                                                Returns Promise<TenantRead>

                                                                A promise that resolves to the tenant.

                                                                +
                                                              +

                                                              Returns Promise<TenantRead<Attributes>>

                                                              A promise that resolves to the tenant.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:360
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Retrieves a tenant by its key. -Alias for the get method.

                                                                +Alias for the get method.

                                                                +
                                                                +

                                                                Type Parameters

                                                                +
                                                                  +
                                                                • Attributes extends object = object

                                                                Parameters

                                                                  -
                                                                • -
                                                                  tenantKey: string
                                                                  +
                                                                • tenantKey: string

                                                                  The key of the tenant.

                                                                  -
                                                                  -
                                                                -

                                                                Returns Promise<TenantRead>

                                                                A promise that resolves to the tenant.

                                                                +
                                                              +

                                                              Returns Promise<TenantRead<Attributes>>

                                                              A promise that resolves to the tenant.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:345
                                                            • +
                                                              + +

                                                              Returns Promise<PaginatedResultTenantRead<Attributes>>

                                                              Tenant rows by default, or the complete page when includeTotalCount is true. +Dynamic or optional boolean flags retain the union of both result shapes.

                                                              -

                                                              See

                                                              IListTenantsParams

                                                              + +
                                                              +

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              +
                                                              +
                                                              +

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              +
                                                              +
                                                            • + +
                                                              +

                                                              Retrieves a list of tenants.

                                                              +
                                                              +
                                                              +

                                                              Type Parameters

                                                              +
                                                                +
                                                              • Attributes extends object = object
                                                              +
                                                              +

                                                              Parameters

                                                              +
                                                                +
                                                              • Optionalparams: IListTenantsParams & { includeTotalCount?: false } +

                                                                Filtering and pagination options,

                                                                +
                                                              +

                                                              Returns Promise<TenantRead<Attributes>[]>

                                                              Tenant rows by default, or the complete page when includeTotalCount is true. +Dynamic or optional boolean flags retain the union of both result shapes.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              +
                                                              + +
                                                              +

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              +
                                                              +
                                                              +

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              +
                                                            • +
                                                            • + +
                                                              +

                                                              Retrieves a list of tenants.

                                                              +
                                                              +
                                                              +

                                                              Type Parameters

                                                              +
                                                                +
                                                              • Attributes extends object = object
                                                              +
                                                              +

                                                              Parameters

                                                              +
                                                              +

                                                              Returns Promise<TenantRead<Attributes>[] | PaginatedResultTenantRead<Attributes>>

                                                              Tenant rows by default, or the complete page when includeTotalCount is true. +Dynamic or optional boolean flags retain the union of both result shapes.

                                                              -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                            • -
                                                              - +
                                                            • Defined in src/api/tenants.ts:229
                                                            • +
                                                              + +

                                                              Returns Promise<PaginatedResultUserRead<Attributes>>

                                                              A promise that resolves to a PaginatedResultUserRead object containing the list of tenant users.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:292
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Updates a tenant.

                                                                +
                                                                +

                                                                Type Parameters

                                                                +
                                                                  +
                                                                • Attributes extends object = object

                                                                Parameters

                                                                  -
                                                                • -
                                                                  tenantKey: string
                                                                  +
                                                                • tenantKey: string

                                                                  The key of the tenant.

                                                                  -
                                                                  -
                                                                • -
                                                                • -
                                                                  tenantData: TenantUpdate
                                                                  +
                                                              • +
                                                              • tenantData: TenantUpdate

                                                                The updated data for the tenant.

                                                                -
                                                                -
                                                              -

                                                              Returns Promise<TenantRead>

                                                              A promise that resolves to the updated tenant.

                                                              + +

                                                              Returns Promise<TenantRead<Attributes>>

                                                              A promise that resolves to the updated tenant.

                                                              -

                                                              Throws

                                                              PermitApiError If the API returns an error HTTP status code.

                                                              - -

                                                              Throws

                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                              -
                                                              -
                                                              - +
                                                            • Defined in src/api/tenants.ts:400
                                                            • +
                                                              +
                                                                - -
                                                              • +
                                                              • + +

                                                                Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                Parameters

                                                                  -
                                                                • -
                                                                  timeout: null | number
                                                                  +
                                                                • timeout: number | null

                                                                  The maximum number of seconds to wait for the synchronization to complete. Set to null to wait indefinitely.

                                                                  -
                                                                  -
                                                                -

                                                                Returns TenantsApi

                                                                -
                                                              • +
                                                              • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                                Controls what happens when the timeout is reached during synchronization.

                                                                +
                                                                  +
                                                                • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                • +
                                                                • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                • +
                                                                +
                                                              +

                                                              Returns this

                                                              +
                                                            • Defined in src/api/base.ts:265
                                                            • +
                                                              +
                                                              +

                                                              On This Page

                                                              +
                                                              Constructors +
                                                              +
                                                              Methods +
                                                              -
                                                              -

                                                              Generated using TypeDoc

                                                              -
                                                              \ No newline at end of file + +
                                                              diff --git a/docs/classes/UserAttributesApi.html b/docs/classes/UserAttributesApi.html new file mode 100644 index 00000000..99565f0a --- /dev/null +++ b/docs/classes/UserAttributesApi.html @@ -0,0 +1,240 @@ +UserAttributesApi | permitio
                                                              +
                                                              permitio + +
                                                                +
                                                                +
                                                                Preparing search index...
                                                                +
                                                                +
                                                                +
                                                                + +

                                                                Class UserAttributesApi

                                                                +
                                                                +

                                                                Direct control-plane client for the five user attribute schema operations.

                                                                +
                                                                +
                                                                +

                                                                Hierarchy

                                                                +
                                                                  +
                                                                • BasePermitApi +
                                                                    +
                                                                  • UserAttributesApi
                                                                +
                                                                +

                                                                Implements

                                                                +
                                                                +
                                                                +
                                                                +
                                                                +
                                                                Index
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                  +
                                                                • + +
                                                                  +

                                                                  Creates the user attribute schema client.

                                                                  +
                                                                  +
                                                                  +

                                                                  Parameters

                                                                  +
                                                                    +
                                                                  • config: IPermitConfig +

                                                                    The SDK configuration and selected API context.

                                                                    +
                                                                  • +
                                                                  • logger: Logger +

                                                                    The SDK logger.

                                                                    +
                                                                  +

                                                                  Returns UserAttributesApi

                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                  +
                                                                • + +
                                                                  +

                                                                  Deletes a user attribute definition and related data; policies then see it as undefined.

                                                                  +
                                                                  +
                                                                  +

                                                                  Parameters

                                                                  +
                                                                    +
                                                                  • attributeKey: string +

                                                                    The attribute key or UUID.

                                                                    +
                                                                  +

                                                                  Returns Promise<void>

                                                                  A promise that resolves to undefined after successful deletion.

                                                                  +
                                                                +
                                                                + +
                                                                  +
                                                                • + +
                                                                  +

                                                                  Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                                                  +
                                                                  +
                                                                  +

                                                                  Parameters

                                                                  +
                                                                    +
                                                                  • requiredAccessLevel: ApiKeyLevel +

                                                                    The required API Key Access level for the endpoint.

                                                                    +
                                                                  +

                                                                  Returns Promise<void>

                                                                  +
                                                                  +
                                                                  +

                                                                  PermitContextError If the currently set API key access level does not match the required access level.

                                                                  +
                                                                +
                                                                + +
                                                                  +
                                                                • + +
                                                                  +

                                                                  Ensure that the API context matches the required endpoint context.

                                                                  +
                                                                  +
                                                                  +

                                                                  Parameters

                                                                  +
                                                                    +
                                                                  • requiredContext: ApiContextLevel +

                                                                    The required API context level for the endpoint.

                                                                    +
                                                                  +

                                                                  Returns Promise<void>

                                                                  +
                                                                  +
                                                                  +

                                                                  PermitContextError If the currently set API context level does not match the required context level.

                                                                  +
                                                                +
                                                                + +
                                                                  +
                                                                • + +
                                                                  +

                                                                  Gets a user attribute definition by its key or UUID.

                                                                  +
                                                                  +
                                                                  +

                                                                  Parameters

                                                                  +
                                                                    +
                                                                  • attributeKey: string +

                                                                    The attribute key or UUID.

                                                                    +
                                                                  +

                                                                  Returns Promise<ResourceAttributeRead>

                                                                  The complete stored attribute definition.

                                                                  +
                                                                +
                                                                + +
                                                                  +
                                                                • + +
                                                                  +

                                                                  Lists user attribute definitions in the selected environment.

                                                                  +
                                                                  +
                                                                  +

                                                                  Parameters

                                                                  +
                                                                    +
                                                                  • params: IPagination = {} +

                                                                    Optional pagination; page defaults to 1 and perPage to 100.

                                                                    +
                                                                  +

                                                                  Returns Promise<ResourceAttributeRead[]>

                                                                  The complete attribute rows, including identity, context and timestamps.

                                                                  +
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +
                                                                diff --git a/docs/classes/UserInvitesApi.html b/docs/classes/UserInvitesApi.html new file mode 100644 index 00000000..43adadb7 --- /dev/null +++ b/docs/classes/UserInvitesApi.html @@ -0,0 +1,269 @@ +UserInvitesApi | permitio
                                                                +
                                                                permitio + +
                                                                  +
                                                                  +
                                                                  Preparing search index...
                                                                  +
                                                                  +
                                                                  +
                                                                  + +

                                                                  Class UserInvitesApi

                                                                  +
                                                                  +

                                                                  Direct API-key client for the six facts user-invite operations.

                                                                  +
                                                                  +
                                                                  +

                                                                  Hierarchy

                                                                  +
                                                                    +
                                                                  • BasePermitApi +
                                                                      +
                                                                    • UserInvitesApi
                                                                  +
                                                                  +

                                                                  Implements

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  Index
                                                                  +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                    +
                                                                  • + +
                                                                    +

                                                                    Creates the invite client.

                                                                    +
                                                                    +
                                                                    +

                                                                    Parameters

                                                                    +
                                                                      +
                                                                    • config: IPermitConfig +

                                                                      The SDK configuration and selected API context.

                                                                      +
                                                                    • +
                                                                    • logger: Logger +

                                                                      The SDK logger.

                                                                      +
                                                                    +

                                                                    Returns UserInvitesApi

                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                    +
                                                                  • + +
                                                                    +

                                                                    Approves an invite, creating or reusing its user and granting membership and the invite role. +Uses the control plane even when facts proxying is enabled; success is not PDP synchronization.

                                                                    +
                                                                    +
                                                                    +

                                                                    Type Parameters

                                                                    +
                                                                      +
                                                                    • Attributes extends object = object
                                                                    +
                                                                    +

                                                                    Parameters

                                                                    +
                                                                      +
                                                                    • userInviteId: string +

                                                                      The internal invite ID.

                                                                      +
                                                                    • +
                                                                    • approval: ElementsUserInviteApprove +

                                                                      Matching email, final user key and required nullable attributes.

                                                                      +
                                                                    +

                                                                    Returns Promise<UserInviteApprovalRead<Attributes>>

                                                                    The actual user; existing-user profile attributes are not guaranteed to be replaced. +HTTP 400 refusals omit remote text and body, which can contain another invite's email.

                                                                    +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                    +
                                                                  • + +
                                                                    +

                                                                    Deletes an invite record; it does not revoke facts created by an earlier approval.

                                                                    +
                                                                    +
                                                                    +

                                                                    Parameters

                                                                    +
                                                                      +
                                                                    • userInviteId: string +

                                                                      The internal invite ID.

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    A promise that resolves to undefined after successful deletion.

                                                                    +
                                                                  +
                                                                  + +
                                                                    +
                                                                  • + +
                                                                    +

                                                                    Ensure that the API Key has the necessary permissions to successfully call the API endpoint. +Note that this check is not foolproof, and the API may still throw 401.

                                                                    +
                                                                    +
                                                                    +

                                                                    Parameters

                                                                    +
                                                                      +
                                                                    • requiredAccessLevel: ApiKeyLevel +

                                                                      The required API Key Access level for the endpoint.

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    +
                                                                    +
                                                                    +

                                                                    PermitContextError If the currently set API key access level does not match the required access level.

                                                                    +
                                                                  +
                                                                  + +
                                                                    +
                                                                  • + +
                                                                    +

                                                                    Ensure that the API context matches the required endpoint context.

                                                                    +
                                                                    +
                                                                    +

                                                                    Parameters

                                                                    +
                                                                      +
                                                                    • requiredContext: ApiContextLevel +

                                                                      The required API context level for the endpoint.

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    +
                                                                    +
                                                                    +

                                                                    PermitContextError If the currently set API context level does not match the required context level.

                                                                    +
                                                                  +
                                                                  + +
                                                                    +
                                                                  • + +
                                                                    +

                                                                    Gets an invite by its internal ID.

                                                                    +
                                                                    +
                                                                    +

                                                                    Parameters

                                                                    +
                                                                      +
                                                                    • userInviteId: string +

                                                                      The internal invite ID; this route does not look up user keys.

                                                                      +
                                                                    +

                                                                    Returns Promise<ElementsUserInviteRead>

                                                                    The stored invite.

                                                                    +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                  +
                                                                  diff --git a/docs/classes/UsersApi.html b/docs/classes/UsersApi.html index 8a61fdfe..e5228713 100644 --- a/docs/classes/UsersApi.html +++ b/docs/classes/UsersApi.html @@ -1,659 +1,585 @@ -UsersApi | permitio
                                                                  -
                                                                  - -
                                                                  +UsersApi | permitio
                                                                  +
                                                                  permitio + +
                                                                    +
                                                                    +
                                                                    Preparing search index...
                                                                    - +

                                                                    Class UsersApi

                                                                    The UsersApi class provides methods for interacting with Permit Users.

                                                                    -
                                                                    -
                                                                    -
                                                                    +
                                                                    +

                                                                    Hierarchy

                                                                      -
                                                                    • BaseFactsPermitAPI +
                                                                    • BaseFactsPermitAPI
                                                                        -
                                                                      • UsersApi
                                                                    -
                                                                    - +
                                                                    +
                                                                    Index
                                                                    -
                                                                    -

                                                                    Constructors

                                                                    -
                                                                    - +
                                                                    + +
                                                                    +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Creates an instance of the UsersApi.

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        config: IPermitConfig
                                                                        +
                                                                      • config: IPermitConfig

                                                                        The configuration object for the Permit SDK.

                                                                        -
                                                                        -
                                                                      • -
                                                                      • -
                                                                        logger: Logger<LoggerOptions>
                                                                        +
                                                                    • +
                                                                    • logger: Logger

                                                                      The logger instance for logging.

                                                                      -
                                                                      -
                                                                    -

                                                                    Returns UsersApi

                                                                    -
                                                                    +
                                                                    + +
                                                                    +
                                                                    + +

                                                                    Returns Promise<RoleAssignmentRead>

                                                                    A promise that resolves with the assigned role.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:510
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Creates users in bulk.

                                                                      Parameters

                                                                      -

                                                                      Returns Promise<UserCreateBulkOperation>

                                                                      A promise that resolves to the bulk creation result.

                                                                      +
                                                                    +

                                                                    Returns Promise<object>

                                                                    The response object. Its fields are unspecified by the current API schema.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:554
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Deletes users in bulk.

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        userKeys: string[]
                                                                        +
                                                                      • userKeys: string[]

                                                                        The array of user keys to delete.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<UserDeleteBulkOperation>

                                                                      A promise that resolves to the bulk deletion result.

                                                                      +
                                                                    +

                                                                    Returns Promise<object>

                                                                    The response object. Its fields are unspecified by the current API schema.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:579
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Replaces users in bulk.

                                                                      If a user exists, it will be replaced. Otherwise, it will be created.

                                                                      Parameters

                                                                      -

                                                                      Returns Promise<UserReplaceBulkOperation>

                                                                      A promise that resolves to the bulk replacement result.

                                                                      +
                                                                    +

                                                                    Returns Promise<object>

                                                                    The response object. Its fields are unspecified by the current API schema.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:606
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Creates a new user.

                                                                      +
                                                                      +

                                                                      Type Parameters

                                                                      +
                                                                        +
                                                                      • Attributes extends object = object

                                                                      Parameters

                                                                      -

                                                                      Returns Promise<UserRead>

                                                                      A promise that resolves to the created user.

                                                                      +
                                                                    +

                                                                    Returns Promise<UserRead<Attributes>>

                                                                    A promise that resolves to the created user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:408
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Deletes a user.

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        userKey: string
                                                                        +
                                                                      • userKey: string

                                                                        The key of the user to delete.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<void>

                                                                      A promise that resolves when the user is deleted.

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    A promise that resolves when the user is deleted.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:489
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        requiredAccessLevel: ApiKeyLevel
                                                                        +
                                                                      • requiredAccessLevel: ApiKeyLevel

                                                                        The required API Key Access level for the endpoint.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<void>

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    -

                                                                    Throws

                                                                    PermitContextError If the currently set API key access level does not match the required access level.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/base.ts:162
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Ensure that the API context matches the required endpoint context.

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        requiredContext: ApiContextLevel
                                                                        +
                                                                      • requiredContext: ApiContextLevel

                                                                        The required API context level for the endpoint.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<void>

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    -

                                                                    Throws

                                                                    PermitContextError If the currently set API context level does not match the required context level.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/base.ts:189
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Retrieves a user by its key.

                                                                      +
                                                                      +

                                                                      Type Parameters

                                                                      +
                                                                        +
                                                                      • Attributes extends object = object

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        userKey: string
                                                                        +
                                                                      • userKey: string

                                                                        The key of the user.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<UserRead>

                                                                      A promise that resolves to the user.

                                                                      +
                                                                    +

                                                                    Returns Promise<UserRead<Attributes>>

                                                                    A promise that resolves to the user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:353
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Retrieves the roles assigned to a user in a given tenant (if the tenant filter is provided) or across all tenants (if the tenant filter in not provided).

                                                                      +
                                                                      +

                                                                      Type Parameters

                                                                      +

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        roleFilters: IGetUserRoles
                                                                        +
                                                                      • params: T

                                                                        The filters for retrieving role assignments.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<RoleAssignmentRead[]>

                                                                      A promise that resolves with an array of role assignments for the user.

                                                                      +
                                                                    +

                                                                    Returns Promise<ReturnIGetUserRolesType<T>>

                                                                    A promise that resolves with an array of role assignments for the user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:632
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Retrieves a user by its ID. -Alias for the get method.

                                                                      +Alias for the get method.

                                                                      +
                                                                      +

                                                                      Type Parameters

                                                                      +
                                                                        +
                                                                      • Attributes extends object = object

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        userId: string
                                                                        +
                                                                      • userId: string

                                                                        The ID of the user.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<UserRead>

                                                                      A promise that resolves to the user.

                                                                      +
                                                                    +

                                                                    Returns Promise<UserRead<Attributes>>

                                                                    A promise that resolves to the user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:394
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Retrieves a user by its key. -Alias for the get method.

                                                                      +Alias for the get method.

                                                                      +
                                                                      +

                                                                      Type Parameters

                                                                      +
                                                                        +
                                                                      • Attributes extends object = object

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        userKey: string
                                                                        +
                                                                      • userKey: string

                                                                        The key of the user.

                                                                        -
                                                                        -
                                                                      -

                                                                      Returns Promise<UserRead>

                                                                      A promise that resolves to the user.

                                                                      +
                                                                    +

                                                                    Returns Promise<UserRead<Attributes>>

                                                                    A promise that resolves to the user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:379
                                                                  • +
                                                                    + +

                                                                    Returns Promise<PaginatedResultUserRead<Attributes>>

                                                                    A promise that resolves to a PaginatedResultUserRead object containing the list of users.

                                                                    -

                                                                    See

                                                                    IUsersListParams

                                                                    - -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:328
                                                                  • +
                                                                    + +

                                                                    Returns Promise<ICreateOrUpdateUserResult<Attributes>>

                                                                    A promise that resolves with the result of the user creation or update operation.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:461
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Unassigns a role from a user in the scope of a given tenant.

                                                                      Parameters

                                                                      -

                                                                      Returns Promise<void>

                                                                      A promise that resolves when the role is successfully unassigned from the user.

                                                                      +
                                                                    +

                                                                    Returns Promise<void>

                                                                    A promise that resolves when the role is successfully unassigned from the user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:533
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +

                                                                      Updates a user.

                                                                      +
                                                                      +

                                                                      Type Parameters

                                                                      +
                                                                        +
                                                                      • Attributes extends object = object

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        userKey: string
                                                                        +
                                                                      • userKey: string

                                                                        The key of the user.

                                                                        -
                                                                        -
                                                                      • -
                                                                      • -
                                                                        userData: UserUpdate
                                                                        +
                                                                    • +
                                                                    • userData: UserUpdate

                                                                      The updated data for the user.

                                                                      -
                                                                      -
                                                                    -

                                                                    Returns Promise<UserRead>

                                                                    A promise that resolves to the updated user.

                                                                    + +

                                                                    Returns Promise<UserRead<Attributes>>

                                                                    A promise that resolves to the updated user.

                                                                    -

                                                                    Throws

                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                    - -

                                                                    Throws

                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                    -
                                                                    -
                                                                    - +
                                                                  • Defined in src/api/users.ts:434
                                                                  • +
                                                                    +
                                                                      - -
                                                                    • +
                                                                    • + +
                                                                      +

                                                                      Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                      +

                                                                      Parameters

                                                                        -
                                                                      • -
                                                                        timeout: null | number
                                                                      -

                                                                      Returns UsersApi

                                                                    +

                                                                    Returns this

                                                                    +
                                                                  • Defined in src/api/base.ts:265
                                                                  • +
                                                                    +
                                                                    +

                                                                    On This Page

                                                                    +
                                                                    Constructors +
                                                                    +
                                                                    Methods +
                                                                    -
                                                                    -

                                                                    Generated using TypeDoc

                                                                    -
                                                                    \ No newline at end of file + +
                                                                    diff --git a/docs/enums/APIKeyOwnerType.html b/docs/enums/APIKeyOwnerType.html deleted file mode 100644 index 375d93e9..00000000 --- a/docs/enums/APIKeyOwnerType.html +++ /dev/null @@ -1,204 +0,0 @@ -APIKeyOwnerType | permitio
                                                                    -
                                                                    - -
                                                                    -
                                                                    -
                                                                    -
                                                                    - -

                                                                    Enumeration APIKeyOwnerType

                                                                    -
                                                                    -

                                                                    An enumeration.

                                                                    -
                                                                    -
                                                                    -

                                                                    Export

                                                                    -
                                                                    -
                                                                    -
                                                                    - -
                                                                    -
                                                                    -

                                                                    Enumeration Members

                                                                    -
                                                                    -
                                                                    -

                                                                    Enumeration Members

                                                                    -
                                                                    - -
                                                                    Elements: "elements"
                                                                    -
                                                                    - -
                                                                    Member: "member"
                                                                    -
                                                                    - -
                                                                    PdpConfig: "pdp_config"
                                                                    -
                                                                    - -
                                                                    -
                                                                    -

                                                                    Generated using TypeDoc

                                                                    -
                                                                    \ No newline at end of file diff --git a/docs/enums/ApiContextLevel.html b/docs/enums/ApiContextLevel.html new file mode 100644 index 00000000..d7536cd1 --- /dev/null +++ b/docs/enums/ApiContextLevel.html @@ -0,0 +1,79 @@ +ApiContextLevel | permitio
                                                                    +
                                                                    permitio + +
                                                                      +
                                                                      +
                                                                      Preparing search index...
                                                                      +
                                                                      +
                                                                      +
                                                                      + +

                                                                      Enumeration ApiContextLevel

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      Index
                                                                      +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + +
                                                                      ENVIRONMENT: 3
                                                                      +

                                                                      When running in this context level, the SDK knows the current organization, project and environment.

                                                                      +
                                                                      +
                                                                      + +
                                                                      ORGANIZATION: 1
                                                                      +

                                                                      When running in this context level, the SDK knows the current organization.

                                                                      +
                                                                      +
                                                                      + +
                                                                      PROJECT: 2
                                                                      +

                                                                      When running in this context level, the SDK knows the current organization and project.

                                                                      +
                                                                      +
                                                                      + +
                                                                      WAIT_FOR_INIT: 0
                                                                      +

                                                                      Signifies that the context is not set yet.

                                                                      +
                                                                      +
                                                                      + +
                                                                      +
                                                                      diff --git a/docs/enums/ApiKeyLevel.html b/docs/enums/ApiKeyLevel.html index c49ddbef..dd4cea41 100644 --- a/docs/enums/ApiKeyLevel.html +++ b/docs/enums/ApiKeyLevel.html @@ -1,227 +1,88 @@ -ApiKeyLevel | permitio
                                                                      -
                                                                      - -
                                                                      +ApiKeyLevel | permitio
                                                                      +
                                                                      permitio + +
                                                                        +
                                                                        +
                                                                        Preparing search index...
                                                                        - +

                                                                        Enumeration ApiKeyLevel

                                                                        The ApiKeyLevel enum represents the access level of a Permit API Key.

                                                                        -
                                                                        -
                                                                        +
                                                                      • Defined in src/api/context.ts:11
                                                                      • -
                                                                        - +
                                                                        +
                                                                        Index
                                                                        -
                                                                        -

                                                                        Enumeration Members

                                                                        -
                                                                        - -
                                                                        ENVIRONMENT_LEVEL_API_KEY: "ENVIRONMENT_LEVEL_API_KEY"
                                                                        +
                                                                        + +
                                                                        +
                                                                        + +
                                                                        ENVIRONMENT_LEVEL_API_KEY: "ENVIRONMENT_LEVEL_API_KEY"

                                                                        Environment level API key authorization. Using an API key of this scope will allow the SDK user to modify a single Permit environment.

                                                                        -
                                                                        -
                                                                        -
                                                                        - -
                                                                        ORGANIZATION_LEVEL_API_KEY: "ORGANIZATION_LEVEL_API_KEY"
                                                                        +
                                                                      • Defined in src/api/context.ts:36
                                                                      • +
                                                                        + +
                                                                        ORGANIZATION_LEVEL_API_KEY: "ORGANIZATION_LEVEL_API_KEY"

                                                                        Organization level API key authorization. Using an API key of this scope will allow the SDK user to modify all projects and environments under the organization / workspace.

                                                                        -
                                                                        -
                                                                        -
                                                                        - -
                                                                        PROJECT_LEVEL_API_KEY: "PROJECT_LEVEL_API_KEY"
                                                                        +
                                                                      • Defined in src/api/context.ts:22
                                                                      • +
                                                                        + +
                                                                        PROJECT_LEVEL_API_KEY: "PROJECT_LEVEL_API_KEY"

                                                                        Project level API key authorization. Using an API key of this scope will allow the SDK user to modify a single project and the environments under that project.

                                                                        -
                                                                        -
                                                                        -
                                                                        - -
                                                                        WAIT_FOR_INIT: "WAIT_FOR_INIT"
                                                                        +
                                                                      • Defined in src/api/context.ts:29
                                                                      • +
                                                                        + +
                                                                        WAIT_FOR_INIT: "WAIT_FOR_INIT"

                                                                        Wait for initialization of the API key.

                                                                        -
                                                                        -
                                                                        +
                                                                      • Defined in src/api/context.ts:15
                                                                      • +
                                                                        +
                                                                        +

                                                                        On This Page

                                                                        +
                                                                        Enumeration Members +
                                                                        -
                                                                        -

                                                                        Generated using TypeDoc

                                                                        -
                                                                        \ No newline at end of file + +
                                                                        diff --git a/docs/enums/AttributeType.html b/docs/enums/AttributeType.html deleted file mode 100644 index ac89b55b..00000000 --- a/docs/enums/AttributeType.html +++ /dev/null @@ -1,225 +0,0 @@ -AttributeType | permitio
                                                                        -
                                                                        - -
                                                                        -
                                                                        -
                                                                        -
                                                                        - -

                                                                        Enumeration AttributeType

                                                                        -
                                                                        -

                                                                        supported attribute primitives

                                                                        -
                                                                        -
                                                                        -

                                                                        Export

                                                                        -
                                                                        -
                                                                        -
                                                                        - -
                                                                        -
                                                                        -

                                                                        Enumeration Members

                                                                        -
                                                                        -
                                                                        -

                                                                        Enumeration Members

                                                                        -
                                                                        - -
                                                                        Array: "array"
                                                                        -
                                                                        - -
                                                                        Bool: "bool"
                                                                        -
                                                                        - -
                                                                        Json: "json"
                                                                        -
                                                                        - -
                                                                        Number: "number"
                                                                        -
                                                                        - -
                                                                        String: "string"
                                                                        -
                                                                        - -
                                                                        Time: "time"
                                                                        -
                                                                        - -
                                                                        -
                                                                        -

                                                                        Generated using TypeDoc

                                                                        -
                                                                        \ No newline at end of file diff --git a/docs/enums/ConditionSetType.html b/docs/enums/ConditionSetType.html deleted file mode 100644 index 68629037..00000000 --- a/docs/enums/ConditionSetType.html +++ /dev/null @@ -1,197 +0,0 @@ -ConditionSetType | permitio
                                                                        -
                                                                        - -
                                                                        -
                                                                        -
                                                                        -
                                                                        - -

                                                                        Enumeration ConditionSetType

                                                                        -
                                                                        -

                                                                        An enumeration.

                                                                        -
                                                                        -
                                                                        -

                                                                        Export

                                                                        -
                                                                        -
                                                                        -
                                                                        - -
                                                                        -
                                                                        -

                                                                        Enumeration Members

                                                                        -
                                                                        -
                                                                        -

                                                                        Enumeration Members

                                                                        -
                                                                        - -
                                                                        Resourceset: "resourceset"
                                                                        -
                                                                        - -
                                                                        Userset: "userset"
                                                                        -
                                                                        - -
                                                                        -
                                                                        -

                                                                        Generated using TypeDoc

                                                                        -
                                                                        \ No newline at end of file diff --git a/docs/enums/ElementsApiErrors.html b/docs/enums/ElementsApiErrors.html index 7d444a23..e5f860b1 100644 --- a/docs/enums/ElementsApiErrors.html +++ b/docs/enums/ElementsApiErrors.html @@ -1,209 +1,74 @@ -ElementsApiErrors | permitio
                                                                        -
                                                                        - -
                                                                        +ElementsApiErrors | permitio
                                                                        +
                                                                        permitio + +
                                                                          +
                                                                          +
                                                                          Preparing search index...
                                                                          - +

                                                                          Enumeration ElementsApiErrors

                                                                          Represents the possible error messages returned by the Elements API.

                                                                          -
                                                                          -
                                                                          +
                                                                        • Defined in src/api/elements.ts:33
                                                                        • -
                                                                          - +
                                                                          +
                                                                          Index
                                                                          -
                                                                          -

                                                                          Enumeration Members

                                                                          -
                                                                          - -
                                                                          FORBIDDEN_ACCESS: "Forbidden access"
                                                                          +
                                                                        • Defined in src/api/elements.ts:34
                                                                        • +
                                                                          +
                                                                          +

                                                                          On This Page

                                                                          +
                                                                          Enumeration Members +
                                                                          -
                                                                          -

                                                                          Generated using TypeDoc

                                                                          -
                                                                          \ No newline at end of file + +
                                                                          diff --git a/docs/enums/MemberAccessLevel.html b/docs/enums/MemberAccessLevel.html deleted file mode 100644 index 971cd93f..00000000 --- a/docs/enums/MemberAccessLevel.html +++ /dev/null @@ -1,204 +0,0 @@ -MemberAccessLevel | permitio
                                                                          -
                                                                          - -
                                                                          -
                                                                          -
                                                                          -
                                                                          - -

                                                                          Enumeration MemberAccessLevel

                                                                          -
                                                                          -

                                                                          An enumeration.

                                                                          -
                                                                          -
                                                                          -

                                                                          Export

                                                                          -
                                                                          -
                                                                          -
                                                                          - -
                                                                          -
                                                                          -

                                                                          Enumeration Members

                                                                          -
                                                                          -
                                                                          -

                                                                          Enumeration Members

                                                                          -
                                                                          - -
                                                                          Admin: "admin"
                                                                          -
                                                                          - -
                                                                          Read: "read"
                                                                          -
                                                                          - -
                                                                          Write: "write"
                                                                          -
                                                                          - -
                                                                          -
                                                                          -

                                                                          Generated using TypeDoc

                                                                          -
                                                                          \ No newline at end of file diff --git a/docs/enums/MemberAccessObj.html b/docs/enums/MemberAccessObj.html deleted file mode 100644 index 6c557d55..00000000 --- a/docs/enums/MemberAccessObj.html +++ /dev/null @@ -1,204 +0,0 @@ -MemberAccessObj | permitio
                                                                          -
                                                                          - -
                                                                          -
                                                                          -
                                                                          -
                                                                          - -

                                                                          Enumeration MemberAccessObj

                                                                          -
                                                                          -

                                                                          An enumeration.

                                                                          -
                                                                          -
                                                                          -

                                                                          Export

                                                                          -
                                                                          -
                                                                          -
                                                                          - -
                                                                          -
                                                                          -

                                                                          Enumeration Members

                                                                          -
                                                                          -
                                                                          -

                                                                          Enumeration Members

                                                                          -
                                                                          - -
                                                                          Env: "env"
                                                                          -
                                                                          - -
                                                                          Org: "org"
                                                                          -
                                                                          - -
                                                                          Project: "project"
                                                                          -
                                                                          - -
                                                                          -
                                                                          -

                                                                          Generated using TypeDoc

                                                                          -
                                                                          \ No newline at end of file diff --git a/docs/hierarchy.html b/docs/hierarchy.html new file mode 100644 index 00000000..9ade156a --- /dev/null +++ b/docs/hierarchy.html @@ -0,0 +1,170 @@ +permitio
                                                                          +
                                                                          permitio + +
                                                                            +
                                                                            +
                                                                            Preparing search index...
                                                                            +
                                                                            +
                                                                            +
                                                                            +

                                                                            permitio

                                                                            +

                                                                            Hierarchy Summary

                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                            +
                                                                            + +
                                                                            +
                                                                            diff --git a/docs/index.html b/docs/index.html index 741f174e..ad4aec67 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,184 +1,584 @@ -permitio
                                                                            -
                                                                            - -
                                                                            +permitio
                                                                            +
                                                                            permitio + +
                                                                              +
                                                                              +
                                                                              Preparing search index...
                                                                              -

                                                                              permitio

                                                                              -

                                                                              Node.png

                                                                              -

                                                                              Permit.io client for Node.js

                                                                              Node.js client library for the Permit.io full-stack permissions platform.

                                                                              -

                                                                              Installation

                                                                              npm install permitio
                                                                              +

                                                                              permitio

                                                                              +

                                                                              Node.png

                                                                              +

                                                                              Preparing for 3.0? Read the 2.x-to-3.0 migration guide and customer agent skill.

                                                                              +

                                                                              Permit.io client for Node.js

                                                                              +

                                                                              Node.js client library for the Permit.io full-stack permissions platform.

                                                                              + +

                                                                              Node.js 22.13.0 or newer is supported, including later major versions. +CI retains the 22.13.0 and 24.0.0 floors and tests current releases of Node 22, 24 and 26. +The package provides both +CommonJS (require) and ES module (import) entry points.

                                                                              + +
                                                                              npm install permitio
                                                                               
                                                                              -

                                                                              Release

                                                                                -
                                                                              1. Update the version in package.json
                                                                              2. -
                                                                              3. Execute yarn run build
                                                                              4. -
                                                                              5. Execute yarn docs ; git add docs/ ; git commit -m "update tsdoc" to update the auto generated docs
                                                                              6. -
                                                                              7. Execute yarn publish --access public
                                                                              8. -
                                                                              -

                                                                              Documentation

                                                                              Read the documentation at Permit.io website

                                                                              -

                                                                              API Reference

                                                                              Check out the tsdoc reference here.

                                                                              + +

                                                                              See the 3.0 migration guide for grouped API replacements and removed exports.

                                                                              + +

                                                                              Use the Node version in .nvmrc and pnpm 12.8.1, pinned in package.json. +Install pnpm with npm install --global --ignore-scripts pnpm@12.8.1. Then run:

                                                                              +
                                                                              pnpm audit --audit-level=moderate
                                                                              pnpm install --frozen-lockfile
                                                                              pnpm hooks:install
                                                                              pnpm verify +
                                                                              + +

                                                                              Installs disable lifecycle scripts, so builds and hook setup are explicit. Run pnpm hooks:install +to install prek for the current checkout without changing sibling worktree hooks. New dependency +versions must be at least 24 hours old; direct dependencies are saved with exact versions.

                                                                              +

                                                                              pnpm test runs the unit and module-import suites without a Permit backend. +pnpm test:codegen tests the generator guard without Java; pnpm check:codegen also +regenerates the fixture and requires Java 17. pnpm check:openapi regenerates the reviewed +production snapshot twice and verifies committed output. See OpenAPI generation +and its migration inventory.

                                                                              +

                                                                              Test commands save native Vitest reports and execution summaries in .test-results/. The gate +requires collected files and executed tests in every selected suite, and rejects unexpected skips. +Backend commands exit with UNAVAILABLE and a nonzero status when PDP_API_KEY is absent. +Absent optional organization/project keys and disabled direct OPA checks are named UNAVAILABLE +limitations; a supplied key with the wrong scope fails. The known ABAC decision test remains +BLOCKED by PER-16553. A run with these limitations reports PARTIAL, with passed execution counted +separately. CI runs backend checks against the cloud control plane and a pinned local PDP; fork and +Dependabot runs explicitly report unavailable backend coverage.

                                                                              +

                                                                              pnpm coverage measures all authored runtime TypeScript, including API wrappers, enforcement, +configuration and utilities. Generated OpenAPI clients and test files are excluded. Text, HTML, +LCOV and JSON summaries are saved in coverage/; this measured scope has no percentage threshold.

                                                                              + +

                                                                              The shared candidate workflow builds permitio@3.0.0 from the committed version, validates the +package metadata and file allowlist, and records its archive hash and source identity. Required +quality checks cover lint, strict types, local unit/tooling tests, generated contracts, workflow +security, and external packed ESM/CommonJS customers on Node 22.13.0, 24.0.0, and current +Node 22, 24 and 26 releases. The customer +fixtures also compile with TypeScript 6 and 7 under Node16, NodeNext and Bundler resolution. +Both runtime entry points expose named exports; the ESM declaration facade preserves shared +class identity with CommonJS. Dependency security scans the same archive on both Node floors.

                                                                              +

                                                                              The release workflow normalizes semantic-version tags, including an optional v prefix, and +requires the resulting version to match the reviewed package version. +Its production job downloads and revalidates the tested/scanned archive, then uses npm Trusted +Publishing with lifecycle scripts disabled. It does not build, change the version or repack. +Release candidates use the rc distribution tag.

                                                                              +

                                                                              Publication is currently blocked. SDK71's local release evidence has 13 unproved operations, +its releaseReady remains false, and the shared target is unavailable (PER-16345). +Shared acceptance and Curtain Call (PER-16561, PER-16574) must provide their reviewed acceptance +contract before publication can proceed. Ordinary PR quality checks do not claim this external +acceptance.

                                                                              +

                                                                              Repository check, production approval, release tag and npm publisher settings require the separate +owner rollout described in Contributing. Workflow +source alone does not configure those protections. Actual merge, tag creation and publication +also require separate authorization.

                                                                              +

                                                                              See Contributing for scan commands and reports.

                                                                              + +

                                                                              The constructor accepts IPermitOptions. Omitted values use environment variables and SDK +defaults. A nonempty token is required after PERMIT_API_KEY fallback; tokens are opaque strings +and cannot contain whitespace or control characters. PDP and REST URLs must be absolute HTTP(S) +URLs without literal query (?) or fragment (#) components, including empty delimiters. +Path prefixes and encoded path characters such as %3F and %23 remain supported. Omitted +pdp and apiUrl use the existing PERMIT_PDP_URL and PERMIT_API_URL defaults. Invalid +settings throw before the SDK creates a logger or transport, with errors that omit caller values.

                                                                              +

                                                                              In 3.0, permit.config settings and their SDK-owned nested objects are frozen. Configure tokens, +URLs, logging, tenancy and retry settings at construction time. Supplied Axios instances and +retry callbacks remain caller-owned and live; their defaults, interceptors and mutable callback +state can still change.

                                                                              +

                                                                              A supplied apiContext is copied into an independent SDK-owned context, preserving its initial +permissions and selection. It no longer retains the supplied object's identity. Make later +context changes through permit.config.apiContext. Concurrent first REST calls share one scope +lookup per SDK. A failed initial lookup rejects its waiting calls and allows a later retry. Invalid +hierarchical scope replies are rejected atomically, and late replies preserve explicit context +changes.

                                                                              + +

                                                                              The SDK includes built-in retry support for transient failures. Retries are opt-in: +they are off unless you pass a retry config (or retry: { enabled: true }).

                                                                              +

                                                                              When enabled, the defaults are:

                                                                              +
                                                                                +
                                                                              • 3 retries (up to 4 total attempts) with exponential backoff
                                                                              • +
                                                                              • Retries on recognized transient network errors and status codes: 408, 429, 500, 502, 503, 504
                                                                              • +
                                                                              • Respects Retry-After headers for rate limiting (429)
                                                                              • +
                                                                              +

                                                                              maxRetries is the number of retries after the initial request, so the default of 3 means up to 4 total requests.

                                                                              +
                                                                              +

                                                                              Behavioral note

                                                                              +
                                                                                +
                                                                              • Retries are opt-in — providing a retry config object turns them on; omitting it (or passing retry: false) leaves them off.
                                                                              • +
                                                                              • When enabled, PDP/OPA calls additionally retry POST because authorization queries are idempotent.
                                                                              • +
                                                                              • SDK retries never repeat REST POST or PATCH, even when listed in retryMethods. The default idempotent methods remain GET, HEAD, OPTIONS, PUT and DELETE.
                                                                              • +
                                                                              • Cancellation and invalid request configuration are never retried, even with a custom predicate. Unclassified response-less errors are not retried by the default predicate.
                                                                              • +
                                                                              +
                                                                              +

                                                                              Retry options are checked when the SDK is constructed. Counts must be nonnegative safe integers; +delays must be finite milliseconds from 0 through 2,147,483,647; the backoff multiplier must be +finite and at least 1. Retry predicates must return a boolean. Invalid configuration fails with +an actionable error instead of silently accepting a malformed policy.

                                                                              +

                                                                              For 3.0, failed attempts and backoff consume one Axios timeout budget. Each retry gets the +remaining timeout, and a delay that exhausts the budget prevents another attempt. The SDK timeout +option applies to PDP/OPA; REST and Elements use the supplied Axios instance's timeout. A timeout +of 0 disables the deadline; omitted SDK timeouts preserve caller defaults. This changes the earlier +behavior that reset the full timeout for every retry. Axios adapters must honor the timeout; +arbitrary caller interceptors or adapters are not interrupted by an SDK wall-clock deadline.

                                                                              +

                                                                              A supplied axiosInstance serves REST and Elements; opaAxiosInstance serves OPA. The SDK keeps +these caller instances unchanged and delegates every attempt through their live adapters, +transforms and interceptors, including when the SDK and supplied Axios client use different +CommonJS/ESM entry points. Caller default headers remain live on every attempt. Two SDK instances +can share a client while retaining separate routes, Bearer tokens, logging and SDK retry policies. +SDK requests explicitly allow their configured absolute URLs even when the caller default +allowAbsoluteUrls is false, so a caller base URL cannot prefix or reroute an SDK destination. +Direct caller requests retain that caller restriction and remain usable and acquire no SDK retries. +Default Basic credentials cannot replace an explicit +SDK Bearer token. Intentional caller hooks can still rewrite request configuration, including +headers and transforms; caller-owned retry or redirect behavior remains the caller's responsibility. +For 3.0, the SDK serializes enforcement request bodies before dispatch so legal JSON dictionary +keys such as __proto__ and constructor survive Axios merging. A supplied OPA request +interceptor or transform receives JSON text, including the { input: ... } envelope. +To edit it, parse the text, update the parsed object, and return serialized JSON. Earlier hooks +that expected a raw object must be updated. Direct caller requests retain their own data shape. +Circular references and unsupported JSON values raise a contextual PermitError before HTTP; +explicit non-throwing authorization mode retains its deny result. The raw serialization exception +and input are omitted from diagnostics.

                                                                              +

                                                                              PDP requests use a separate internal transport. There are no SDK registrations on supplied +instances to dispose of.

                                                                              + +
                                                                              import { Permit } from 'permitio';

                                                                              // Retries are off by default (opt-in)
                                                                              const permitDefault = new Permit({ token: 'your-api-key' });

                                                                              // Enable with custom retry configuration
                                                                              const permitCustom = new Permit({
                                                                              token: 'your-api-key',
                                                                              retry: {
                                                                              maxRetries: 5,
                                                                              retryDelay: 500, // Initial delay in ms
                                                                              backoffMultiplier: 2, // Exponential backoff multiplier
                                                                              maxDelay: 30000, // Maximum delay cap
                                                                              },
                                                                              });

                                                                              // Explicitly disable retry
                                                                              const permitNoRetry = new Permit({
                                                                              token: 'your-api-key',
                                                                              retry: false,
                                                                              });

                                                                              // Different config for PDP vs REST API
                                                                              const permitPdp = new Permit({
                                                                              token: 'your-api-key',
                                                                              retry: { maxRetries: 3 },
                                                                              pdpRetry: { maxRetries: 5 },
                                                                              }); +
                                                                              + + +

                                                                              log.level controls the SDK's log level (default: warn). Set it to debug to include HTTP +request and response diagnostics, or silent to disable SDK logs. PERMIT_LOG_LEVEL supplies +the default when log.level is omitted.

                                                                              +

                                                                              Logs are JSON lines by default. Set log.json: false for pretty text. When log.json is +omitted, PERMIT_LOG_JSON supplies the default: false selects pretty text, while true, an +unset variable, or any other value keeps JSON lines. The variable ignores letter case and +surrounding whitespace. An explicit log.json setting always overrides the environment variable. +This is a breaking logging change: explicit log.json: false produced JSON in 2.x and selects +pretty text in 3.0. Update log parsers, or set log.json: true to retain JSON output. +Pretty output uses an in-process synchronous stream without worker threads. Writes run on the +calling thread, so blocked stdout can delay the application. Prefer the default JSON output for +production log collection. SDK initialization logs do not include the API key or serialized +configuration.

                                                                              +
                                                                              import { Permit } from 'permitio';

                                                                              const permit = new Permit({
                                                                              token: process.env.PERMIT_API_KEY,
                                                                              log: { level: 'debug', json: false },
                                                                              }); +
                                                                              + +

                                                                              With the default throwOnError: true, a PDP response with an unexpected status code, or a 200 +response with a body the SDK cannot read, throws PermitPDPStatusError, a subclass of +PermitConnectionError. It carries the HTTP statusCode and a bounded, sanitized responseBody. +Transport failures, such as refused connections or timeouts, throw PermitConnectionError with +a safe cause and transport code when available. Match errors with instanceof, +not their name or message, and check the more specific status error first:

                                                                              +
                                                                              import { PermitConnectionError, PermitPDPStatusError } from 'permitio';

                                                                              try {
                                                                              await permit.check('user-1', 'read', 'document:one');
                                                                              } catch (error) {
                                                                              if (error instanceof PermitPDPStatusError) {
                                                                              console.error('PDP HTTP status:', error.statusCode);
                                                                              } else if (error instanceof PermitConnectionError) {
                                                                              console.error('PDP connection failed');
                                                                              } else {
                                                                              throw error;
                                                                              }
                                                                              } +
                                                                              + +

                                                                              REST failures throw named PermitApiError errors. +The SDK accepts message, detail (including validation-error arrays), and text error bodies; +missing descriptions fall back to the HTTP status or transport failure. status, code and a +detached safe cause retain failure metadata. API-key scope failures use PermitContextError +with the same safe metadata.

                                                                              +

                                                                              These are deliberate 3.0 error-property changes. PermitApiError.originalError is a detached Axios +snapshot; response.data and formattedAxiosError.error have type unknown after redaction. +PermitApiError no longer takes a response-body type parameter; narrow the sanitized data before use. +request is always undefined. Snapshots omit request bodies, parameters, socket objects, hooks, +original stacks and raw causes. Response diagnostics keep only message, detail, msg, +error_code, code and errors; nested values, item counts and text lengths are bounded. +Request header values remain redacted except known protocol/SDK headers. Response header values +are redacted except content type, content length and retry timing. Credential URL components +(user information, query values and fragments) are removed. Known request credentials and private +values are scrubbed from error descriptions; oversized or deeply nested requests cause descriptions +to be redacted. Failures from caller adapters, interceptors and retry hooks follow the same rules; +uninspectable primitive rejections use a useful operation fallback. Credentials and identity/permission +attributes are omitted from JSON and pretty +SDK logs, including successful authorization calls.

                                                                              +

                                                                              These rules apply to check, bulkCheck, getUserPermissions, checkAllTenants, +getAuthorizedUsers, getUserTenants, and filterObjects. +PDP responses are validated before authorization data reaches the caller. Direct PDP responses +and OPA result envelopes are supported. Decisions must be literal booleans; bulk results must +contain exactly one decision for each requested position. An empty bulk request requires an empty +result. Every all-tenant entry must have allow: true and a tenant with a string key; a denied or +malformed entry invalidates the whole result. A legacy result boolean alongside allow is +additive metadata and does not override the decision.

                                                                              +

                                                                              Permission entries must contain string arrays when permissions or roles are supplied. Tenant +and resource details require string keys, resources also require a string type, and supplied +attributes must be objects. The SDK applies the PDP's documented defaults: missing permissions +become [], missing attributes become {}, and nullable optional roles/tenant/resource fields are +omitted. Null permissions or attributes are invalid. Extra fields are retained. Dictionary identifiers +such as result, permissions, and __proto__ remain valid; a valid direct map takes precedence +over interpreting it as an OPA envelope.

                                                                              +

                                                                              These are deliberate next-major response contract changes: malformed responses that previously +escaped as truthy values, incomplete bulk arrays, or unchecked permission/tenant objects now fail. +useOpa: true is supported by check() only; bulk and permission calls reject it under the same +error policy instead of ignoring it. Per-call timeout: 0 disables the timeout.

                                                                              +

                                                                              With throwOnError: false, failures, including an invalid resource string, return false for +check, one false per input for bulkCheck, {} for getUserPermissions, and [] for +checkAllTenants. The first three methods also accept per-call error-policy overrides; +checkAllTenants uses the SDK setting.

                                                                              + +

                                                                              getUserPermissions(user, tenants?, resources?, resourceTypes?, config?) accepts request context +in its existing fifth argument: { context: { requestFlag: true }, timeout: 1000 }. Request values +override the internal global context. A general CheckConfig does not accept a context option; +other methods receive context as their own argument.

                                                                              +

                                                                              getAuthorizedUsers(action, resource, context?, config?) queries /authorized_users, published +by both container and cloud PDP contracts. It returns the complete { resource, tenant, users } +result, with each user's assignments retaining user, tenant, resource, and role. Legal +own dictionary keys and additive response fields are preserved. Malformed results invalidate the +whole response. A resource type or type:key string follows the same tenant defaults as check.

                                                                              +

                                                                              getUserTenants(user, context?, config?) queries /user-tenants on a compatible container PDP. +It returns role-derived tenant details; membership without a relevant role does not establish a +positive result. Missing tenant attributes default to {}. The cloud PDP contract does not publish +this endpoint, and no cloud runtime support is claimed. HTTP 404 raises an actionable capability +error regardless of throwOnError; it does not guess which PDP host is configured.

                                                                              +

                                                                              filterObjects(user, action, objects, context?, config?) performs one supported bulk check and +returns the authorized original objects in input order, preserving duplicates, extra fields and +object identity. Pass a dense readonly array of resources. Only type, key, tenant, and +attributes are sent as resource fields; extra application fields remain on returned objects. +Each object's optional context is sent as top-level check context with precedence global, +then call, then object. A synchronous array snapshot keeps results aligned if the caller changes +the array while the request is pending. Sparse or undefined slots reject before HTTP. Empty input +returns [] without HTTP after validating options.

                                                                              +
                                                                              const permissions = await permit.getUserPermissions('alice', undefined, undefined, undefined, {
                                                                              context: { requestFlag: true },
                                                                              });
                                                                              const authorized = await permit.getAuthorizedUsers('read', 'document:report', {
                                                                              requestFlag: true,
                                                                              });
                                                                              const tenants = await permit.getUserTenants('alice');
                                                                              const visible = await permit.filterObjects('alice', 'read', [
                                                                              { type: 'document', key: 'report', title: 'Report', context: { requestFlag: true } },
                                                                              ]); +
                                                                              + +

                                                                              The new discovery and filtering methods reject useOpa: true regardless of the error policy, +including an empty filtering call. Operational or malformed-response failures follow normal +throwOnError: non-throwing mode returns [] for tenant discovery/filtering and a normalized empty +{ resource, tenant, users: {} } for authorized users. No partial authorization data is returned. +Existing permission-query and bulk OPA error policies remain unchanged. checkAllTenants is +retained; future deprecation planning does not remove it here. AuthZEN remains deferred. +Internal context transforms are not activated by these methods.

                                                                              + +

                                                                              permit.getLocalRoleAssignments(query?, config?) reads one page of assignments cached by a +compatible container PDP. It uses GET /local/role_assignments; the cloud PDP does not publish +this endpoint. These key-based rows are distinct from permit.api.roleAssignments.list records +with control-plane IDs. The helper does not synchronize the local cache or promise freshness.

                                                                              +
                                                                              const assignments = await permit.getLocalRoleAssignments({
                                                                              user: 'alice',
                                                                              tenant: 'east',
                                                                              resource: 'document',
                                                                              resourceInstance: 'document:report',
                                                                              page: 1,
                                                                              perPage: 30,
                                                                              }); +
                                                                              + +

                                                                              Optional user, role, tenant, resource and resourceInstance filters are strings forwarded +unchanged. resource selects a resource type; resourceInstance is its type:key identifier. +Omitted tenant leaves tenants unfiltered and does not inject multiTenancy.defaultTenant. +No request context, total count, control-plane IDs or envelope is added. The result is a complete +ILocalRoleAssignment[] page with required string user, role and tenant, optional +resource_instance and preserved additive fields, order and duplicates. Missing and explicit +null resource_instance values remain distinct, matching the public Python SDK compatibility.

                                                                              +

                                                                              page defaults to 1 and must be a positive safe integer. perPage defaults to the REST value 30 +and must be an integer from 1 through 100. The SDK rejects invalid values instead of clamping them. +There is no automatic pagination: request subsequent pages until a page is shorter than perPage. +Timeout/error policy uses CheckConfig; a per-call timeout overrides the SDK value, and 0 +disables it. useOpa: true and invalid query/options always reject before HTTP with PermitError. +Malformed 200 pages and unavailable HTTP 404/405/501 endpoints always reject with +PermitPDPStatusError, even with throwOnError: false. Ordinary HTTP, connection and timeout +failures follow the per-call/global error policy: typed sanitized errors in throwing mode or [] +in non-throwing mode. A genuine empty page also returns [].

                                                                              + +

                                                                              permit.checkUrl(user, httpMethod, url, config?) evaluates a full URL through the compatible +container PDP's POST /allowed_url endpoint and its configured URL mapping rules. It returns +only a literal boolean allow: false represents policy denial or no matching mapping. +The cloud PDP snapshot does not publish this endpoint. See the +public URL mapping guide +for mapping configuration.

                                                                              +
                                                                              import { type CheckUrlConfig } from 'permitio';

                                                                              const urlOptions: CheckUrlConfig = {
                                                                              tenant: 'east',
                                                                              context: { requestFlag: true },
                                                                              timeout: 1000,
                                                                              throwOnError: true,
                                                                              };
                                                                              const allowed = await permit.checkUrl(
                                                                              { key: 'alice', attributes: { eligible: true } },
                                                                              'GET',
                                                                              'https://api.example.com/documents/report?version=1',
                                                                              urlOptions,
                                                                              ); +
                                                                              + +

                                                                              CheckUrlConfig adds optional tenant and context to the existing timeout/error options. +Omitted or empty tenant uses multiTenancy.defaultTenant when useDefaultTenantIfEmpty is true; +otherwise the call requires an explicit tenant. Context merges global values then per-call +values without changing either source. User, tenant and context are serialized before the +request, so later caller changes do not alter a pending request or its retries. Per-call timeout +uses milliseconds and overrides the SDK timeout; 0 disables it.

                                                                              +

                                                                              The HTTP method is a string sent unchanged; the published contract has no closed method enum. +The URL must be an absolute URI of 1..65536 Unicode characters without unescaped whitespace or +control characters, raw backslashes, or malformed percent escapes. Its original scheme, case, +percent encoding, query and fragment are sent +unchanged. The SDK imposes no HTTP(S)-only scheme restriction and does not fetch this URL; +matching and authorization remain the PDP's responsibility. Relative paths are invalid.

                                                                              +

                                                                              Invalid input, input that cannot be JSON-serialized and useOpa: true reject with PermitError +before HTTP, regardless of +throwOnError. A malformed decision (missing or nonboolean top-level allow, including an +OPA-only envelope) and unavailable HTTP 404, 405 or 501 always reject with +PermitPDPStatusError. Ordinary HTTP, connection and timeout failures follow the per-call +throwOnError override or SDK policy: throwing mode preserves typed sanitized errors, and +non-throwing mode returns false.

                                                                              + +

                                                                              permit.api.proxyConfigs manages the selected environment's proxy configurations through the +control-plane API. It supports list, get, create, update and delete; keys or IDs identify +individual configurations. Listing returns a plain array and defaults to page 1/perPage 100.

                                                                              +
                                                                              import { AuthMechanism, Methods, Permit } from 'permitio';

                                                                              const permit = new Permit({ token: process.env.PERMIT_API_KEY });
                                                                              const created = await permit.api.proxyConfigs.create({
                                                                              key: 'payments',
                                                                              name: 'Payments',
                                                                              secret: 'example-only-credential',
                                                                              auth_mechanism: AuthMechanism.Bearer,
                                                                              mapping_rules: [
                                                                              {
                                                                              url: 'https://service.example.test/items/{id}',
                                                                              http_method: Methods.Get,
                                                                              resource: 'document',
                                                                              action: 'read',
                                                                              priority: 0,
                                                                              },
                                                                              ],
                                                                              });
                                                                              const stored = await permit.api.proxyConfigs.get(created.id);
                                                                              const changed = await permit.api.proxyConfigs.update(created.id, {
                                                                              secret: { 'X-Authorization': 'example-only-header' },
                                                                              auth_mechanism: AuthMechanism.Headers,
                                                                              });
                                                                              const page = await permit.api.proxyConfigs.list({ page: 1, perPage: 7 });
                                                                              await permit.api.proxyConfigs.delete(created.id); +
                                                                              + +

                                                                              The exported ProxyConfigCreate, ProxyConfigUpdate, ProxyConfigRead, Secret, MappingRule +and MappingRuleUpdate retain the published fields. Secret accepts a string or string-valued +header dictionary. Mapping rules use the lowercase Methods enum; regex rules set +url_type: MappingRuleUrlTypeEnum.Regex, while plain/template rules omit url_type. +Updates may mark a rule with should_delete: true; they cannot rename the configuration key.

                                                                              +

                                                                              Results preserve the complete received configuration and any returned secret mask. Submitted +credentials are never merged into a returned result; the API decides which secret value it +returns. Write bodies and pagination are copied before asynchronous context discovery. Inputs +that cannot be JSON-serialized reject before a write. Named REST/context failures remain visible, +and REST POST/PATCH follow the existing SDK policy of no automatic retries. These operations use +the control plane even when proxyFactsViaPdp is enabled and have no waitForSync helper.

                                                                              + +

                                                                              permit.api.auditLogs.list and get read the selected environment's authorization audit logs +through the control-plane API, including when proxyFactsViaPdp is enabled. List returns the full +LimitedPaginatedResultAuditLogModel envelope with data, total_count, pagination_count and +optional nullable page_count. Get takes a log UUID and returns DetailedAuditLogModel, including its +required raw_data and optional nullable objects. Successful results preserve all received +decision data, including nullable optional fields and nested objects.

                                                                              +
                                                                              import { AuditLogQueryType, AuditLogSortKey, Permit } from 'permitio';

                                                                              const permit = new Permit({ token: process.env.PERMIT_API_KEY });
                                                                              const page = await permit.api.auditLogs.list({
                                                                              users: ['alice', 'bob'],
                                                                              resources: ['document'],
                                                                              tenant: 'east',
                                                                              action: 'read',
                                                                              decision: false,
                                                                              query: AuditLogQueryType.None,
                                                                              sortBy: AuditLogSortKey.Timestamp,
                                                                              page: 1,
                                                                              perPage: 100,
                                                                              });
                                                                              for (const log of page.data) {
                                                                              const detail = await permit.api.auditLogs.get(log.id);
                                                                              if ('metrics' in detail.raw_data) {
                                                                              const metrics = detail.raw_data.metrics;
                                                                              }
                                                                              } +
                                                                              + +

                                                                              IListAuditLogs exposes pagination plus pdpId, users, decision, resources, tenant, +action, timestampFrom, timestampTo, sortBy and query. Arrays use repeated query entries, +retaining order, duplicates, commas and empty strings; empty arrays omit those entries. Options +and arrays are copied before asynchronous context discovery. Explicit false, zero and empty values +are forwarded for server validation. User filter items have a published 500-character maximum. +Numeric timestamp filters are forwarded unchanged because their units are not specified by the +published contract. Omitted sorting/query fields retain the service's timestamp/check defaults; +AuditLogSortKey.None and AuditLogQueryType.None serialize as None and none, respectively.

                                                                              +

                                                                              The SDK defaults to page 1/perPage 100; the REST omission default is 1/30 and maximum page size +is 100. Reads do not auto-paginate or promise an atomic list/detail snapshot. The exported +AuditLogModel, DetailedAuditLogModel, RawData, RawData1, OPAEngineDecisionLog, +AVPEngineDecisionLog, GenericEngineDecisionLog, DummyEngineModel and AuditLogObjectsModel +preserve the published read schemas, including optional nullable engine tags and metrics. +Engine tags overlap the dummy branch, so guard properties +before using engine-specific fields. Named REST/context failures reject, including unavailable +records; there is no empty-page fallback. Audit replay, deletion, Elements and waitForSync +are outside this read API. Record availability and retention remain service responsibilities.

                                                                              + +

                                                                              permit.api.users.list returns the full PaginatedResultUserRead envelope. Pass +searchOperator: 'contains', 'startswith' or 'endswith' to match user keys, emails +and names. Omitting it leaves the API default of contains. Search, role and pagination +options can be combined; role: '' selects users without roles.

                                                                              +
                                                                              const users = await permit.api.users.list({
                                                                              search: 'alice',
                                                                              searchOperator: 'startswith',
                                                                              includeResourceInstanceRoles: true,
                                                                              page: 1,
                                                                              perPage: 20,
                                                                              });
                                                                              console.log(users.total_count, users.data[0]?.associated_tenants); +
                                                                              + +

                                                                              includeResourceInstanceRoles defaults to false at the API. When true, resource roles +appear in each associated tenant's resource_instance_roles, with resource, +resource_instance and role fields. Both flag values retain the same paginated result.

                                                                              + +

                                                                              permit.api.roles.bulkCreateOrReplace creates or replaces role definitions in the selected +environment. Pass RoleCreateBulk[]: each definition requires a key and name. Omit resource +for a tenant role, or set it to the resource key for a resource role.

                                                                              +
                                                                              import type { RoleCreateBulk, RoleCreateBulkOperationResult } from 'permitio';

                                                                              const roles: RoleCreateBulk[] = [
                                                                              { key: 'reader', name: 'Reader', permissions: ['document:read'] },
                                                                              { key: 'editor', name: 'Editor', resource: 'document', permissions: ['read', 'write'] },
                                                                              ];
                                                                              const result: RoleCreateBulkOperationResult = await permit.api.roles.bulkCreateOrReplace(roles);
                                                                              console.log(result.created, result.updated); +
                                                                              + +

                                                                              Calls use PUT /v2/schema/{proj_id}/{env_id}/bulk/roles on apiUrl, including when +proxyFactsViaPdp is enabled. The SDK wraps the definitions in { operations: roles } and returns +the complete received result, including both created and updated string arrays. Those strings +have no published UUID, ordering or input-index guarantee. The contract does not promise batch +atomicity or first-attempt classifications; existing PUT retries can replay a request. Read role +definitions through roles.get or resourceRoles.get to verify persisted outcomes. These schema +writes have no waitForSync() method. Context failures use PermitContextError; HTTP failures use +PermitApiError.

                                                                              + +

                                                                              permit.api.userAttributes manages the selected environment's user attribute schema through +list, get, create, update and delete. These definitions describe policy attributes; +individual user values are supplied through permit.api.users, such as users.update. +Calls use the dedicated /v2/schema/{proj_id}/{env_id}/users/attributes routes on apiUrl, +including when proxyFactsViaPdp is enabled.

                                                                              +
                                                                              import { AttributeType } from 'permitio';

                                                                              const definition = await permit.api.userAttributes.create({
                                                                              key: 'department',
                                                                              type: AttributeType.String,
                                                                              description: 'The department used by user policies.',
                                                                              });
                                                                              const definitions = await permit.api.userAttributes.list({ page: 1, perPage: 20 });
                                                                              const stored = await permit.api.userAttributes.get(definition.id);
                                                                              const updated = await permit.api.userAttributes.update(stored.key, {
                                                                              description: 'Updated policy schema description.',
                                                                              });
                                                                              await permit.api.users.update('user-key', { attributes: { department: 'engineering' } });
                                                                              console.log(definitions.length, updated.resource_key, updated.built_in);
                                                                              await permit.api.userAttributes.delete(definition.id); +
                                                                              + +

                                                                              Creation requires the schema key and AttributeType; description is optional. Update is a +partial schema body containing type and/or description. get, update and delete accept +an attribute key or UUID. Results retain the full ResourceAttributeRead metadata, including +resource identity, environment, timestamps and built_in; list returns an array, with SDK +defaults page 1 and perPage 100. This dedicated group has no resource selector or waitForSync() +method. Deleting a definition also removes its related data; policies then evaluate it as +undefined. Context failures use PermitContextError; HTTP failures use PermitApiError.

                                                                              + +

                                                                              permit.api.apiKeys exposes list, get, create, delete, rotate and getScope through +the control-plane /v2/api-key routes on apiUrl, including with proxyFactsViaPdp enabled. +Server authorization governs access. These methods do not initialize or require selected API +context, inject scope into creation bodies, or provide a facts synchronization helper.

                                                                              +
                                                                              import { APIKeyOwnerType, MemberAccessLevel, MemberAccessObj } from 'permitio';

                                                                              const scope = await permit.api.apiKeys.getScope();
                                                                              const page = await permit.api.apiKeys.list({
                                                                              objectType: MemberAccessObj.Project,
                                                                              projId: 'project-key-or-uuid',
                                                                              page: 1,
                                                                              perPage: 20,
                                                                              });
                                                                              const disposable = await permit.api.apiKeys.create({
                                                                              organization_id: scope.organization_id,
                                                                              object_type: MemberAccessObj.Org,
                                                                              access_level: MemberAccessLevel.Read,
                                                                              owner_type: APIKeyOwnerType.Member,
                                                                              name: 'Disposable key',
                                                                              });
                                                                              const stored = await permit.api.apiKeys.get(disposable.id);
                                                                              const rotated = await permit.api.apiKeys.rotate(disposable.id);
                                                                              // Store returned secrets securely when present; do not log them.
                                                                              console.log(page.total_count, stored.organization_id, rotated.id);
                                                                              await permit.api.apiKeys.delete(rotated.id); +
                                                                              + +

                                                                              Creation uses the complete APIKeyCreate body: organization_id is required; project and +environment IDs, record scope, access level, owner type and name are optional. The SDK forwards +these values without replacing them from selected context. List accepts only objectType, +projId, page and perPage; its defaults are 1/100, while REST defaults are 1/30 with a +maximum page size of 100. It returns the complete PaginatedResultAPIKeyRead envelope, +including required total_count and optional nullable page_count, without automatic +pagination.

                                                                              +

                                                                              Record operations accept API-key IDs, not names or credential strings; rotation's published ID +is a UUID. APIKeyRead retains all received metadata and its optional nullable secret. +A successful response may omit the secret or return null; the SDK does not recover it from +earlier inputs or responses. +getScope() returns APIKeyScopeRead directly without initializing or changing selected API +context. Optional record scope, name, enum, timestamp and nested metadata fields also allow null. +The organization ID is required; project/environment IDs may be omitted or null. +Use a null-and-undefined guard before treating those optional IDs as strings.

                                                                              +

                                                                              Rotation sends a bodyless POST to /v2/api-key/{api_key_id}/rotate-secret. The SDK does not +retry create or rotation POSTs, or replace the client's configured credential. Preserve the +received result without assuming its ID stays unchanged. API failures always reject with +PermitApiError; the authorization-check fallback setting does not suppress management errors. +Existing permit.api.environments.getApiKey remains the separate environment-key helper.

                                                                              + +

                                                                              permit.api.userInvites manages API-key facts invites through create, list, get, +update, delete and approve. Calls use the selected environment on apiUrl, including +when proxyFactsViaPdp is enabled. These methods store and approve facts; they do not send +invitation mail and have no waitForSync() method or PDP synchronization guarantee.

                                                                              +
                                                                              const invite = await permit.api.userInvites.create({
                                                                              key: null,
                                                                              status: 'pending',
                                                                              email: 'invitee@example.com',
                                                                              first_name: null,
                                                                              last_name: null,
                                                                              role_id: role.id,
                                                                              tenant_id: tenant.id,
                                                                              resource_instance_id: null,
                                                                              });
                                                                              const page = await permit.api.userInvites.list({ tenant: tenant.key, page: 1, perPage: 20 });
                                                                              const user = await permit.api.userInvites.approve(invite.id, {
                                                                              email: invite.email,
                                                                              key: 'approved-user',
                                                                              attributes: null,
                                                                              });
                                                                              console.log(page.total_count, user.key); +
                                                                              + +

                                                                              Creation and update require every editable field, including the four nullable fields shown +above. update requires this full body despite using PATCH. Use internal UUIDs for role_id, +tenant_id and a non-null resource_instance_id; null selects a tenant role invite. Setting +status alone does not grant membership or roles. get, update, delete and approve use +the invite's internal ID, without user-key lookup.

                                                                              +

                                                                              list accepts role and tenant keys or IDs, text search, page and perPage. It returns the +complete PaginatedResultElementsUserInviteRead page, preserving nullable fields and counts. +page_count, when present, is the number of rows on the current page. The SDK's list defaults +are page 1 and perPage 100. UserInviteStatus exposes the pending and approved values.

                                                                              +

                                                                              Approval requires the matching email, final user key and nullable attributes. It creates or +reuses the user, adds tenant membership and grants the invite's role. It returns +UserInviteApprovalRead, whose optional names and attributes can be null. An optional attribute +type argument is a caller assertion of the response shape, without validation or write inference; +approval does not guarantee replacing an existing user's profile attributes. HTTP 400 approval +refusals retain safe status, transport code and route details with generic guidance; remote text +and response bodies are omitted because they can contain another invite's stored email. +Other failures use the existing API diagnostics. Deleting an invite resolves to undefined and +does not revoke membership or roles created by approval.

                                                                              + +

                                                                              permit.api.tenants.list() returns a tenant array. Pass includeTotalCount: true to keep the +complete API page, including data, total_count and optional page_count. False or omitted +flags preserve the array result. Search, page and perPage are forwarded without new defaults.

                                                                              +
                                                                              interface TenantAttributes {
                                                                              region: string;
                                                                              }

                                                                              const tenants = await permit.api.tenants.list<TenantAttributes>();
                                                                              const page = await permit.api.tenants.list<TenantAttributes>({
                                                                              includeTotalCount: true,
                                                                              search: 'east',
                                                                              page: 1,
                                                                              perPage: 20,
                                                                              });
                                                                              console.log(tenants[0]?.attributes?.region, page.total_count, page.data); +
                                                                              + +

                                                                              A dynamic or optional boolean flag produces a union of the array and page types; narrow with +Array.isArray(result) before reading page metadata. The attribute type is optional and remains +a caller assertion of server data. waitForSync() clones support the same flag and types.

                                                                              + +

                                                                              User, tenant and resource-instance reads accept an optional per-call attribute type. The default +is object, and attributes remains optional. This type describes the server data you expect; +it does not validate responses or infer attributes from write requests.

                                                                              +
                                                                              interface UserAttributes {
                                                                              department: string;
                                                                              note: string | null;
                                                                              }

                                                                              const user = await permit.api.users.get<UserAttributes>('alice');
                                                                              const users = await permit.api.users.list<UserAttributes>({ search: 'alice' });
                                                                              const synced = await permit.api.users.sync<UserAttributes>({ key: 'alice' });
                                                                              console.log(user.attributes?.department, users.data[0]?.attributes?.note, synced.created); +
                                                                              + +

                                                                              The type also flows through getByKey, getById, create, update and waitForSync() clones. +Tenant list/read/create/update methods select tenant attributes; addUser and listTenantUsers +select user attributes. Resource-instance list, listDetailed and read/create/update methods +select instance attributes. Lists keep their existing array or paginated envelope, and sync keeps +its { user, created } result. ResourceRead describes resource schema definitions and has no +attribute-data type parameter. Role assignment and other nested partial models are unchanged.

                                                                              + +

                                                                              permit.api.groups supports the eight GA core operations: create, delete, list, get, +assignUser, removeUser, assignRole, and removeRole. list and get use the direct Groups +endpoints. Pass a qualified resource:instance key (such as team:support) or an internal group +instance ID to identify a group.

                                                                              +

                                                                              Create and assignment calls return GroupRead, which contains the group and membership fields. +Direct reads return GroupReadSchema, which also contains id. list always returns the full +PaginatedResultGroupReadSchema envelope: data, total_count, and optional page_count. +It accepts tenant, resource, search, page, and perPage; pagination defaults to page 1 +with 100 rows per page.

                                                                              +
                                                                              // The group resource type, user, tenant, target resource instance, and role already exist.
                                                                              const groupKey = 'team:support';
                                                                              await permit.api.groups.create({
                                                                              group_resource_type_key: 'team',
                                                                              group_instance_key: 'support',
                                                                              group_tenant: 'east',
                                                                              });
                                                                              await permit.api.groups.assignUser(groupKey, 'alice', { tenant: 'east' });

                                                                              const grant = {
                                                                              role: 'reader',
                                                                              resource: 'document',
                                                                              resource_instance: 'quarterly-report',
                                                                              tenant: 'east',
                                                                              };
                                                                              await permit.api.groups.assignRole(groupKey, grant);
                                                                              const page = await permit.api.groups.list({ tenant: 'east', page: 1, perPage: 20 });
                                                                              console.log(page.data, page.total_count);

                                                                              await permit.api.groups.removeRole(groupKey, grant);
                                                                              await permit.api.groups.removeUser(groupKey, 'alice', { tenant: 'east' });
                                                                              await permit.api.groups.delete(groupKey); +
                                                                              + +

                                                                              Group role grants apply through ReBAC relationships and role derivation. Members inherit the +granted resource role; revoking the grant or removing membership removes that inheritance after +policy and facts synchronization. Both adding and removing a user require the tenant JSON body. +Role assignment and removal require role, resource, resource_instance, and tenant.

                                                                              + +

                                                                              permit.api.tenants.addUser(tenantKeyOrId, userData) creates a new user and associates it +with an existing tenant. Pass UserCreate data with a key; no role assignment is required. +The backend rejects an already-existing user. This method always uses the control-plane API, +even with proxyFactsViaPdp or waitForSync; its response does not guarantee PDP synchronization.

                                                                              +
                                                                              await permit.api.tenants.addUser('east', { key: 'new-user' });
                                                                              const tuples = await permit.api.relationshipTuples.listDetailed({ tenant: 'east' });
                                                                              const instances = await permit.api.resourceInstances.listDetailed({
                                                                              tenant: 'east',
                                                                              resource: 'document',
                                                                              search: ['report'],
                                                                              page: 1,
                                                                              perPage: 20,
                                                                              });
                                                                              const assignments = await permit.api.roleAssignments.listDetailed({ user: 'new-user' });
                                                                              console.log(tuples.data, instances.total_count, assignments.page_count);

                                                                              const refresh = await permit.api.pdps.refresh({ reason: 'Reload external data' });
                                                                              console.log(refresh.update_id, refresh.pdp_ids); +
                                                                              + +

                                                                              Each listDetailed uses the dedicated control-plane /detailed endpoint, even when facts +proxying or waitForSync is enabled, and returns its full paginated +envelope, including nested details, total_count, and optional page_count. Pagination defaults +to page 1 with 100 rows. Relationship filters accept tenant, subject, relation, object, +objectType, and subjectType. Instance filters accept tenant, resource, and search terms. +Assignment filters accept user, role, tenant, resource, and resourceInstance. +Dedicated detailed lists have no detailed or includeTotalCount switches. The existing +roleAssignments.list retains its query behavior; dynamic flags return the corresponding +array/envelope and base/detailed type unions.

                                                                              +

                                                                              permit.api.pdps.refresh requests a data refresh for all PDP configurations in the selected +environment through the control plane. It requires an API key with update access to those +configurations and accepts an optional reason. The returned update ID and PDP IDs acknowledge +the request; they do not signal completion. Environment refresh does not accept shard_id. +Individual-PDP refresh remains deferred. All five methods require a selected environment and +an environment-level API key or broader access.

                                                                              + +

                                                                              Read the documentation at Permit.io website

                                                                              + +

                                                                              The API reference is hosted on +GitHub Pages. For this unreleased candidate, run pnpm run docs and inspect the generated +docs/index.html; building the reference does not publish it.

                                                                              +

                                                                              Grouped interfaces and the named input/result/error contracts used by public methods are imported +from permitio. This includes IRelationshipTuplesApi, IResourceInstancesApi, +IResourceRelationsApi and IResourceRolesApi. The reference links these interfaces from +IPermitApi and its navigation. Generated-only internal files are not a supported deep-import API.

                                                                              + +

                                                                              permit.api.environments.copyAsync submits a copy in the same project and returns the complete +received task response. Pass the source project and source environment explicitly; target_env +selects the destination. The existing copy method retains its synchronous environment response.

                                                                              +
                                                                              const task = await permit.api.environments.copyAsync(
                                                                              'project',
                                                                              'source',
                                                                              {
                                                                              target_env: { new: { key: 'staging', name: 'Staging' } },
                                                                              conflict_strategy: 'fail',
                                                                              scope: { resources: { include: ['document'] } },
                                                                              },
                                                                              0,
                                                                              );

                                                                              const current = await permit.api.environments.getCopyResult('project', 'source', task.task_id, 0.5);
                                                                              if (current.status === 'success' && current.result) {
                                                                              console.log(current.result.id, current.result.key);
                                                                              } else if (current.status === 'failure' && current.error) {
                                                                              console.log(current.error.error_code);
                                                                              } +
                                                                              + +

                                                                              Both methods return once and preserve task_id, status, optional nullable result and error, +and any additional response fields. Status is processing, success, failure or cancelled; +a failure or cancelled task response is data, while HTTP and transport failures throw named SDK +errors. A fast task may already be complete in the submission response. The SDK does not poll, +replay submission or cancel the task. Keep the acknowledged task ID to request another result.

                                                                              +

                                                                              The optional wait is a finite server wait in seconds from 0 through 60, including fractions. +Omitting it omits the query parameter; explicit zero is forwarded. It is independent of the +caller's Axios REST timeout in milliseconds. Config.timeout configures PDP/OPA requests. +Expiration of a wait or caller transport timeout does not cancel an accepted background task. +Submission requires a project or organization API key in the SDK preflight. Result reads use the +existing environment-read preflight; the server still determines permission for either request.

                                                                              +

                                                                              The public background-task guide describes the +wait and task responses. The +copy guide describes destination, +conflict strategy and scope filters.

                                                                              +
                                                                              +

                                                                              On This Page

                                                                              +
                                                                              +
                                                                            • Customizing Retry Behavior
                                                                            • +
                                                                            • Logging and errors
                                                                            • +
                                                                            • PDP discovery and object filtering
                                                                            • +
                                                                            • Local role assignments
                                                                            • +
                                                                            • URL authorization
                                                                            • +
                                                                            • Proxy configurations
                                                                            • +
                                                                            • Authorization audit logs
                                                                            • +
                                                                            • User lists
                                                                            • +
                                                                            • Bulk roles
                                                                            • +
                                                                            • User attribute definitions
                                                                            • +
                                                                            • API keys
                                                                            • +
                                                                            • User invites
                                                                            • +
                                                                            • Tenant lists and totals
                                                                            • +
                                                                            • Attribute types
                                                                            • +
                                                                            • Groups
                                                                            • +
                                                                            • Tenant membership, detailed lists, and PDP refresh
                                                                            • +
                                                                            • Documentation
                                                                            • +
                                                                            • API Reference
                                                                            • +
                                                                            • Background environment copies
                                                                            • -
                                                                              -

                                                                              Generated using TypeDoc

                                                                              -
                                                                              \ No newline at end of file + +
                                                                              diff --git a/docs/interfaces/APIKeyCreate.html b/docs/interfaces/APIKeyCreate.html new file mode 100644 index 00000000..571e0117 --- /dev/null +++ b/docs/interfaces/APIKeyCreate.html @@ -0,0 +1,90 @@ +APIKeyCreate | permitio
                                                                              +
                                                                              permitio + +
                                                                                +
                                                                                +
                                                                                Preparing search index...
                                                                                +
                                                                                +
                                                                                +
                                                                                + +

                                                                                Interface APIKeyCreate

                                                                                +
                                                                                interface APIKeyCreate {
                                                                                    access_level?: MemberAccessLevel;
                                                                                    environment_id?: string;
                                                                                    name?: string;
                                                                                    object_type?: MemberAccessObj;
                                                                                    organization_id: string;
                                                                                    owner_type?: APIKeyOwnerType;
                                                                                    project_id?: string;
                                                                                }
                                                                                +
                                                                                +
                                                                                +
                                                                                +
                                                                                Index
                                                                                +
                                                                                +
                                                                                + +
                                                                                +
                                                                                + +
                                                                                access_level?: MemberAccessLevel
                                                                                +
                                                                                + +
                                                                                environment_id?: string
                                                                                +
                                                                                + +
                                                                                name?: string
                                                                                +
                                                                                + +
                                                                                object_type?: MemberAccessObj
                                                                                +
                                                                                + +
                                                                                organization_id: string
                                                                                +
                                                                                + +
                                                                                owner_type?: APIKeyOwnerType
                                                                                +
                                                                                + +
                                                                                project_id?: string
                                                                                +
                                                                                + +
                                                                                +
                                                                                diff --git a/docs/interfaces/APIKeyRead.html b/docs/interfaces/APIKeyRead.html index f92943c9..bc7e9f51 100644 --- a/docs/interfaces/APIKeyRead.html +++ b/docs/interfaces/APIKeyRead.html @@ -1,325 +1,132 @@ -APIKeyRead | permitio
                                                                                -
                                                                                - -
                                                                                +APIKeyRead | permitio
                                                                                +
                                                                                permitio + +
                                                                                  +
                                                                                  +
                                                                                  Preparing search index...
                                                                                  - +

                                                                                  Interface APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  -

                                                                                  Export

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  -

                                                                                  Hierarchy

                                                                                  -
                                                                                    -
                                                                                  • APIKeyRead
                                                                                  -
                                                                                  - +
                                                                                  +
                                                                                  Index
                                                                                  -
                                                                                  -

                                                                                  Properties

                                                                                  -
                                                                                  - -
                                                                                  access_level?: MemberAccessLevel
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  created_at: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  created_by_member?: OrgMemberRead
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - - -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  environment_id?: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  id: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  last_used_at?: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  name?: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  object_type?: MemberAccessObj
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  organization_id: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  owner_type: APIKeyOwnerType
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  project?: ProjectRead
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  project_id?: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  -
                                                                                  - -
                                                                                  secret?: string
                                                                                  -
                                                                                  -

                                                                                  Memberof

                                                                                  APIKeyRead

                                                                                  -
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + +
                                                                                  access_level?: MemberAccessLevel | null
                                                                                  +
                                                                                  + +
                                                                                  created_at: string
                                                                                  +
                                                                                  + +
                                                                                  created_by_member?: OrgMemberRead | null
                                                                                  +
                                                                                  + +
                                                                                  env?: EnvironmentRead | null
                                                                                  +
                                                                                  + +
                                                                                  environment_id?: string | null
                                                                                  +
                                                                                  + +
                                                                                  id: string
                                                                                  +
                                                                                  + +
                                                                                  last_used_at?: string | null
                                                                                  +
                                                                                  + +
                                                                                  name?: string | null
                                                                                  +
                                                                                  + +
                                                                                  object_type?: MemberAccessObj | null
                                                                                  +
                                                                                  + +
                                                                                  organization_id: string
                                                                                  +
                                                                                  + +
                                                                                  owner_type: APIKeyOwnerType
                                                                                  +
                                                                                  + +
                                                                                  project?: ProjectRead | null
                                                                                  +
                                                                                  + +
                                                                                  project_id?: string | null
                                                                                  +
                                                                                  + +
                                                                                  secret?: string | null
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  On This Page

                                                                                  +
                                                                                  Properties +
                                                                                  -
                                                                                  -

                                                                                  Generated using TypeDoc

                                                                                  -
                                                                                  \ No newline at end of file + +
                                                                                  diff --git a/docs/interfaces/APIKeyScopeRead.html b/docs/interfaces/APIKeyScopeRead.html new file mode 100644 index 00000000..79fa4b6a --- /dev/null +++ b/docs/interfaces/APIKeyScopeRead.html @@ -0,0 +1,80 @@ +APIKeyScopeRead | permitio
                                                                                  +
                                                                                  permitio + +
                                                                                    +
                                                                                    +
                                                                                    Preparing search index...
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + +

                                                                                    Interface APIKeyScopeRead

                                                                                    +
                                                                                    +

                                                                                    Permit.io API +Authorization as a service

                                                                                    +

                                                                                    The version of the OpenAPI document: 2.0.0

                                                                                    +

                                                                                    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                    +
                                                                                    +
                                                                                    interface APIKeyScopeRead {
                                                                                        environment_id?: string | null;
                                                                                        organization_id: string;
                                                                                        project_id?: string | null;
                                                                                    }
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    Index
                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    environment_id?: string | null
                                                                                    +

                                                                                    Unique id of the environment that the api_key belongs to.

                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    organization_id: string
                                                                                    +

                                                                                    Unique id of the organization that the api_key belongs to.

                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    project_id?: string | null
                                                                                    +

                                                                                    Unique id of the project that the api_key belongs to.

                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    diff --git a/docs/interfaces/AVPEngineDecisionLog.html b/docs/interfaces/AVPEngineDecisionLog.html new file mode 100644 index 00000000..91f77ae9 --- /dev/null +++ b/docs/interfaces/AVPEngineDecisionLog.html @@ -0,0 +1,92 @@ +AVPEngineDecisionLog | permitio
                                                                                    +
                                                                                    permitio + +
                                                                                      +
                                                                                      +
                                                                                      Preparing search index...
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      + +

                                                                                      Interface AVPEngineDecisionLog

                                                                                      +
                                                                                      +

                                                                                      Permit.io API +Authorization as a service

                                                                                      +

                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                      +

                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                      +
                                                                                      +
                                                                                      interface AVPEngineDecisionLog {
                                                                                          engine?: "AVP" | null;
                                                                                          input: object;
                                                                                          process_time_ms?: number | null;
                                                                                          result: object;
                                                                                          tenant: string;
                                                                                          timestamp: string;
                                                                                      }
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      Index
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      engine?: "AVP" | null
                                                                                      +
                                                                                      + +
                                                                                      input: object
                                                                                      +
                                                                                      + +
                                                                                      process_time_ms?: number | null
                                                                                      +
                                                                                      + +
                                                                                      result: object
                                                                                      +
                                                                                      + +
                                                                                      tenant: string
                                                                                      +
                                                                                      + +
                                                                                      timestamp: string
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      diff --git a/docs/interfaces/ActionBlockEditable.html b/docs/interfaces/ActionBlockEditable.html index 7fa33b59..53ea0735 100644 --- a/docs/interfaces/ActionBlockEditable.html +++ b/docs/interfaces/ActionBlockEditable.html @@ -1,219 +1,90 @@ -ActionBlockEditable | permitio
                                                                                      -
                                                                                      - -
                                                                                      +ActionBlockEditable | permitio
                                                                                      +
                                                                                      permitio + +
                                                                                        +
                                                                                        +
                                                                                        Preparing search index...
                                                                                        - +

                                                                                        Interface ActionBlockEditable

                                                                                        -
                                                                                        -

                                                                                        Export

                                                                                        ActionBlockEditable

                                                                                        +

                                                                                        Permit.io API +Authorization as a service

                                                                                        +

                                                                                        The version of the OpenAPI document: 2.0.0

                                                                                        +

                                                                                        NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                        -
                                                                                        -

                                                                                        Hierarchy

                                                                                        -
                                                                                          -
                                                                                        • ActionBlockEditable
                                                                                        -
                                                                                        - +
                                                                                        +
                                                                                        Index
                                                                                        -
                                                                                        -

                                                                                        Properties

                                                                                        -
                                                                                        - -
                                                                                        attributes?: object
                                                                                        -
                                                                                        -

                                                                                        Memberof

                                                                                        ActionBlockEditable

                                                                                        -
                                                                                        +
                                                                                        +
                                                                                        description?: string

                                                                                        optional description string explaining what this action represents in your system

                                                                                        -
                                                                                        -
                                                                                        -

                                                                                        Memberof

                                                                                        ActionBlockEditable

                                                                                        -
                                                                                        - +
                                                                                      • Defined in src/openapi/types/action-block-editable.ts:21
                                                                                      • +
                                                                                        +
                                                                                        name?: string

                                                                                        a more descriptive name for the action

                                                                                        -
                                                                                        -
                                                                                        -

                                                                                        Memberof

                                                                                        ActionBlockEditable

                                                                                        +
                                                                                      • Defined in src/openapi/types/action-block-editable.ts:17
                                                                                      • +
                                                                                        + +
                                                                                        v1compat_name?: string
                                                                                        +
                                                                                        + +
                                                                                        v1compat_path?: string
                                                                                        +
                                                                                        +
                                                                                        +

                                                                                        On This Page

                                                                                        +
                                                                                        Properties +
                                                                                        -
                                                                                        -

                                                                                        Generated using TypeDoc

                                                                                        -
                                                                                        \ No newline at end of file + +
                                                                                        diff --git a/docs/interfaces/ActionBlockRead.html b/docs/interfaces/ActionBlockRead.html index e6abd2c1..ebc3bd0f 100644 --- a/docs/interfaces/ActionBlockRead.html +++ b/docs/interfaces/ActionBlockRead.html @@ -1,243 +1,106 @@ -ActionBlockRead | permitio
                                                                                        -
                                                                                        - -
                                                                                        +ActionBlockRead | permitio
                                                                                        +
                                                                                        permitio + +
                                                                                          +
                                                                                          +
                                                                                          Preparing search index...
                                                                                          - +

                                                                                          Interface ActionBlockRead

                                                                                          -
                                                                                          -

                                                                                          Export

                                                                                          ActionBlockRead

                                                                                          +

                                                                                          Permit.io API +Authorization as a service

                                                                                          +

                                                                                          The version of the OpenAPI document: 2.0.0

                                                                                          +

                                                                                          NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                          -
                                                                                          -

                                                                                          Hierarchy

                                                                                          -
                                                                                            -
                                                                                          • ActionBlockRead
                                                                                          -
                                                                                          - +
                                                                                          +
                                                                                          Index
                                                                                          -
                                                                                          -

                                                                                          Properties

                                                                                          -
                                                                                          - -
                                                                                          attributes?: object
                                                                                          -
                                                                                          -

                                                                                          Memberof

                                                                                          ActionBlockRead

                                                                                          -
                                                                                          +
                                                                                          +
                                                                                          description?: string

                                                                                          optional description string explaining what this action represents in your system

                                                                                          -
                                                                                          -
                                                                                          -

                                                                                          Memberof

                                                                                          ActionBlockRead

                                                                                          -
                                                                                          - +
                                                                                        • Defined in src/openapi/types/action-block-read.ts:21
                                                                                        • +
                                                                                          +
                                                                                          id: string

                                                                                          Unique id of the action

                                                                                          -
                                                                                          -
                                                                                          -

                                                                                          Memberof

                                                                                          ActionBlockRead

                                                                                          -
                                                                                          - +
                                                                                        • Defined in src/openapi/types/action-block-read.ts:28
                                                                                        • +
                                                                                          +
                                                                                          key?: string

                                                                                          action key

                                                                                          -
                                                                                          -
                                                                                          -

                                                                                          Memberof

                                                                                          ActionBlockRead

                                                                                          -
                                                                                          - +
                                                                                        • Defined in src/openapi/types/action-block-read.ts:32
                                                                                        • +
                                                                                          +
                                                                                          name?: string

                                                                                          a more descriptive name for the action

                                                                                          -
                                                                                          -
                                                                                          -

                                                                                          Memberof

                                                                                          ActionBlockRead

                                                                                          +
                                                                                        • Defined in src/openapi/types/action-block-read.ts:17
                                                                                        • +
                                                                                          + +
                                                                                          v1compat_name?: string
                                                                                          +
                                                                                          + +
                                                                                          v1compat_path?: string
                                                                                          +
                                                                                          +
                                                                                          +

                                                                                          On This Page

                                                                                          +
                                                                                          Properties +
                                                                                          -
                                                                                          -

                                                                                          Generated using TypeDoc

                                                                                          -
                                                                                          \ No newline at end of file + +
                                                                                          diff --git a/docs/interfaces/AttributeBlockEditable.html b/docs/interfaces/AttributeBlockEditable.html index 434b796d..3a0648c2 100644 --- a/docs/interfaces/AttributeBlockEditable.html +++ b/docs/interfaces/AttributeBlockEditable.html @@ -1,209 +1,64 @@ -AttributeBlockEditable | permitio
                                                                                          -
                                                                                          - -
                                                                                          +AttributeBlockEditable | permitio
                                                                                          +
                                                                                          permitio + +
                                                                                            +
                                                                                            +
                                                                                            Preparing search index...
                                                                                            - +

                                                                                            Interface AttributeBlockEditable

                                                                                            -
                                                                                            -
                                                                                            -

                                                                                            Export

                                                                                            AttributeBlockEditable

                                                                                            -
                                                                                            -
                                                                                            -

                                                                                            Hierarchy

                                                                                            -
                                                                                              -
                                                                                            • AttributeBlockEditable
                                                                                            -
                                                                                            - +
                                                                                            +
                                                                                            Index
                                                                                            -

                                                                                            Properties

                                                                                            -
                                                                                            -
                                                                                            -

                                                                                            Properties

                                                                                            -
                                                                                            - +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            description?: string

                                                                                            optional description string explaining what data this attribute will store

                                                                                            -
                                                                                            -
                                                                                            -

                                                                                            Memberof

                                                                                            AttributeBlockEditable

                                                                                            -
                                                                                            - - +
                                                                                          • Defined in src/openapi/types/attribute-block-editable.ts:24
                                                                                          • +
                                                                                            + +

                                                                                            The type of the attribute, we currently support: bool, number (ints, floats), time (a timestamp), string, and json.

                                                                                            -
                                                                                            -
                                                                                            -

                                                                                            Memberof

                                                                                            AttributeBlockEditable

                                                                                            +
                                                                                          • Defined in src/openapi/types/attribute-block-editable.ts:20
                                                                                          • +
                                                                                            +
                                                                                            +

                                                                                            On This Page

                                                                                            +
                                                                                            Properties +
                                                                                            -
                                                                                            -

                                                                                            Generated using TypeDoc

                                                                                            -
                                                                                            \ No newline at end of file + +
                                                                                            diff --git a/docs/interfaces/AttributeBlockRead.html b/docs/interfaces/AttributeBlockRead.html index f5b527f3..c6eed196 100644 --- a/docs/interfaces/AttributeBlockRead.html +++ b/docs/interfaces/AttributeBlockRead.html @@ -1,233 +1,80 @@ -AttributeBlockRead | permitio
                                                                                            -
                                                                                            - -
                                                                                            +AttributeBlockRead | permitio
                                                                                            +
                                                                                            permitio + +
                                                                                              +
                                                                                              +
                                                                                              Preparing search index...
                                                                                              - +

                                                                                              Interface AttributeBlockRead

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Export

                                                                                              AttributeBlockRead

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Hierarchy

                                                                                              -
                                                                                                -
                                                                                              • AttributeBlockRead
                                                                                              -
                                                                                              - +
                                                                                              +
                                                                                              Index
                                                                                              -

                                                                                              Properties

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Properties

                                                                                              -
                                                                                              - +
                                                                                              + +
                                                                                              +
                                                                                              +
                                                                                              description?: string

                                                                                              optional description string explaining what data this attribute will store

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Memberof

                                                                                              AttributeBlockRead

                                                                                              -
                                                                                              - +
                                                                                            • Defined in src/openapi/types/attribute-block-read.ts:24
                                                                                            • +
                                                                                              +
                                                                                              id: string

                                                                                              Unique id of the attribute

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Memberof

                                                                                              AttributeBlockRead

                                                                                              -
                                                                                              - +
                                                                                            • Defined in src/openapi/types/attribute-block-read.ts:28
                                                                                            • +
                                                                                              +
                                                                                              key?: string

                                                                                              action key

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Memberof

                                                                                              AttributeBlockRead

                                                                                              -
                                                                                              - - +
                                                                                            • Defined in src/openapi/types/attribute-block-read.ts:32
                                                                                            • +
                                                                                              + +

                                                                                              The type of the attribute, we currently support: bool, number (ints, floats), time (a timestamp), string, and json.

                                                                                              -
                                                                                              -
                                                                                              -

                                                                                              Memberof

                                                                                              AttributeBlockRead

                                                                                              +
                                                                                            • Defined in src/openapi/types/attribute-block-read.ts:20
                                                                                            • +
                                                                                              +
                                                                                              +

                                                                                              On This Page

                                                                                              +
                                                                                              Properties +
                                                                                              -
                                                                                              -

                                                                                              Generated using TypeDoc

                                                                                              -
                                                                                              \ No newline at end of file + +
                                                                                              diff --git a/docs/interfaces/AuditLogModel.html b/docs/interfaces/AuditLogModel.html new file mode 100644 index 00000000..49e01c25 --- /dev/null +++ b/docs/interfaces/AuditLogModel.html @@ -0,0 +1,168 @@ +AuditLogModel | permitio
                                                                                              +
                                                                                              permitio + +
                                                                                                +
                                                                                                +
                                                                                                Preparing search index...
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + +

                                                                                                Interface AuditLogModel

                                                                                                +
                                                                                                interface AuditLogModel {
                                                                                                    action?: string | null;
                                                                                                    context?: any;
                                                                                                    created_at?: string | null;
                                                                                                    decision?: boolean | null;
                                                                                                    env_id: string;
                                                                                                    id: string;
                                                                                                    input?: any;
                                                                                                    org_id: string;
                                                                                                    pdp_config_id?: string | null;
                                                                                                    project_id: string;
                                                                                                    query?: string | null;
                                                                                                    raw_data?: RawData | null;
                                                                                                    reason?: string | null;
                                                                                                    resource_type?: string | null;
                                                                                                    result?: any;
                                                                                                    tenant?: string | null;
                                                                                                    timestamp: string;
                                                                                                    user_email?: string | null;
                                                                                                    user_key?: string | null;
                                                                                                    user_name?: string | null;
                                                                                                }
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                Index
                                                                                                +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                action?: string | null
                                                                                                +
                                                                                                + +
                                                                                                context?: any
                                                                                                +
                                                                                                + +
                                                                                                created_at?: string | null
                                                                                                +
                                                                                                + +
                                                                                                decision?: boolean | null
                                                                                                +
                                                                                                + +
                                                                                                env_id: string
                                                                                                +
                                                                                                + +
                                                                                                id: string
                                                                                                +
                                                                                                + +
                                                                                                input?: any
                                                                                                +
                                                                                                + +
                                                                                                org_id: string
                                                                                                +
                                                                                                + +
                                                                                                pdp_config_id?: string | null
                                                                                                +
                                                                                                + +
                                                                                                project_id: string
                                                                                                +
                                                                                                + +
                                                                                                query?: string | null
                                                                                                +
                                                                                                + +
                                                                                                raw_data?: RawData | null
                                                                                                +
                                                                                                + +
                                                                                                reason?: string | null
                                                                                                +
                                                                                                + +
                                                                                                resource_type?: string | null
                                                                                                +
                                                                                                + +
                                                                                                result?: any
                                                                                                +
                                                                                                + +
                                                                                                tenant?: string | null
                                                                                                +
                                                                                                + +
                                                                                                timestamp: string
                                                                                                +
                                                                                                + +
                                                                                                user_email?: string | null
                                                                                                +
                                                                                                + +
                                                                                                user_key?: string | null
                                                                                                +
                                                                                                + +
                                                                                                user_name?: string | null
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                diff --git a/docs/interfaces/AuditLogObjectsModel.html b/docs/interfaces/AuditLogObjectsModel.html new file mode 100644 index 00000000..6b966cf5 --- /dev/null +++ b/docs/interfaces/AuditLogObjectsModel.html @@ -0,0 +1,108 @@ +AuditLogObjectsModel | permitio
                                                                                                +
                                                                                                permitio + +
                                                                                                  +
                                                                                                  +
                                                                                                  Preparing search index...
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + +

                                                                                                  Interface AuditLogObjectsModel

                                                                                                  +
                                                                                                  interface AuditLogObjectsModel {
                                                                                                      action_object?: ActionObj | null;
                                                                                                      created_at?: string | null;
                                                                                                      environment_object?: EnvironmentObject | null;
                                                                                                      id?: string | null;
                                                                                                      organization_object?: OrganizationObject | null;
                                                                                                      pdp_config_object?: PdpConfigObject | null;
                                                                                                      project_object?: ProjectObject | null;
                                                                                                      resource_type_object?: ResourceTypeObj | null;
                                                                                                      tenant_object?: TenantObj | null;
                                                                                                      user_object?: UserObj | null;
                                                                                                  }
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  Index
                                                                                                  +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  action_object?: ActionObj | null
                                                                                                  +
                                                                                                  + +
                                                                                                  created_at?: string | null
                                                                                                  +
                                                                                                  + +
                                                                                                  environment_object?: EnvironmentObject | null
                                                                                                  +
                                                                                                  + +
                                                                                                  id?: string | null
                                                                                                  +
                                                                                                  + +
                                                                                                  organization_object?: OrganizationObject | null
                                                                                                  +
                                                                                                  + +
                                                                                                  pdp_config_object?: PdpConfigObject | null
                                                                                                  +
                                                                                                  + +
                                                                                                  project_object?: ProjectObject | null
                                                                                                  +
                                                                                                  + +
                                                                                                  resource_type_object?: ResourceTypeObj | null
                                                                                                  +
                                                                                                  + +
                                                                                                  tenant_object?: TenantObj | null
                                                                                                  +
                                                                                                  + +
                                                                                                  user_object?: UserObj | null
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  diff --git a/docs/interfaces/BulkRoleAssignmentReport.html b/docs/interfaces/BulkRoleAssignmentReport.html index e323665b..9562b8a6 100644 --- a/docs/interfaces/BulkRoleAssignmentReport.html +++ b/docs/interfaces/BulkRoleAssignmentReport.html @@ -1,195 +1,62 @@ -BulkRoleAssignmentReport | permitio
                                                                                                  -
                                                                                                  - -
                                                                                                  +BulkRoleAssignmentReport | permitio
                                                                                                  +
                                                                                                  permitio + +
                                                                                                    +
                                                                                                    +
                                                                                                    Preparing search index...
                                                                                                    - +

                                                                                                    Interface BulkRoleAssignmentReport

                                                                                                    -
                                                                                                    -

                                                                                                    Export

                                                                                                    BulkRoleAssignmentReport

                                                                                                    +

                                                                                                    Permit.io API +Authorization as a service

                                                                                                    +

                                                                                                    The version of the OpenAPI document: 2.0.0

                                                                                                    +

                                                                                                    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                    -
                                                                                                    -

                                                                                                    Hierarchy

                                                                                                    -
                                                                                                      -
                                                                                                    • BulkRoleAssignmentReport
                                                                                                    -
                                                                                                    - +
                                                                                                    +
                                                                                                    Index
                                                                                                    -

                                                                                                    Properties

                                                                                                    -
                                                                                                    -
                                                                                                    -

                                                                                                    Properties

                                                                                                    -
                                                                                                    - -
                                                                                                    assignments_created?: number
                                                                                                    -
                                                                                                    -

                                                                                                    Memberof

                                                                                                    BulkRoleAssignmentReport

                                                                                                    -
                                                                                                    +
                                                                                                  • Defined in src/openapi/types/bulk-role-assignment-report.ts:14
                                                                                                  • +
                                                                                                    +
                                                                                                    +

                                                                                                    On This Page

                                                                                                    +
                                                                                                    Properties +
                                                                                                    -
                                                                                                    -

                                                                                                    Generated using TypeDoc

                                                                                                    -
                                                                                                    \ No newline at end of file + +
                                                                                                    diff --git a/docs/interfaces/BulkRoleUnAssignmentReport.html b/docs/interfaces/BulkRoleUnAssignmentReport.html index 907f641a..5bbd1617 100644 --- a/docs/interfaces/BulkRoleUnAssignmentReport.html +++ b/docs/interfaces/BulkRoleUnAssignmentReport.html @@ -1,195 +1,62 @@ -BulkRoleUnAssignmentReport | permitio
                                                                                                    -
                                                                                                    - -
                                                                                                    +BulkRoleUnAssignmentReport | permitio
                                                                                                    +
                                                                                                    permitio + +
                                                                                                      +
                                                                                                      +
                                                                                                      Preparing search index...
                                                                                                      - +

                                                                                                      Interface BulkRoleUnAssignmentReport

                                                                                                      -
                                                                                                      -

                                                                                                      Export

                                                                                                      BulkRoleUnAssignmentReport

                                                                                                      +

                                                                                                      Permit.io API +Authorization as a service

                                                                                                      +

                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                      +

                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                      -
                                                                                                      -

                                                                                                      Hierarchy

                                                                                                      -
                                                                                                        -
                                                                                                      • BulkRoleUnAssignmentReport
                                                                                                      -
                                                                                                      - +
                                                                                                      +
                                                                                                      Index
                                                                                                      -

                                                                                                      Properties

                                                                                                      -
                                                                                                      -
                                                                                                      -

                                                                                                      Properties

                                                                                                      -
                                                                                                      - -
                                                                                                      assignments_removed?: number
                                                                                                      -
                                                                                                      -

                                                                                                      Memberof

                                                                                                      BulkRoleUnAssignmentReport

                                                                                                      -
                                                                                                      +
                                                                                                    • Defined in src/openapi/types/bulk-role-un-assignment-report.ts:14
                                                                                                    • +
                                                                                                      +
                                                                                                      +

                                                                                                      On This Page

                                                                                                      +
                                                                                                      Properties +
                                                                                                      -
                                                                                                      -

                                                                                                      Generated using TypeDoc

                                                                                                      -
                                                                                                      \ No newline at end of file + +
                                                                                                      diff --git a/docs/interfaces/CheckConfig.html b/docs/interfaces/CheckConfig.html new file mode 100644 index 00000000..dac817bf --- /dev/null +++ b/docs/interfaces/CheckConfig.html @@ -0,0 +1,78 @@ +CheckConfig | permitio
                                                                                                      +
                                                                                                      permitio + +
                                                                                                        +
                                                                                                        +
                                                                                                        Preparing search index...
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +

                                                                                                        Interface CheckConfig

                                                                                                        +
                                                                                                        interface CheckConfig {
                                                                                                            throwOnError?: boolean;
                                                                                                            timeout?: number;
                                                                                                            useOpa?: boolean;
                                                                                                        }
                                                                                                        +
                                                                                                        +

                                                                                                        Hierarchy (View Summary)

                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        Index
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        throwOnError?: boolean
                                                                                                        +
                                                                                                        + +
                                                                                                        timeout?: number
                                                                                                        +

                                                                                                        Request timeout in milliseconds; zero disables the timeout for this call.

                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        useOpa?: boolean
                                                                                                        +

                                                                                                        Use OPA for check(); discovery/filtering/URL checks reject true regardless of error policy. +Existing bulk/permission queries retain their configured throw/deny policy.

                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        diff --git a/docs/interfaces/CheckUrlConfig.html b/docs/interfaces/CheckUrlConfig.html new file mode 100644 index 00000000..8724ffd1 --- /dev/null +++ b/docs/interfaces/CheckUrlConfig.html @@ -0,0 +1,99 @@ +CheckUrlConfig | permitio
                                                                                                        +
                                                                                                        permitio + +
                                                                                                          +
                                                                                                          +
                                                                                                          Preparing search index...
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + +

                                                                                                          Interface CheckUrlConfig

                                                                                                          +
                                                                                                          +

                                                                                                          Per-call URL authorization options for a compatible container PDP.

                                                                                                          +
                                                                                                          +
                                                                                                          interface CheckUrlConfig {
                                                                                                              context?: Context;
                                                                                                              tenant?: string;
                                                                                                              throwOnError?: boolean;
                                                                                                              timeout?: number;
                                                                                                              useOpa?: boolean;
                                                                                                          }
                                                                                                          +
                                                                                                          +

                                                                                                          Hierarchy (View Summary)

                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          Index
                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          context?: Context
                                                                                                          +

                                                                                                          Request context overriding the existing global context.

                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          tenant?: string
                                                                                                          +

                                                                                                          Tenant key; omitted or empty uses the configured default when default tenancy is enabled.

                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          throwOnError?: boolean
                                                                                                          +
                                                                                                          + +
                                                                                                          timeout?: number
                                                                                                          +

                                                                                                          Request timeout in milliseconds; zero disables the timeout for this call.

                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          useOpa?: boolean
                                                                                                          +

                                                                                                          Use OPA for check(); discovery/filtering/URL checks reject true regardless of error policy. +Existing bulk/permission queries retain their configured throw/deny policy.

                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          diff --git a/docs/interfaces/ConditionSetCreate.html b/docs/interfaces/ConditionSetCreate.html index 370e3246..4ba6252f 100644 --- a/docs/interfaces/ConditionSetCreate.html +++ b/docs/interfaces/ConditionSetCreate.html @@ -1,277 +1,108 @@ -ConditionSetCreate | permitio
                                                                                                          -
                                                                                                          - -
                                                                                                          +ConditionSetCreate | permitio
                                                                                                          +
                                                                                                          permitio + +
                                                                                                            +
                                                                                                            +
                                                                                                            Preparing search index...
                                                                                                            - +

                                                                                                            Interface ConditionSetCreate

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Export

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Hierarchy

                                                                                                            -
                                                                                                              -
                                                                                                            • ConditionSetCreate
                                                                                                            -
                                                                                                            - +
                                                                                                            +
                                                                                                            Index
                                                                                                            -
                                                                                                            -

                                                                                                            Properties

                                                                                                            -
                                                                                                            - +
                                                                                                            + +
                                                                                                            +
                                                                                                            +
                                                                                                            autogenerated?: boolean

                                                                                                            whether the set was autogenerated by the system.

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            - +
                                                                                                          • Defined in src/openapi/types/condition-set-create.ts:32
                                                                                                          • +
                                                                                                            +
                                                                                                            conditions?: object

                                                                                                            a boolean expression that consists of multiple conditions, with and/or logic.

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            - +
                                                                                                          • Defined in src/openapi/types/condition-set-create.ts:45
                                                                                                          • +
                                                                                                            +
                                                                                                            description?: string

                                                                                                            an optional longer description of the set

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            - +
                                                                                                          • Defined in src/openapi/types/condition-set-create.ts:41
                                                                                                          • +
                                                                                                            +
                                                                                                            key: string

                                                                                                            A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name.

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            - +
                                                                                                          • Defined in src/openapi/types/condition-set-create.ts:24
                                                                                                          • +
                                                                                                            +
                                                                                                            name: string
                                                                                                            -

                                                                                                            A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            +

                                                                                                            A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'

                                                                                                            -
                                                                                                            - -
                                                                                                            parent_id?: ParentId
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            +
                                                                                                            + +
                                                                                                            parent_id?: string
                                                                                                            -
                                                                                                            - -
                                                                                                            resource_id?: ResourceId
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            -
                                                                                                            +
                                                                                                            + +
                                                                                                            resource_id?: string
                                                                                                            -
                                                                                                            - - +
                                                                                                          • Defined in src/openapi/types/condition-set-create.ts:33
                                                                                                          • +
                                                                                                            + +

                                                                                                            the type of the set: UserSet or ResourceSet

                                                                                                            -
                                                                                                            -
                                                                                                            -

                                                                                                            Memberof

                                                                                                            ConditionSetCreate

                                                                                                            +
                                                                                                          • Defined in src/openapi/types/condition-set-create.ts:28
                                                                                                          • +
                                                                                                            +
                                                                                                            +

                                                                                                            On This Page

                                                                                                            +
                                                                                                            Properties +
                                                                                                            -
                                                                                                            -

                                                                                                            Generated using TypeDoc

                                                                                                            -
                                                                                                            \ No newline at end of file + +
                                                                                                            diff --git a/docs/interfaces/ConditionSetRead.html b/docs/interfaces/ConditionSetRead.html index 5003f847..385a8004 100644 --- a/docs/interfaces/ConditionSetRead.html +++ b/docs/interfaces/ConditionSetRead.html @@ -1,359 +1,162 @@ -ConditionSetRead | permitio
                                                                                                            -
                                                                                                            - -
                                                                                                            +ConditionSetRead | permitio
                                                                                                            +
                                                                                                            permitio + +
                                                                                                              +
                                                                                                              +
                                                                                                              Preparing search index...
                                                                                                              - +

                                                                                                              Interface ConditionSetRead

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Export

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Hierarchy

                                                                                                              -
                                                                                                                -
                                                                                                              • ConditionSetRead
                                                                                                              -
                                                                                                              - +
                                                                                                              +
                                                                                                              Index
                                                                                                              -
                                                                                                              -

                                                                                                              Properties

                                                                                                              -
                                                                                                              - +
                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                              autogenerated?: boolean

                                                                                                              whether the set was autogenerated by the system.

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:34
                                                                                                            • +
                                                                                                              +
                                                                                                              conditions?: object

                                                                                                              a boolean expression that consists of multiple conditions, with and/or logic.

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - -
                                                                                                              created_at: string
                                                                                                              +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:72
                                                                                                            • +
                                                                                                              + +
                                                                                                              created_at: string

                                                                                                              Date and time when the condition set was created (ISO_8601 format).

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:55
                                                                                                            • +
                                                                                                              +
                                                                                                              description?: string

                                                                                                              an optional longer description of the set

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - -
                                                                                                              environment_id: string
                                                                                                              +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:68
                                                                                                            • +
                                                                                                              + +
                                                                                                              environment_id: string

                                                                                                              Unique id of the environment that the condition set belongs to.

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:51
                                                                                                            • +
                                                                                                              +
                                                                                                              id: string

                                                                                                              Unique id of the condition set

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:39
                                                                                                            • +
                                                                                                              +
                                                                                                              key: string

                                                                                                              A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name.

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:26
                                                                                                            • +
                                                                                                              +
                                                                                                              name: string
                                                                                                              -

                                                                                                              A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              +

                                                                                                              A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'

                                                                                                              -
                                                                                                              - -
                                                                                                              organization_id: string
                                                                                                              +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:64
                                                                                                            • +
                                                                                                              + +
                                                                                                              organization_id: string

                                                                                                              Unique id of the organization that the condition set belongs to.

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - -
                                                                                                              parent_id?: ParentId
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              +
                                                                                                              + +
                                                                                                              parent_id?: string
                                                                                                              -
                                                                                                              - -
                                                                                                              project_id: string
                                                                                                              +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:73
                                                                                                            • +
                                                                                                              + +
                                                                                                              project_id: string

                                                                                                              Unique id of the project that the condition set belongs to.

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - -
                                                                                                              resource?: ResourceRead
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              +
                                                                                                              + +
                                                                                                              resource?: ResourceRead
                                                                                                              -
                                                                                                              - -
                                                                                                              resource_id?: ResourceId
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              +
                                                                                                              + +
                                                                                                              resource_id?: string
                                                                                                              -
                                                                                                              - - +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:35
                                                                                                            • +
                                                                                                              + +

                                                                                                              the type of the set: UserSet or ResourceSet

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              -
                                                                                                              - -
                                                                                                              updated_at: string
                                                                                                              +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:30
                                                                                                            • +
                                                                                                              + +
                                                                                                              updated_at: string

                                                                                                              Date and time when the condition set was last updated/modified (ISO_8601 format).

                                                                                                              -
                                                                                                              -
                                                                                                              -

                                                                                                              Memberof

                                                                                                              ConditionSetRead

                                                                                                              +
                                                                                                            • Defined in src/openapi/types/condition-set-read.ts:59
                                                                                                            • +
                                                                                                              +
                                                                                                              +

                                                                                                              On This Page

                                                                                                              +
                                                                                                              Properties +
                                                                                                              -
                                                                                                              -

                                                                                                              Generated using TypeDoc

                                                                                                              -
                                                                                                              \ No newline at end of file + +
                                                                                                              diff --git a/docs/interfaces/ConditionSetRuleCreate.html b/docs/interfaces/ConditionSetRuleCreate.html index 09d1d9f3..c87cf50b 100644 --- a/docs/interfaces/ConditionSetRuleCreate.html +++ b/docs/interfaces/ConditionSetRuleCreate.html @@ -1,245 +1,96 @@ -ConditionSetRuleCreate | permitio
                                                                                                              -
                                                                                                              - -
                                                                                                              +ConditionSetRuleCreate | permitio
                                                                                                              +
                                                                                                              permitio + +
                                                                                                                +
                                                                                                                +
                                                                                                                Preparing search index...
                                                                                                                - +

                                                                                                                Interface ConditionSetRuleCreate

                                                                                                                -
                                                                                                                -

                                                                                                                Export

                                                                                                                ConditionSetRuleCreate

                                                                                                                +

                                                                                                                Permit.io API +Authorization as a service

                                                                                                                +

                                                                                                                The version of the OpenAPI document: 2.0.0

                                                                                                                +

                                                                                                                NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                -
                                                                                                                -

                                                                                                                Hierarchy

                                                                                                                -
                                                                                                                  -
                                                                                                                • ConditionSetRuleCreate
                                                                                                                -
                                                                                                                - +
                                                                                                                +
                                                                                                                Index
                                                                                                                -
                                                                                                                -

                                                                                                                Properties

                                                                                                                -
                                                                                                                - -
                                                                                                                is_resource?: boolean
                                                                                                                -

                                                                                                                if True, will set the condition set rule to the resource's autogen resource-set.

                                                                                                                -
                                                                                                                -
                                                                                                                -

                                                                                                                Memberof

                                                                                                                ConditionSetRuleCreate

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                is_resource?: boolean
                                                                                                                +

                                                                                                                if True, will set the condition set rule to the resource's autogen resource-set.

                                                                                                                -
                                                                                                                - -
                                                                                                                is_role?: boolean
                                                                                                                -

                                                                                                                if True, will set the condition set rule to the role's autogen user-set.

                                                                                                                -
                                                                                                                -
                                                                                                                -

                                                                                                                Memberof

                                                                                                                ConditionSetRuleCreate

                                                                                                                +
                                                                                                              • Defined in src/openapi/types/condition-set-rule-create.ts:33
                                                                                                              • +
                                                                                                                + +
                                                                                                                is_role?: boolean
                                                                                                                +

                                                                                                                if True, will set the condition set rule to the role's autogen user-set.

                                                                                                                -
                                                                                                                - +
                                                                                                              • Defined in src/openapi/types/condition-set-rule-create.ts:29
                                                                                                              • +
                                                                                                                +
                                                                                                                permission: string

                                                                                                                The permission that will be granted to the userset on the resourceset. The permission can be either a resource action id, or {resource_key}:{action_key}, i.e: the "permission name".

                                                                                                                -
                                                                                                                -
                                                                                                                -

                                                                                                                Memberof

                                                                                                                ConditionSetRuleCreate

                                                                                                                -
                                                                                                                - -
                                                                                                                resource_set: string
                                                                                                                +
                                                                                                              • Defined in src/openapi/types/condition-set-rule-create.ts:21
                                                                                                              • +
                                                                                                                + +
                                                                                                                resource_set: string

                                                                                                                The resourceset that represents the resources that are granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted permission

                                                                                                                -
                                                                                                                -
                                                                                                                -

                                                                                                                Memberof

                                                                                                                ConditionSetRuleCreate

                                                                                                                -
                                                                                                                - -
                                                                                                                user_set: string
                                                                                                                +
                                                                                                              • Defined in src/openapi/types/condition-set-rule-create.ts:25
                                                                                                              • +
                                                                                                                + +
                                                                                                                user_set: string

                                                                                                                The userset that will be given permission, i.e: all the users matching this rule will be given the specified permission

                                                                                                                -
                                                                                                                -
                                                                                                                -

                                                                                                                Memberof

                                                                                                                ConditionSetRuleCreate

                                                                                                                +
                                                                                                              • Defined in src/openapi/types/condition-set-rule-create.ts:17
                                                                                                              • +
                                                                                                                +
                                                                                                                +

                                                                                                                On This Page

                                                                                                                +
                                                                                                                Properties +
                                                                                                                -
                                                                                                                -

                                                                                                                Generated using TypeDoc

                                                                                                                -
                                                                                                                \ No newline at end of file + +
                                                                                                                diff --git a/docs/interfaces/ConditionSetRuleRead.html b/docs/interfaces/ConditionSetRuleRead.html index 34f60391..0aed8333 100644 --- a/docs/interfaces/ConditionSetRuleRead.html +++ b/docs/interfaces/ConditionSetRuleRead.html @@ -1,305 +1,136 @@ -ConditionSetRuleRead | permitio
                                                                                                                -
                                                                                                                - -
                                                                                                                +ConditionSetRuleRead | permitio
                                                                                                                +
                                                                                                                permitio + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  Preparing search index...
                                                                                                                  - +

                                                                                                                  Interface ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  -

                                                                                                                  Export

                                                                                                                  ConditionSetRuleRead

                                                                                                                  +

                                                                                                                  Permit.io API +Authorization as a service

                                                                                                                  +

                                                                                                                  The version of the OpenAPI document: 2.0.0

                                                                                                                  +

                                                                                                                  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                  -
                                                                                                                  -

                                                                                                                  Hierarchy

                                                                                                                  -
                                                                                                                    -
                                                                                                                  • ConditionSetRuleRead
                                                                                                                  -
                                                                                                                  - +
                                                                                                                  +
                                                                                                                  Index
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Properties

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  created_at: string
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  created_at: string

                                                                                                                  Date and time when the condition set rule was created (ISO_8601 format).

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  environment_id: string
                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:49
                                                                                                                • +
                                                                                                                  + +
                                                                                                                  environment_id: string

                                                                                                                  Unique id of the environment that the condition set rule belongs to.

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:45
                                                                                                                • +
                                                                                                                  +
                                                                                                                  id: string

                                                                                                                  Unique id of the condition set rule

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:17
                                                                                                                • +
                                                                                                                  +
                                                                                                                  key: string

                                                                                                                  A unique id by which Permit will identify this condition set rule.

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  organization_id: string
                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:21
                                                                                                                • +
                                                                                                                  + +
                                                                                                                  organization_id: string

                                                                                                                  Unique id of the organization that the condition set rule belongs to.

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:37
                                                                                                                • +
                                                                                                                  +
                                                                                                                  permission: string

                                                                                                                  a permission that is currently granted to the userset on the resourceset.

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  project_id: string
                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:29
                                                                                                                • +
                                                                                                                  + +
                                                                                                                  project_id: string

                                                                                                                  Unique id of the project that the condition set rule belongs to.

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  resource_set: string
                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:41
                                                                                                                • +
                                                                                                                  + +
                                                                                                                  resource_set: string

                                                                                                                  the resourceset that represents the resources that are currently granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted permission

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  updated_at: string
                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:33
                                                                                                                • +
                                                                                                                  + +
                                                                                                                  updated_at: string

                                                                                                                  Date and time when the condition set rule was last updated/modified (ISO_8601 format).

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  -
                                                                                                                  - -
                                                                                                                  user_set: string
                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:53
                                                                                                                • +
                                                                                                                  + +
                                                                                                                  user_set: string

                                                                                                                  the userset that is currently granted permissions, i.e: all the users matching this rule are granted the permission on the resourceset

                                                                                                                  -
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Memberof

                                                                                                                  ConditionSetRuleRead

                                                                                                                  +
                                                                                                                • Defined in src/openapi/types/condition-set-rule-read.ts:25
                                                                                                                • +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  On This Page

                                                                                                                  +
                                                                                                                  Properties +
                                                                                                                  -
                                                                                                                  -

                                                                                                                  Generated using TypeDoc

                                                                                                                  -
                                                                                                                  \ No newline at end of file + +
                                                                                                                  diff --git a/docs/interfaces/ConditionSetRuleRemove.html b/docs/interfaces/ConditionSetRuleRemove.html index 14855c05..9250fd8c 100644 --- a/docs/interfaces/ConditionSetRuleRemove.html +++ b/docs/interfaces/ConditionSetRuleRemove.html @@ -1,245 +1,96 @@ -ConditionSetRuleRemove | permitio
                                                                                                                  -
                                                                                                                  - -
                                                                                                                  +ConditionSetRuleRemove | permitio
                                                                                                                  +
                                                                                                                  permitio + +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    Preparing search index...
                                                                                                                    - +

                                                                                                                    Interface ConditionSetRuleRemove

                                                                                                                    -
                                                                                                                    -

                                                                                                                    Export

                                                                                                                    ConditionSetRuleRemove

                                                                                                                    +

                                                                                                                    Permit.io API +Authorization as a service

                                                                                                                    +

                                                                                                                    The version of the OpenAPI document: 2.0.0

                                                                                                                    +

                                                                                                                    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                    -
                                                                                                                    -

                                                                                                                    Hierarchy

                                                                                                                    -
                                                                                                                      -
                                                                                                                    • ConditionSetRuleRemove
                                                                                                                    -
                                                                                                                    - +
                                                                                                                    +
                                                                                                                    Index
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Properties

                                                                                                                    -
                                                                                                                    - -
                                                                                                                    is_resource?: boolean
                                                                                                                    -

                                                                                                                    if True, will set the condition set rule to the resource's autogen resource-set.

                                                                                                                    -
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Memberof

                                                                                                                    ConditionSetRuleRemove

                                                                                                                    +
                                                                                                                    + +
                                                                                                                    +
                                                                                                                    + +
                                                                                                                    is_resource?: boolean
                                                                                                                    +

                                                                                                                    if True, will set the condition set rule to the resource's autogen resource-set.

                                                                                                                    -
                                                                                                                    - -
                                                                                                                    is_role?: boolean
                                                                                                                    -

                                                                                                                    if True, will set the condition set rule to the role's autogen user-set.

                                                                                                                    -
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Memberof

                                                                                                                    ConditionSetRuleRemove

                                                                                                                    +
                                                                                                                  • Defined in src/openapi/types/condition-set-rule-remove.ts:33
                                                                                                                  • +
                                                                                                                    + +
                                                                                                                    is_role?: boolean
                                                                                                                    +

                                                                                                                    if True, will set the condition set rule to the role's autogen user-set.

                                                                                                                    -
                                                                                                                    - +
                                                                                                                  • Defined in src/openapi/types/condition-set-rule-remove.ts:29
                                                                                                                  • +
                                                                                                                    +
                                                                                                                    permission: string

                                                                                                                    The permission that will be removed from the userset on the resourceset. The permission can be either a resource action id, or {resource_key}:{action_key}, i.e: the "permission name".

                                                                                                                    -
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Memberof

                                                                                                                    ConditionSetRuleRemove

                                                                                                                    -
                                                                                                                    - -
                                                                                                                    resource_set: string
                                                                                                                    +
                                                                                                                  • Defined in src/openapi/types/condition-set-rule-remove.ts:21
                                                                                                                  • +
                                                                                                                    + +
                                                                                                                    resource_set: string

                                                                                                                    The resourceset that represents the resources that are no longer granted for access, i.e: all the resources matching this rule can no longer be accessed by the userset, and will be revoked the specified permission

                                                                                                                    -
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Memberof

                                                                                                                    ConditionSetRuleRemove

                                                                                                                    -
                                                                                                                    - -
                                                                                                                    user_set: string
                                                                                                                    +
                                                                                                                  • Defined in src/openapi/types/condition-set-rule-remove.ts:25
                                                                                                                  • +
                                                                                                                    + +
                                                                                                                    user_set: string

                                                                                                                    The userset that will be unassigned these permission, i.e: all the users matching this rule will lose the specified permission

                                                                                                                    -
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Memberof

                                                                                                                    ConditionSetRuleRemove

                                                                                                                    +
                                                                                                                  • Defined in src/openapi/types/condition-set-rule-remove.ts:17
                                                                                                                  • +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    On This Page

                                                                                                                    +
                                                                                                                    Properties +
                                                                                                                    -
                                                                                                                    -

                                                                                                                    Generated using TypeDoc

                                                                                                                    -
                                                                                                                    \ No newline at end of file + +
                                                                                                                    diff --git a/docs/interfaces/ConditionSetUpdate.html b/docs/interfaces/ConditionSetUpdate.html index b3bab936..75fda2eb 100644 --- a/docs/interfaces/ConditionSetUpdate.html +++ b/docs/interfaces/ConditionSetUpdate.html @@ -1,231 +1,78 @@ -ConditionSetUpdate | permitio
                                                                                                                    -
                                                                                                                    - -
                                                                                                                    +ConditionSetUpdate | permitio
                                                                                                                    +
                                                                                                                    permitio + +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Preparing search index...
                                                                                                                      - +

                                                                                                                      Interface ConditionSetUpdate

                                                                                                                      -
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Export

                                                                                                                      ConditionSetUpdate

                                                                                                                      -
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Hierarchy

                                                                                                                      -
                                                                                                                        -
                                                                                                                      • ConditionSetUpdate
                                                                                                                      -
                                                                                                                      - +
                                                                                                                      +
                                                                                                                      Index
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Properties

                                                                                                                      -
                                                                                                                      - +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      conditions?: object

                                                                                                                      a boolean expression that consists of multiple conditions, with and/or logic.

                                                                                                                      -
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Memberof

                                                                                                                      ConditionSetUpdate

                                                                                                                      -
                                                                                                                      - +
                                                                                                                    • Defined in src/openapi/types/condition-set-update.ts:28
                                                                                                                    • +
                                                                                                                      +
                                                                                                                      description?: string

                                                                                                                      an optional longer description of the set

                                                                                                                      -
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Memberof

                                                                                                                      ConditionSetUpdate

                                                                                                                      -
                                                                                                                      - +
                                                                                                                    • Defined in src/openapi/types/condition-set-update.ts:24
                                                                                                                    • +
                                                                                                                      +
                                                                                                                      name?: string
                                                                                                                      -

                                                                                                                      A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'

                                                                                                                      -
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Memberof

                                                                                                                      ConditionSetUpdate

                                                                                                                      +

                                                                                                                      A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'

                                                                                                                      -
                                                                                                                      - -
                                                                                                                      parent_id?: ParentId
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Memberof

                                                                                                                      ConditionSetUpdate

                                                                                                                      -
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      parent_id?: string
                                                                                                                      +
                                                                                                                    • Defined in src/openapi/types/condition-set-update.ts:29
                                                                                                                    • +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      On This Page

                                                                                                                      +
                                                                                                                      Properties +
                                                                                                                      -
                                                                                                                      -

                                                                                                                      Generated using TypeDoc

                                                                                                                      -
                                                                                                                      \ No newline at end of file + +
                                                                                                                      diff --git a/docs/interfaces/Context.html b/docs/interfaces/Context.html index 51dd9315..4f226fe0 100644 --- a/docs/interfaces/Context.html +++ b/docs/interfaces/Context.html @@ -1,170 +1,36 @@ -Context | permitio
                                                                                                                      -
                                                                                                                      - -
                                                                                                                      +Context | permitio
                                                                                                                      +
                                                                                                                      permitio + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        Preparing search index...
                                                                                                                        - +

                                                                                                                        Interface Context

                                                                                                                        -
                                                                                                                        -

                                                                                                                        Hierarchy

                                                                                                                        -
                                                                                                                          -
                                                                                                                        • Context

                                                                                                                        Indexable

                                                                                                                        -
                                                                                                                        [id: string]: any
                                                                                                                        +
                                                                                                                      • Defined in src/utils/context.ts:1
                                                                                                                      • +
                                                                                                                      • +
                                                                                                                        -
                                                                                                                        -

                                                                                                                        Generated using TypeDoc

                                                                                                                        -
                                                                                                                        \ No newline at end of file + +
                                                                                                                        diff --git a/docs/interfaces/ContextTransform.html b/docs/interfaces/ContextTransform.html deleted file mode 100644 index 71e4fbc0..00000000 --- a/docs/interfaces/ContextTransform.html +++ /dev/null @@ -1,177 +0,0 @@ -ContextTransform | permitio
                                                                                                                        -
                                                                                                                        - -
                                                                                                                        -
                                                                                                                        -
                                                                                                                        -
                                                                                                                        - -

                                                                                                                        Interface ContextTransform

                                                                                                                        -
                                                                                                                        -

                                                                                                                        Hierarchy

                                                                                                                        -
                                                                                                                          -
                                                                                                                        • ContextTransform
                                                                                                                        -
                                                                                                                        -
                                                                                                                        -
                                                                                                                        - -
                                                                                                                        -
                                                                                                                        -

                                                                                                                        Generated using TypeDoc

                                                                                                                        -
                                                                                                                        \ No newline at end of file diff --git a/docs/interfaces/DerivedRoleRuleCreate.html b/docs/interfaces/DerivedRoleRuleCreate.html new file mode 100644 index 00000000..19532f6e --- /dev/null +++ b/docs/interfaces/DerivedRoleRuleCreate.html @@ -0,0 +1,80 @@ +DerivedRoleRuleCreate | permitio
                                                                                                                        +
                                                                                                                        permitio + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          Preparing search index...
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +

                                                                                                                          Interface DerivedRoleRuleCreate

                                                                                                                          +
                                                                                                                          interface DerivedRoleRuleCreate {
                                                                                                                              linked_by_relation: string;
                                                                                                                              on_resource: string;
                                                                                                                              role: string;
                                                                                                                              when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;
                                                                                                                          }
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          Index
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          linked_by_relation: string
                                                                                                                          +

                                                                                                                          the relation key that needs to exist between the resource and the related resource

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          on_resource: string
                                                                                                                          +

                                                                                                                          the resource key that needs to exist on the related role (from the relation)

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          role: string
                                                                                                                          +

                                                                                                                          the role key that needs to exist on the related resource (from the relation)

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + +

                                                                                                                          the settings of the derived role rule

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          diff --git a/docs/interfaces/DerivedRoleRuleDelete.html b/docs/interfaces/DerivedRoleRuleDelete.html new file mode 100644 index 00000000..818dedb0 --- /dev/null +++ b/docs/interfaces/DerivedRoleRuleDelete.html @@ -0,0 +1,80 @@ +DerivedRoleRuleDelete | permitio
                                                                                                                          +
                                                                                                                          permitio + +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            Preparing search index...
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +

                                                                                                                            Interface DerivedRoleRuleDelete

                                                                                                                            +
                                                                                                                            interface DerivedRoleRuleDelete {
                                                                                                                                linked_by_relation: string;
                                                                                                                                on_resource: string;
                                                                                                                                role: string;
                                                                                                                                when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;
                                                                                                                            }
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            Index
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            linked_by_relation: string
                                                                                                                            +

                                                                                                                            the relation key that needs to exist between the resource and the related resource

                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            on_resource: string
                                                                                                                            +

                                                                                                                            the resource key that needs to exist on the related role (from the relation)

                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            role: string
                                                                                                                            +

                                                                                                                            the role key that needs to exist on the related resource (from the relation)

                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + +

                                                                                                                            the settings of the derived role rule

                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            diff --git a/docs/interfaces/DerivedRoleRuleRead.html b/docs/interfaces/DerivedRoleRuleRead.html new file mode 100644 index 00000000..59f6fbb7 --- /dev/null +++ b/docs/interfaces/DerivedRoleRuleRead.html @@ -0,0 +1,104 @@ +DerivedRoleRuleRead | permitio
                                                                                                                            +
                                                                                                                            permitio + +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              Preparing search index...
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +

                                                                                                                              Interface DerivedRoleRuleRead

                                                                                                                              +
                                                                                                                              interface DerivedRoleRuleRead {
                                                                                                                                  linked_by_relation: string;
                                                                                                                                  on_resource: string;
                                                                                                                                  relation_id: string;
                                                                                                                                  resource_id: string;
                                                                                                                                  role: string;
                                                                                                                                  role_id: string;
                                                                                                                                  when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings;
                                                                                                                              }
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              Index
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              linked_by_relation: string
                                                                                                                              +

                                                                                                                              the relation key that needs to exist between the resource and the related resource

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              on_resource: string
                                                                                                                              +

                                                                                                                              the resource key that needs to exist on the related role (from the relation)

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              relation_id: string
                                                                                                                              +

                                                                                                                              the relation id that needs to exist between the resource and the related resource

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              resource_id: string
                                                                                                                              +

                                                                                                                              the resource id that needs to exist on the related role (from the relation)

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              role: string
                                                                                                                              +

                                                                                                                              the role key that needs to exist on the related resource (from the relation)

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              role_id: string
                                                                                                                              +

                                                                                                                              the role id that needs to exist on the related resource (from the relation)

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + + +

                                                                                                                              the settings of the derived role rule

                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              diff --git a/docs/interfaces/DetailedAuditLogModel.html b/docs/interfaces/DetailedAuditLogModel.html new file mode 100644 index 00000000..97233add --- /dev/null +++ b/docs/interfaces/DetailedAuditLogModel.html @@ -0,0 +1,174 @@ +DetailedAuditLogModel | permitio
                                                                                                                              +
                                                                                                                              permitio + +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                Preparing search index...
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + +

                                                                                                                                Interface DetailedAuditLogModel

                                                                                                                                +
                                                                                                                                interface DetailedAuditLogModel {
                                                                                                                                    action?: string | null;
                                                                                                                                    context?: any;
                                                                                                                                    created_at?: string | null;
                                                                                                                                    decision?: boolean | null;
                                                                                                                                    env_id: string;
                                                                                                                                    id: string;
                                                                                                                                    input?: any;
                                                                                                                                    objects?: AuditLogObjectsModel | null;
                                                                                                                                    org_id: string;
                                                                                                                                    pdp_config_id?: string | null;
                                                                                                                                    project_id: string;
                                                                                                                                    query?: string | null;
                                                                                                                                    raw_data: RawData1;
                                                                                                                                    reason?: string | null;
                                                                                                                                    resource_type?: string | null;
                                                                                                                                    result?: any;
                                                                                                                                    tenant?: string | null;
                                                                                                                                    timestamp: string;
                                                                                                                                    user_email?: string | null;
                                                                                                                                    user_key?: string | null;
                                                                                                                                    user_name?: string | null;
                                                                                                                                }
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                Index
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                action?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                context?: any
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                created_at?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                decision?: boolean | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                env_id: string
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                id: string
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                input?: any
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                objects?: AuditLogObjectsModel | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                org_id: string
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                pdp_config_id?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                project_id: string
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                query?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                raw_data: RawData1
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                reason?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                resource_type?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                result?: any
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                tenant?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                timestamp: string
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                user_email?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                user_key?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                user_name?: string | null
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                diff --git a/docs/interfaces/DummyEngineModel.html b/docs/interfaces/DummyEngineModel.html new file mode 100644 index 00000000..01dfa9d6 --- /dev/null +++ b/docs/interfaces/DummyEngineModel.html @@ -0,0 +1,63 @@ +DummyEngineModel | permitio
                                                                                                                                +
                                                                                                                                permitio + +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  Preparing search index...
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + +

                                                                                                                                  Interface DummyEngineModel

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  dummy engine class in case we couldn't parse the log but we didn't want to drop it

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  interface DummyEngineModel {
                                                                                                                                      engine?: Engine | null;
                                                                                                                                      timestamp?: string | null;
                                                                                                                                  }
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  Index
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  engine?: Engine | null
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  timestamp?: string | null
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  diff --git a/docs/interfaces/ElementsUserInviteApprove.html b/docs/interfaces/ElementsUserInviteApprove.html new file mode 100644 index 00000000..bc56dbf6 --- /dev/null +++ b/docs/interfaces/ElementsUserInviteApprove.html @@ -0,0 +1,83 @@ +ElementsUserInviteApprove | permitio
                                                                                                                                  +
                                                                                                                                  permitio + +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    Preparing search index...
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + +

                                                                                                                                    Interface ElementsUserInviteApprove

                                                                                                                                    +
                                                                                                                                    +

                                                                                                                                    Approval body: the matching email, final user key and required nullable attributes.

                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    interface ElementsUserInviteApprove {
                                                                                                                                        attributes: object | null;
                                                                                                                                        email: string;
                                                                                                                                        key: string;
                                                                                                                                    }
                                                                                                                                    +
                                                                                                                                    +

                                                                                                                                    Hierarchy

                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                    • Omit<GeneratedApprove, "attributes"> +
                                                                                                                                        +
                                                                                                                                      • ElementsUserInviteApprove
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    Index
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    attributes: object | null
                                                                                                                                    +

                                                                                                                                    User attributes, or null; this field must be supplied.

                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    email: string
                                                                                                                                    +

                                                                                                                                    The email of the user that is being invited

                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    key: string
                                                                                                                                    +

                                                                                                                                    The key of the elements user invite

                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    diff --git a/docs/interfaces/ElementsUserInviteCreate.html b/docs/interfaces/ElementsUserInviteCreate.html new file mode 100644 index 00000000..b5b23cb4 --- /dev/null +++ b/docs/interfaces/ElementsUserInviteCreate.html @@ -0,0 +1,125 @@ +ElementsUserInviteCreate | permitio
                                                                                                                                    +
                                                                                                                                    permitio + +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      Preparing search index...
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +

                                                                                                                                      Interface ElementsUserInviteCreate

                                                                                                                                      +
                                                                                                                                      +

                                                                                                                                      Complete invite creation body; nullable fields remain required by the facts API.

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      interface ElementsUserInviteCreate {
                                                                                                                                          email: string;
                                                                                                                                          first_name: string | null;
                                                                                                                                          key: string | null;
                                                                                                                                          last_name: string | null;
                                                                                                                                          resource_instance_id: string | null;
                                                                                                                                          role_id: string;
                                                                                                                                          status: UserInviteStatus;
                                                                                                                                          tenant_id: string;
                                                                                                                                      }
                                                                                                                                      +
                                                                                                                                      +

                                                                                                                                      Hierarchy

                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                      • Omit<GeneratedCreate, NullableInviteKeys> +
                                                                                                                                          +
                                                                                                                                        • ElementsUserInviteCreate
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      Index
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      email: string
                                                                                                                                      +

                                                                                                                                      The email of the user that being invited

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      first_name: string | null
                                                                                                                                      +

                                                                                                                                      First name, or null when absent.

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      key: string | null
                                                                                                                                      +

                                                                                                                                      Suggested user key; approval supplies the final key.

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      last_name: string | null
                                                                                                                                      +

                                                                                                                                      Last name, or null when absent.

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      resource_instance_id: string | null
                                                                                                                                      +

                                                                                                                                      Internal instance ID, or null for a tenant role invite.

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      role_id: string
                                                                                                                                      +

                                                                                                                                      The role of the user that is being invited

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + + +

                                                                                                                                      The status of the user invite

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      tenant_id: string
                                                                                                                                      +

                                                                                                                                      The tenant id of the user that is being invited

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      diff --git a/docs/interfaces/ElementsUserInviteRead.html b/docs/interfaces/ElementsUserInviteRead.html new file mode 100644 index 00000000..88272fd6 --- /dev/null +++ b/docs/interfaces/ElementsUserInviteRead.html @@ -0,0 +1,179 @@ +ElementsUserInviteRead | permitio
                                                                                                                                      +
                                                                                                                                      permitio + +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        Preparing search index...
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +

                                                                                                                                        Interface ElementsUserInviteRead

                                                                                                                                        +
                                                                                                                                        +

                                                                                                                                        Stored invite, including its required context, timestamps and nullable editable fields.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        interface ElementsUserInviteRead {
                                                                                                                                            created_at: string;
                                                                                                                                            email: string;
                                                                                                                                            environment_id: string;
                                                                                                                                            first_name: string | null;
                                                                                                                                            id: string;
                                                                                                                                            key: string | null;
                                                                                                                                            last_name: string | null;
                                                                                                                                            organization_id: string;
                                                                                                                                            project_id: string;
                                                                                                                                            resource_instance_id: string | null;
                                                                                                                                            role_id: string;
                                                                                                                                            status: UserInviteStatus;
                                                                                                                                            tenant_id: string;
                                                                                                                                            updated_at: string;
                                                                                                                                        }
                                                                                                                                        +
                                                                                                                                        +

                                                                                                                                        Hierarchy

                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                        • Omit<GeneratedRead, NullableInviteKeys> +
                                                                                                                                            +
                                                                                                                                          • ElementsUserInviteRead
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        Index
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        created_at: string
                                                                                                                                        +

                                                                                                                                        Date and time when the elements_user_invite was created (ISO_8601 format).

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        email: string
                                                                                                                                        +

                                                                                                                                        The email of the user that being invited

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        environment_id: string
                                                                                                                                        +

                                                                                                                                        Unique id of the environment that the elements_user_invite belongs to.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        first_name: string | null
                                                                                                                                        +

                                                                                                                                        First name, or null when absent.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        id: string
                                                                                                                                        +

                                                                                                                                        Unique id of the elements_user_invite

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        key: string | null
                                                                                                                                        +

                                                                                                                                        Suggested or approved user key.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        last_name: string | null
                                                                                                                                        +

                                                                                                                                        Last name, or null when absent.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        organization_id: string
                                                                                                                                        +

                                                                                                                                        Unique id of the organization that the elements_user_invite belongs to.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        project_id: string
                                                                                                                                        +

                                                                                                                                        Unique id of the project that the elements_user_invite belongs to.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        resource_instance_id: string | null
                                                                                                                                        +

                                                                                                                                        Internal instance ID, or null for a tenant role invite.

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        role_id: string
                                                                                                                                        +

                                                                                                                                        The role of the user that is being invited

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + + +

                                                                                                                                        The status of the user invite

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        tenant_id: string
                                                                                                                                        +

                                                                                                                                        The tenant id of the user that is being invited

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        updated_at: string
                                                                                                                                        +

                                                                                                                                        Date and time when the elements_user_invite was last updated/modified (ISO_8601 format).

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        diff --git a/docs/interfaces/ElementsUserInviteUpdate.html b/docs/interfaces/ElementsUserInviteUpdate.html new file mode 100644 index 00000000..f6151579 --- /dev/null +++ b/docs/interfaces/ElementsUserInviteUpdate.html @@ -0,0 +1,125 @@ +ElementsUserInviteUpdate | permitio
                                                                                                                                        +
                                                                                                                                        permitio + +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          Preparing search index...
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +

                                                                                                                                          Interface ElementsUserInviteUpdate

                                                                                                                                          +
                                                                                                                                          +

                                                                                                                                          Full PATCH body; the facts endpoint requires every editable field.

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          interface ElementsUserInviteUpdate {
                                                                                                                                              email: string;
                                                                                                                                              first_name: string | null;
                                                                                                                                              key: string | null;
                                                                                                                                              last_name: string | null;
                                                                                                                                              resource_instance_id: string | null;
                                                                                                                                              role_id: string;
                                                                                                                                              status: UserInviteStatus;
                                                                                                                                              tenant_id: string;
                                                                                                                                          }
                                                                                                                                          +
                                                                                                                                          +

                                                                                                                                          Hierarchy

                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                          • Omit<GeneratedUpdate, NullableInviteKeys> +
                                                                                                                                              +
                                                                                                                                            • ElementsUserInviteUpdate
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          Index
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          email: string
                                                                                                                                          +

                                                                                                                                          The email of the user that being invited

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          first_name: string | null
                                                                                                                                          +

                                                                                                                                          First name, or null when absent.

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          key: string | null
                                                                                                                                          +

                                                                                                                                          Suggested user key; approval supplies the final key.

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          last_name: string | null
                                                                                                                                          +

                                                                                                                                          Last name, or null when absent.

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          resource_instance_id: string | null
                                                                                                                                          +

                                                                                                                                          Internal instance ID, or null for a tenant role invite.

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          role_id: string
                                                                                                                                          +

                                                                                                                                          The role of the user that is being invited

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + + +

                                                                                                                                          The status of the user invite

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          tenant_id: string
                                                                                                                                          +

                                                                                                                                          The tenant id of the user that is being invited

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          diff --git a/docs/interfaces/EmbeddedLoginRequestOutputWithContent.html b/docs/interfaces/EmbeddedLoginRequestOutputWithContent.html index 2ba18dfa..49e12951 100644 --- a/docs/interfaces/EmbeddedLoginRequestOutputWithContent.html +++ b/docs/interfaces/EmbeddedLoginRequestOutputWithContent.html @@ -1,259 +1,117 @@ -EmbeddedLoginRequestOutputWithContent | permitio
                                                                                                                                          -
                                                                                                                                          - -
                                                                                                                                          +EmbeddedLoginRequestOutputWithContent | permitio
                                                                                                                                          +
                                                                                                                                          permitio + +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            Preparing search index...
                                                                                                                                            - +

                                                                                                                                            Interface EmbeddedLoginRequestOutputWithContent

                                                                                                                                            Represents the response returned by the loginAs method of the ElementsClient class, with additional content.

                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            interface EmbeddedLoginRequestOutputWithContent {
                                                                                                                                                content?: any;
                                                                                                                                                element_bearer_token?: string;
                                                                                                                                                error?: string;
                                                                                                                                                error_code?: number;
                                                                                                                                                extra?: string;
                                                                                                                                                redirect_url: string;
                                                                                                                                                token?: string;
                                                                                                                                            }
                                                                                                                                            +

                                                                                                                                            Hierarchy

                                                                                                                                              -
                                                                                                                                            • EmbeddedLoginRequestOutput +
                                                                                                                                            • EmbeddedLoginRequestOutput
                                                                                                                                                -
                                                                                                                                              • EmbeddedLoginRequestOutputWithContent
                                                                                                                                            -
                                                                                                                                            - +
                                                                                                                                            +
                                                                                                                                            Index
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Properties

                                                                                                                                            -
                                                                                                                                            - +
                                                                                                                                            + +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            content?: any
                                                                                                                                            -
                                                                                                                                            - +
                                                                                                                                          • Defined in src/api/elements.ts:13
                                                                                                                                          • +
                                                                                                                                            + +
                                                                                                                                            element_bearer_token?: string
                                                                                                                                            +

                                                                                                                                            The bearer token that lets your users login into permit elements

                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            error?: string

                                                                                                                                            If the login request failed, this field will contain the error message

                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Memberof

                                                                                                                                            EmbeddedLoginRequestOutput

                                                                                                                                            -
                                                                                                                                            - -
                                                                                                                                            error_code?: number
                                                                                                                                            +
                                                                                                                                          • Defined in src/openapi/types/embedded-login-request-output.ts:17
                                                                                                                                          • +
                                                                                                                                            + +
                                                                                                                                            error_code?: number

                                                                                                                                            If the login request failed, this field will contain the error code

                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Memberof

                                                                                                                                            EmbeddedLoginRequestOutput

                                                                                                                                            -
                                                                                                                                            - +
                                                                                                                                          • Defined in src/openapi/types/embedded-login-request-output.ts:21
                                                                                                                                          • +
                                                                                                                                            +
                                                                                                                                            extra?: string

                                                                                                                                            Extra data that you can pass to the login request

                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Memberof

                                                                                                                                            EmbeddedLoginRequestOutput

                                                                                                                                            -
                                                                                                                                            - -
                                                                                                                                            redirect_url: string
                                                                                                                                            +
                                                                                                                                          • Defined in src/openapi/types/embedded-login-request-output.ts:29
                                                                                                                                          • +
                                                                                                                                            + +
                                                                                                                                            redirect_url: string

                                                                                                                                            The full URL to which the user should be redirected in order to complete the login process

                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Memberof

                                                                                                                                            EmbeddedLoginRequestOutput

                                                                                                                                            -
                                                                                                                                            - +
                                                                                                                                          • Defined in src/openapi/types/embedded-login-request-output.ts:33
                                                                                                                                          • +
                                                                                                                                            +
                                                                                                                                            token?: string

                                                                                                                                            The auth token that lets your users login into permit elements

                                                                                                                                            -
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Memberof

                                                                                                                                            EmbeddedLoginRequestOutput

                                                                                                                                            +
                                                                                                                                          • Defined in src/openapi/types/embedded-login-request-output.ts:25
                                                                                                                                          • +
                                                                                                                                            +
                                                                                                                                            +

                                                                                                                                            On This Page

                                                                                                                                            +
                                                                                                                                            Properties +
                                                                                                                                            -
                                                                                                                                            -

                                                                                                                                            Generated using TypeDoc

                                                                                                                                            -
                                                                                                                                            \ No newline at end of file + +
                                                                                                                                            diff --git a/docs/interfaces/EnvironmentCopy.html b/docs/interfaces/EnvironmentCopy.html index ddf47b70..6ab96b61 100644 --- a/docs/interfaces/EnvironmentCopy.html +++ b/docs/interfaces/EnvironmentCopy.html @@ -1,217 +1,72 @@ -EnvironmentCopy | permitio
                                                                                                                                            -
                                                                                                                                            - -
                                                                                                                                            +EnvironmentCopy | permitio
                                                                                                                                            +
                                                                                                                                            permitio + +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              Preparing search index...
                                                                                                                                              - +

                                                                                                                                              Interface EnvironmentCopy

                                                                                                                                              -
                                                                                                                                              -
                                                                                                                                              -

                                                                                                                                              Export

                                                                                                                                              EnvironmentCopy

                                                                                                                                              -
                                                                                                                                              -
                                                                                                                                              -

                                                                                                                                              Hierarchy

                                                                                                                                              -
                                                                                                                                                -
                                                                                                                                              • EnvironmentCopy
                                                                                                                                              -
                                                                                                                                              - +
                                                                                                                                              +
                                                                                                                                              Index
                                                                                                                                              -
                                                                                                                                              -

                                                                                                                                              Properties

                                                                                                                                              -
                                                                                                                                              - - +
                                                                                                                                              + +
                                                                                                                                              +
                                                                                                                                              + +

                                                                                                                                              Action to take when detecting a conflict when copying. Only applies to copying into an existing environment

                                                                                                                                              -
                                                                                                                                              -
                                                                                                                                              -

                                                                                                                                              Memberof

                                                                                                                                              EnvironmentCopy

                                                                                                                                              -
                                                                                                                                              - +
                                                                                                                                            • Defined in src/openapi/types/environment-copy.ts:28
                                                                                                                                            • +
                                                                                                                                              + -
                                                                                                                                              -

                                                                                                                                              Memberof

                                                                                                                                              EnvironmentCopy

                                                                                                                                              +

                                                                                                                                              Filters to include and exclude copied objects

                                                                                                                                              -
                                                                                                                                              - - -
                                                                                                                                              -

                                                                                                                                              Memberof

                                                                                                                                              EnvironmentCopy

                                                                                                                                              +
                                                                                                                                            • Defined in src/openapi/types/environment-copy.ts:32
                                                                                                                                            • +
                                                                                                                                              + + +

                                                                                                                                              If copying a new environment, the environment configuration. If copying to an existing environment, the environment identifier

                                                                                                                                              +
                                                                                                                                            • Defined in src/openapi/types/environment-copy.ts:24
                                                                                                                                            • +
                                                                                                                                              +
                                                                                                                                              +

                                                                                                                                              On This Page

                                                                                                                                              +
                                                                                                                                              Properties +
                                                                                                                                              -
                                                                                                                                              -

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              -
                                                                                                                                              \ No newline at end of file + +
                                                                                                                                              diff --git a/docs/interfaces/EnvironmentCopyScope.html b/docs/interfaces/EnvironmentCopyScope.html index dadd7acd..fd793015 100644 --- a/docs/interfaces/EnvironmentCopyScope.html +++ b/docs/interfaces/EnvironmentCopyScope.html @@ -1,225 +1,88 @@ -EnvironmentCopyScope | permitio
                                                                                                                                              -
                                                                                                                                              - -
                                                                                                                                              +EnvironmentCopyScope | permitio
                                                                                                                                              +
                                                                                                                                              permitio + +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Preparing search index...
                                                                                                                                                - +

                                                                                                                                                Interface EnvironmentCopyScope

                                                                                                                                                -
                                                                                                                                                -
                                                                                                                                                -

                                                                                                                                                Export

                                                                                                                                                EnvironmentCopyScope

                                                                                                                                                -
                                                                                                                                                -
                                                                                                                                                -

                                                                                                                                                Hierarchy

                                                                                                                                                -
                                                                                                                                                  -
                                                                                                                                                • EnvironmentCopyScope
                                                                                                                                                -
                                                                                                                                                - +
                                                                                                                                                +
                                                                                                                                                Index
                                                                                                                                                -
                                                                                                                                                -

                                                                                                                                                Properties

                                                                                                                                                -
                                                                                                                                                - - -
                                                                                                                                                -

                                                                                                                                                Memberof

                                                                                                                                                EnvironmentCopyScope

                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                custom_policies?: EnvironmentCopyScopeFilters
                                                                                                                                                +

                                                                                                                                                Custom policies to copy

                                                                                                                                                -
                                                                                                                                                - +
                                                                                                                                              • Defined in src/openapi/types/environment-copy-scope.ts:36
                                                                                                                                              • +
                                                                                                                                                + + +

                                                                                                                                                Resource sets to copy

                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + -
                                                                                                                                                -

                                                                                                                                                Memberof

                                                                                                                                                EnvironmentCopyScope

                                                                                                                                                +

                                                                                                                                                Resources to copy

                                                                                                                                                -
                                                                                                                                                - +
                                                                                                                                              • Defined in src/openapi/types/environment-copy-scope.ts:20
                                                                                                                                              • +
                                                                                                                                                + -
                                                                                                                                                -

                                                                                                                                                Memberof

                                                                                                                                                EnvironmentCopyScope

                                                                                                                                                +

                                                                                                                                                Roles to copy

                                                                                                                                                -
                                                                                                                                                - - -
                                                                                                                                                -

                                                                                                                                                Memberof

                                                                                                                                                EnvironmentCopyScope

                                                                                                                                                +
                                                                                                                                              • Defined in src/openapi/types/environment-copy-scope.ts:24
                                                                                                                                              • +
                                                                                                                                                + + +

                                                                                                                                                User sets to copy

                                                                                                                                                +
                                                                                                                                              • Defined in src/openapi/types/environment-copy-scope.ts:28
                                                                                                                                              • +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                On This Page

                                                                                                                                                +
                                                                                                                                                Properties +
                                                                                                                                                -
                                                                                                                                                -

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                -
                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                diff --git a/docs/interfaces/EnvironmentCopyScopeFilters.html b/docs/interfaces/EnvironmentCopyScopeFilters.html index fdc35aa7..88d26431 100644 --- a/docs/interfaces/EnvironmentCopyScopeFilters.html +++ b/docs/interfaces/EnvironmentCopyScopeFilters.html @@ -1,209 +1,72 @@ -EnvironmentCopyScopeFilters | permitio
                                                                                                                                                -
                                                                                                                                                - -
                                                                                                                                                +EnvironmentCopyScopeFilters | permitio
                                                                                                                                                +
                                                                                                                                                permitio + +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  Preparing search index...
                                                                                                                                                  - +

                                                                                                                                                  Interface EnvironmentCopyScopeFilters

                                                                                                                                                  -
                                                                                                                                                  -

                                                                                                                                                  Export

                                                                                                                                                  EnvironmentCopyScopeFilters

                                                                                                                                                  +

                                                                                                                                                  Permit.io API +Authorization as a service

                                                                                                                                                  +

                                                                                                                                                  The version of the OpenAPI document: 2.0.0

                                                                                                                                                  +

                                                                                                                                                  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                  -
                                                                                                                                                  -

                                                                                                                                                  Hierarchy

                                                                                                                                                  -
                                                                                                                                                    -
                                                                                                                                                  • EnvironmentCopyScopeFilters
                                                                                                                                                  -
                                                                                                                                                  - +
                                                                                                                                                  +
                                                                                                                                                  Index
                                                                                                                                                  -

                                                                                                                                                  Properties

                                                                                                                                                  -
                                                                                                                                                  -
                                                                                                                                                  -

                                                                                                                                                  Properties

                                                                                                                                                  -
                                                                                                                                                  - +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  exclude?: string[]

                                                                                                                                                  Object to exclude (use * as wildcard)

                                                                                                                                                  -
                                                                                                                                                  -
                                                                                                                                                  -

                                                                                                                                                  Memberof

                                                                                                                                                  EnvironmentCopyScopeFilters

                                                                                                                                                  -
                                                                                                                                                  - +
                                                                                                                                                • Defined in src/openapi/types/environment-copy-scope-filters.ts:21
                                                                                                                                                • +
                                                                                                                                                  +
                                                                                                                                                  include?: string[]

                                                                                                                                                  Objects to include (use * as wildcard)

                                                                                                                                                  -
                                                                                                                                                  -
                                                                                                                                                  -

                                                                                                                                                  Memberof

                                                                                                                                                  EnvironmentCopyScopeFilters

                                                                                                                                                  +
                                                                                                                                                • Defined in src/openapi/types/environment-copy-scope-filters.ts:17
                                                                                                                                                • +
                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  On This Page

                                                                                                                                                  +
                                                                                                                                                  Properties +
                                                                                                                                                  -
                                                                                                                                                  -

                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                  -
                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                  diff --git a/docs/interfaces/EnvironmentCopyTarget.html b/docs/interfaces/EnvironmentCopyTarget.html index ab56159e..a11c7d7a 100644 --- a/docs/interfaces/EnvironmentCopyTarget.html +++ b/docs/interfaces/EnvironmentCopyTarget.html @@ -1,207 +1,64 @@ -EnvironmentCopyTarget | permitio
                                                                                                                                                  -
                                                                                                                                                  - -
                                                                                                                                                  +EnvironmentCopyTarget | permitio
                                                                                                                                                  +
                                                                                                                                                  permitio + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    Preparing search index...
                                                                                                                                                    - +

                                                                                                                                                    Interface EnvironmentCopyTarget

                                                                                                                                                    -
                                                                                                                                                    -
                                                                                                                                                    -

                                                                                                                                                    Export

                                                                                                                                                    EnvironmentCopyTarget

                                                                                                                                                    -
                                                                                                                                                    -
                                                                                                                                                    -

                                                                                                                                                    Hierarchy

                                                                                                                                                    -
                                                                                                                                                      -
                                                                                                                                                    • EnvironmentCopyTarget
                                                                                                                                                    -
                                                                                                                                                    - +
                                                                                                                                                    +
                                                                                                                                                    Index
                                                                                                                                                    -

                                                                                                                                                    Properties

                                                                                                                                                    -
                                                                                                                                                    existing? -new? + +
                                                                                                                                                    -
                                                                                                                                                    -

                                                                                                                                                    Properties

                                                                                                                                                    -
                                                                                                                                                    - +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    existing?: string

                                                                                                                                                    Identifier of an existing environment to copy into

                                                                                                                                                    -
                                                                                                                                                    -
                                                                                                                                                    -

                                                                                                                                                    Memberof

                                                                                                                                                    EnvironmentCopyTarget

                                                                                                                                                    -
                                                                                                                                                    - +
                                                                                                                                                  • Defined in src/openapi/types/environment-copy-target.ts:20
                                                                                                                                                  • +
                                                                                                                                                    + -
                                                                                                                                                    -

                                                                                                                                                    Memberof

                                                                                                                                                    EnvironmentCopyTarget

                                                                                                                                                    +

                                                                                                                                                    Description of the environment to create. This environment must not already exist.

                                                                                                                                                    +
                                                                                                                                                  • Defined in src/openapi/types/environment-copy-target.ts:24
                                                                                                                                                  • +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    On This Page

                                                                                                                                                    +
                                                                                                                                                    Properties +
                                                                                                                                                    -
                                                                                                                                                    -

                                                                                                                                                    Generated using TypeDoc

                                                                                                                                                    -
                                                                                                                                                    \ No newline at end of file + +
                                                                                                                                                    diff --git a/docs/interfaces/EnvironmentCreate.html b/docs/interfaces/EnvironmentCreate.html index 53aaaba6..10a0b6e7 100644 --- a/docs/interfaces/EnvironmentCreate.html +++ b/docs/interfaces/EnvironmentCreate.html @@ -1,243 +1,96 @@ -EnvironmentCreate | permitio
                                                                                                                                                    -
                                                                                                                                                    - -
                                                                                                                                                    +EnvironmentCreate | permitio
                                                                                                                                                    +
                                                                                                                                                    permitio + +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Preparing search index...
                                                                                                                                                      - +

                                                                                                                                                      Interface EnvironmentCreate

                                                                                                                                                      -
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Export

                                                                                                                                                      EnvironmentCreate

                                                                                                                                                      -
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Hierarchy

                                                                                                                                                      -
                                                                                                                                                        -
                                                                                                                                                      • EnvironmentCreate
                                                                                                                                                      -
                                                                                                                                                      - +
                                                                                                                                                      +
                                                                                                                                                      Index
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Properties

                                                                                                                                                      -
                                                                                                                                                      - -
                                                                                                                                                      custom_branch_name?: string
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      custom_branch_name?: string

                                                                                                                                                      when using gitops feature, an optional branch name for the environment

                                                                                                                                                      -
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Memberof

                                                                                                                                                      EnvironmentCreate

                                                                                                                                                      -
                                                                                                                                                      - +
                                                                                                                                                    • Defined in src/openapi/types/environment-create.ts:32
                                                                                                                                                    • +
                                                                                                                                                      +
                                                                                                                                                      description?: string

                                                                                                                                                      an optional longer description of the environment

                                                                                                                                                      -
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Memberof

                                                                                                                                                      EnvironmentCreate

                                                                                                                                                      -
                                                                                                                                                      - -
                                                                                                                                                      jwks?: JwksObj
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Memberof

                                                                                                                                                      EnvironmentCreate

                                                                                                                                                      +
                                                                                                                                                    • Defined in src/openapi/types/environment-create.ts:28
                                                                                                                                                    • +
                                                                                                                                                      + +
                                                                                                                                                      jwks?: JwksConfig
                                                                                                                                                      +

                                                                                                                                                      jwks for element frontend only login

                                                                                                                                                      -
                                                                                                                                                      - +
                                                                                                                                                    • Defined in src/openapi/types/environment-create.ts:36
                                                                                                                                                    • +
                                                                                                                                                      +
                                                                                                                                                      key: string

                                                                                                                                                      A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment.

                                                                                                                                                      -
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Memberof

                                                                                                                                                      EnvironmentCreate

                                                                                                                                                      -
                                                                                                                                                      - +
                                                                                                                                                    • Defined in src/openapi/types/environment-create.ts:20
                                                                                                                                                    • +
                                                                                                                                                      +
                                                                                                                                                      name: string

                                                                                                                                                      The name of the environment

                                                                                                                                                      -
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Memberof

                                                                                                                                                      EnvironmentCreate

                                                                                                                                                      +
                                                                                                                                                    • Defined in src/openapi/types/environment-create.ts:24
                                                                                                                                                    • +
                                                                                                                                                      + +
                                                                                                                                                      settings?: object
                                                                                                                                                      +

                                                                                                                                                      the settings for this environment

                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      On This Page

                                                                                                                                                      +
                                                                                                                                                      Properties +
                                                                                                                                                      -
                                                                                                                                                      -

                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                      -
                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                      diff --git a/docs/interfaces/EnvironmentRead.html b/docs/interfaces/EnvironmentRead.html index 81da2688..6e5d1e78 100644 --- a/docs/interfaces/EnvironmentRead.html +++ b/docs/interfaces/EnvironmentRead.html @@ -1,303 +1,142 @@ -EnvironmentRead | permitio
                                                                                                                                                      -
                                                                                                                                                      - -
                                                                                                                                                      +EnvironmentRead | permitio
                                                                                                                                                      +
                                                                                                                                                      permitio + +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        Preparing search index...
                                                                                                                                                        - +

                                                                                                                                                        Interface EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Export

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Hierarchy

                                                                                                                                                        -
                                                                                                                                                          -
                                                                                                                                                        • EnvironmentRead
                                                                                                                                                        -
                                                                                                                                                        - +
                                                                                                                                                        +
                                                                                                                                                        Index
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Properties

                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        created_at: string
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        avp_policy_store_id?: string
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        created_at: string

                                                                                                                                                        Date and time when the environment was created (ISO_8601 format).

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        custom_branch_name?: string
                                                                                                                                                        +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:36
                                                                                                                                                      • +
                                                                                                                                                        + +
                                                                                                                                                        custom_branch_name?: string

                                                                                                                                                        when using gitops feature, an optional branch name for the environment

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:53
                                                                                                                                                      • +
                                                                                                                                                        +
                                                                                                                                                        description?: string

                                                                                                                                                        an optional longer description of the environment

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:49
                                                                                                                                                      • +
                                                                                                                                                        +
                                                                                                                                                        id: string

                                                                                                                                                        Unique id of the environment

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        jwks?: JwksObj
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:24
                                                                                                                                                      • +
                                                                                                                                                        + +
                                                                                                                                                        jwks?: JwksConfig
                                                                                                                                                        +

                                                                                                                                                        jwks for element frontend only login

                                                                                                                                                        -
                                                                                                                                                        - +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:57
                                                                                                                                                      • +
                                                                                                                                                        +
                                                                                                                                                        key: string

                                                                                                                                                        A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment.

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:20
                                                                                                                                                      • +
                                                                                                                                                        +
                                                                                                                                                        name: string

                                                                                                                                                        The name of the environment

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        organization_id: string
                                                                                                                                                        +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:45
                                                                                                                                                      • +
                                                                                                                                                        + +
                                                                                                                                                        organization_id: string

                                                                                                                                                        Unique id of the organization that the environment belongs to.

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        project_id: string
                                                                                                                                                        +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:28
                                                                                                                                                      • +
                                                                                                                                                        + +
                                                                                                                                                        project_id: string

                                                                                                                                                        Unique id of the project that the environment belongs to.

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        updated_at: string
                                                                                                                                                        +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:32
                                                                                                                                                      • +
                                                                                                                                                        + +
                                                                                                                                                        settings?: object
                                                                                                                                                        +

                                                                                                                                                        the settings for this environment

                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        updated_at: string

                                                                                                                                                        Date and time when the environment was last updated/modified (ISO_8601 format).

                                                                                                                                                        -
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Memberof

                                                                                                                                                        EnvironmentRead

                                                                                                                                                        +
                                                                                                                                                      • Defined in src/openapi/types/environment-read.ts:40
                                                                                                                                                      • +
                                                                                                                                                        +
                                                                                                                                                        +

                                                                                                                                                        On This Page

                                                                                                                                                        +
                                                                                                                                                        Properties +
                                                                                                                                                        -
                                                                                                                                                        -

                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                        -
                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                        diff --git a/docs/interfaces/EnvironmentStats.html b/docs/interfaces/EnvironmentStats.html index ebb688fa..12128f9a 100644 --- a/docs/interfaces/EnvironmentStats.html +++ b/docs/interfaces/EnvironmentStats.html @@ -1,323 +1,154 @@ -EnvironmentStats | permitio
                                                                                                                                                        -
                                                                                                                                                        - -
                                                                                                                                                        +EnvironmentStats | permitio
                                                                                                                                                        +
                                                                                                                                                        permitio + +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          Preparing search index...
                                                                                                                                                          - +

                                                                                                                                                          Interface EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Export

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Hierarchy

                                                                                                                                                          -
                                                                                                                                                            -
                                                                                                                                                          • EnvironmentStats
                                                                                                                                                          -
                                                                                                                                                          - +
                                                                                                                                                          +
                                                                                                                                                          Index
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Properties

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          created_at: string
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          avp_policy_store_id?: string
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          created_at: string

                                                                                                                                                          Date and time when the environment was created (ISO_8601 format).

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          custom_branch_name?: string
                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:40
                                                                                                                                                        • +
                                                                                                                                                          + +
                                                                                                                                                          custom_branch_name?: string

                                                                                                                                                          when using gitops feature, an optional branch name for the environment

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:57
                                                                                                                                                        • +
                                                                                                                                                          +
                                                                                                                                                          description?: string

                                                                                                                                                          an optional longer description of the environment

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:53
                                                                                                                                                        • +
                                                                                                                                                          +
                                                                                                                                                          id: string

                                                                                                                                                          Unique id of the environment

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          jwks?: JwksObj
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:28
                                                                                                                                                        • +
                                                                                                                                                          + +
                                                                                                                                                          jwks?: JwksConfig
                                                                                                                                                          +

                                                                                                                                                          jwks for element frontend only login

                                                                                                                                                          -
                                                                                                                                                          - +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:61
                                                                                                                                                        • +
                                                                                                                                                          +
                                                                                                                                                          key: string

                                                                                                                                                          A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment.

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:24
                                                                                                                                                        • +
                                                                                                                                                          +
                                                                                                                                                          name: string

                                                                                                                                                          The name of the environment

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          organization_id: string
                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:49
                                                                                                                                                        • +
                                                                                                                                                          + +
                                                                                                                                                          organization_id: string

                                                                                                                                                          Unique id of the organization that the environment belongs to.

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          pdp_configs: PDPConfigRead[]
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          pdp_configs: PDPConfigRead[]
                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          project_id: string
                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:66
                                                                                                                                                        • +
                                                                                                                                                          + +
                                                                                                                                                          project_id: string

                                                                                                                                                          Unique id of the project that the environment belongs to.

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          stats: Statistics
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:36
                                                                                                                                                        • +
                                                                                                                                                          + +
                                                                                                                                                          settings?: object
                                                                                                                                                          +

                                                                                                                                                          the settings for this environment

                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          updated_at: string
                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:65
                                                                                                                                                        • +
                                                                                                                                                          + +
                                                                                                                                                          stats: EnvironmentStatistics
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          updated_at: string

                                                                                                                                                          Date and time when the environment was last updated/modified (ISO_8601 format).

                                                                                                                                                          -
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Memberof

                                                                                                                                                          EnvironmentStats

                                                                                                                                                          +
                                                                                                                                                        • Defined in src/openapi/types/environment-stats.ts:44
                                                                                                                                                        • +
                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          On This Page

                                                                                                                                                          +
                                                                                                                                                          Properties +
                                                                                                                                                          -
                                                                                                                                                          -

                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                          -
                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                          diff --git a/docs/interfaces/EnvironmentUpdate.html b/docs/interfaces/EnvironmentUpdate.html index 09585f70..8c96d178 100644 --- a/docs/interfaces/EnvironmentUpdate.html +++ b/docs/interfaces/EnvironmentUpdate.html @@ -1,231 +1,88 @@ -EnvironmentUpdate | permitio
                                                                                                                                                          -
                                                                                                                                                          - -
                                                                                                                                                          +EnvironmentUpdate | permitio
                                                                                                                                                          +
                                                                                                                                                          permitio + +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            Preparing search index...
                                                                                                                                                            - +

                                                                                                                                                            Interface EnvironmentUpdate

                                                                                                                                                            -
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Export

                                                                                                                                                            EnvironmentUpdate

                                                                                                                                                            -
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Hierarchy

                                                                                                                                                            -
                                                                                                                                                              -
                                                                                                                                                            • EnvironmentUpdate
                                                                                                                                                            -
                                                                                                                                                            - +
                                                                                                                                                            +
                                                                                                                                                            Index
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Properties

                                                                                                                                                            -
                                                                                                                                                            - -
                                                                                                                                                            custom_branch_name?: string
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            custom_branch_name?: string

                                                                                                                                                            when using gitops feature, an optional branch name for the environment

                                                                                                                                                            -
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Memberof

                                                                                                                                                            EnvironmentUpdate

                                                                                                                                                            -
                                                                                                                                                            - +
                                                                                                                                                          • Defined in src/openapi/types/environment-update.ts:28
                                                                                                                                                          • +
                                                                                                                                                            +
                                                                                                                                                            description?: string

                                                                                                                                                            an optional longer description of the environment

                                                                                                                                                            -
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Memberof

                                                                                                                                                            EnvironmentUpdate

                                                                                                                                                            -
                                                                                                                                                            - -
                                                                                                                                                            jwks?: JwksObj
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Memberof

                                                                                                                                                            EnvironmentUpdate

                                                                                                                                                            +
                                                                                                                                                          • Defined in src/openapi/types/environment-update.ts:24
                                                                                                                                                          • +
                                                                                                                                                            + +
                                                                                                                                                            jwks?: JwksConfig
                                                                                                                                                            +

                                                                                                                                                            jwks for element frontend only login

                                                                                                                                                            -
                                                                                                                                                            - +
                                                                                                                                                          • Defined in src/openapi/types/environment-update.ts:32
                                                                                                                                                          • +
                                                                                                                                                            +
                                                                                                                                                            name?: string

                                                                                                                                                            The name of the environment

                                                                                                                                                            -
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Memberof

                                                                                                                                                            EnvironmentUpdate

                                                                                                                                                            +
                                                                                                                                                          • Defined in src/openapi/types/environment-update.ts:20
                                                                                                                                                          • +
                                                                                                                                                            + +
                                                                                                                                                            settings?: object
                                                                                                                                                            +

                                                                                                                                                            the settings for this environment

                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            On This Page

                                                                                                                                                            +
                                                                                                                                                            Properties +
                                                                                                                                                            -
                                                                                                                                                            -

                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                            -
                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                            diff --git a/docs/interfaces/ErrorDetails.html b/docs/interfaces/ErrorDetails.html new file mode 100644 index 00000000..88d0e4af --- /dev/null +++ b/docs/interfaces/ErrorDetails.html @@ -0,0 +1,84 @@ +ErrorDetails | permitio
                                                                                                                                                            +
                                                                                                                                                            permitio + +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              Preparing search index...
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + +

                                                                                                                                                              Interface ErrorDetails

                                                                                                                                                              +
                                                                                                                                                              interface ErrorDetails {
                                                                                                                                                                  additional_info?: any;
                                                                                                                                                                  error_code: ErrorCode;
                                                                                                                                                                  id: string;
                                                                                                                                                                  message?: string;
                                                                                                                                                                  support_link?: string;
                                                                                                                                                                  title: string;
                                                                                                                                                              }
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              Index
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              additional_info?: any
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              error_code: ErrorCode
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              id: string
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              message?: string
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              support_link?: string
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              title: string
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              diff --git a/docs/interfaces/FormattedAxiosError.html b/docs/interfaces/FormattedAxiosError.html new file mode 100644 index 00000000..ecf5b1e1 --- /dev/null +++ b/docs/interfaces/FormattedAxiosError.html @@ -0,0 +1,72 @@ +FormattedAxiosError | permitio
                                                                                                                                                              +
                                                                                                                                                              permitio + +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                Preparing search index...
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + +

                                                                                                                                                                Interface FormattedAxiosError

                                                                                                                                                                +
                                                                                                                                                                interface FormattedAxiosError {
                                                                                                                                                                    code?: string;
                                                                                                                                                                    error?: unknown;
                                                                                                                                                                    message: string;
                                                                                                                                                                    status?: number;
                                                                                                                                                                }
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                Index
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                code?: string
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                error?: unknown
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                message: string
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                status?: number
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                diff --git a/docs/interfaces/GenericEngineDecisionLog.html b/docs/interfaces/GenericEngineDecisionLog.html new file mode 100644 index 00000000..875b205f --- /dev/null +++ b/docs/interfaces/GenericEngineDecisionLog.html @@ -0,0 +1,141 @@ +GenericEngineDecisionLog | permitio
                                                                                                                                                                +
                                                                                                                                                                permitio + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  Preparing search index...
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +

                                                                                                                                                                  Interface GenericEngineDecisionLog

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Generic decision log format for external or custom integrations. Accepts a flat JSON payload with explicit fields rather than requiring engine-specific nested structures. Unknown fields are rejected to prevent unbounded storage growth.

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  interface GenericEngineDecisionLog {
                                                                                                                                                                      action?: string | null;
                                                                                                                                                                      context?: any;
                                                                                                                                                                      decision: boolean;
                                                                                                                                                                      decision_id?: string | null;
                                                                                                                                                                      engine?: "GENERIC" | null;
                                                                                                                                                                      input?: any;
                                                                                                                                                                      process_time_ms?: number | null;
                                                                                                                                                                      query?: string | null;
                                                                                                                                                                      resource_type?: string | null;
                                                                                                                                                                      result?: any;
                                                                                                                                                                      tenant?: string | null;
                                                                                                                                                                      timestamp: string;
                                                                                                                                                                      user_email?: string | null;
                                                                                                                                                                      user_key?: string | null;
                                                                                                                                                                      user_name?: string | null;
                                                                                                                                                                  }
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  Index
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  action?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  context?: any
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  decision: boolean
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  decision_id?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  engine?: "GENERIC" | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  input?: any
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  process_time_ms?: number | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  query?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  resource_type?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  result?: any
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  tenant?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  timestamp: string
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  user_email?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  user_key?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  user_name?: string | null
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/docs/interfaces/GetUserPermissionsConfig.html b/docs/interfaces/GetUserPermissionsConfig.html new file mode 100644 index 00000000..614d1503 --- /dev/null +++ b/docs/interfaces/GetUserPermissionsConfig.html @@ -0,0 +1,89 @@ +GetUserPermissionsConfig | permitio
                                                                                                                                                                  +
                                                                                                                                                                  permitio + +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    Preparing search index...
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +

                                                                                                                                                                    Interface GetUserPermissionsConfig

                                                                                                                                                                    +
                                                                                                                                                                    +

                                                                                                                                                                    Options for a permission query, including its request-specific context.

                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    interface GetUserPermissionsConfig {
                                                                                                                                                                        context?: Context;
                                                                                                                                                                        throwOnError?: boolean;
                                                                                                                                                                        timeout?: number;
                                                                                                                                                                        useOpa?: boolean;
                                                                                                                                                                    }
                                                                                                                                                                    +
                                                                                                                                                                    +

                                                                                                                                                                    Hierarchy (View Summary)

                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    Index
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    context?: Context
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    throwOnError?: boolean
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    timeout?: number
                                                                                                                                                                    +

                                                                                                                                                                    Request timeout in milliseconds; zero disables the timeout for this call.

                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    useOpa?: boolean
                                                                                                                                                                    +

                                                                                                                                                                    Use OPA for check(); discovery/filtering/URL checks reject true regardless of error policy. +Existing bulk/permission queries retain their configured throw/deny policy.

                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    diff --git a/docs/interfaces/GroupAddRole.html b/docs/interfaces/GroupAddRole.html new file mode 100644 index 00000000..2ee00126 --- /dev/null +++ b/docs/interfaces/GroupAddRole.html @@ -0,0 +1,88 @@ +GroupAddRole | permitio
                                                                                                                                                                    +
                                                                                                                                                                    permitio + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      Preparing search index...
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +

                                                                                                                                                                      Interface GroupAddRole

                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      Permit.io API +Authorization as a service

                                                                                                                                                                      +

                                                                                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                                                                                      +

                                                                                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      interface GroupAddRole {
                                                                                                                                                                          resource: string;
                                                                                                                                                                          resource_instance: string;
                                                                                                                                                                          role: string;
                                                                                                                                                                          tenant: string;
                                                                                                                                                                      }
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      Index
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      resource: string
                                                                                                                                                                      +

                                                                                                                                                                      The resource key or id that the role belongs to.

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      resource_instance: string
                                                                                                                                                                      +

                                                                                                                                                                      The resource instance key or id that the role belongs to.

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      role: string
                                                                                                                                                                      +

                                                                                                                                                                      The role key or id that will be assigned to the group.

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      tenant: string
                                                                                                                                                                      +

                                                                                                                                                                      The tenant key or id that the role belongs to.

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/docs/interfaces/GroupAssignUser.html b/docs/interfaces/GroupAssignUser.html new file mode 100644 index 00000000..210f59bc --- /dev/null +++ b/docs/interfaces/GroupAssignUser.html @@ -0,0 +1,64 @@ +GroupAssignUser | permitio
                                                                                                                                                                      +
                                                                                                                                                                      permitio + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        Preparing search index...
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Interface GroupAssignUser

                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Permit.io API +Authorization as a service

                                                                                                                                                                        +

                                                                                                                                                                        The version of the OpenAPI document: 2.0.0

                                                                                                                                                                        +

                                                                                                                                                                        NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        interface GroupAssignUser {
                                                                                                                                                                            tenant: string;
                                                                                                                                                                        }
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        Index
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        tenant: string
                                                                                                                                                                        +

                                                                                                                                                                        The tenant key or id that the user belongs to.

                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        diff --git a/docs/interfaces/GroupCreate.html b/docs/interfaces/GroupCreate.html new file mode 100644 index 00000000..2b3f15a9 --- /dev/null +++ b/docs/interfaces/GroupCreate.html @@ -0,0 +1,81 @@ +GroupCreate | permitio
                                                                                                                                                                        +
                                                                                                                                                                        permitio + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          Preparing search index...
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Interface GroupCreate

                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          Permit.io API +Authorization as a service

                                                                                                                                                                          +

                                                                                                                                                                          The version of the OpenAPI document: 2.0.0

                                                                                                                                                                          +

                                                                                                                                                                          NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          interface GroupCreate {
                                                                                                                                                                              group_instance_key: string;
                                                                                                                                                                              group_resource_type_key?: string;
                                                                                                                                                                              group_tenant: string;
                                                                                                                                                                          }
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          Index
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          group_instance_key: string
                                                                                                                                                                          +

                                                                                                                                                                          Either the unique id of the resource instance that the group belongs to, or the +URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file)

                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          group_resource_type_key?: string
                                                                                                                                                                          +

                                                                                                                                                                          The key of the resource type that the group belongs to.

                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          group_tenant: string
                                                                                                                                                                          +

                                                                                                                                                                          The tenant key or id that the group belongs to.

                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          diff --git a/docs/interfaces/GroupRead.html b/docs/interfaces/GroupRead.html new file mode 100644 index 00000000..7315f1d0 --- /dev/null +++ b/docs/interfaces/GroupRead.html @@ -0,0 +1,96 @@ +GroupRead | permitio
                                                                                                                                                                          +
                                                                                                                                                                          permitio + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            Preparing search index...
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            Interface GroupRead

                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            Permit.io API +Authorization as a service

                                                                                                                                                                            +

                                                                                                                                                                            The version of the OpenAPI document: 2.0.0

                                                                                                                                                                            +

                                                                                                                                                                            NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            interface GroupRead {
                                                                                                                                                                                assigned_roles?: string[];
                                                                                                                                                                                group_instance_key: string;
                                                                                                                                                                                group_resource_type_key?: string;
                                                                                                                                                                                group_tenant: string;
                                                                                                                                                                                users?: string[];
                                                                                                                                                                            }
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            Index
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            assigned_roles?: string[]
                                                                                                                                                                            +

                                                                                                                                                                            List of roles that are assigned to this group

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            group_instance_key: string
                                                                                                                                                                            +

                                                                                                                                                                            Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file)

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            group_resource_type_key?: string
                                                                                                                                                                            +

                                                                                                                                                                            The key of the resource type that the group belongs to.

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            group_tenant: string
                                                                                                                                                                            +

                                                                                                                                                                            The tenant key or id that the group belongs to.

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            users?: string[]
                                                                                                                                                                            +

                                                                                                                                                                            List of user ids that are assigned to this group

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            diff --git a/docs/interfaces/GroupReadSchema.html b/docs/interfaces/GroupReadSchema.html new file mode 100644 index 00000000..d9101b09 --- /dev/null +++ b/docs/interfaces/GroupReadSchema.html @@ -0,0 +1,87 @@ +GroupReadSchema | permitio
                                                                                                                                                                            +
                                                                                                                                                                            permitio + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              Preparing search index...
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Interface GroupReadSchema

                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Permit.io API +Authorization as a service

                                                                                                                                                                              +

                                                                                                                                                                              The version of the OpenAPI document: 2.0.0

                                                                                                                                                                              +

                                                                                                                                                                              NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              interface GroupReadSchema {
                                                                                                                                                                                  group_instance_key: string;
                                                                                                                                                                                  group_resource_type_key?: string;
                                                                                                                                                                                  group_tenant: string;
                                                                                                                                                                                  id: string;
                                                                                                                                                                              }
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              Index
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              group_instance_key: string
                                                                                                                                                                              +

                                                                                                                                                                              Either the unique id of the resource instance that the group belongs to, or the +URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file)

                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              group_resource_type_key?: string
                                                                                                                                                                              +

                                                                                                                                                                              The key of the resource type that the group belongs to.

                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              group_tenant: string
                                                                                                                                                                              +

                                                                                                                                                                              The tenant key or id that the group belongs to.

                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              id: string
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              diff --git a/docs/interfaces/IApiKeysApi.html b/docs/interfaces/IApiKeysApi.html new file mode 100644 index 00000000..48660929 --- /dev/null +++ b/docs/interfaces/IApiKeysApi.html @@ -0,0 +1,188 @@ +IApiKeysApi | permitio
                                                                                                                                                                              +
                                                                                                                                                                              permitio + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Interface IApiKeysApi

                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                API-key management through the control plane; server authorization governs access.

                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                interface IApiKeysApi {
                                                                                                                                                                                    create(apiKey: APIKeyCreate): Promise<APIKeyRead>;
                                                                                                                                                                                    delete(apiKeyId: string): Promise<void>;
                                                                                                                                                                                    get(apiKeyId: string): Promise<APIKeyRead>;
                                                                                                                                                                                    getScope(): Promise<APIKeyScopeRead>;
                                                                                                                                                                                    list(params?: IListApiKeys): Promise<PaginatedResultAPIKeyRead>;
                                                                                                                                                                                    rotate(apiKeyId: string): Promise<APIKeyRead>;
                                                                                                                                                                                }
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                Implemented by

                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                Index
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                  +
                                                                                                                                                                                • + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Creates an API key with the supplied scope without injecting the client's context.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • apiKey: APIKeyCreate +

                                                                                                                                                                                    Published creation body, including organization_id and optional scope.

                                                                                                                                                                                    +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns Promise<APIKeyRead>

                                                                                                                                                                                  The complete received record; retain its secret securely when present.

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  PermitApiError If the API rejects the body or denies creation.

                                                                                                                                                                                  +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                  +
                                                                                                                                                                                • + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Deletes an API-key record and its related data.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • apiKeyId: string +

                                                                                                                                                                                    API-key ID, not its name or secret.

                                                                                                                                                                                    +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns Promise<void>

                                                                                                                                                                                  A promise resolving to undefined after successful deletion.

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  PermitApiError If the record is absent or deletion is denied.

                                                                                                                                                                                  +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                  +
                                                                                                                                                                                • + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Gets an API-key record by its ID.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • apiKeyId: string +

                                                                                                                                                                                    API-key ID, not its name or secret.

                                                                                                                                                                                    +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns Promise<APIKeyRead>

                                                                                                                                                                                  The complete record; the server may omit its secret or return null.

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  PermitApiError If the record is absent or access is denied.

                                                                                                                                                                                  +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                  +
                                                                                                                                                                                • + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Discovers the configured credential's scope without initializing API context.

                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns Promise<APIKeyScopeRead>

                                                                                                                                                                                  The received organization ID and optional, nullable project/environment IDs.

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  PermitApiError If the credential is invalid or discovery fails.

                                                                                                                                                                                  +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                  +
                                                                                                                                                                                • + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Lists API-key records with their complete pagination envelope.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • Optionalparams: IListApiKeys +

                                                                                                                                                                                    Optional scope filters; page defaults to 1 and perPage to 100.

                                                                                                                                                                                    +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns Promise<PaginatedResultAPIKeyRead>

                                                                                                                                                                                  The received page, including counts and any returned optional secrets.

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  PermitApiError If the API denies access or rejects the request.

                                                                                                                                                                                  +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                  +
                                                                                                                                                                                • + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Rotates a key's secret with a bodyless POST; the SDK does not replay this request.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • apiKeyId: string +

                                                                                                                                                                                    API-key UUID to rotate; use a disposable key for lifecycle tests.

                                                                                                                                                                                    +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns Promise<APIKeyRead>

                                                                                                                                                                                  The complete response; no stable record ID or always-present secret is promised. +Rotation does not replace this client's configured credential.

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  PermitApiError If the record is absent or rotation fails.

                                                                                                                                                                                  +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                diff --git a/docs/interfaces/IAuditLogsApi.html b/docs/interfaces/IAuditLogsApi.html new file mode 100644 index 00000000..07fb84a5 --- /dev/null +++ b/docs/interfaces/IAuditLogsApi.html @@ -0,0 +1,107 @@ +IAuditLogsApi | permitio
                                                                                                                                                                                +
                                                                                                                                                                                permitio + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Interface IAuditLogsApi

                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Reads authorization audit logs through the selected environment's control-plane API.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  interface IAuditLogsApi {
                                                                                                                                                                                      get(logId: string): Promise<DetailedAuditLogModel>;
                                                                                                                                                                                      list(params?: IListAuditLogs): Promise<LimitedPaginatedResultAuditLogModel>;
                                                                                                                                                                                  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Implemented by

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  Index
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                    +
                                                                                                                                                                                  • + +
                                                                                                                                                                                    +

                                                                                                                                                                                    Gets the complete audit log and its raw engine data.

                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Parameters

                                                                                                                                                                                    +
                                                                                                                                                                                      +
                                                                                                                                                                                    • logId: string +

                                                                                                                                                                                      The audit-log UUID; the service determines record availability and retention.

                                                                                                                                                                                      +
                                                                                                                                                                                    +

                                                                                                                                                                                    Returns Promise<DetailedAuditLogModel>

                                                                                                                                                                                    The complete detailed log, retaining all published raw-data union branches.

                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    PermitApiError If the log is unavailable or the API rejects the request.

                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    PermitContextError If the environment or API-key scope is insufficient.

                                                                                                                                                                                    +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  diff --git a/docs/interfaces/IAuthorizedUserAssignment.html b/docs/interfaces/IAuthorizedUserAssignment.html new file mode 100644 index 00000000..979ea5ed --- /dev/null +++ b/docs/interfaces/IAuthorizedUserAssignment.html @@ -0,0 +1,80 @@ +IAuthorizedUserAssignment | permitio
                                                                                                                                                                                  +
                                                                                                                                                                                  permitio + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Interface IAuthorizedUserAssignment

                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    A role assignment explaining a user's access to a resource.

                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    interface IAuthorizedUserAssignment {
                                                                                                                                                                                        resource: string;
                                                                                                                                                                                        role: string;
                                                                                                                                                                                        tenant: string;
                                                                                                                                                                                        user: string;
                                                                                                                                                                                        [id: string]: unknown;
                                                                                                                                                                                    }
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Indexable

                                                                                                                                                                                    +
                                                                                                                                                                                      +
                                                                                                                                                                                    • +
                                                                                                                                                                                      [id: string]: unknown
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    Index
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    resource: string
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    role: string
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    tenant: string
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    user: string
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    diff --git a/docs/interfaces/IAuthorizedUsersResult.html b/docs/interfaces/IAuthorizedUsersResult.html new file mode 100644 index 00000000..8e829416 --- /dev/null +++ b/docs/interfaces/IAuthorizedUsersResult.html @@ -0,0 +1,74 @@ +IAuthorizedUsersResult | permitio
                                                                                                                                                                                    +
                                                                                                                                                                                    permitio + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Interface IAuthorizedUsersResult

                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      The complete authorized-user result, including arbitrary user-key dictionary entries.

                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      interface IAuthorizedUsersResult {
                                                                                                                                                                                          resource: string;
                                                                                                                                                                                          tenant: string;
                                                                                                                                                                                          users: Record<string, IAuthorizedUserAssignment[]>;
                                                                                                                                                                                          [id: string]: unknown;
                                                                                                                                                                                      }
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Indexable

                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                      • +
                                                                                                                                                                                        [id: string]: unknown
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      Index
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      resource: string
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      tenant: string
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      users: Record<string, IAuthorizedUserAssignment[]>
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      diff --git a/docs/interfaces/IBaseGetUserRoles.html b/docs/interfaces/IBaseGetUserRoles.html new file mode 100644 index 00000000..ef6db716 --- /dev/null +++ b/docs/interfaces/IBaseGetUserRoles.html @@ -0,0 +1,120 @@ +IBaseGetUserRoles | permitio
                                                                                                                                                                                      +
                                                                                                                                                                                      permitio + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Interface IBaseGetUserRoles

                                                                                                                                                                                        +
                                                                                                                                                                                        interface IBaseGetUserRoles {
                                                                                                                                                                                            detailed?: boolean;
                                                                                                                                                                                            includeTotalCount?: boolean;
                                                                                                                                                                                            page?: number;
                                                                                                                                                                                            perPage?: number;
                                                                                                                                                                                            tenant?: string;
                                                                                                                                                                                            user: string;
                                                                                                                                                                                        }
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        Index
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        detailed?: boolean
                                                                                                                                                                                        +

                                                                                                                                                                                        Whether to return full details about the user, tenant and role

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        false
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        includeTotalCount?: boolean
                                                                                                                                                                                        +

                                                                                                                                                                                        If true, returns the list of role assignments and the total count.

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        false
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        page?: number
                                                                                                                                                                                        +

                                                                                                                                                                                        Page number of the results to fetch, starting at 1.

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        1
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        perPage?: number
                                                                                                                                                                                        +

                                                                                                                                                                                        The number of results per page (max 100).

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        100
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        tenant?: string
                                                                                                                                                                                        +

                                                                                                                                                                                        optional tenant filter, will only return role assignments granted in that tenant (id or key).

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        user: string
                                                                                                                                                                                        +

                                                                                                                                                                                        id or key of the user

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        diff --git a/docs/interfaces/IBaseListRoleAssignments.html b/docs/interfaces/IBaseListRoleAssignments.html new file mode 100644 index 00000000..22fdf285 --- /dev/null +++ b/docs/interfaces/IBaseListRoleAssignments.html @@ -0,0 +1,124 @@ +IBaseListRoleAssignments | permitio
                                                                                                                                                                                        +
                                                                                                                                                                                        permitio + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Interface IBaseListRoleAssignments

                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Represents the parameters for listing role assignments.

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          interface IBaseListRoleAssignments {
                                                                                                                                                                                              detailed?: boolean;
                                                                                                                                                                                              includeTotalCount?: boolean;
                                                                                                                                                                                              page?: number;
                                                                                                                                                                                              perPage?: number;
                                                                                                                                                                                              resourceInstance?: string;
                                                                                                                                                                                              role?: string;
                                                                                                                                                                                              tenant?: string;
                                                                                                                                                                                              user?: string;
                                                                                                                                                                                          }
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                          • IBasePaginationExtended +
                                                                                                                                                                                              +
                                                                                                                                                                                            • IBaseListRoleAssignments
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          Index
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          detailed?: boolean
                                                                                                                                                                                          +

                                                                                                                                                                                          optional detailed flag, will return detailed role assignments.

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          includeTotalCount?: boolean
                                                                                                                                                                                          +

                                                                                                                                                                                          the total number of items

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          page?: number
                                                                                                                                                                                          +

                                                                                                                                                                                          the page number to fetch (default: 1)

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          perPage?: number
                                                                                                                                                                                          +

                                                                                                                                                                                          how many items to fetch per page (default: 100)

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          resourceInstance?: string
                                                                                                                                                                                          +

                                                                                                                                                                                          optional resource instance filter, will only return (resource) role assignments granted on that resource instance.

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          role?: string
                                                                                                                                                                                          +

                                                                                                                                                                                          optional role filter, will only return role assignments granting this role.

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          tenant?: string
                                                                                                                                                                                          +

                                                                                                                                                                                          optional tenant filter, will only return role assignments granted in that tenant.

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          user?: string
                                                                                                                                                                                          +

                                                                                                                                                                                          optional user filter, will only return role assignments granted to this user.

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          diff --git a/docs/interfaces/ICheckQuery.html b/docs/interfaces/ICheckQuery.html new file mode 100644 index 00000000..816c1606 --- /dev/null +++ b/docs/interfaces/ICheckQuery.html @@ -0,0 +1,72 @@ +ICheckQuery | permitio
                                                                                                                                                                                          +
                                                                                                                                                                                          permitio + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +

                                                                                                                                                                                            Interface ICheckQuery

                                                                                                                                                                                            +
                                                                                                                                                                                            interface ICheckQuery {
                                                                                                                                                                                                action: string;
                                                                                                                                                                                                context?: Context;
                                                                                                                                                                                                resource: string | IResource;
                                                                                                                                                                                                user: string | IUser;
                                                                                                                                                                                            }
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            Index
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            action: string
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            context?: Context
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            resource: string | IResource
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            user: string | IUser
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            diff --git a/docs/interfaces/IConditionSetRulesApi.html b/docs/interfaces/IConditionSetRulesApi.html index 61e6b18a..2191d3a1 100644 --- a/docs/interfaces/IConditionSetRulesApi.html +++ b/docs/interfaces/IConditionSetRulesApi.html @@ -1,269 +1,136 @@ -IConditionSetRulesApi | permitio
                                                                                                                                                                                            -
                                                                                                                                                                                            - -
                                                                                                                                                                                            +IConditionSetRulesApi | permitio
                                                                                                                                                                                            +
                                                                                                                                                                                            permitio + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                              - +

                                                                                                                                                                                              Interface IConditionSetRulesApi

                                                                                                                                                                                              The ConditionSetsApi class provides methods for interacting with condition sets using the Permit REST API.

                                                                                                                                                                                              -
                                                                                                                                                                                              -
                                                                                                                                                                                              -
                                                                                                                                                                                              -

                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                              -
                                                                                                                                                                                                -
                                                                                                                                                                                              • IConditionSetRulesApi
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              interface IConditionSetRulesApi {
                                                                                                                                                                                                  create(rule: ConditionSetRuleCreate): Promise<ConditionSetRuleRead>;
                                                                                                                                                                                                  delete(rule: ConditionSetRuleRemove): Promise<void>;
                                                                                                                                                                                                  list(params?: IListConditionSetRules): Promise<ConditionSetRuleRead[]>;
                                                                                                                                                                                              }

                                                                                                                                                                                              Implemented by

                                                                                                                                                                                              +
                                                                                                                                                                                            • Defined in src/api/condition-set-rules.ts:44
                                                                                                                                                                                            • -
                                                                                                                                                                                              - +
                                                                                                                                                                                              +
                                                                                                                                                                                              Index
                                                                                                                                                                                              -

                                                                                                                                                                                              Methods

                                                                                                                                                                                              -
                                                                                                                                                                                              -
                                                                                                                                                                                              -

                                                                                                                                                                                              Methods

                                                                                                                                                                                              -
                                                                                                                                                                                              - +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              Returns Promise<ConditionSetRuleRead>

                                                                                                                                                                                              A promise that resolves to the created condition set rule.

                                                                                                                                                                                              -

                                                                                                                                                                                              Throws

                                                                                                                                                                                              PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                              - -

                                                                                                                                                                                              Throws

                                                                                                                                                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                              -
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Returns Promise<void>

                                                                                                                                                                                              A promise that resolves when the condition set rule is deleted.

                                                                                                                                                                                              -

                                                                                                                                                                                              Throws

                                                                                                                                                                                              PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                              - -

                                                                                                                                                                                              Throws

                                                                                                                                                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                              -
                                                                                                                                                                                              -
                                                                                                                                                                                              - +
                                                                                                                                                                                            • Defined in src/api/condition-set-rules.ts:73
                                                                                                                                                                                            • +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Returns Promise<ConditionSetRuleRead[]>

                                                                                                                                                                                              A promise that resolves to an array of condition set rules.

                                                                                                                                                                                              -

                                                                                                                                                                                              See

                                                                                                                                                                                              IListConditionSetRules

                                                                                                                                                                                              - -

                                                                                                                                                                                              Throws

                                                                                                                                                                                              PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                              - -

                                                                                                                                                                                              Throws

                                                                                                                                                                                              PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                              -
                                                                                                                                                                                              +
                                                                                                                                                                                            • Defined in src/api/condition-set-rules.ts:53
                                                                                                                                                                                            • +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              On This Page

                                                                                                                                                                                              +
                                                                                                                                                                                              Methods +
                                                                                                                                                                                              -
                                                                                                                                                                                              -

                                                                                                                                                                                              Generated using TypeDoc

                                                                                                                                                                                              -
                                                                                                                                                                                              \ No newline at end of file + +
                                                                                                                                                                                              diff --git a/docs/interfaces/IConditionSetsApi.html b/docs/interfaces/IConditionSetsApi.html index 608f4654..28002c55 100644 --- a/docs/interfaces/IConditionSetsApi.html +++ b/docs/interfaces/IConditionSetsApi.html @@ -1,376 +1,242 @@ -IConditionSetsApi | permitio
                                                                                                                                                                                              -
                                                                                                                                                                                              - -
                                                                                                                                                                                              +IConditionSetsApi | permitio
                                                                                                                                                                                              +
                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                - +

                                                                                                                                                                                                Interface IConditionSetsApi

                                                                                                                                                                                                -
                                                                                                                                                                                                -

                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                -
                                                                                                                                                                                                  -
                                                                                                                                                                                                • IConditionSetsApi
                                                                                                                                                                                                +
                                                                                                                                                                                                interface IConditionSetsApi {
                                                                                                                                                                                                    create(conditionSetData: ConditionSetCreate): Promise<ConditionSetRead>;
                                                                                                                                                                                                    delete(conditionSetKey: string): Promise<void>;
                                                                                                                                                                                                    get(conditionSetKey: string): Promise<ConditionSetRead>;
                                                                                                                                                                                                    getById(conditionSetId: string): Promise<ConditionSetRead>;
                                                                                                                                                                                                    getByKey(conditionSetKey: string): Promise<ConditionSetRead>;
                                                                                                                                                                                                    list(params?: IListConditionSets): Promise<ConditionSetRead[]>;
                                                                                                                                                                                                    update(
                                                                                                                                                                                                        conditionSetKey: string,
                                                                                                                                                                                                        conditionSetData: ConditionSetUpdate,
                                                                                                                                                                                                    ): Promise<ConditionSetRead>;
                                                                                                                                                                                                }

                                                                                                                                                                                                Implemented by

                                                                                                                                                                                                +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:32
                                                                                                                                                                                              • -
                                                                                                                                                                                                - +
                                                                                                                                                                                                +
                                                                                                                                                                                                Index
                                                                                                                                                                                                -
                                                                                                                                                                                                -

                                                                                                                                                                                                Methods

                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                Returns Promise<ConditionSetRead>

                                                                                                                                                                                                A promise that resolves to the created condition set.

                                                                                                                                                                                                -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:83
                                                                                                                                                                                              • +
                                                                                                                                                                                                +
                                                                                                                                                                                                  - -
                                                                                                                                                                                                • +
                                                                                                                                                                                                • + +

                                                                                                                                                                                                  Deletes a condition set.

                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    conditionSetKey: string
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • conditionSetKey: string

                                                                                                                                                                                                    The key of the condition set to delete.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Returns Promise<void>

                                                                                                                                                                                                  A promise that resolves when the condition set is deleted.

                                                                                                                                                                                                  +
                                                                                                                                                                                                +

                                                                                                                                                                                                Returns Promise<void>

                                                                                                                                                                                                A promise that resolves when the condition set is deleted.

                                                                                                                                                                                                -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:104
                                                                                                                                                                                              • +
                                                                                                                                                                                                +
                                                                                                                                                                                                  - -
                                                                                                                                                                                                • +
                                                                                                                                                                                                • + +

                                                                                                                                                                                                  Retrieves a condition set by its key.

                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    conditionSetKey: string
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • conditionSetKey: string

                                                                                                                                                                                                    The key of the condition set.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Returns Promise<ConditionSetRead>

                                                                                                                                                                                                  A promise that resolves to the condition set.

                                                                                                                                                                                                  +
                                                                                                                                                                                                +

                                                                                                                                                                                                Returns Promise<ConditionSetRead>

                                                                                                                                                                                                A promise that resolves to the condition set.

                                                                                                                                                                                                -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:51
                                                                                                                                                                                              • +
                                                                                                                                                                                                +
                                                                                                                                                                                                  - -
                                                                                                                                                                                                • +
                                                                                                                                                                                                • + +

                                                                                                                                                                                                  Retrieves a condition set by its ID. -Alias for the get method.

                                                                                                                                                                                                  +Alias for the get method.

                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    conditionSetId: string
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • conditionSetId: string

                                                                                                                                                                                                    The ID of the condition set.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Returns Promise<ConditionSetRead>

                                                                                                                                                                                                  A promise that resolves to the condition set.

                                                                                                                                                                                                  +
                                                                                                                                                                                                +

                                                                                                                                                                                                Returns Promise<ConditionSetRead>

                                                                                                                                                                                                A promise that resolves to the condition set.

                                                                                                                                                                                                -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:73
                                                                                                                                                                                              • +
                                                                                                                                                                                                +
                                                                                                                                                                                                  - -
                                                                                                                                                                                                • +
                                                                                                                                                                                                • + +

                                                                                                                                                                                                  Retrieves a condition set by its key. -Alias for the get method.

                                                                                                                                                                                                  +Alias for the get method.

                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    conditionSetKey: string
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • conditionSetKey: string

                                                                                                                                                                                                    The key of the condition set.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Returns Promise<ConditionSetRead>

                                                                                                                                                                                                  A promise that resolves to the condition set.

                                                                                                                                                                                                  +
                                                                                                                                                                                                +

                                                                                                                                                                                                Returns Promise<ConditionSetRead>

                                                                                                                                                                                                A promise that resolves to the condition set.

                                                                                                                                                                                                -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:62
                                                                                                                                                                                              • +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Returns Promise<ConditionSetRead[]>

                                                                                                                                                                                                A promise that resolves to an array of condition sets.

                                                                                                                                                                                                -

                                                                                                                                                                                                See

                                                                                                                                                                                                IPagination

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                -
                                                                                                                                                                                                - +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:41
                                                                                                                                                                                              • +
                                                                                                                                                                                                +
                                                                                                                                                                                                  - -
                                                                                                                                                                                                • +
                                                                                                                                                                                                • + +

                                                                                                                                                                                                  Updates a condition set.

                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    conditionSetKey: string
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • conditionSetKey: string

                                                                                                                                                                                                    The key of the condition set.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    conditionSetData: ConditionSetUpdate
                                                                                                                                                                                                    +
                                                                                                                                                                                                • +
                                                                                                                                                                                                • conditionSetData: ConditionSetUpdate

                                                                                                                                                                                                  The updated data for the condition set.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                -

                                                                                                                                                                                                Returns Promise<ConditionSetRead>

                                                                                                                                                                                                A promise that resolves to the updated condition set.

                                                                                                                                                                                                + +

                                                                                                                                                                                                Returns Promise<ConditionSetRead>

                                                                                                                                                                                                A promise that resolves to the updated condition set.

                                                                                                                                                                                                -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                - -

                                                                                                                                                                                                Throws

                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                -
                                                                                                                                                                                                +
                                                                                                                                                                                              • Defined in src/api/condition-sets.ts:94
                                                                                                                                                                                              • +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                On This Page

                                                                                                                                                                                                +
                                                                                                                                                                                                Methods +
                                                                                                                                                                                                -
                                                                                                                                                                                                -

                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                -
                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                diff --git a/docs/interfaces/ICreateOrUpdateUserResult.html b/docs/interfaces/ICreateOrUpdateUserResult.html index 8fe429da..6339d0ca 100644 --- a/docs/interfaces/ICreateOrUpdateUserResult.html +++ b/docs/interfaces/ICreateOrUpdateUserResult.html @@ -1,201 +1,68 @@ -ICreateOrUpdateUserResult | permitio
                                                                                                                                                                                                -
                                                                                                                                                                                                - -
                                                                                                                                                                                                +ICreateOrUpdateUserResult | permitio
                                                                                                                                                                                                +
                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                  - -

                                                                                                                                                                                                  Interface ICreateOrUpdateUserResult

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                  -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  • ICreateOrUpdateUserResult
                                                                                                                                                                                                  +
                                                                                                                                                                                                  interface ICreateOrUpdateUserResult<Attributes extends object = object> {
                                                                                                                                                                                                      created: boolean;
                                                                                                                                                                                                      user: UserRead<Attributes>;
                                                                                                                                                                                                  }
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Type Parameters

                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • Attributes extends object = object
                                                                                                                                                                                                  +
                                                                                                                                                                                                • Defined in src/api/users.ts:46
                                                                                                                                                                                                • -
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Index
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Properties

                                                                                                                                                                                                  -
                                                                                                                                                                                                  created -user + +
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Properties

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  created: boolean

                                                                                                                                                                                                  whether the user was newly created

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  user: UserRead
                                                                                                                                                                                                  +
                                                                                                                                                                                                • Defined in src/api/users.ts:55
                                                                                                                                                                                                • +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  the created or updated user

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                • Defined in src/api/users.ts:50
                                                                                                                                                                                                • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                  +
                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                  -
                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                  diff --git a/docs/interfaces/IDeprecatedPermitApi.html b/docs/interfaces/IDeprecatedPermitApi.html deleted file mode 100644 index 4e88c955..00000000 --- a/docs/interfaces/IDeprecatedPermitApi.html +++ /dev/null @@ -1,670 +0,0 @@ -IDeprecatedPermitApi | permitio
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -

                                                                                                                                                                                                  Interface IDeprecatedPermitApi

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  This interface contains read actions that goes outside -of your local network and queries permit.io cloud api. -You should be aware that these actions incur some cross-cloud latency.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  See

                                                                                                                                                                                                  DeprecatedApiClient for implementation and docs.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Implemented by

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Methods

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                  -
                                                                                                                                                                                                  \ No newline at end of file diff --git a/docs/interfaces/IDeprecatedReadApis.html b/docs/interfaces/IDeprecatedReadApis.html deleted file mode 100644 index d2727776..00000000 --- a/docs/interfaces/IDeprecatedReadApis.html +++ /dev/null @@ -1,309 +0,0 @@ -IDeprecatedReadApis | permitio
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -

                                                                                                                                                                                                  Interface IDeprecatedReadApis

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  This interface contains read actions that goes outside -of your local network and queries permit.io cloud api. -You should be aware that these actions incur some cross-cloud latency.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  See

                                                                                                                                                                                                  DeprecatedApiClient for implementation and docs.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Methods

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                  -
                                                                                                                                                                                                  \ No newline at end of file diff --git a/docs/interfaces/IDeprecatedWriteApis.html b/docs/interfaces/IDeprecatedWriteApis.html deleted file mode 100644 index 022bc4f8..00000000 --- a/docs/interfaces/IDeprecatedWriteApis.html +++ /dev/null @@ -1,516 +0,0 @@ -IDeprecatedWriteApis | permitio
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -

                                                                                                                                                                                                  Interface IDeprecatedWriteApis

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  This interface contains write actions (or mutations) that manipulate remote -state by calling the permit.io api. These api calls goes outside your local network. -You should be aware that these actions incur some cross-cloud latency.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  See

                                                                                                                                                                                                  DeprecatedApiClient for implementation and docs.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Methods

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                    - -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                      conditionSetId: string
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<AxiosResponse<void, any>>

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                    - -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                      resourceId: string
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<AxiosResponse<void, any>>

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                    - -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                      roleId: string
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<AxiosResponse<void, any>>

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                    - -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                      tenantId: string
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<AxiosResponse<void, any>>

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                    - -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                      userId: string
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<AxiosResponse<void, any>>

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                  -
                                                                                                                                                                                                  \ No newline at end of file diff --git a/docs/interfaces/IEnvironmentsApi.html b/docs/interfaces/IEnvironmentsApi.html index f991bcdd..74a4f8bb 100644 --- a/docs/interfaces/IEnvironmentsApi.html +++ b/docs/interfaces/IEnvironmentsApi.html @@ -1,55 +1,51 @@ -IEnvironmentsApi | permitio
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - -
                                                                                                                                                                                                  +IEnvironmentsApi | permitio
                                                                                                                                                                                                  +
                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                    - +

                                                                                                                                                                                                    Interface IEnvironmentsApi

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Hierarchy

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • IEnvironmentsApi
                                                                                                                                                                                                    +
                                                                                                                                                                                                    interface IEnvironmentsApi {
                                                                                                                                                                                                        copy(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentKey: string,
                                                                                                                                                                                                            copyParams: EnvironmentCopy,
                                                                                                                                                                                                        ): Promise<EnvironmentRead>;
                                                                                                                                                                                                        copyAsync(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentKey: string,
                                                                                                                                                                                                            copyParams: EnvironmentCopy,
                                                                                                                                                                                                            wait?: number,
                                                                                                                                                                                                        ): Promise<TaskResultEnvironmentRead>;
                                                                                                                                                                                                        create(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentData: EnvironmentCreate,
                                                                                                                                                                                                        ): Promise<EnvironmentRead>;
                                                                                                                                                                                                        delete(projectKey: string, environmentKey: string): Promise<void>;
                                                                                                                                                                                                        get(projectKey: string, environmentKey: string): Promise<EnvironmentRead>;
                                                                                                                                                                                                        getApiKey(projectKey: string, environmentKey: string): Promise<APIKeyRead>;
                                                                                                                                                                                                        getById(projectId: string, environmentId: string): Promise<EnvironmentRead>;
                                                                                                                                                                                                        getByKey(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentKey: string,
                                                                                                                                                                                                        ): Promise<EnvironmentRead>;
                                                                                                                                                                                                        getCopyResult(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentKey: string,
                                                                                                                                                                                                            taskId: string,
                                                                                                                                                                                                            wait?: number,
                                                                                                                                                                                                        ): Promise<TaskResultEnvironmentRead>;
                                                                                                                                                                                                        getStats(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentKey: string,
                                                                                                                                                                                                        ): Promise<EnvironmentStats>;
                                                                                                                                                                                                        list(params: IListEnvironments): Promise<EnvironmentRead[]>;
                                                                                                                                                                                                        update(
                                                                                                                                                                                                            projectKey: string,
                                                                                                                                                                                                            environmentKey: string,
                                                                                                                                                                                                            environmentData: EnvironmentUpdate,
                                                                                                                                                                                                        ): Promise<EnvironmentRead>;
                                                                                                                                                                                                    }

                                                                                                                                                                                                    Implemented by

                                                                                                                                                                                                    +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:43
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Index
                                                                                                                                                                                                    -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Methods

                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • copyParams: EnvironmentCopy

                                                                                                                                                                                                    The parameters for copying the environment.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  • -

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the copied environment.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the copied environment.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • + +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Submits a background copy from the explicit source environment in the same project. +The SDK requires a project or organization API key and does not replay submission or poll.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                      +
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string +

                                                                                                                                                                                                        The source project key or ID.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • environmentKey: string +

                                                                                                                                                                                                        The source environment key or ID, not the target environment.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • copyParams: EnvironmentCopy +

                                                                                                                                                                                                        Complete target, conflict strategy and optional copy scope.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • Optionalwait: number +

                                                                                                                                                                                                        Optional finite server wait in seconds, from 0 through 60, including fractions.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Returns Promise<TaskResultEnvironmentRead>

                                                                                                                                                                                                      The complete task response; processing, failure and cancelled statuses remain data.

                                                                                                                                                                                                      -

                                                                                                                                                                                                      Throws

                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                      -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:173
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    + -

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the created environment.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the created environment.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:121
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Deletes an environment.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string

                                                                                                                                                                                                        The project key.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentKey: string

                                                                                                                                                                                                      The environment key.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                    A promise that resolves when the environment is successfully deleted.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                    A promise that resolves when the environment is successfully deleted.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:209
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Gets an environment by project key and environment key.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string

                                                                                                                                                                                                        The project key.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentKey: string

                                                                                                                                                                                                      The environment key.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:63
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Retrieves the API key that grants access for an environment (and only the requested environment). Must be requested with an organization-level api key.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string

                                                                                                                                                                                                        The project key.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentKey: string

                                                                                                                                                                                                      The environment key.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<APIKeyRead>

                                                                                                                                                                                                    A promise that resolves to an APIKeyRead object containing the API key and its metadata.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<APIKeyRead>

                                                                                                                                                                                                    A promise that resolves to an APIKeyRead object containing the API key and its metadata.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:110
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Gets an environment by project ID and environment ID. -Alias for the get method.

                                                                                                                                                                                                      +Alias for the get method.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectId: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectId: string

                                                                                                                                                                                                        The project ID.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentId: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentId: string

                                                                                                                                                                                                      The environment ID.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:87
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Gets an environment by project key and environment key. -Alias for the get method.

                                                                                                                                                                                                      +Alias for the get method.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string

                                                                                                                                                                                                        The project key.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentKey: string

                                                                                                                                                                                                      The environment key.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • + +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Reads one acknowledged copy task using its explicit source project and environment. +The SDK returns once, including a processing response; it does not poll or cancel the task.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                      +
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string +

                                                                                                                                                                                                        The source project key or ID.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • environmentKey: string +

                                                                                                                                                                                                        The source environment key or ID.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • taskId: string +

                                                                                                                                                                                                        The acknowledged task ID.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • Optionalwait: number +

                                                                                                                                                                                                        Optional finite server wait in seconds, from 0 through 60, including fractions.

                                                                                                                                                                                                        +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Returns Promise<TaskResultEnvironmentRead>

                                                                                                                                                                                                      The complete task response, preserving nullable result and error data.

                                                                                                                                                                                                      -

                                                                                                                                                                                                      Throws

                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                      -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:193
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Retrieves statistics and metadata for an environment.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string

                                                                                                                                                                                                        The project key.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentKey: string

                                                                                                                                                                                                      The environment key.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<EnvironmentStats>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentStats object representing the statistics data.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentStats>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentStats object representing the statistics data.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:98
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead[]>

                                                                                                                                                                                                    A promise that resolves to an array of EnvironmentRead objects representing the listed environments.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    See

                                                                                                                                                                                                    IListEnvironments

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    -
                                                                                                                                                                                                    - +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:52
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      - -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • + +

                                                                                                                                                                                                      Updates an existing environment.

                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • projectKey: string

                                                                                                                                                                                                        The project key.

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • -
                                                                                                                                                                                                        environmentKey: string
                                                                                                                                                                                                        +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentKey: string

                                                                                                                                                                                                      The environment key.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • -
                                                                                                                                                                                                      environmentData: EnvironmentUpdate
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • environmentData: EnvironmentUpdate

                                                                                                                                                                                                      The data for updating the environment.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the updated environment.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    Returns Promise<EnvironmentRead>

                                                                                                                                                                                                    A promise that resolves to an EnvironmentRead object representing the updated environment.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                    - -

                                                                                                                                                                                                    Throws

                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • Defined in src/api/environments.ts:133
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    On This Page

                                                                                                                                                                                                    +
                                                                                                                                                                                                    Methods +
                                                                                                                                                                                                    -
                                                                                                                                                                                                    -

                                                                                                                                                                                                    Generated using TypeDoc

                                                                                                                                                                                                    -
                                                                                                                                                                                                    \ No newline at end of file + +
                                                                                                                                                                                                    diff --git a/docs/interfaces/IFilterObject.html b/docs/interfaces/IFilterObject.html new file mode 100644 index 00000000..56abb6fe --- /dev/null +++ b/docs/interfaces/IFilterObject.html @@ -0,0 +1,106 @@ +IFilterObject | permitio
                                                                                                                                                                                                    +
                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +

                                                                                                                                                                                                      Interface IFilterObject

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      An object to filter, with request context that overrides the shared call context.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      interface IFilterObject {
                                                                                                                                                                                                          attributes?: Dict;
                                                                                                                                                                                                          context?: Context;
                                                                                                                                                                                                          key?: string;
                                                                                                                                                                                                          tenant?: string;
                                                                                                                                                                                                          type: string;
                                                                                                                                                                                                      }
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Hierarchy (View Summary)

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Index
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      attributes?: Dict
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Extra attributes associated with the resource. +This is particularly relevant if the policy is ABAC (Attribute-Based Access Control).

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      context?: Context
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      key?: string
                                                                                                                                                                                                      +

                                                                                                                                                                                                      The key of the resource instance, which is the customer-side ID of the resource. +Can be used by relationship-based access control policies or by attribute-based +access control policies. If no key is provided (i.e: undefined), the authorization +query is: Can the user perform the action on any resource of this type? +(i.e., all resources in this resource namespace)

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      tenant?: string
                                                                                                                                                                                                      +

                                                                                                                                                                                                      The tenant under which the resource is defined. +The permissions service is multi-tenant by default, so a resource must be associated with a tenant.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      type: string
                                                                                                                                                                                                      +

                                                                                                                                                                                                      The resource type, represents a namespace of resources. +For example, all task resources are objects under the task namespace.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      diff --git a/docs/interfaces/IGetUserRoles.html b/docs/interfaces/IGetUserRoles.html deleted file mode 100644 index fab35ecf..00000000 --- a/docs/interfaces/IGetUserRoles.html +++ /dev/null @@ -1,221 +0,0 @@ -IGetUserRoles | permitio
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -

                                                                                                                                                                                                      Interface IGetUserRoles

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -

                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                      -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • IGetUserRoles
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -

                                                                                                                                                                                                      Properties

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -

                                                                                                                                                                                                      Properties

                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      page?: number
                                                                                                                                                                                                      -

                                                                                                                                                                                                      Page number of the results to fetch, starting at 1.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      perPage?: number
                                                                                                                                                                                                      -

                                                                                                                                                                                                      The number of results per page (max 100).

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      tenant?: string
                                                                                                                                                                                                      -

                                                                                                                                                                                                      optional tenant filter, will only return role assignments granted in that tenant (id or key).

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      user: string
                                                                                                                                                                                                      -

                                                                                                                                                                                                      id or key of the user

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -

                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                      -
                                                                                                                                                                                                      \ No newline at end of file diff --git a/docs/interfaces/IGroupsApi.html b/docs/interfaces/IGroupsApi.html new file mode 100644 index 00000000..58f04982 --- /dev/null +++ b/docs/interfaces/IGroupsApi.html @@ -0,0 +1,281 @@ +IGroupsApi | permitio
                                                                                                                                                                                                      +
                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +

                                                                                                                                                                                                        Interface IGroupsApi

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Manages groups, their user membership, and resource role grants.

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        interface IGroupsApi {
                                                                                                                                                                                                            assignRole(
                                                                                                                                                                                                                groupKeyOrId: string,
                                                                                                                                                                                                                assignment: GroupAddRole,
                                                                                                                                                                                                            ): Promise<GroupRead>;
                                                                                                                                                                                                            assignUser(
                                                                                                                                                                                                                groupKeyOrId: string,
                                                                                                                                                                                                                userKeyOrId: string,
                                                                                                                                                                                                                assignment: GroupAssignUser,
                                                                                                                                                                                                            ): Promise<GroupRead>;
                                                                                                                                                                                                            create(group: GroupCreate): Promise<GroupRead>;
                                                                                                                                                                                                            delete(groupKeyOrId: string): Promise<void>;
                                                                                                                                                                                                            get(groupKeyOrId: string): Promise<GroupReadSchema>;
                                                                                                                                                                                                            list(params?: IListGroups): Promise<PaginatedResultGroupReadSchema>;
                                                                                                                                                                                                            removeRole(groupKeyOrId: string, assignment: GroupAddRole): Promise<void>;
                                                                                                                                                                                                            removeUser(
                                                                                                                                                                                                                groupKeyOrId: string,
                                                                                                                                                                                                                userKeyOrId: string,
                                                                                                                                                                                                                assignment: GroupAssignUser,
                                                                                                                                                                                                            ): Promise<void>;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Implemented by

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Index
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Grants a group a resource role using relationships and role derivation through ReBAC.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • groupKeyOrId: string +

                                                                                                                                                                                                            The qualified resource:instance key or internal instance ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • assignment: GroupAddRole +

                                                                                                                                                                                                            The role, resource type, resource instance, and tenant identifiers.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<GroupRead>

                                                                                                                                                                                                          The updated group and its role membership.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Adds a user to a group so the user can inherit the group's resource roles through ReBAC.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • groupKeyOrId: string +

                                                                                                                                                                                                            The qualified resource:instance key or internal instance ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • userKeyOrId: string +

                                                                                                                                                                                                            The user key or ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • assignment: GroupAssignUser +

                                                                                                                                                                                                            The required tenant body for the membership request.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<GroupRead>

                                                                                                                                                                                                          The updated group and its membership.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Creates a group resource instance.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • group: GroupCreate +

                                                                                                                                                                                                            The group instance key, tenant, and optional resource type.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<GroupRead>

                                                                                                                                                                                                          The created group and its membership; this response does not contain an ID.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Deletes a group resource instance.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • groupKeyOrId: string +

                                                                                                                                                                                                            The qualified resource:instance key or internal instance ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                          A promise that resolves when the group is deleted.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Gets a group through the direct endpoint.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • groupKeyOrId: string +

                                                                                                                                                                                                            The qualified resource:instance key or internal instance ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<GroupReadSchema>

                                                                                                                                                                                                          The group instance, including its internal ID.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request, including a missing group.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Revokes a group's resource role grant.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • groupKeyOrId: string +

                                                                                                                                                                                                            The qualified resource:instance key or internal instance ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • assignment: GroupAddRole +

                                                                                                                                                                                                            The role, resource type, resource instance, and tenant identifiers.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                          A promise that resolves when the role grant is removed.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Removes a user's membership from a group.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • groupKeyOrId: string +

                                                                                                                                                                                                            The qualified resource:instance key or internal instance ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • userKeyOrId: string +

                                                                                                                                                                                                            The user key or ID.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • assignment: GroupAssignUser +

                                                                                                                                                                                                            The required tenant body, also sent for this DELETE request.

                                                                                                                                                                                                            +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                          A promise that resolves when the membership is removed.

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitApiError If the API rejects the request.

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          PermitContextError If the API key or selected context is insufficient.

                                                                                                                                                                                                          +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        diff --git a/docs/interfaces/IListActionGroups.html b/docs/interfaces/IListActionGroups.html index 3f316ca3..4f84542f 100644 --- a/docs/interfaces/IListActionGroups.html +++ b/docs/interfaces/IListActionGroups.html @@ -1,212 +1,78 @@ -IListActionGroups | permitio
                                                                                                                                                                                                        -
                                                                                                                                                                                                        - -
                                                                                                                                                                                                        +IListActionGroups | permitio
                                                                                                                                                                                                        +
                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                          - +

                                                                                                                                                                                                          Interface IListActionGroups

                                                                                                                                                                                                          -
                                                                                                                                                                                                          -

                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                          +
                                                                                                                                                                                                          interface IListActionGroups {
                                                                                                                                                                                                              page?: number;
                                                                                                                                                                                                              perPage?: number;
                                                                                                                                                                                                              resourceKey: string;
                                                                                                                                                                                                          }
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Hierarchy (View Summary)

                                                                                                                                                                                                          +
                                                                                                                                                                                                        • Defined in src/api/resource-action-groups.ts:25
                                                                                                                                                                                                        • -
                                                                                                                                                                                                          - +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          Index
                                                                                                                                                                                                          -

                                                                                                                                                                                                          Properties

                                                                                                                                                                                                          -
                                                                                                                                                                                                          -
                                                                                                                                                                                                          -

                                                                                                                                                                                                          Properties

                                                                                                                                                                                                          -
                                                                                                                                                                                                          - +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          page?: number

                                                                                                                                                                                                          the page number to fetch (default: 1)

                                                                                                                                                                                                          -
                                                                                                                                                                                                          -
                                                                                                                                                                                                          -
                                                                                                                                                                                                          - -
                                                                                                                                                                                                          perPage?: number
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • Defined in src/api/base.ts:78
                                                                                                                                                                                                        • +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          perPage?: number

                                                                                                                                                                                                          how many items to fetch per page (default: 100)

                                                                                                                                                                                                          -
                                                                                                                                                                                                          -
                                                                                                                                                                                                          -
                                                                                                                                                                                                          - -
                                                                                                                                                                                                          resourceKey: string
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          resourceKey: string
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • Defined in src/api/resource-action-groups.ts:26
                                                                                                                                                                                                        • +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                          +
                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                          -
                                                                                                                                                                                                          -

                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                          -
                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                          diff --git a/docs/interfaces/IListActions.html b/docs/interfaces/IListActions.html index 78d0f8d4..8806ab10 100644 --- a/docs/interfaces/IListActions.html +++ b/docs/interfaces/IListActions.html @@ -1,212 +1,78 @@ -IListActions | permitio
                                                                                                                                                                                                          -
                                                                                                                                                                                                          - -
                                                                                                                                                                                                          +IListActions | permitio
                                                                                                                                                                                                          +
                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                            - +

                                                                                                                                                                                                            Interface IListActions

                                                                                                                                                                                                            -
                                                                                                                                                                                                            -

                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                            +
                                                                                                                                                                                                            interface IListActions {
                                                                                                                                                                                                                page?: number;
                                                                                                                                                                                                                perPage?: number;
                                                                                                                                                                                                                resourceKey: string;
                                                                                                                                                                                                            }
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            Hierarchy (View Summary)

                                                                                                                                                                                                            +
                                                                                                                                                                                                          • Defined in src/api/resource-actions.ts:25
                                                                                                                                                                                                          • -
                                                                                                                                                                                                            - +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            Index
                                                                                                                                                                                                            -

                                                                                                                                                                                                            Properties

                                                                                                                                                                                                            -
                                                                                                                                                                                                            -
                                                                                                                                                                                                            -

                                                                                                                                                                                                            Properties

                                                                                                                                                                                                            -
                                                                                                                                                                                                            - +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            page?: number

                                                                                                                                                                                                            the page number to fetch (default: 1)

                                                                                                                                                                                                            -
                                                                                                                                                                                                            -
                                                                                                                                                                                                            -
                                                                                                                                                                                                            - -
                                                                                                                                                                                                            perPage?: number
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • Defined in src/api/base.ts:78
                                                                                                                                                                                                          • +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            perPage?: number

                                                                                                                                                                                                            how many items to fetch per page (default: 100)

                                                                                                                                                                                                            -
                                                                                                                                                                                                            -
                                                                                                                                                                                                            -
                                                                                                                                                                                                            - -
                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • Defined in src/api/resource-actions.ts:26
                                                                                                                                                                                                          • +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                            +
                                                                                                                                                                                                            Properties +
                                                                                                                                                                                                            -
                                                                                                                                                                                                            -

                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                            -
                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                            diff --git a/docs/interfaces/IListApiKeys.html b/docs/interfaces/IListApiKeys.html new file mode 100644 index 00000000..c2624f1a --- /dev/null +++ b/docs/interfaces/IListApiKeys.html @@ -0,0 +1,91 @@ +IListApiKeys | permitio
                                                                                                                                                                                                            +
                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +

                                                                                                                                                                                                              Interface IListApiKeys

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Optional scope filters; project references accept a UUID or key.

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              interface IListApiKeys {
                                                                                                                                                                                                                  objectType?: MemberAccessObj;
                                                                                                                                                                                                                  page?: number;
                                                                                                                                                                                                                  perPage?: number;
                                                                                                                                                                                                                  projId?: string;
                                                                                                                                                                                                              }
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Hierarchy (View Summary)

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              Index
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              objectType?: MemberAccessObj
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Record scope to filter by: organization, project or environment.

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              page?: number
                                                                                                                                                                                                              +

                                                                                                                                                                                                              the page number to fetch (default: 1)

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              perPage?: number
                                                                                                                                                                                                              +

                                                                                                                                                                                                              how many items to fetch per page (default: 100)

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              projId?: string
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Project UUID or key to filter by; this does not select the client's context.

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              diff --git a/docs/interfaces/IListAttributes.html b/docs/interfaces/IListAttributes.html index 3df397d7..61248d0b 100644 --- a/docs/interfaces/IListAttributes.html +++ b/docs/interfaces/IListAttributes.html @@ -1,212 +1,78 @@ -IListAttributes | permitio
                                                                                                                                                                                                              -
                                                                                                                                                                                                              - -
                                                                                                                                                                                                              +IListAttributes | permitio
                                                                                                                                                                                                              +
                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                - +

                                                                                                                                                                                                                Interface IListAttributes

                                                                                                                                                                                                                -
                                                                                                                                                                                                                -

                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                +
                                                                                                                                                                                                                interface IListAttributes {
                                                                                                                                                                                                                    page?: number;
                                                                                                                                                                                                                    perPage?: number;
                                                                                                                                                                                                                    resourceKey: string;
                                                                                                                                                                                                                }
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                Hierarchy (View Summary)

                                                                                                                                                                                                                +
                                                                                                                                                                                                              • Defined in src/api/resource-attributes.ts:25
                                                                                                                                                                                                              • -
                                                                                                                                                                                                                - +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                Index
                                                                                                                                                                                                                -

                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                -
                                                                                                                                                                                                                -
                                                                                                                                                                                                                -

                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                -
                                                                                                                                                                                                                - +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                page?: number

                                                                                                                                                                                                                the page number to fetch (default: 1)

                                                                                                                                                                                                                -
                                                                                                                                                                                                                -
                                                                                                                                                                                                                -
                                                                                                                                                                                                                - -
                                                                                                                                                                                                                perPage?: number
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • Defined in src/api/base.ts:78
                                                                                                                                                                                                              • +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                perPage?: number

                                                                                                                                                                                                                how many items to fetch per page (default: 100)

                                                                                                                                                                                                                -
                                                                                                                                                                                                                -
                                                                                                                                                                                                                -
                                                                                                                                                                                                                - -
                                                                                                                                                                                                                resourceKey: string
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                resourceKey: string
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • Defined in src/api/resource-attributes.ts:26
                                                                                                                                                                                                              • +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                On This Page

                                                                                                                                                                                                                +
                                                                                                                                                                                                                Properties +
                                                                                                                                                                                                                -
                                                                                                                                                                                                                -

                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                -
                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                diff --git a/docs/interfaces/IListAuditLogs.html b/docs/interfaces/IListAuditLogs.html new file mode 100644 index 00000000..d6a3f530 --- /dev/null +++ b/docs/interfaces/IListAuditLogs.html @@ -0,0 +1,145 @@ +IListAuditLogs | permitio
                                                                                                                                                                                                                +
                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                  Interface IListAuditLogs

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Published audit-log filters; arrays are sent as repeated query parameters.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  interface IListAuditLogs {
                                                                                                                                                                                                                      action?: string;
                                                                                                                                                                                                                      decision?: boolean;
                                                                                                                                                                                                                      page?: number;
                                                                                                                                                                                                                      pdpId?: string;
                                                                                                                                                                                                                      perPage?: number;
                                                                                                                                                                                                                      query?: AuditLogQueryType;
                                                                                                                                                                                                                      resources?: readonly string[];
                                                                                                                                                                                                                      sortBy?: AuditLogSortKey;
                                                                                                                                                                                                                      tenant?: string;
                                                                                                                                                                                                                      timestampFrom?: number;
                                                                                                                                                                                                                      timestampTo?: number;
                                                                                                                                                                                                                      users?: readonly string[];
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Hierarchy (View Summary)

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  action?: string
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  decision?: boolean
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  page?: number
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  the page number to fetch (default: 1)

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  pdpId?: string
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  PDP configuration UUID.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  perPage?: number
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  how many items to fetch per page (default: 100)

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                  none includes all published query types.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  resources?: readonly string[]
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  tenant?: string
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  timestampFrom?: number
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Numeric timestamp boundary, forwarded unchanged; units are not specified by the contract.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  timestampTo?: number
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Numeric timestamp boundary, forwarded unchanged; units are not specified by the contract.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  users?: readonly string[]
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  User keys or emails; the API limits each item to 500 characters.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  diff --git a/docs/interfaces/IListConditionSetRules.html b/docs/interfaces/IListConditionSetRules.html index d5879e41..d8daa814 100644 --- a/docs/interfaces/IListConditionSetRules.html +++ b/docs/interfaces/IListConditionSetRules.html @@ -1,236 +1,97 @@ -IListConditionSetRules | permitio
                                                                                                                                                                                                                  -
                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                  +IListConditionSetRules | permitio
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                    - +

                                                                                                                                                                                                                    Interface IListConditionSetRules

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -

                                                                                                                                                                                                                    Hierarchy

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    interface IListConditionSetRules {
                                                                                                                                                                                                                        page?: number;
                                                                                                                                                                                                                        permissionKey?: string;
                                                                                                                                                                                                                        perPage?: number;
                                                                                                                                                                                                                        resourceSetKey?: string;
                                                                                                                                                                                                                        userSetKey?: string;
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Hierarchy (View Summary)

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • Defined in src/api/condition-set-rules.ts:25
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -

                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    page?: number

                                                                                                                                                                                                                    the page number to fetch (default: 1)

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                    perPage?: number
                                                                                                                                                                                                                    -

                                                                                                                                                                                                                    how many items to fetch per page (default: 100)

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    permissionKey?: string
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    The action key or ID used to filter rule permissions, for example write. +Rule create/read permissions use resource:action; this GET filter uses the action.

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                    permissionKey: string
                                                                                                                                                                                                                    -

                                                                                                                                                                                                                    the key of the permission, formatted as :. -if used only rules granting that permission will be fetched.

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    perPage?: number
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    how many items to fetch per page (default: 100)

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                    resourceSetKey: string
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • Defined in src/api/base.ts:82
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    resourceSetKey?: string

                                                                                                                                                                                                                    the key of the resourceset, if used only rules matching that resourceset will be fetched.

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                    userSetKey: string
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • Defined in src/api/condition-set-rules.ts:38
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    userSetKey?: string

                                                                                                                                                                                                                    the key of the userset, if used only rules matching that userset will be fetched.

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • Defined in src/api/condition-set-rules.ts:29
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    On This Page

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Properties +
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -

                                                                                                                                                                                                                    Generated using TypeDoc

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    \ No newline at end of file + +
                                                                                                                                                                                                                    diff --git a/docs/interfaces/IListConditionSets.html b/docs/interfaces/IListConditionSets.html new file mode 100644 index 00000000..193e4c63 --- /dev/null +++ b/docs/interfaces/IListConditionSets.html @@ -0,0 +1,83 @@ +IListConditionSets | permitio
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                      Interface IListConditionSets

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Filters and pagination for condition-set listing.

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      interface IListConditionSets {
                                                                                                                                                                                                                          page?: number;
                                                                                                                                                                                                                          perPage?: number;
                                                                                                                                                                                                                          type?: ConditionSetType;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Hierarchy (View Summary)

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      page?: number
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      the page number to fetch (default: 1)

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      perPage?: number
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      how many items to fetch per page (default: 100)

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                      Return only user sets or resource sets; omitted means both kinds.

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      diff --git a/docs/interfaces/IListEnvironments.html b/docs/interfaces/IListEnvironments.html index 8e94b950..0603215b 100644 --- a/docs/interfaces/IListEnvironments.html +++ b/docs/interfaces/IListEnvironments.html @@ -1,215 +1,80 @@ -IListEnvironments | permitio
                                                                                                                                                                                                                      -
                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                      +IListEnvironments | permitio
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                        Interface IListEnvironments

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -

                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        interface IListEnvironments {
                                                                                                                                                                                                                            page?: number;
                                                                                                                                                                                                                            perPage?: number;
                                                                                                                                                                                                                            projectKey: string;
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Hierarchy (View Summary)

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • Defined in src/api/environments.ts:36
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                        -

                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -

                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        page?: number

                                                                                                                                                                                                                        the page number to fetch (default: 1)

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                        perPage?: number
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • Defined in src/api/base.ts:78
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        perPage?: number

                                                                                                                                                                                                                        how many items to fetch per page (default: 100)

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                        projectKey: string
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • Defined in src/api/base.ts:82
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        projectKey: string

                                                                                                                                                                                                                        only environments under the project with this key will be listed.

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • Defined in src/api/environments.ts:40
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        -

                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                        -
                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                        diff --git a/docs/interfaces/IListGroups.html b/docs/interfaces/IListGroups.html new file mode 100644 index 00000000..a9f95e4e --- /dev/null +++ b/docs/interfaces/IListGroups.html @@ -0,0 +1,99 @@ +IListGroups | permitio
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                          Interface IListGroups

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Filters and pagination for the direct Groups list.

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          interface IListGroups {
                                                                                                                                                                                                                              page?: number;
                                                                                                                                                                                                                              perPage?: number;
                                                                                                                                                                                                                              resource?: string;
                                                                                                                                                                                                                              search?: string;
                                                                                                                                                                                                                              tenant?: string;
                                                                                                                                                                                                                          }
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Hierarchy (View Summary)

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          page?: number
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          the page number to fetch (default: 1)

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          perPage?: number
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          how many items to fetch per page (default: 100)

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          resource?: string
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Resource type key or ID to filter by.

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          search?: string
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Text to search for in the group name or key.

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          tenant?: string
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Tenant key or ID to filter by.

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          diff --git a/docs/interfaces/IListRelations.html b/docs/interfaces/IListRelations.html new file mode 100644 index 00000000..06f34c77 --- /dev/null +++ b/docs/interfaces/IListRelations.html @@ -0,0 +1,78 @@ +IListRelations | permitio
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                            Interface IListRelations

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            interface IListRelations {
                                                                                                                                                                                                                                page?: number;
                                                                                                                                                                                                                                perPage?: number;
                                                                                                                                                                                                                                resourceKey: string;
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Hierarchy (View Summary)

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            page?: number
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            the page number to fetch (default: 1)

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            perPage?: number
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            how many items to fetch per page (default: 100)

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            diff --git a/docs/interfaces/IListRelationshipTuples.html b/docs/interfaces/IListRelationshipTuples.html new file mode 100644 index 00000000..bf1f2cec --- /dev/null +++ b/docs/interfaces/IListRelationshipTuples.html @@ -0,0 +1,123 @@ +IListRelationshipTuples | permitio
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                              Interface IListRelationshipTuples

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Represents the parameters for listing role createments.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              interface IListRelationshipTuples {
                                                                                                                                                                                                                                  object?: string;
                                                                                                                                                                                                                                  objectType?: string;
                                                                                                                                                                                                                                  page?: number;
                                                                                                                                                                                                                                  perPage?: number;
                                                                                                                                                                                                                                  relation?: string;
                                                                                                                                                                                                                                  subject?: string;
                                                                                                                                                                                                                                  subjectType?: string;
                                                                                                                                                                                                                                  tenant?: string;
                                                                                                                                                                                                                              }
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Hierarchy (View Summary)

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              object?: string
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              optional object filter, will only return relationship tuples with this object.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              objectType?: string
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              The object type to filter by, accepts resource type id or key

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              page?: number
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              the page number to fetch (default: 1)

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              perPage?: number
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              how many items to fetch per page (default: 100)

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              relation?: string
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              optional relation filter, will only return relationship tuples with this relation.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              subject?: string
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              optional subject filter, will only return relationship tuples with this subject.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              subjectType?: string
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              The subject type to filter by, accepts resource type id or key

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              tenant?: string
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              optional tenant filter, will only return relationship tuples with this tenant.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              diff --git a/docs/interfaces/IListResourceInstanceDetailedParams.html b/docs/interfaces/IListResourceInstanceDetailedParams.html new file mode 100644 index 00000000..be6c0481 --- /dev/null +++ b/docs/interfaces/IListResourceInstanceDetailedParams.html @@ -0,0 +1,97 @@ +IListResourceInstanceDetailedParams | permitio
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                Interface IListResourceInstanceDetailedParams

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Filters for the dedicated resource-instance detailed list.

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                interface IListResourceInstanceDetailedParams {
                                                                                                                                                                                                                                    page?: number;
                                                                                                                                                                                                                                    perPage?: number;
                                                                                                                                                                                                                                    resource?: string;
                                                                                                                                                                                                                                    search?: string[];
                                                                                                                                                                                                                                    tenant?: string;
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Hierarchy (View Summary)

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                page?: number
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                the page number to fetch (default: 1)

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                perPage?: number
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                resource?: string
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                search?: string[]
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Search terms to match against the instance key.

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                tenant?: string
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                diff --git a/docs/interfaces/IListResourceInstanceParams.html b/docs/interfaces/IListResourceInstanceParams.html new file mode 100644 index 00000000..3f1fb3da --- /dev/null +++ b/docs/interfaces/IListResourceInstanceParams.html @@ -0,0 +1,86 @@ +IListResourceInstanceParams | permitio
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                  Interface IListResourceInstanceParams

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  interface IListResourceInstanceParams {
                                                                                                                                                                                                                                      page?: number;
                                                                                                                                                                                                                                      perPage?: number;
                                                                                                                                                                                                                                      resource?: string;
                                                                                                                                                                                                                                      tenant?: string;
                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Hierarchy (View Summary)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  page?: number
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  the page number to fetch (default: 1)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  perPage?: number
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  resource?: string
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  tenant?: string
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  diff --git a/docs/interfaces/IListResourceInstanceUsers.html b/docs/interfaces/IListResourceInstanceUsers.html new file mode 100644 index 00000000..11108eaf --- /dev/null +++ b/docs/interfaces/IListResourceInstanceUsers.html @@ -0,0 +1,78 @@ +IListResourceInstanceUsers | permitio
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                    Interface IListResourceInstanceUsers

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    interface IListResourceInstanceUsers {
                                                                                                                                                                                                                                        instanceKey: string;
                                                                                                                                                                                                                                        page?: number;
                                                                                                                                                                                                                                        perPage?: number;
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Hierarchy (View Summary)

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    instanceKey: string
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    page?: number
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    the page number to fetch (default: 1)

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    perPage?: number
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    diff --git a/docs/interfaces/IListResourceRoles.html b/docs/interfaces/IListResourceRoles.html new file mode 100644 index 00000000..a31b2511 --- /dev/null +++ b/docs/interfaces/IListResourceRoles.html @@ -0,0 +1,78 @@ +IListResourceRoles | permitio
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                      Interface IListResourceRoles

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      interface IListResourceRoles {
                                                                                                                                                                                                                                          page?: number;
                                                                                                                                                                                                                                          perPage?: number;
                                                                                                                                                                                                                                          resourceKey: string;
                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Hierarchy (View Summary)

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      page?: number
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      the page number to fetch (default: 1)

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      perPage?: number
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      resourceKey: string
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      diff --git a/docs/interfaces/IListResourceUsers.html b/docs/interfaces/IListResourceUsers.html deleted file mode 100644 index 4aa4286b..00000000 --- a/docs/interfaces/IListResourceUsers.html +++ /dev/null @@ -1,212 +0,0 @@ -IListResourceUsers | permitio
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                      Interface IListResourceUsers

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      page?: number
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      the page number to fetch (default: 1)

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      perPage?: number
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      resourceKey: string
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      \ No newline at end of file diff --git a/docs/interfaces/IListRoleAssignments.html b/docs/interfaces/IListRoleAssignments.html deleted file mode 100644 index 74963546..00000000 --- a/docs/interfaces/IListRoleAssignments.html +++ /dev/null @@ -1,249 +0,0 @@ -IListRoleAssignments | permitio
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                      Interface IListRoleAssignments

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Represents the parameters for listing role assignments.

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      page?: number
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      the page number to fetch (default: 1)

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      perPage?: number
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      resourceInstance?: string
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      optional resource instance filter, will only return (resource) role assignments granted on that resource instance.

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      role?: string
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      optional role filter, will only return role assignments granting this role.

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      tenant?: string
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      optional tenant filter, will only return role assignments granted in that tenant.

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      user?: string
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      optional user filter, will only return role assignments granted to this user.

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      \ No newline at end of file diff --git a/docs/interfaces/IListTenantUsers.html b/docs/interfaces/IListTenantUsers.html index 78568623..d8b6f72e 100644 --- a/docs/interfaces/IListTenantUsers.html +++ b/docs/interfaces/IListTenantUsers.html @@ -1,226 +1,90 @@ -IListTenantUsers | permitio
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                      +IListTenantUsers | permitio
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                        Interface IListTenantUsers

                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        interface IListTenantUsers {
                                                                                                                                                                                                                                            page?: number;
                                                                                                                                                                                                                                            perPage?: number;
                                                                                                                                                                                                                                            role?: string;
                                                                                                                                                                                                                                            search?: string;
                                                                                                                                                                                                                                            tenantKey: string;
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Hierarchy (View Summary)

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                      • Defined in src/api/tenants.ts:36
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        page?: number

                                                                                                                                                                                                                                        the page number to fetch (default: 1)

                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                        perPage?: number
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                      • Defined in src/api/base.ts:78
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        perPage?: number

                                                                                                                                                                                                                                        how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                      • Defined in src/api/base.ts:82
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        role?: string
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                      • Defined in src/api/tenants.ts:39
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        search?: string
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                        tenantKey: string
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        tenantKey: string
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                      • Defined in src/api/tenants.ts:37
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                        diff --git a/docs/interfaces/IListTenantsParams.html b/docs/interfaces/IListTenantsParams.html index 8796ca12..c21fc97f 100644 --- a/docs/interfaces/IListTenantsParams.html +++ b/docs/interfaces/IListTenantsParams.html @@ -1,212 +1,87 @@ -IListTenantsParams | permitio
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                        +IListTenantsParams | permitio
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                          Interface IListTenantsParams

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          interface IListTenantsParams {
                                                                                                                                                                                                                                              includeTotalCount?: boolean;
                                                                                                                                                                                                                                              page?: number;
                                                                                                                                                                                                                                              perPage?: number;
                                                                                                                                                                                                                                              search?: string;
                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Hierarchy (View Summary)

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • Defined in src/api/tenants.ts:42
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          includeTotalCount?: boolean
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Returns the full page with total_count when true; otherwise returns tenant rows. +Omission preserves the API's false default and the SDK's array result.

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          page?: number

                                                                                                                                                                                                                                          the page number to fetch (default: 1)

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                          perPage?: number
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • Defined in src/api/base.ts:78
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          perPage?: number

                                                                                                                                                                                                                                          how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                        • Defined in src/api/base.ts:82
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          search?: string
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • Defined in src/api/tenants.ts:43
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                          diff --git a/docs/interfaces/IListUserInvites.html b/docs/interfaces/IListUserInvites.html new file mode 100644 index 00000000..c9512ea7 --- /dev/null +++ b/docs/interfaces/IListUserInvites.html @@ -0,0 +1,99 @@ +IListUserInvites | permitio
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                            Interface IListUserInvites

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Scoped role/tenant filters and text search across invite email, key or name.

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            interface IListUserInvites {
                                                                                                                                                                                                                                                page?: number;
                                                                                                                                                                                                                                                perPage?: number;
                                                                                                                                                                                                                                                role?: string;
                                                                                                                                                                                                                                                search?: string;
                                                                                                                                                                                                                                                tenant?: string;
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Hierarchy (View Summary)

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            page?: number
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            the page number to fetch (default: 1)

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            perPage?: number
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            role?: string
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Role key or ID to filter by.

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            search?: string
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Text to search for in the invite email, key or name.

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            tenant?: string
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Tenant key or ID to filter by.

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            diff --git a/docs/interfaces/ILocalRoleAssignment.html b/docs/interfaces/ILocalRoleAssignment.html new file mode 100644 index 00000000..fd81c3e9 --- /dev/null +++ b/docs/interfaces/ILocalRoleAssignment.html @@ -0,0 +1,82 @@ +ILocalRoleAssignment | permitio
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                              Interface ILocalRoleAssignment

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              A local PDP assignment with keys, distinct from a control-plane assignment with IDs.

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              interface ILocalRoleAssignment {
                                                                                                                                                                                                                                                  resource_instance?: string | null;
                                                                                                                                                                                                                                                  role: string;
                                                                                                                                                                                                                                                  tenant: string;
                                                                                                                                                                                                                                                  user: string;
                                                                                                                                                                                                                                                  [id: string]: unknown;
                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Indexable

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                [id: string]: unknown
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              resource_instance?: string | null
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Resource type:key identifier; absence and explicit null are preserved.

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              role: string
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              tenant: string
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              user: string
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              diff --git a/docs/interfaces/ILocalRoleAssignmentsQuery.html b/docs/interfaces/ILocalRoleAssignmentsQuery.html new file mode 100644 index 00000000..077497dd --- /dev/null +++ b/docs/interfaces/ILocalRoleAssignmentsQuery.html @@ -0,0 +1,107 @@ +ILocalRoleAssignmentsQuery | permitio
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                Interface ILocalRoleAssignmentsQuery

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Filters one page of role assignments cached by a compatible container PDP.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                interface ILocalRoleAssignmentsQuery {
                                                                                                                                                                                                                                                    page?: number;
                                                                                                                                                                                                                                                    perPage?: number;
                                                                                                                                                                                                                                                    resource?: string;
                                                                                                                                                                                                                                                    resourceInstance?: string;
                                                                                                                                                                                                                                                    role?: string;
                                                                                                                                                                                                                                                    tenant?: string;
                                                                                                                                                                                                                                                    user?: string;
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                page?: number
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Positive safe integer; defaults to 1.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                perPage?: number
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Page size from 1 through 100; defaults to 30.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                resource?: string
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Resource type key.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                resourceInstance?: string
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Resource type:key identifier, forwarded unchanged.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                role?: string
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Role key; omission leaves roles unfiltered.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                tenant?: string
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Tenant key; omission does not select the configured default tenant.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                user?: string
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                User key; omission leaves users unfiltered.

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                diff --git a/docs/interfaces/IPagination.html b/docs/interfaces/IPagination.html index d13e4252..e59d485c 100644 --- a/docs/interfaces/IPagination.html +++ b/docs/interfaces/IPagination.html @@ -1,212 +1,87 @@ -IPagination | permitio
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                +IPagination | permitio
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                  Interface IPagination

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  interface IPagination {
                                                                                                                                                                                                                                                      page?: number;
                                                                                                                                                                                                                                                      perPage?: number;
                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Hierarchy (View Summary)

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • Defined in src/api/base.ts:74
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  page? -perPage? + +
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  page?: number

                                                                                                                                                                                                                                                  the page number to fetch (default: 1)

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                  perPage?: number
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • Defined in src/api/base.ts:78
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  perPage?: number

                                                                                                                                                                                                                                                  how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • Defined in src/api/base.ts:82
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/IPdpsApi.html b/docs/interfaces/IPdpsApi.html new file mode 100644 index 00000000..18ebf3e4 --- /dev/null +++ b/docs/interfaces/IPdpsApi.html @@ -0,0 +1,82 @@ +IPdpsApi | permitio
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                    Interface IPdpsApi

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Manages environment-wide PDP data refresh requests through the control plane.

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    interface IPdpsApi {
                                                                                                                                                                                                                                                        refresh(
                                                                                                                                                                                                                                                            request?: IEnvironmentPdpDataRefreshRequest,
                                                                                                                                                                                                                                                        ): Promise<PDPDataRefreshResponse>;
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Implemented by

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Requests a data refresh for all PDP configurations in the selected environment. +Requires an API key with write access to those configurations.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Returns Promise<PDPDataRefreshResponse>

                                                                                                                                                                                                                                                      The update ID and targeted PDP IDs. This acknowledges the request, not completion.

                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      PermitApiError If no PDP configurations exist or the API rejects the request.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      PermitContextError If the environment context or API key is insufficient.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/IPermitApi.html b/docs/interfaces/IPermitApi.html index bdb9c052..fbe8762f 100644 --- a/docs/interfaces/IPermitApi.html +++ b/docs/interfaces/IPermitApi.html @@ -1,911 +1,353 @@ -IPermitApi | permitio
                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                    +IPermitApi | permitio
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                      Interface IPermitApi

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      This interface contains read actions that goes outside -of your local network and queries permit.io cloud api. -You should be aware that these actions incur some cross-cloud latency.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      See

                                                                                                                                                                                                                                                      DeprecatedApiClient for implementation and docs.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Implemented by

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:34
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - - +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                      API for managing resource action groups.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      apiKeys: IApiKeysApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Direct API-key management and scope discovery; server authorization governs access.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      conditionSetRules: IConditionSetRulesApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:36
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      auditLogs: IAuditLogsApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Reads complete authorization audit pages and detailed engine data.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      conditionSetRules: IConditionSetRulesApi

                                                                                                                                                                                                                                                      API for managing condition set rules.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      conditionSets: IConditionSetsApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      conditionSets: IConditionSetsApi

                                                                                                                                                                                                                                                      API for managing condition sets.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:66
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      environments: IEnvironmentsApi

                                                                                                                                                                                                                                                      API for managing environments.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      groups: IGroupsApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      API for managing groups, user membership, and resource role grants.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:51
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      pdps: IPdpsApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      API for requesting environment-wide PDP data refreshes.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      projects: IProjectsApi

                                                                                                                                                                                                                                                      API for managing projects.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      proxyConfigs: IProxyConfigsApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Direct API for environment proxy configurations and complete URL mapping rules.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      relationshipTuples: IRelationshipTuplesApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:42
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      relationshipTuples: IRelationshipTuplesApi

                                                                                                                                                                                                                                                      API for managing relationship tuples.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      resourceActions: IResourceActionsApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      resourceActions: IResourceActionsApi

                                                                                                                                                                                                                                                      API for managing resource actions.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      resourceAttributes: IResourceAttributesApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      resourceAttributes: IResourceAttributesApi

                                                                                                                                                                                                                                                      API for managing resource attributes.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      resourceInstances: IResourceInstancesApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      resourceInstances: IResourceInstancesApi

                                                                                                                                                                                                                                                      API for managing resource instances.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      resourceRelations: IResourceRelationsApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      resourceRelations: IResourceRelationsApi

                                                                                                                                                                                                                                                      API for managing resource relations.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      resourceRoles: IResourceRolesApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      resourceRoles: IResourceRolesApi

                                                                                                                                                                                                                                                      API for managing resource roles.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:102
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      resources: IResourcesApi

                                                                                                                                                                                                                                                      API for managing resources.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      roleAssignments: IRoleAssignmentsApi
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      roleAssignments: IRoleAssignmentsApi

                                                                                                                                                                                                                                                      API for managing role assignments.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:126
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      roles: IRolesApi

                                                                                                                                                                                                                                                      API for managing roles.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:138
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      tenants: ITenantsApi

                                                                                                                                                                                                                                                      API for managing tenants.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      userAttributes: IUserAttributesApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      API for user attribute definitions; individual user values belong to users.

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      userInvites: IUserInvitesApi
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Direct API for stored user invites and their approval; no mail delivery or PDP sync.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:48
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      users: IUsersApi

                                                                                                                                                                                                                                                      API for managing users.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      Methods

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                        Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          requiredAccessLevel: ApiKeyLevel
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • requiredAccessLevel: ApiKeyLevel

                                                                                                                                                                                                                                                          The required API Key Access level for the endpoint.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Returns Promise<void>

                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                      PermitContextError If the currently set API key access level does not match the required access level.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:158
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                        Ensure that the API context matches the required endpoint context.

                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          requiredContext: ApiContextLevel
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • requiredContext: ApiContextLevel

                                                                                                                                                                                                                                                          The required API context level for the endpoint.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Returns Promise<void>

                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                      PermitContextError If the currently set API context level does not match the required context level.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Defined in src/api/api-client.ts:165
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Methods +
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/IPermitClient.html b/docs/interfaces/IPermitClient.html index 1102b127..3eae9479 100644 --- a/docs/interfaces/IPermitClient.html +++ b/docs/interfaces/IPermitClient.html @@ -1,373 +1,322 @@ -IPermitClient | permitio
                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                      +IPermitClient | permitio
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                        Interface IPermitClient

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        interface IPermitClient {
                                                                                                                                                                                                                                                            api: IPermitApi;
                                                                                                                                                                                                                                                            config: IPermitConfig;
                                                                                                                                                                                                                                                            elements: IPermitElementsApi;
                                                                                                                                                                                                                                                            bulkCheck(
                                                                                                                                                                                                                                                                checks: ICheckQuery[],
                                                                                                                                                                                                                                                                context?: Context,
                                                                                                                                                                                                                                                                config?: CheckConfig,
                                                                                                                                                                                                                                                            ): Promise<boolean[]>;
                                                                                                                                                                                                                                                            check(
                                                                                                                                                                                                                                                                user: string | IUser,
                                                                                                                                                                                                                                                                action: string,
                                                                                                                                                                                                                                                                resource: string | IResource,
                                                                                                                                                                                                                                                                context?: Context,
                                                                                                                                                                                                                                                                config?: CheckConfig,
                                                                                                                                                                                                                                                            ): Promise<boolean>;
                                                                                                                                                                                                                                                            checkAllTenants(
                                                                                                                                                                                                                                                                user: string | IUser,
                                                                                                                                                                                                                                                                action: string,
                                                                                                                                                                                                                                                                resource: string | IResource,
                                                                                                                                                                                                                                                                context: Context | undefined,
                                                                                                                                                                                                                                                                sdk: string | undefined,
                                                                                                                                                                                                                                                            ): Promise<TenantDetails[]>;
                                                                                                                                                                                                                                                            checkUrl(
                                                                                                                                                                                                                                                                user: string | IUser,
                                                                                                                                                                                                                                                                httpMethod: string,
                                                                                                                                                                                                                                                                url: string,
                                                                                                                                                                                                                                                                config?: CheckUrlConfig,
                                                                                                                                                                                                                                                            ): Promise<boolean>;
                                                                                                                                                                                                                                                            filterObjects<T extends IFilterObject>(
                                                                                                                                                                                                                                                                user: string | IUser,
                                                                                                                                                                                                                                                                action: string,
                                                                                                                                                                                                                                                                objects: readonly T[],
                                                                                                                                                                                                                                                                context?: Context,
                                                                                                                                                                                                                                                                config?: CheckConfig,
                                                                                                                                                                                                                                                            ): Promise<T[]>;
                                                                                                                                                                                                                                                            getAuthorizedUsers(
                                                                                                                                                                                                                                                                action: string,
                                                                                                                                                                                                                                                                resource: string | IResource,
                                                                                                                                                                                                                                                                context?: Context,
                                                                                                                                                                                                                                                                config?: CheckConfig,
                                                                                                                                                                                                                                                            ): Promise<IAuthorizedUsersResult>;
                                                                                                                                                                                                                                                            getLocalRoleAssignments(
                                                                                                                                                                                                                                                                query?: ILocalRoleAssignmentsQuery,
                                                                                                                                                                                                                                                                config?: CheckConfig,
                                                                                                                                                                                                                                                            ): Promise<ILocalRoleAssignment[]>;
                                                                                                                                                                                                                                                            getUserPermissions(
                                                                                                                                                                                                                                                                user: string | IUser,
                                                                                                                                                                                                                                                                tenants?: string[],
                                                                                                                                                                                                                                                                resources?: string[],
                                                                                                                                                                                                                                                                resource_types?: string[],
                                                                                                                                                                                                                                                                config?: GetUserPermissionsConfig,
                                                                                                                                                                                                                                                            ): Promise<IUserPermissions>;
                                                                                                                                                                                                                                                            getUserTenants(
                                                                                                                                                                                                                                                                user: string | IUser,
                                                                                                                                                                                                                                                                context?: Context,
                                                                                                                                                                                                                                                                config?: CheckConfig,
                                                                                                                                                                                                                                                            ): Promise<TenantDetails[]>;
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • IEnforcer +
                                                                                                                                                                                                                                                        • IEnforcer
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • IPermitClient
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • IPermitClient
                                                                                                                                                                                                                                                      • Implemented by

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • Defined in src/index.ts:66
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Access the Permit REST API using this property.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                      • Defined in src/index.ts:76
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Access the SDK configuration using this property. Once the SDK is initialized, the configuration is read-only.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                      • Defined in src/index.ts:71
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Access the Permit Elements API using this property.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Methods

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                      • Defined in src/index.ts:81
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                          Checks multiple requests within the specified context.

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            checks: ICheckQuery[]
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • checks: ICheckQuery[]

                                                                                                                                                                                                                                                            The check requests.

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            Optional context: Context
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Optionalcontext: Context

                                                                                                                                                                                                                                                          The context object representing the context in which the action is performed.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          Optional config: CheckConfig
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Returns Promise<boolean[]>

                                                                                                                                                                                                                                                        array containing true if the user is authorized, false otherwise for each check request.

                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                      • Optionalconfig: CheckConfig
                                                                                                                                                                                                                                                      • +

                                                                                                                                                                                                                                                        Returns Promise<boolean[]>

                                                                                                                                                                                                                                                        array containing true if the user is authorized, false otherwise for each check request.

                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                        PermitPDPStatusError if received a response with unexpected status code from the PDP.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                      • Defined in src/enforcement/enforcer.ts:140
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                          Checks if a user is authorized to perform an action on a resource within the specified context.

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            user: string | IUser
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • user: string | IUser

                                                                                                                                                                                                                                                            The user object representing the user.

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            action: string
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • action: string

                                                                                                                                                                                                                                                          The action to be performed on the resource.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          resource: string | IResource
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • resource: string | IResource

                                                                                                                                                                                                                                                          The resource object representing the resource.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          Optional context: Context
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Optionalcontext: Context

                                                                                                                                                                                                                                                          The context object representing the context in which the action is performed.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          Optional config: CheckConfig
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Returns Promise<boolean>

                                                                                                                                                                                                                                                        true if the user is authorized, false otherwise.

                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                      • Optionalconfig: CheckConfig
                                                                                                                                                                                                                                                      • +

                                                                                                                                                                                                                                                        Returns Promise<boolean>

                                                                                                                                                                                                                                                        true if the user is authorized, false otherwise.

                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                        PermitPDPStatusError if received a response with unexpected status code from the PDP.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                      • Defined in src/enforcement/enforcer.ts:115
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                          Get all tenants available in the system.

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            user: string | IUser
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            action: string
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            resource: string | IResource
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            context: undefined | Context
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            sdk: undefined | string
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          Returns Promise<TenantDetails[]>

                                                                                                                                                                                                                                                          An array of TenantDetails representing all tenants.

                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Returns Promise<TenantDetails[]>

                                                                                                                                                                                                                                                        An array of TenantDetails representing all tenants.

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                      • Defined in src/enforcement/enforcer.ts:200
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Checks a full URL on a compatible container PDP; invalid or unavailable decisions reject.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Returns Promise<boolean>

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Filters a stable snapshot of objects through positional bulk authorization decisions.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Type Parameters

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Returns Promise<T[]>

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Queries the full authorized-user envelope; unsupported OPA queries always reject.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Returns Promise<IAuthorizedUsersResult>

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                          Get all permissions for the specified user.

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            user: string | IUser
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • user: string | IUser

                                                                                                                                                                                                                                                            The user object representing the user.

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            Optional tenants: string[]
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Optionaltenants: string[]

                                                                                                                                                                                                                                                          The list of tenants to filter the permissions on ( given by roles ).

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          Optional resources: string[]
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Optionalresources: string[]

                                                                                                                                                                                                                                                          The list of resources to filter the permissions on ( given by resource roles ).

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          Optional resource_types: string[]
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Optionalresource_types: string[]

                                                                                                                                                                                                                                                          The list of resource types to filter the permissions on ( given by resource roles ).

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                          Optional config: CheckConfig
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Returns Promise<IUserPermissions>

                                                                                                                                                                                                                                                        object with key as the resource identifier and value as the resource details and permissions.

                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                      • Optionalconfig: GetUserPermissionsConfig +

                                                                                                                                                                                                                                                        Timeout/error policy and request context overriding existing global context.

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • +

                                                                                                                                                                                                                                                        Returns Promise<IUserPermissions>

                                                                                                                                                                                                                                                        object with key as the resource identifier and value as the resource details and permissions.

                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                        PermitConnectionError if an error occurs while sending the authorization request to the PDP.

                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                        PermitPDPStatusError if received a response with unexpected status code from the PDP.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • Defined in src/enforcement/enforcer.ts:158
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Queries container PDP role-derived tenants; an unavailable endpoint always rejects.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Returns Promise<TenantDetails[]>

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Methods +
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/IPermitConfig.html b/docs/interfaces/IPermitConfig.html index bd9ba5fd..3ce0add1 100644 --- a/docs/interfaces/IPermitConfig.html +++ b/docs/interfaces/IPermitConfig.html @@ -1,303 +1,224 @@ -IPermitConfig | permitio
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                        +IPermitConfig | permitio
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                          Interface IPermitConfig

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                          • IPermitConfig
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          apiContext: ApiContext
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          apiContext: ApiContext

                                                                                                                                                                                                                                                          represents the current API key authorization level.

                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          See

                                                                                                                                                                                                                                                          ApiContext

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          apiUrl: string
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          Configures the URL of the Permit REST API.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          apiUrl: string
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Configures the absolute HTTP(S) REST base URL, without query or fragment components.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          axiosInstance: AxiosInstance
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:51
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          axiosInstance: AxiosInstance

                                                                                                                                                                                                                                                          an optional custom axios instance, to control the behavior of the HTTP client used to connect to the Permit REST API.

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          This instance applies to REST and Elements only. The SDK delegates each attempt +through its current adapters, transforms and interceptors without changing defaults +or installing handlers. SDK routes and Bearer tokens override transport defaults. +SDK requests explicitly set allowAbsoluteUrls:true so caller base URLs cannot prefix +an SDK destination. Direct caller requests retain the caller's own setting. +SDK retry/logging policies stay private; caller-owned retries and redirects remain +the caller's responsibility. PDP uses an internal transport; OPA has its own option.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          factsSyncTimeout: null | number
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:98
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          factsSyncTimeout: number | null

                                                                                                                                                                                                                                                          The amount of time in seconds to wait for facts to be available in the PDP cache before returning the response.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          log: ILoggerConfig
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:107
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          factsSyncTimeoutPolicy: FactsSyncTimeoutPolicy | null
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Controls what happens when the facts synchronization timeout is reached during proxy requests to the PDP.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          log: Readonly<ILoggerConfig>

                                                                                                                                                                                                                                                          the logger configuration used by the SDK,

                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          See

                                                                                                                                                                                                                                                          ILoggerConfig

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          multiTenancy: IMultiTenancyConfig
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:56
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          multiTenancy: Readonly<IMultiTenancyConfig>

                                                                                                                                                                                                                                                          @see: IMultiTenancyConfig

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          opaAxiosInstance?: AxiosInstance
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          an optional custom axios instance for OPA, to control the behavior of the HTTP +client used to connect to OPA. This applies to OPA calls only and is separate +from axiosInstance (REST API) and the dedicated internal PDP instance. +Its defaults and interceptors remain unchanged. SDK routing, headers and retry policy +are applied privately; intentional caller hooks still run for each attempt.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:124
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          pdp: string
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          Configures the Policy Decision Point (PDP) address.

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Configures the absolute HTTP(S) PDP base URL, without query or fragment components.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          pdpRetry?: false | Readonly<IRetryConfig>
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Optional separate retry configuration for PDP (enforcement) calls. +If not provided, uses the main retry configuration. +Set to false to disable retries for PDP calls only.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          proxyFactsViaPdp: boolean
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:143
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          proxyFactsViaPdp: boolean

                                                                                                                                                                                                                                                          Create facts via the PDP API instead of using the default Permit REST API.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          retry?: false | Readonly<IRetryConfig>
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Configuration for automatic retry of failed requests. +Retries are opt-in: when omitted or set to false, retries are disabled. +Providing a config object enables them (3 retries with exponential backoff +by default).

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          throwOnError: undefined | boolean
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:134
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          throwOnError: boolean | undefined

                                                                                                                                                                                                                                                          whether or not permit.check() will throw on error, or return a default denied decision.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          timeout: undefined | number
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          specifies the number of milliseconds before a permit.check() request times out. -If the request takes longer than timeout, the request will be aborted.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          timeout: number | undefined
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          PDP/OPA request timeout in milliseconds; 0 disables it. REST and Elements use +the supplied Axios instance timeout instead. When retries are enabled, +failed attempts and backoff consume one shared timeout budget. Each retry receives +the remaining Axios timeout. Caller adapters must honor it; arbitrary caller hooks +are not interrupted. When omitted, supplied transport timeout defaults are preserved.

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:70
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          token: string

                                                                                                                                                                                                                                                          The token (API Key) used for authorization against the PDP and the Permit REST API.

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Defined in src/config.ts:41
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/IPermitElementsApi.html b/docs/interfaces/IPermitElementsApi.html index 21b838d5..a2bebdca 100644 --- a/docs/interfaces/IPermitElementsApi.html +++ b/docs/interfaces/IPermitElementsApi.html @@ -1,215 +1,81 @@ -IPermitElementsApi | permitio
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                          +IPermitElementsApi | permitio
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                            - +

                                                                                                                                                                                                                                                            Interface IPermitElementsApi

                                                                                                                                                                                                                                                            Interface for interacting with the Permit Elements API.

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                            • IPermitElementsApi
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            interface IPermitElementsApi {
                                                                                                                                                                                                                                                                loginAs(
                                                                                                                                                                                                                                                                    loginData: loginAsSchema,
                                                                                                                                                                                                                                                                ): Promise<EmbeddedLoginRequestOutputWithContent>;
                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                            Implemented by

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • Defined in src/api/elements.ts:19
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                            Methods

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            loginAs + +
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                            Methods

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Returns Promise<EmbeddedLoginRequestOutputWithContent>

                                                                                                                                                                                                                                                            The embedded login authentication session data.

                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Methods +
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/IPermitOptions.html b/docs/interfaces/IPermitOptions.html new file mode 100644 index 00000000..8e13d0d6 --- /dev/null +++ b/docs/interfaces/IPermitOptions.html @@ -0,0 +1,143 @@ +IPermitOptions | permitio
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                              Interface IPermitOptions

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Constructor options; supplied clients and callbacks retain their complete public types.

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              interface IPermitOptions {
                                                                                                                                                                                                                                                                  apiContext?: ApiContext;
                                                                                                                                                                                                                                                                  apiUrl?: string;
                                                                                                                                                                                                                                                                  axiosInstance?: AxiosInstance;
                                                                                                                                                                                                                                                                  factsSyncTimeout?: number | null;
                                                                                                                                                                                                                                                                  factsSyncTimeoutPolicy?: FactsSyncTimeoutPolicy | null;
                                                                                                                                                                                                                                                                  log?: Partial<ILoggerConfig>;
                                                                                                                                                                                                                                                                  multiTenancy?: Partial<IMultiTenancyConfig>;
                                                                                                                                                                                                                                                                  opaAxiosInstance?: AxiosInstance;
                                                                                                                                                                                                                                                                  pdp?: string;
                                                                                                                                                                                                                                                                  pdpRetry?: false | IRetryConfig;
                                                                                                                                                                                                                                                                  proxyFactsViaPdp?: boolean;
                                                                                                                                                                                                                                                                  retry?: false | IRetryConfig;
                                                                                                                                                                                                                                                                  throwOnError?: boolean;
                                                                                                                                                                                                                                                                  timeout?: number;
                                                                                                                                                                                                                                                                  token?: string;
                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              apiContext?: ApiContext
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Initial permissions and selection are copied; edit permit.config.apiContext afterward.

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              apiUrl?: string
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              axiosInstance?: AxiosInstance
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              factsSyncTimeout?: number | null
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              factsSyncTimeoutPolicy?: FactsSyncTimeoutPolicy | null
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              log?: Partial<ILoggerConfig>
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              multiTenancy?: Partial<IMultiTenancyConfig>
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              opaAxiosInstance?: AxiosInstance
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              pdp?: string
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              pdpRetry?: false | IRetryConfig
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              proxyFactsViaPdp?: boolean
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              retry?: false | IRetryConfig
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              throwOnError?: boolean
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              timeout?: number
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              token?: string
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/IProjectsApi.html b/docs/interfaces/IProjectsApi.html index fdbebd8d..406d5eb8 100644 --- a/docs/interfaces/IProjectsApi.html +++ b/docs/interfaces/IProjectsApi.html @@ -1,376 +1,242 @@ -IProjectsApi | permitio
                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                              +IProjectsApi | permitio
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                - +

                                                                                                                                                                                                                                                                Interface IProjectsApi

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                • IProjectsApi
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                interface IProjectsApi {
                                                                                                                                                                                                                                                                    create(projectData: ProjectCreate): Promise<ProjectRead>;
                                                                                                                                                                                                                                                                    delete(projectKey: string): Promise<void>;
                                                                                                                                                                                                                                                                    get(projectKey: string): Promise<ProjectRead>;
                                                                                                                                                                                                                                                                    getById(projectId: string): Promise<ProjectRead>;
                                                                                                                                                                                                                                                                    getByKey(projectKey: string): Promise<ProjectRead>;
                                                                                                                                                                                                                                                                    list(pagination?: IPagination): Promise<ProjectRead[]>;
                                                                                                                                                                                                                                                                    update(
                                                                                                                                                                                                                                                                        projectKey: string,
                                                                                                                                                                                                                                                                        projectData: ProjectUpdate,
                                                                                                                                                                                                                                                                    ): Promise<ProjectRead>;
                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                Implemented by

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:17
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Methods

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                A promise that resolves to the created project.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:68
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • + +

                                                                                                                                                                                                                                                                  Deletes a project.

                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                    projectKey: string
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • projectKey: string

                                                                                                                                                                                                                                                                    The key of the project to delete.

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Returns Promise<void>

                                                                                                                                                                                                                                                                  A promise that resolves when the project is deleted.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Returns Promise<void>

                                                                                                                                                                                                                                                                A promise that resolves when the project is deleted.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:89
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • + +

                                                                                                                                                                                                                                                                  Retrieves a project by its key.

                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                    projectKey: string
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • projectKey: string

                                                                                                                                                                                                                                                                    The key of the project.

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                  A promise that resolves to the project.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                A promise that resolves to the project.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:36
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • + +

                                                                                                                                                                                                                                                                  Retrieves a project by its ID. -Alias for the get method.

                                                                                                                                                                                                                                                                  +Alias for the get method.

                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                    projectId: string
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • projectId: string

                                                                                                                                                                                                                                                                    The ID of the project.

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                  A promise that resolves to the project.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                A promise that resolves to the project.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:58
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • + +

                                                                                                                                                                                                                                                                  Retrieves a project by its key. -Alias for the get method.

                                                                                                                                                                                                                                                                  +Alias for the get method.

                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                    projectKey: string
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • projectKey: string

                                                                                                                                                                                                                                                                    The key of the project.

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                  A promise that resolves to the project.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                A promise that resolves to the project.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:47
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead[]>

                                                                                                                                                                                                                                                                A promise that resolves to an array of projects.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                See

                                                                                                                                                                                                                                                                IPagination

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:26
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • + +

                                                                                                                                                                                                                                                                  Updates a project.

                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                    projectKey: string
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • projectKey: string

                                                                                                                                                                                                                                                                    The key of the project.

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                    projectData: ProjectUpdate
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • projectData: ProjectUpdate

                                                                                                                                                                                                                                                                  The updated data for the project.

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                A promise that resolves to the updated project.

                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                Returns Promise<ProjectRead>

                                                                                                                                                                                                                                                                A promise that resolves to the updated project.

                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                Throws

                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • Defined in src/api/projects.ts:79
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                On This Page

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Methods +
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/IProxyConfigsApi.html b/docs/interfaces/IProxyConfigsApi.html new file mode 100644 index 00000000..94d6de71 --- /dev/null +++ b/docs/interfaces/IProxyConfigsApi.html @@ -0,0 +1,188 @@ +IProxyConfigsApi | permitio
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                  Interface IProxyConfigsApi

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Manages environment proxy configurations and their complete URL mapping rules.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  interface IProxyConfigsApi {
                                                                                                                                                                                                                                                                      create(proxyConfig: ProxyConfigCreate): Promise<ProxyConfigRead>;
                                                                                                                                                                                                                                                                      delete(proxyConfigKeyOrId: string): Promise<void>;
                                                                                                                                                                                                                                                                      get(proxyConfigKeyOrId: string): Promise<ProxyConfigRead>;
                                                                                                                                                                                                                                                                      list(params?: IPagination): Promise<ProxyConfigRead[]>;
                                                                                                                                                                                                                                                                      update(
                                                                                                                                                                                                                                                                          proxyConfigKeyOrId: string,
                                                                                                                                                                                                                                                                          proxyConfig: ProxyConfigUpdate,
                                                                                                                                                                                                                                                                      ): Promise<ProxyConfigRead>;
                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Implemented by

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Creates a proxy configuration; an existing key may return the existing configuration.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • proxyConfig: ProxyConfigCreate +

                                                                                                                                                                                                                                                                      The key, name, secret and optional authentication/mapping rules.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Returns Promise<ProxyConfigRead>

                                                                                                                                                                                                                                                                    The complete API response, preserving its secret without merging submitted values.

                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitApiError If input cannot be JSON-serialized or the API rejects it.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Deletes a proxy configuration by its key or UUID.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • proxyConfigKeyOrId: string +

                                                                                                                                                                                                                                                                      The proxy configuration key or UUID.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                                                                                    A promise that resolves to undefined after successful deletion.

                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitApiError If the configuration is absent or the API denies deletion.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Gets a proxy configuration by its key or UUID.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • proxyConfigKeyOrId: string +

                                                                                                                                                                                                                                                                      The proxy configuration key or UUID.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Returns Promise<ProxyConfigRead>

                                                                                                                                                                                                                                                                    The complete stored configuration; any returned secret mask is preserved.

                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitApiError If the configuration is absent or the API rejects the request.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Lists proxy configurations in the selected environment.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • Optionalparams: IPagination +

                                                                                                                                                                                                                                                                      Pagination; page defaults to 1 and perPage to 100.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Returns Promise<ProxyConfigRead[]>

                                                                                                                                                                                                                                                                    Complete stored rows in a plain array, including the received secret values.

                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitApiError If the API rejects the request.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Partially updates the supplied fields; mapping rules may use should_delete for removal.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • proxyConfigKeyOrId: string +

                                                                                                                                                                                                                                                                      The proxy configuration key or UUID.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • proxyConfig: ProxyConfigUpdate +

                                                                                                                                                                                                                                                                      The name, secret, authentication mechanism and/or mapping rule updates.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Returns Promise<ProxyConfigRead>

                                                                                                                                                                                                                                                                    The complete API response, preserving its secret without merging submitted values.

                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitApiError If input cannot be JSON-serialized or the API rejects it.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/IRelationshipTuplesApi.html b/docs/interfaces/IRelationshipTuplesApi.html new file mode 100644 index 00000000..1f841588 --- /dev/null +++ b/docs/interfaces/IRelationshipTuplesApi.html @@ -0,0 +1,248 @@ +IRelationshipTuplesApi | permitio
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                    Interface IRelationshipTuplesApi

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    API client for managing role createments.

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    interface IRelationshipTuplesApi {
                                                                                                                                                                                                                                                                        bulkRelationshipTuples(
                                                                                                                                                                                                                                                                            tuples: RelationshipTupleCreate[],
                                                                                                                                                                                                                                                                        ): Promise<object>;
                                                                                                                                                                                                                                                                        bulkUnRelationshipTuples(
                                                                                                                                                                                                                                                                            tuples: RelationshipTupleDelete[],
                                                                                                                                                                                                                                                                        ): Promise<object>;
                                                                                                                                                                                                                                                                        create(tuple: RelationshipTupleCreate): Promise<RelationshipTupleRead>;
                                                                                                                                                                                                                                                                        delete(tuple: RelationshipTupleDelete): Promise<void>;
                                                                                                                                                                                                                                                                        list(params: IListRelationshipTuples): Promise<RelationshipTupleRead[]>;
                                                                                                                                                                                                                                                                        listDetailed(
                                                                                                                                                                                                                                                                            params?: IListRelationshipTuples,
                                                                                                                                                                                                                                                                        ): Promise<PaginatedResultRelationshipTupleDetailedRead>;
                                                                                                                                                                                                                                                                        waitForSync(timeout: number | null, policy?: FactsSyncTimeoutPolicy): this;
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Hierarchy

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • IWaitForSync +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • IRelationshipTuplesApi
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Implemented by

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Creates multiple relationship tuples at once using the provided tuple data. +Each tuple object is of type RelationshipTupleCreate and is essentially a tuple of (subject, relation, object, tenant).

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Returns Promise<object>

                                                                                                                                                                                                                                                                      A promise that resolves with the bulk assignment report.

                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Deletes multiple relationship tuples at once using the provided tuple data. +Each tuple object is of type RelationshipTupleDelete and is essentially a tuple of (subject, relation, object).

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Returns Promise<object>

                                                                                                                                                                                                                                                                      The response object. Its fields are unspecified by the current API schema.

                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Removes a relationship tuple.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Returns Promise<void>

                                                                                                                                                                                                                                                                      A promise that resolves when the tuple is successfully deleted.

                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • timeout: number | null +

                                                                                                                                                                                                                                                                        The maximum number of seconds to wait for the synchronization to complete. +Set to null to wait indefinitely.

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                                                                                                                                                                                                                                        Controls what happens when the timeout is reached during synchronization.

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Returns this

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/IResource.html b/docs/interfaces/IResource.html index 6cee6e2a..827549e8 100644 --- a/docs/interfaces/IResource.html +++ b/docs/interfaces/IResource.html @@ -1,234 +1,98 @@ -IResource | permitio
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                    +IResource | permitio
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                      Interface IResource

                                                                                                                                                                                                                                                                      Respresents a protected resource passed to the permit.check() function. The permit.check() function will check if the user is authorized to access the resource described by this interface, according to the specified check parameters.

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      interface IResource {
                                                                                                                                                                                                                                                                          attributes?: Dict;
                                                                                                                                                                                                                                                                          key?: string;
                                                                                                                                                                                                                                                                          tenant?: string;
                                                                                                                                                                                                                                                                          type: string;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Hierarchy (View Summary)

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                      • IResource
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                      attributes?: Dict
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      attributes?: Dict

                                                                                                                                                                                                                                                                      Extra attributes associated with the resource. This is particularly relevant if the policy is ABAC (Attribute-Based Access Control).

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                    • Defined in src/enforcement/interfaces.ts:99
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      key?: string

                                                                                                                                                                                                                                                                      The key of the resource instance, which is the customer-side ID of the resource. Can be used by relationship-based access control policies or by attribute-based access control policies. If no key is provided (i.e: undefined), the authorization query is: Can the user perform the action on any resource of this type? (i.e., all resources in this resource namespace)

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                    • Defined in src/enforcement/interfaces.ts:89
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      tenant?: string

                                                                                                                                                                                                                                                                      The tenant under which the resource is defined. The permissions service is multi-tenant by default, so a resource must be associated with a tenant.

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                    • Defined in src/enforcement/interfaces.ts:94
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      type: string

                                                                                                                                                                                                                                                                      The resource type, represents a namespace of resources. For example, all task resources are objects under the task namespace.

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • Defined in src/enforcement/interfaces.ts:81
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/IResourceActionGroupsApi.html b/docs/interfaces/IResourceActionGroupsApi.html index ed7455f1..83a2cee4 100644 --- a/docs/interfaces/IResourceActionGroupsApi.html +++ b/docs/interfaces/IResourceActionGroupsApi.html @@ -1,410 +1,263 @@ -IResourceActionGroupsApi | permitio
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                      +IResourceActionGroupsApi | permitio
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                        Interface IResourceActionGroupsApi

                                                                                                                                                                                                                                                                        Interface representing the Resource Action Groups API.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        • IResourceActionGroupsApi
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        interface IResourceActionGroupsApi {
                                                                                                                                                                                                                                                                            create(
                                                                                                                                                                                                                                                                                resourceKey: string,
                                                                                                                                                                                                                                                                                groupData: ResourceActionGroupCreate,
                                                                                                                                                                                                                                                                            ): Promise<ResourceActionGroupRead>;
                                                                                                                                                                                                                                                                            delete(resourceKey: string, groupKey: string): Promise<void>;
                                                                                                                                                                                                                                                                            get(
                                                                                                                                                                                                                                                                                resourceKey: string,
                                                                                                                                                                                                                                                                                groupKey: string,
                                                                                                                                                                                                                                                                            ): Promise<ResourceActionGroupRead>;
                                                                                                                                                                                                                                                                            getById(
                                                                                                                                                                                                                                                                                resourceId: string,
                                                                                                                                                                                                                                                                                groupId: string,
                                                                                                                                                                                                                                                                            ): Promise<ResourceActionGroupRead>;
                                                                                                                                                                                                                                                                            getByKey(
                                                                                                                                                                                                                                                                                resourceKey: string,
                                                                                                                                                                                                                                                                                groupKey: string,
                                                                                                                                                                                                                                                                            ): Promise<ResourceActionGroupRead>;
                                                                                                                                                                                                                                                                            list(params: IListActionGroups): Promise<ResourceActionGroupRead[]>;
                                                                                                                                                                                                                                                                            update(
                                                                                                                                                                                                                                                                                resourceKey: string,
                                                                                                                                                                                                                                                                                groupKey: string,
                                                                                                                                                                                                                                                                                groupData: ResourceActionGroupUpdate,
                                                                                                                                                                                                                                                                            ): Promise<ResourceActionGroupRead>;
                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                        Implemented by

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:32
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Methods

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the created action group.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the created action group.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                          Deletes a action group based on the resource key and group key.

                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • resourceKey: string

                                                                                                                                                                                                                                                                            The resource key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            groupKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • groupKey: string

                                                                                                                                                                                                                                                                          The group key.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                                        A promise that resolves when the action group is successfully deleted.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                                        A promise that resolves when the action group is successfully deleted.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:113
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                          Retrieves an action group based on the resource key and the group key.

                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • resourceKey: string

                                                                                                                                                                                                                                                                            The resource key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            groupKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • groupKey: string

                                                                                                                                                                                                                                                                          The group key.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:51
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                          Retrieves an action group based on the resource ID and the group ID. -Alias for the get method.

                                                                                                                                                                                                                                                                          +Alias for the get method.

                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            resourceId: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • resourceId: string

                                                                                                                                                                                                                                                                            The resource ID.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            groupId: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • groupId: string

                                                                                                                                                                                                                                                                          The group ID.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:75
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                          Retrieves an action group based on the resource key and the group key. -Alias for the get method.

                                                                                                                                                                                                                                                                          +Alias for the get method.

                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • resourceKey: string

                                                                                                                                                                                                                                                                            The resource key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            groupKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • groupKey: string

                                                                                                                                                                                                                                                                          The group key.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the action group.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:63
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead[]>

                                                                                                                                                                                                                                                                        A promise that resolves to an array of ResourceActionGroupRead objects representing the action groups.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        See

                                                                                                                                                                                                                                                                        IListActionGroups

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:40
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                          Updates an action group.

                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            resourceKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • resourceKey: string

                                                                                                                                                                                                                                                                            The resource key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            groupKey: string
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • groupKey: string

                                                                                                                                                                                                                                                                          The group key.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                          groupData: ResourceActionGroupUpdate
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • groupData: ResourceActionGroupUpdate

                                                                                                                                                                                                                                                                          The action group data.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the updated action group.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        Returns Promise<ResourceActionGroupRead>

                                                                                                                                                                                                                                                                        A promise that resolves to a ResourceActionGroupRead object representing the updated action group.

                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • Defined in src/api/resource-action-groups.ts:99
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Methods +
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/IResourceActionsApi.html b/docs/interfaces/IResourceActionsApi.html index 5358b48d..083524c1 100644 --- a/docs/interfaces/IResourceActionsApi.html +++ b/docs/interfaces/IResourceActionsApi.html @@ -1,410 +1,263 @@ -IResourceActionsApi | permitio
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                        +IResourceActionsApi | permitio
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                                          Interface IResourceActionsApi

                                                                                                                                                                                                                                                                          Interface representing the Resource Actions API.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • IResourceActionsApi
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          interface IResourceActionsApi {
                                                                                                                                                                                                                                                                              create(
                                                                                                                                                                                                                                                                                  resourceKey: string,
                                                                                                                                                                                                                                                                                  actionData: ResourceActionCreate,
                                                                                                                                                                                                                                                                              ): Promise<ResourceActionRead>;
                                                                                                                                                                                                                                                                              delete(resourceKey: string, actionKey: string): Promise<void>;
                                                                                                                                                                                                                                                                              get(resourceKey: string, actionKey: string): Promise<ResourceActionRead>;
                                                                                                                                                                                                                                                                              getById(resourceId: string, actionId: string): Promise<ResourceActionRead>;
                                                                                                                                                                                                                                                                              getByKey(
                                                                                                                                                                                                                                                                                  resourceKey: string,
                                                                                                                                                                                                                                                                                  actionKey: string,
                                                                                                                                                                                                                                                                              ): Promise<ResourceActionRead>;
                                                                                                                                                                                                                                                                              list(params: IListActions): Promise<ResourceActionRead[]>;
                                                                                                                                                                                                                                                                              update(
                                                                                                                                                                                                                                                                                  resourceKey: string,
                                                                                                                                                                                                                                                                                  actionKey: string,
                                                                                                                                                                                                                                                                                  actionData: ResourceActionUpdate,
                                                                                                                                                                                                                                                                              ): Promise<ResourceActionRead>;
                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                          Implemented by

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:32
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Methods

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the created action.

                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the created action.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                            Deletes a action based on the resource key and action key.

                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              resourceKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • resourceKey: string

                                                                                                                                                                                                                                                                              The resource key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              actionKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • actionKey: string

                                                                                                                                                                                                                                                                            The action key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                                                                                          A promise that resolves when the action is successfully deleted.

                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                                                                                          A promise that resolves when the action is successfully deleted.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:112
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                            Retrieves an action based on the resource key and the action key.

                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              resourceKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • resourceKey: string

                                                                                                                                                                                                                                                                              The resource key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              actionKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • actionKey: string

                                                                                                                                                                                                                                                                            The action key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the action.

                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the action.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:51
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                            Retrieves an action based on the resource ID and the action ID. -Alias for the get method.

                                                                                                                                                                                                                                                                            +Alias for the get method.

                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              resourceId: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • resourceId: string

                                                                                                                                                                                                                                                                              The resource ID.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              actionId: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • actionId: string

                                                                                                                                                                                                                                                                            The action ID.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the action.

                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the action.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:75
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                            Retrieves an action based on the resource key and the action key. -Alias for the get method.

                                                                                                                                                                                                                                                                            +Alias for the get method.

                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              resourceKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • resourceKey: string

                                                                                                                                                                                                                                                                              The resource key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              actionKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • actionKey: string

                                                                                                                                                                                                                                                                            The action key.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the action.

                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the action.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:63
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead[]>

                                                                                                                                                                                                                                                                          A promise that resolves to an array of ResourceActionRead objects representing the actions.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          See

                                                                                                                                                                                                                                                                          IListActions

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:40
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                            Updates an existing environment.

                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              resourceKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • resourceKey: string

                                                                                                                                                                                                                                                                              The resource key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              actionKey: string
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • actionKey: string

                                                                                                                                                                                                                                                                            The key of the action to modify.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            actionData: ResourceActionUpdate
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • actionData: ResourceActionUpdate

                                                                                                                                                                                                                                                                            The data for updating the action.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the updated action.

                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                          Returns Promise<ResourceActionRead>

                                                                                                                                                                                                                                                                          A promise that resolves to a ResourceActionRead object representing the updated action.

                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • Defined in src/api/resource-actions.ts:98
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          Methods +
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/IResourceAttributesApi.html b/docs/interfaces/IResourceAttributesApi.html index 2fda35ff..3698f379 100644 --- a/docs/interfaces/IResourceAttributesApi.html +++ b/docs/interfaces/IResourceAttributesApi.html @@ -1,410 +1,263 @@ -IResourceAttributesApi | permitio
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                          +IResourceAttributesApi | permitio
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                            - +

                                                                                                                                                                                                                                                                            Interface IResourceAttributesApi

                                                                                                                                                                                                                                                                            Interface representing the Resource Attributes API.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • IResourceAttributesApi
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            interface IResourceAttributesApi {
                                                                                                                                                                                                                                                                                create(
                                                                                                                                                                                                                                                                                    resourceKey: string,
                                                                                                                                                                                                                                                                                    attributeData: ResourceAttributeCreate,
                                                                                                                                                                                                                                                                                ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                delete(resourceKey: string, attributeKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                get(
                                                                                                                                                                                                                                                                                    resourceKey: string,
                                                                                                                                                                                                                                                                                    attributeKey: string,
                                                                                                                                                                                                                                                                                ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                getById(
                                                                                                                                                                                                                                                                                    resourceId: string,
                                                                                                                                                                                                                                                                                    attributeId: string,
                                                                                                                                                                                                                                                                                ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                getByKey(
                                                                                                                                                                                                                                                                                    resourceKey: string,
                                                                                                                                                                                                                                                                                    attributeKey: string,
                                                                                                                                                                                                                                                                                ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                list(params: IListAttributes): Promise<ResourceAttributeRead[]>;
                                                                                                                                                                                                                                                                                update(
                                                                                                                                                                                                                                                                                    resourceKey: string,
                                                                                                                                                                                                                                                                                    attributeKey: string,
                                                                                                                                                                                                                                                                                    attributeData: ResourceAttributeUpdate,
                                                                                                                                                                                                                                                                                ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                            Implemented by

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:32
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Methods

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the created attribute.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the created attribute.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                              Deletes a attribute based on the resource key and attribute key.

                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                resourceKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • resourceKey: string

                                                                                                                                                                                                                                                                                The resource key.

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                attributeKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • attributeKey: string

                                                                                                                                                                                                                                                                              The attribute key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Returns Promise<void>

                                                                                                                                                                                                                                                                            A promise that resolves when the attribute is successfully deleted.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<void>

                                                                                                                                                                                                                                                                            A promise that resolves when the attribute is successfully deleted.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:115
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                              Retrieves an attribute based on the resource key and the attribute key.

                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                resourceKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • resourceKey: string

                                                                                                                                                                                                                                                                                The resource key.

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                attributeKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • attributeKey: string

                                                                                                                                                                                                                                                                              The attribute key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:51
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                              Retrieves an attribute based on the resource ID and the attribute ID. -Alias for the get method.

                                                                                                                                                                                                                                                                              +Alias for the get method.

                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                resourceId: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • resourceId: string

                                                                                                                                                                                                                                                                                The resource ID.

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                attributeId: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • attributeId: string

                                                                                                                                                                                                                                                                              The attribute ID.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:75
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                              Retrieves an attribute based on the resource key and the attribute key. -Alias for the get method.

                                                                                                                                                                                                                                                                              +Alias for the get method.

                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                resourceKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • resourceKey: string

                                                                                                                                                                                                                                                                                The resource key.

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                attributeKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • attributeKey: string

                                                                                                                                                                                                                                                                              The attribute key.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the attribute.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:63
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead[]>

                                                                                                                                                                                                                                                                            A promise that resolves to an array of ResourceAttributeRead objects representing the attributes.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            See

                                                                                                                                                                                                                                                                            IListAttributes

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:40
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                              Updates an existing environment.

                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                resourceKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • resourceKey: string

                                                                                                                                                                                                                                                                                The resource key.

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                attributeKey: string
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • attributeKey: string

                                                                                                                                                                                                                                                                              The key of the attribute to modify.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                              attributeData: ResourceAttributeUpdate
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • attributeData: ResourceAttributeUpdate

                                                                                                                                                                                                                                                                              The data for updating the attribute.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the updated attribute.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                            A promise that resolves to a ResourceAttributeRead object representing the updated attribute.

                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • Defined in src/api/resource-attributes.ts:101
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Methods +
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/IResourceInstancesApi.html b/docs/interfaces/IResourceInstancesApi.html new file mode 100644 index 00000000..2fe6ede5 --- /dev/null +++ b/docs/interfaces/IResourceInstancesApi.html @@ -0,0 +1,330 @@ +IResourceInstancesApi | permitio
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                              Interface IResourceInstancesApi

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              interface IResourceInstancesApi {
                                                                                                                                                                                                                                                                                  create<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      instanceData: ResourceInstanceCreate,
                                                                                                                                                                                                                                                                                  ): Promise<ResourceInstanceRead<Attributes>>;
                                                                                                                                                                                                                                                                                  delete(instanceKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                  get<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      instanceKey: string,
                                                                                                                                                                                                                                                                                  ): Promise<ResourceInstanceRead<Attributes>>;
                                                                                                                                                                                                                                                                                  getById<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      instanceId: string,
                                                                                                                                                                                                                                                                                  ): Promise<ResourceInstanceRead<Attributes>>;
                                                                                                                                                                                                                                                                                  getByKey<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      instanceKey: string,
                                                                                                                                                                                                                                                                                  ): Promise<ResourceInstanceRead<Attributes>>;
                                                                                                                                                                                                                                                                                  list<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      params?: IListResourceInstanceParams,
                                                                                                                                                                                                                                                                                  ): Promise<ResourceInstanceRead<Attributes>[]>;
                                                                                                                                                                                                                                                                                  listDetailed<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      params?: IListResourceInstanceDetailedParams,
                                                                                                                                                                                                                                                                                  ): Promise<PaginatedResultResourceInstanceDetailedRead<Attributes>>;
                                                                                                                                                                                                                                                                                  update<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                      instanceKey: string,
                                                                                                                                                                                                                                                                                      instanceData: ResourceInstanceUpdate,
                                                                                                                                                                                                                                                                                  ): Promise<ResourceInstanceRead<Attributes>>;
                                                                                                                                                                                                                                                                                  waitForSync(timeout: number | null, policy?: FactsSyncTimeoutPolicy): this;
                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • IWaitForSync +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • IResourceInstancesApi
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Implemented by

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Deletes a instance.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • instanceKey: string +

                                                                                                                                                                                                                                                                                  The key of the resource instance to delete.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Returns Promise<void>

                                                                                                                                                                                                                                                                                A promise that resolves when the resource instance is deleted.

                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Retrieves a instance by its key.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Type Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • Attributes extends object = object
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • instanceKey: string +

                                                                                                                                                                                                                                                                                  The key of the resource instance.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Returns Promise<ResourceInstanceRead<Attributes>>

                                                                                                                                                                                                                                                                                A promise that resolves to the resource instance.

                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Retrieves a resource instance by its ID. +Alias for the get method.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Type Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • Attributes extends object = object
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • instanceId: string +

                                                                                                                                                                                                                                                                                  The ID of the resource instance.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Returns Promise<ResourceInstanceRead<Attributes>>

                                                                                                                                                                                                                                                                                A promise that resolves to the resource instance.

                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Retrieves a instance by its key. +Alias for the get method.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Type Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • Attributes extends object = object
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • instanceKey: string +

                                                                                                                                                                                                                                                                                  The key of the resource instance.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Returns Promise<ResourceInstanceRead<Attributes>>

                                                                                                                                                                                                                                                                                A promise that resolves to the resource instance.

                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Parameters

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • timeout: number | null +

                                                                                                                                                                                                                                                                                  The maximum number of seconds to wait for the synchronization to complete. +Set to null to wait indefinitely.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                                                                                                                                                                                                                                                  Controls what happens when the timeout is reached during synchronization.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Returns this

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/IResourceRelationsApi.html b/docs/interfaces/IResourceRelationsApi.html new file mode 100644 index 00000000..db8c20ba --- /dev/null +++ b/docs/interfaces/IResourceRelationsApi.html @@ -0,0 +1,231 @@ +IResourceRelationsApi | permitio
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                Interface IResourceRelationsApi

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Interface representing the Resource Relations API.

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                interface IResourceRelationsApi {
                                                                                                                                                                                                                                                                                    create(
                                                                                                                                                                                                                                                                                        resourceKey: string,
                                                                                                                                                                                                                                                                                        RelationData: RelationCreate,
                                                                                                                                                                                                                                                                                    ): Promise<RelationRead>;
                                                                                                                                                                                                                                                                                    delete(resourceKey: string, relationKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                    get(resourceKey: string, relationKey: string): Promise<RelationRead>;
                                                                                                                                                                                                                                                                                    getById(resourceId: string, relationId: string): Promise<RelationRead>;
                                                                                                                                                                                                                                                                                    getByKey(resourceKey: string, relationKey: string): Promise<RelationRead>;
                                                                                                                                                                                                                                                                                    list(params: IListRelations): Promise<RelationRead[]>;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Implemented by

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Creates a new resource relation.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • resourceKey: string +

                                                                                                                                                                                                                                                                                    The resource key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • RelationData: RelationCreate +

                                                                                                                                                                                                                                                                                    The relation data.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Returns Promise<RelationRead>

                                                                                                                                                                                                                                                                                  A promise that resolves to a RelationRead object representing the created relation.

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Deletes a relation based on the resource key and relation key.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • resourceKey: string +

                                                                                                                                                                                                                                                                                    The resource key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • relationKey: string +

                                                                                                                                                                                                                                                                                    The relation key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Returns Promise<void>

                                                                                                                                                                                                                                                                                  A promise that resolves when the relation is successfully deleted.

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Retrieves a resource relation based on the resource key and the relation key.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • resourceKey: string +

                                                                                                                                                                                                                                                                                    The resource key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • relationKey: string +

                                                                                                                                                                                                                                                                                    The relation key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Returns Promise<RelationRead>

                                                                                                                                                                                                                                                                                  A promise that resolves to a RelationRead object representing the relation.

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Retrieves an relation based on the resource ID and the relation ID. +Alias for the get method.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • resourceId: string +

                                                                                                                                                                                                                                                                                    The resource ID.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • relationId: string +

                                                                                                                                                                                                                                                                                    The relation ID.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Returns Promise<RelationRead>

                                                                                                                                                                                                                                                                                  A promise that resolves to a RelationRead object representing the relation.

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Retrieves an relation based on the resource key and the relation key. +Alias for the get method.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • resourceKey: string +

                                                                                                                                                                                                                                                                                    The resource key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • relationKey: string +

                                                                                                                                                                                                                                                                                    The relation key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Returns Promise<RelationRead>

                                                                                                                                                                                                                                                                                  A promise that resolves to a RelationRead object representing the relation.

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Retrieves a list of all resource relations that are defined for a given resource.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Returns Promise<RelationRead[]>

                                                                                                                                                                                                                                                                                  A promise that resolves to an array of RelationRead objects representing the relations.

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/IResourceRolesApi.html b/docs/interfaces/IResourceRolesApi.html new file mode 100644 index 00000000..8a383dab --- /dev/null +++ b/docs/interfaces/IResourceRolesApi.html @@ -0,0 +1,420 @@ +IResourceRolesApi | permitio
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                  Interface IResourceRolesApi

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  interface IResourceRolesApi {
                                                                                                                                                                                                                                                                                      assignPermissions(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleKey: string,
                                                                                                                                                                                                                                                                                          permissions: string[],
                                                                                                                                                                                                                                                                                      ): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      create(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleData: ResourceRoleCreate,
                                                                                                                                                                                                                                                                                      ): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      createRoleDerivation(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleKey: string,
                                                                                                                                                                                                                                                                                          derivationData: DerivedRoleRuleCreate,
                                                                                                                                                                                                                                                                                      ): Promise<DerivedRoleRuleRead>;
                                                                                                                                                                                                                                                                                      delete(resourceKey: string, roleKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                      deleteRoleDerivation(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleKey: string,
                                                                                                                                                                                                                                                                                          derivationRule: DerivedRoleRuleDelete,
                                                                                                                                                                                                                                                                                      ): Promise<void>;
                                                                                                                                                                                                                                                                                      get(resourceKey: string, roleKey: string): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      getById(resourceId: string, roleId: string): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      getByKey(resourceKey: string, roleKey: string): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      list(params: IListResourceRoles): Promise<ResourceRoleRead[]>;
                                                                                                                                                                                                                                                                                      removePermissions(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleKey: string,
                                                                                                                                                                                                                                                                                          permissions: string[],
                                                                                                                                                                                                                                                                                      ): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      update(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleKey: string,
                                                                                                                                                                                                                                                                                          roleData: ResourceRoleUpdate,
                                                                                                                                                                                                                                                                                      ): Promise<ResourceRoleRead>;
                                                                                                                                                                                                                                                                                      updateRoleDerivationConditions(
                                                                                                                                                                                                                                                                                          resourceKey: string,
                                                                                                                                                                                                                                                                                          roleKey: string,
                                                                                                                                                                                                                                                                                          conditions: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings,
                                                                                                                                                                                                                                                                                      ): Promise<PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings>;
                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Implemented by

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Assigns permissions to a resource role.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • permissions: string[] +

                                                                                                                                                                                                                                                                                      An array of permission keys (resourceKey:actionKey) to be assigned to the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to a ResourceRoleRead object representing the updated role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Creates a new role.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleData: ResourceRoleCreate +

                                                                                                                                                                                                                                                                                      The data for the new role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the created role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Creates a new role derivation.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • derivationData: DerivedRoleRuleCreate +

                                                                                                                                                                                                                                                                                      An object of the derivation data.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<DerivedRoleRuleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to a DerivedRoleRuleRead object representing the updated derived role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Deletes a resource role.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role to delete.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                                                                                                    A promise that resolves when the role is deleted.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Delete a role derivation.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • derivationRule: DerivedRoleRuleDelete +

                                                                                                                                                                                                                                                                                      An object of the derivation role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                                                                                                    void.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Retrieves a resource role by its key.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Retrieves a resource role by its ID. +Alias for the get method.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceId: string +

                                                                                                                                                                                                                                                                                      The ID of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleId: string +

                                                                                                                                                                                                                                                                                      The ID of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Retrieves a resource role by its key. +Alias for the get method.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Removes permissions from a resource role.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • permissions: string[] +

                                                                                                                                                                                                                                                                                      An array of permission keys (resourceKey:actionKey) to be removed from the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to a ResourceRoleRead object representing the updated role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Updates a resource role.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • resourceKey: string +

                                                                                                                                                                                                                                                                                      The key of the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleKey: string +

                                                                                                                                                                                                                                                                                      The key of the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • roleData: ResourceRoleUpdate +

                                                                                                                                                                                                                                                                                      The updated data for the role.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRoleRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the updated role.

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/IResourcesApi.html b/docs/interfaces/IResourcesApi.html index 1e46d96f..5ad27a2d 100644 --- a/docs/interfaces/IResourcesApi.html +++ b/docs/interfaces/IResourcesApi.html @@ -1,407 +1,277 @@ -IResourcesApi | permitio
                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                  +IResourcesApi | permitio
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                    - +

                                                                                                                                                                                                                                                                                    Interface IResourcesApi

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Hierarchy

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                    • IResourcesApi
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    interface IResourcesApi {
                                                                                                                                                                                                                                                                                        create(resourceData: ResourceCreate): Promise<ResourceRead>;
                                                                                                                                                                                                                                                                                        delete(resourceKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                        get(resourceKey: string): Promise<ResourceRead>;
                                                                                                                                                                                                                                                                                        getById(resourceId: string): Promise<ResourceRead>;
                                                                                                                                                                                                                                                                                        getByKey(resourceKey: string): Promise<ResourceRead>;
                                                                                                                                                                                                                                                                                        list(): Promise<ResourceRead[]>;
                                                                                                                                                                                                                                                                                        list<T extends IPaginationExtended>(
                                                                                                                                                                                                                                                                                            pagination?: T,
                                                                                                                                                                                                                                                                                        ): Promise<
                                                                                                                                                                                                                                                                                            ReturnPaginationType<T, PaginatedResultResourceRead, ResourceRead[]>,
                                                                                                                                                                                                                                                                                        >;
                                                                                                                                                                                                                                                                                        replace(
                                                                                                                                                                                                                                                                                            resourceKey: string,
                                                                                                                                                                                                                                                                                            resourceData: ResourceReplace,
                                                                                                                                                                                                                                                                                        ): Promise<ResourceRead>;
                                                                                                                                                                                                                                                                                        update(
                                                                                                                                                                                                                                                                                            resourceKey: string,
                                                                                                                                                                                                                                                                                            resourceData: ResourceUpdate,
                                                                                                                                                                                                                                                                                        ): Promise<ResourceRead>;
                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                    Implemented by

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:25
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Methods

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the created resource.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:79
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • + +

                                                                                                                                                                                                                                                                                      Deletes a resource.

                                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceKey: string
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • resourceKey: string

                                                                                                                                                                                                                                                                                        The key of the resource to delete.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                      Returns Promise<void>

                                                                                                                                                                                                                                                                                      A promise that resolves when the resource is deleted.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                                                                                                    A promise that resolves when the resource is deleted.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:111
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • + +

                                                                                                                                                                                                                                                                                      Retrieves a resource by its key.

                                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceKey: string
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • resourceKey: string

                                                                                                                                                                                                                                                                                        The key of the resource.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                      Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                      A promise that resolves to the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the resource.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:47
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • + +

                                                                                                                                                                                                                                                                                      Retrieves a resource by its ID. -Alias for the get method.

                                                                                                                                                                                                                                                                                      +Alias for the get method.

                                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceId: string
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • resourceId: string

                                                                                                                                                                                                                                                                                        The ID of the resource.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                      Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                      A promise that resolves to the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the resource.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:69
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • + +

                                                                                                                                                                                                                                                                                      Retrieves a resource by its key. -Alias for the get method.

                                                                                                                                                                                                                                                                                      +Alias for the get method.

                                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceKey: string
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • resourceKey: string

                                                                                                                                                                                                                                                                                        The key of the resource.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                      Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                      A promise that resolves to the resource.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the resource.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:58
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                    Returns Promise<ReturnPaginationType<T, PaginatedResultResourceRead, ResourceRead[]>>

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:35
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • + +

                                                                                                                                                                                                                                                                                      Creates a resource if such a resource does not exists, otherwise completely replaces the resource configuration.

                                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceKey: string
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • resourceKey: string

                                                                                                                                                                                                                                                                                        The key of the resource.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceData: ResourceReplace
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • resourceData: ResourceReplace

                                                                                                                                                                                                                                                                                      The updated data for the resource.

                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the updated resource.

                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the updated resource.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:90
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • + +

                                                                                                                                                                                                                                                                                      Updates a resource.

                                                                                                                                                                                                                                                                                      Parameters

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceKey: string
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • resourceKey: string

                                                                                                                                                                                                                                                                                        The key of the resource.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        resourceData: ResourceUpdate
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • resourceData: ResourceUpdate

                                                                                                                                                                                                                                                                                      The updated data for the resource.

                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the updated resource.

                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                    Returns Promise<ResourceRead>

                                                                                                                                                                                                                                                                                    A promise that resolves to the updated resource.

                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                    Throws

                                                                                                                                                                                                                                                                                    PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • Defined in src/api/resources.ts:101
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    On This Page

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Methods +
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                    Generated using TypeDoc

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    \ No newline at end of file + +
                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/IRetryConfig.html b/docs/interfaces/IRetryConfig.html new file mode 100644 index 00000000..6c0f8260 --- /dev/null +++ b/docs/interfaces/IRetryConfig.html @@ -0,0 +1,124 @@ +IRetryConfig | permitio
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                      Interface IRetryConfig

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Configuration options for the retry mechanism

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      interface IRetryConfig {
                                                                                                                                                                                                                                                                                          backoffMultiplier?: number;
                                                                                                                                                                                                                                                                                          enabled?: boolean;
                                                                                                                                                                                                                                                                                          maxDelay?: number;
                                                                                                                                                                                                                                                                                          maxRetries?: number;
                                                                                                                                                                                                                                                                                          respectRetryAfter?: boolean;
                                                                                                                                                                                                                                                                                          retryCondition?: RetryConditionFn;
                                                                                                                                                                                                                                                                                          retryDelay?: number;
                                                                                                                                                                                                                                                                                          retryMethods?: readonly string[];
                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      backoffMultiplier?: number
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Multiplier for exponential backoff. Defaults to 2. +Each retry will wait: retryDelay * (backoffMultiplier ^ attemptNumber)

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      enabled?: boolean
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Whether retry is enabled. Retries are opt-in: they are off unless a retry +config object is supplied (which opts you in) or enabled: true is set +explicitly. The default config is disabled.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      maxDelay?: number
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Maximum delay between retries in milliseconds. Defaults to 30000 (30 seconds). +Prevents exponential backoff from growing too large.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      maxRetries?: number
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Maximum number of retries after the initial request. Defaults to 3 +(i.e. up to 4 total attempts).

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      respectRetryAfter?: boolean
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Whether to respect the Retry-After header for 429 responses. Defaults to true.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      retryCondition?: RetryConditionFn
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Custom function to determine if a request should be retried. +If not provided, retries recognized transient network errors and retryable status codes. +Cancellation, invalid request configuration and unsafe REST methods cannot be overridden.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      retryDelay?: number
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Initial delay between retries in milliseconds. Defaults to 1000 (1 second).

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      retryMethods?: readonly string[]
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      HTTP methods to retry. Defaults to ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']. +REST POST/PATCH are never retried by the SDK, even if listed. PDP/OPA authorization +POST requests are idempotent and are added to their separate retry policy.

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/IRoleAssignmentsApi.html b/docs/interfaces/IRoleAssignmentsApi.html index 8bd9aa4a..628d8e86 100644 --- a/docs/interfaces/IRoleAssignmentsApi.html +++ b/docs/interfaces/IRoleAssignmentsApi.html @@ -1,346 +1,251 @@ -IRoleAssignmentsApi | permitio
                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                      +IRoleAssignmentsApi | permitio
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                                        Interface IRoleAssignmentsApi

                                                                                                                                                                                                                                                                                        API client for managing role assignments.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        interface IRoleAssignmentsApi {
                                                                                                                                                                                                                                                                                            assign(assignment: RoleAssignmentCreate): Promise<RoleAssignmentRead>;
                                                                                                                                                                                                                                                                                            bulkAssign(
                                                                                                                                                                                                                                                                                                assignments: RoleAssignmentCreate[],
                                                                                                                                                                                                                                                                                            ): Promise<BulkRoleAssignmentReport>;
                                                                                                                                                                                                                                                                                            bulkUnassign(
                                                                                                                                                                                                                                                                                                unassignments: RoleAssignmentRemove[],
                                                                                                                                                                                                                                                                                            ): Promise<BulkRoleUnAssignmentReport>;
                                                                                                                                                                                                                                                                                            list<T extends IBaseListRoleAssignments>(
                                                                                                                                                                                                                                                                                                params: T,
                                                                                                                                                                                                                                                                                            ): Promise<ReturnListRoleAssignments<T>>;
                                                                                                                                                                                                                                                                                            listDetailed(
                                                                                                                                                                                                                                                                                                params?: IListRoleAssignmentsDetailed,
                                                                                                                                                                                                                                                                                            ): Promise<PaginatedResultRoleAssignmentDetailedRead>;
                                                                                                                                                                                                                                                                                            unassign(unassignment: RoleAssignmentRemove): Promise<void>;
                                                                                                                                                                                                                                                                                            waitForSync(timeout: number | null, policy?: FactsSyncTimeoutPolicy): this;
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                        • IWaitForSync +
                                                                                                                                                                                                                                                                                        • IWaitForSync
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          • IRoleAssignmentsApi
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • IRoleAssignmentsApi
                                                                                                                                                                                                                                                                                      • Implemented by

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Defined in src/api/role-assignments.ts:91
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Methods

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Returns Promise<RoleAssignmentRead>

                                                                                                                                                                                                                                                                                        A promise that resolves with the assigned role.

                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                        Returns Promise<BulkRoleAssignmentReport>

                                                                                                                                                                                                                                                                                        A promise that resolves with the bulk assignment report.

                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                      • Defined in src/api/role-assignments.ts:143
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                        Returns Promise<BulkRoleUnAssignmentReport>

                                                                                                                                                                                                                                                                                        A promise that resolves with the bulk unassignment report.

                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                      • Defined in src/api/role-assignments.ts:154
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                        Returns Promise<ReturnListRoleAssignments<T>>

                                                                                                                                                                                                                                                                                        A promise that resolves with an array of role assignments.

                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                      • Defined in src/api/role-assignments.ts:110
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                                          Unassigns a role from a user in the scope of a given tenant.

                                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                                                                                                          A promise that resolves when the role is successfully unassigned.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                                                        A promise that resolves when the role is successfully unassigned.

                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                                        Throws

                                                                                                                                                                                                                                                                                        PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                      • Defined in src/api/role-assignments.ts:132
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • + +

                                                                                                                                                                                                                                                                                          Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                                                                                                                                                                                                                                          Parameters

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                            timeout: null | number
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • timeout: number | null

                                                                                                                                                                                                                                                                                            The maximum number of seconds to wait for the synchronization to complete. Set to null to wait indefinitely.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Returns IRoleAssignmentsApi

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                                                                                                                                                                                                                                                          Controls what happens when the timeout is reached during synchronization.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Returns this

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Defined in src/api/base.ts:233
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Methods +
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/IRolesApi.html b/docs/interfaces/IRolesApi.html index 9dc2c495..a11a4825 100644 --- a/docs/interfaces/IRolesApi.html +++ b/docs/interfaces/IRolesApi.html @@ -1,438 +1,332 @@ -IRolesApi | permitio
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                        +IRolesApi | permitio
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                                                          Interface IRolesApi

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          • IRolesApi
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          interface IRolesApi {
                                                                                                                                                                                                                                                                                              assignPermissions(
                                                                                                                                                                                                                                                                                                  roleKey: string,
                                                                                                                                                                                                                                                                                                  permissions: string[],
                                                                                                                                                                                                                                                                                              ): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                              bulkCreateOrReplace(
                                                                                                                                                                                                                                                                                                  roles: RoleCreateBulk[],
                                                                                                                                                                                                                                                                                              ): Promise<RoleCreateBulkOperationResult>;
                                                                                                                                                                                                                                                                                              create(roleData: RoleCreate): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                              delete(roleKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                              get(roleKey: string): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                              getById(roleId: string): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                              getByKey(roleKey: string): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                              list(): Promise<RoleRead[]>;
                                                                                                                                                                                                                                                                                              list<T extends IPaginationExtended>(
                                                                                                                                                                                                                                                                                                  pagination?: T,
                                                                                                                                                                                                                                                                                              ): Promise<ReturnPaginationType<T, PaginatedResultRoleRead, RoleRead[]>>;
                                                                                                                                                                                                                                                                                              removePermissions(
                                                                                                                                                                                                                                                                                                  roleKey: string,
                                                                                                                                                                                                                                                                                                  permissions: string[],
                                                                                                                                                                                                                                                                                              ): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                              update(roleKey: string, roleData: RoleUpdate): Promise<RoleRead>;
                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                          Implemented by

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:28
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Methods

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Assigns permissions to a role.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleKey: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleKey: string

                                                                                                                                                                                                                                                                                              The key of the role.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              permissions: string[]
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • permissions: string[]

                                                                                                                                                                                                                                                                                            An array of permission keys (resourceKey:actionKey) to be assigned to the role.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to a RoleRead object representing the updated role.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to a RoleRead object representing the updated role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:91
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Creates a new role.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                            A promise that resolves to the created role.

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to the created role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:82
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Deletes a role.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleKey: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleKey: string

                                                                                                                                                                                                                                                                                              The key of the role to delete.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<void>

                                                                                                                                                                                                                                                                                            A promise that resolves when the role is deleted.

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Returns Promise<void>

                                                                                                                                                                                                                                                                                          A promise that resolves when the role is deleted.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:112
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Retrieves a role by its key.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleKey: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleKey: string

                                                                                                                                                                                                                                                                                              The key of the role.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                            A promise that resolves to the role.

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to the role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:50
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Retrieves a role by its ID. -Alias for the get method.

                                                                                                                                                                                                                                                                                            +Alias for the get method.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleId: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleId: string

                                                                                                                                                                                                                                                                                              The ID of the role.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                            A promise that resolves to the role.

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to the role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:72
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Retrieves a role by its key. -Alias for the get method.

                                                                                                                                                                                                                                                                                            +Alias for the get method.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleKey: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleKey: string

                                                                                                                                                                                                                                                                                              The key of the role.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                            A promise that resolves to the role.

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to the role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:61
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                          Returns Promise<ReturnPaginationType<T, PaginatedResultRoleRead, RoleRead[]>>

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:38
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Removes permissions from a role.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleKey: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleKey: string

                                                                                                                                                                                                                                                                                              The key of the role.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              permissions: string[]
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • permissions: string[]

                                                                                                                                                                                                                                                                                            An array of permission keys (resourceKey:actionKey) to be removed from the role.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to a RoleRead object representing the updated role.

                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to a RoleRead object representing the updated role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:132
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • + +

                                                                                                                                                                                                                                                                                            Updates a role.

                                                                                                                                                                                                                                                                                            Parameters

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleKey: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • roleKey: string

                                                                                                                                                                                                                                                                                              The key of the role.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              roleData: RoleUpdate
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • roleData: RoleUpdate

                                                                                                                                                                                                                                                                                            The updated data for the role.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to the updated role.

                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                          Returns Promise<RoleRead>

                                                                                                                                                                                                                                                                                          A promise that resolves to the updated role.

                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                          Throws

                                                                                                                                                                                                                                                                                          PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Defined in src/api/roles.ts:102
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Methods +
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/ITenantsApi.html b/docs/interfaces/ITenantsApi.html index c984c633..0a65894d 100644 --- a/docs/interfaces/ITenantsApi.html +++ b/docs/interfaces/ITenantsApi.html @@ -1,458 +1,423 @@ -ITenantsApi | permitio
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                          +ITenantsApi | permitio
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                            - +

                                                                                                                                                                                                                                                                                            Interface ITenantsApi

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            interface ITenantsApi {
                                                                                                                                                                                                                                                                                                addUser<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    tenantKey: string,
                                                                                                                                                                                                                                                                                                    userData: UserCreate,
                                                                                                                                                                                                                                                                                                ): Promise<UserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                create<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    tenantData: TenantCreate,
                                                                                                                                                                                                                                                                                                ): Promise<TenantRead<Attributes>>;
                                                                                                                                                                                                                                                                                                delete(tenantKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                                deleteTenantUser(tenantKey: string, userKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                                get<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    tenantKey: string,
                                                                                                                                                                                                                                                                                                ): Promise<TenantRead<Attributes>>;
                                                                                                                                                                                                                                                                                                getById<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    tenantId: string,
                                                                                                                                                                                                                                                                                                ): Promise<TenantRead<Attributes>>;
                                                                                                                                                                                                                                                                                                getByKey<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    tenantKey: string,
                                                                                                                                                                                                                                                                                                ): Promise<TenantRead<Attributes>>;
                                                                                                                                                                                                                                                                                                list<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    params: IListTenantsParams & { includeTotalCount: true },
                                                                                                                                                                                                                                                                                                ): Promise<PaginatedResultTenantRead<Attributes>>;
                                                                                                                                                                                                                                                                                                list<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    params?: IListTenantsParams & { includeTotalCount?: false },
                                                                                                                                                                                                                                                                                                ): Promise<TenantRead<Attributes>[]>;
                                                                                                                                                                                                                                                                                                list<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    params?: IListTenantsParams,
                                                                                                                                                                                                                                                                                                ): Promise<
                                                                                                                                                                                                                                                                                                    PaginatedResultTenantRead<Attributes>
                                                                                                                                                                                                                                                                                                    | TenantRead<Attributes>[],
                                                                                                                                                                                                                                                                                                >;
                                                                                                                                                                                                                                                                                                listTenantUsers<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    params: IListTenantUsers,
                                                                                                                                                                                                                                                                                                ): Promise<PaginatedResultUserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                update<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                    tenantKey: string,
                                                                                                                                                                                                                                                                                                    tenantData: TenantUpdate,
                                                                                                                                                                                                                                                                                                ): Promise<TenantRead<Attributes>>;
                                                                                                                                                                                                                                                                                                waitForSync(timeout: number | null, policy?: FactsSyncTimeoutPolicy): this;
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • IWaitForSync +
                                                                                                                                                                                                                                                                                            • IWaitForSync
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • ITenantsApi
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • ITenantsApi
                                                                                                                                                                                                                                                                                          • Implemented by

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:51
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Methods

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Creates a new user and associates it with a tenant, without requiring a role assignment. +Uses the control-plane API even when facts proxying or waitForSync is enabled. +The acknowledgement does not guarantee that the PDP has synchronized the membership.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Type Parameters

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Attributes extends object = object
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantKey: string +

                                                                                                                                                                                                                                                                                                The existing tenant key or ID.

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • userData: UserCreate +

                                                                                                                                                                                                                                                                                                New user data; role_assignments is optional.

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Returns Promise<UserRead<Attributes>>

                                                                                                                                                                                                                                                                                              The created user, including its tenant membership.

                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              PermitApiError If the user already exists, the tenant is missing, +or the API rejects the request.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              PermitContextError If the environment context or API key is insufficient.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Returns Promise<TenantRead<Attributes>>

                                                                                                                                                                                                                                                                                            A promise that resolves to the created tenant.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:139
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Deletes a tenant.

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantKey: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantKey: string

                                                                                                                                                                                                                                                                                                The key of the tenant to delete.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Returns Promise<void>

                                                                                                                                                                                                                                                                                              A promise that resolves when the tenant is deleted.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Returns Promise<void>

                                                                                                                                                                                                                                                                                            A promise that resolves when the tenant is deleted.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:165
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Deletes a user from a given tenant (also removes all roles granted to the user in that tenant).

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantKey: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantKey: string

                                                                                                                                                                                                                                                                                                The key of the tenant from which the user will be deleted.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                userKey: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • userKey: string

                                                                                                                                                                                                                                                                                              The key of the user to be deleted.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<void>

                                                                                                                                                                                                                                                                                            A promise that resolves when the user is successfully deleted.

                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                            Returns Promise<void>

                                                                                                                                                                                                                                                                                            A promise that resolves when the user is successfully deleted.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:176
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Retrieves a tenant by its key.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Type Parameters

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Attributes extends object = object

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantKey: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantKey: string

                                                                                                                                                                                                                                                                                                The key of the tenant.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Returns Promise<TenantRead>

                                                                                                                                                                                                                                                                                              A promise that resolves to the tenant.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Returns Promise<TenantRead<Attributes>>

                                                                                                                                                                                                                                                                                            A promise that resolves to the tenant.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:107
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Retrieves a tenant by its ID. -Alias for the get method.

                                                                                                                                                                                                                                                                                              +Alias for the get method.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Type Parameters

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Attributes extends object = object

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantId: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantId: string

                                                                                                                                                                                                                                                                                                The ID of the tenant.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Returns Promise<TenantRead>

                                                                                                                                                                                                                                                                                              A promise that resolves to the tenant.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Returns Promise<TenantRead<Attributes>>

                                                                                                                                                                                                                                                                                            A promise that resolves to the tenant.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:129
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Retrieves a tenant by its key. -Alias for the get method.

                                                                                                                                                                                                                                                                                              +Alias for the get method.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Type Parameters

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Attributes extends object = object

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantKey: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantKey: string

                                                                                                                                                                                                                                                                                                The key of the tenant.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Returns Promise<TenantRead>

                                                                                                                                                                                                                                                                                              A promise that resolves to the tenant.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Returns Promise<TenantRead<Attributes>>

                                                                                                                                                                                                                                                                                            A promise that resolves to the tenant.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:118
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                            Returns Promise<PaginatedResultTenantRead<Attributes>>

                                                                                                                                                                                                                                                                                            Tenant rows by default, or the complete page when includeTotalCount is true. +Dynamic or optional boolean flags retain the union of both result shapes.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            See

                                                                                                                                                                                                                                                                                            IListTenantsParams

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:67
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                            Returns Promise<PaginatedResultUserRead<Attributes>>

                                                                                                                                                                                                                                                                                            A promise that resolves to a PaginatedResultUserRead object containing the list of tenant users.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:79
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Updates a tenant.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Type Parameters

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Attributes extends object = object

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantKey: string
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • tenantKey: string

                                                                                                                                                                                                                                                                                                The key of the tenant.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                tenantData: TenantUpdate
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • tenantData: TenantUpdate

                                                                                                                                                                                                                                                                                              The updated data for the tenant.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Returns Promise<TenantRead>

                                                                                                                                                                                                                                                                                            A promise that resolves to the updated tenant.

                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                            Returns Promise<TenantRead<Attributes>>

                                                                                                                                                                                                                                                                                            A promise that resolves to the updated tenant.

                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                            Throws

                                                                                                                                                                                                                                                                                            PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                          • Defined in src/api/tenants.ts:152
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • + +

                                                                                                                                                                                                                                                                                              Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                                                                                                                                                                                                                                              Parameters

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                timeout: null | number
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • timeout: number | null

                                                                                                                                                                                                                                                                                                The maximum number of seconds to wait for the synchronization to complete. Set to null to wait indefinitely.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Returns ITenantsApi

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                                                                                                                                                                                                                                                              Controls what happens when the timeout is reached during synchronization.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Returns this

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • Defined in src/api/base.ts:233
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Methods +
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/IUser.html b/docs/interfaces/IUser.html index 48744c12..8fcfe0c9 100644 --- a/docs/interfaces/IUser.html +++ b/docs/interfaces/IUser.html @@ -1,236 +1,92 @@ -IUser | permitio
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                            +IUser | permitio
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                              - +

                                                                                                                                                                                                                                                                                              Interface IUser

                                                                                                                                                                                                                                                                                              Respresents a user that is attempting to do an action on a protected resource. Passed as part of the input to the permit.check() function.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • IUser
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              interface IUser {
                                                                                                                                                                                                                                                                                                  attributes?: Dict;
                                                                                                                                                                                                                                                                                                  email?: string;
                                                                                                                                                                                                                                                                                                  firstName?: string;
                                                                                                                                                                                                                                                                                                  key: string;
                                                                                                                                                                                                                                                                                                  lastName?: string;
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • Defined in src/enforcement/interfaces.ts:42
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                              attributes?: Dict
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              attributes?: Dict

                                                                                                                                                                                                                                                                                              Custom attributes associated with the user, which can be used in ABAC (Attribute-Based Access Control).

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                            • Defined in src/enforcement/interfaces.ts:62
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              email?: string

                                                                                                                                                                                                                                                                                              The email address of the user (optional).

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                              firstName?: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • Defined in src/enforcement/interfaces.ts:58
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              firstName?: string

                                                                                                                                                                                                                                                                                              The first name of the user (optional).

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                            • Defined in src/enforcement/interfaces.ts:50
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              key: string

                                                                                                                                                                                                                                                                                              The user key, which is the customer-side ID of the user.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                              lastName?: string
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • Defined in src/enforcement/interfaces.ts:46
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              lastName?: string

                                                                                                                                                                                                                                                                                              The last name of the user (optional).

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • Defined in src/enforcement/interfaces.ts:54
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              On This Page

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Properties +
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                              Generated using TypeDoc

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              \ No newline at end of file + +
                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/IUserAttributesApi.html b/docs/interfaces/IUserAttributesApi.html new file mode 100644 index 00000000..02119844 --- /dev/null +++ b/docs/interfaces/IUserAttributesApi.html @@ -0,0 +1,188 @@ +IUserAttributesApi | permitio
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                Interface IUserAttributesApi

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                Defines the environment's user attribute schema; user values belong to the Users API.

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                interface IUserAttributesApi {
                                                                                                                                                                                                                                                                                                    create(
                                                                                                                                                                                                                                                                                                        attribute: ResourceAttributeCreate,
                                                                                                                                                                                                                                                                                                    ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                                    delete(attributeKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                                    get(attributeKey: string): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                                    list(params?: IPagination): Promise<ResourceAttributeRead[]>;
                                                                                                                                                                                                                                                                                                    update(
                                                                                                                                                                                                                                                                                                        attributeKey: string,
                                                                                                                                                                                                                                                                                                        attribute: ResourceAttributeUpdate,
                                                                                                                                                                                                                                                                                                    ): Promise<ResourceAttributeRead>;
                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                Implemented by

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Deletes a user attribute definition and related data; policies then see it as undefined.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • attributeKey: string +

                                                                                                                                                                                                                                                                                                    The attribute key or UUID.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Returns Promise<void>

                                                                                                                                                                                                                                                                                                  A promise that resolves to undefined after successful deletion.

                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitApiError If the attribute is absent or the API denies deletion.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Gets a user attribute definition by its key or UUID.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • attributeKey: string +

                                                                                                                                                                                                                                                                                                    The attribute key or UUID.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                                                  The complete stored attribute definition.

                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitApiError If the attribute is absent or the API rejects the request.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Lists user attribute definitions in the selected environment.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • Optionalparams: IPagination +

                                                                                                                                                                                                                                                                                                    Optional pagination; page defaults to 1 and perPage to 100.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Returns Promise<ResourceAttributeRead[]>

                                                                                                                                                                                                                                                                                                  The complete attribute rows, including identity, context and timestamps.

                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitApiError If the API rejects the request.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Partially updates a user attribute definition, overwriting the supplied fields.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • attributeKey: string +

                                                                                                                                                                                                                                                                                                    The attribute key or UUID.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • attribute: ResourceAttributeUpdate +

                                                                                                                                                                                                                                                                                                    The type and/or description to update.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Returns Promise<ResourceAttributeRead>

                                                                                                                                                                                                                                                                                                  The complete updated attribute definition.

                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitApiError If the attribute is absent or the API rejects the update.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  PermitContextError If the environment or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/IUserInvitesApi.html b/docs/interfaces/IUserInvitesApi.html new file mode 100644 index 00000000..600f09ca --- /dev/null +++ b/docs/interfaces/IUserInvitesApi.html @@ -0,0 +1,223 @@ +IUserInvitesApi | permitio
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                  Interface IUserInvitesApi

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Manages facts invites directly through the control plane; it does not send invitation mail.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  interface IUserInvitesApi {
                                                                                                                                                                                                                                                                                                      approve<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                          userInviteId: string,
                                                                                                                                                                                                                                                                                                          approval: ElementsUserInviteApprove,
                                                                                                                                                                                                                                                                                                      ): Promise<UserInviteApprovalRead<Attributes>>;
                                                                                                                                                                                                                                                                                                      create(invite: ElementsUserInviteCreate): Promise<ElementsUserInviteRead>;
                                                                                                                                                                                                                                                                                                      delete(userInviteId: string): Promise<void>;
                                                                                                                                                                                                                                                                                                      get(userInviteId: string): Promise<ElementsUserInviteRead>;
                                                                                                                                                                                                                                                                                                      list(
                                                                                                                                                                                                                                                                                                          params?: IListUserInvites,
                                                                                                                                                                                                                                                                                                      ): Promise<PaginatedResultElementsUserInviteRead>;
                                                                                                                                                                                                                                                                                                      update(
                                                                                                                                                                                                                                                                                                          userInviteId: string,
                                                                                                                                                                                                                                                                                                          invite: ElementsUserInviteUpdate,
                                                                                                                                                                                                                                                                                                      ): Promise<ElementsUserInviteRead>;
                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Implemented by

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Approves an invite, creating or reusing its user and granting membership and the invite role. +Uses the control plane even when facts proxying is enabled; success is not PDP synchronization.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Type Parameters

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • Attributes extends object = object
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • userInviteId: string +

                                                                                                                                                                                                                                                                                                      The internal invite ID.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • approval: ElementsUserInviteApprove +

                                                                                                                                                                                                                                                                                                      Matching email, final user key and required nullable attributes.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Returns Promise<UserInviteApprovalRead<Attributes>>

                                                                                                                                                                                                                                                                                                    The actual user; existing-user profile attributes are not guaranteed to be replaced. +HTTP 400 refusals omit remote text and body, which can contain another invite's email.

                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitApiError If approval is refused or the API denies write access.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitContextError If the selected context or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Deletes an invite record; it does not revoke facts created by an earlier approval.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • userInviteId: string +

                                                                                                                                                                                                                                                                                                      The internal invite ID.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Returns Promise<void>

                                                                                                                                                                                                                                                                                                    A promise that resolves to undefined after successful deletion.

                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitApiError If the invite is absent or write access is denied.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitContextError If the selected context or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Gets an invite by its internal ID.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • userInviteId: string +

                                                                                                                                                                                                                                                                                                      The internal invite ID; this route does not look up user keys.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Returns Promise<ElementsUserInviteRead>

                                                                                                                                                                                                                                                                                                    The stored invite.

                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitApiError If the invite is absent or the API rejects the request.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitContextError If the selected context or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Updates an invite using the complete editable body, even though the route uses PATCH.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Parameters

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • userInviteId: string +

                                                                                                                                                                                                                                                                                                      The internal invite ID.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • invite: ElementsUserInviteUpdate +

                                                                                                                                                                                                                                                                                                      All editable fields, including required nullable fields.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Returns Promise<ElementsUserInviteRead>

                                                                                                                                                                                                                                                                                                    The updated invite; changing status alone does not execute approval.

                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitApiError If the API rejects the body or denies write access.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    PermitContextError If the selected context or API key scope is insufficient.

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/IUserPermissions.html b/docs/interfaces/IUserPermissions.html new file mode 100644 index 00000000..49d42b34 --- /dev/null +++ b/docs/interfaces/IUserPermissions.html @@ -0,0 +1,36 @@ +IUserPermissions | permitio
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                    Interface IUserPermissions

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Indexable

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      [id: string]: TenantPermissions | ResourcePermissions
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/IUsersApi.html b/docs/interfaces/IUsersApi.html index e6446c44..33b3b96c 100644 --- a/docs/interfaces/IUsersApi.html +++ b/docs/interfaces/IUsersApi.html @@ -1,581 +1,491 @@ -IUsersApi | permitio
                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                    +IUsersApi | permitio
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                      Interface IUsersApi

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      interface IUsersApi {
                                                                                                                                                                                                                                                                                                          assignRole(
                                                                                                                                                                                                                                                                                                              assignment: RoleAssignmentCreate,
                                                                                                                                                                                                                                                                                                          ): Promise<RoleAssignmentRead>;
                                                                                                                                                                                                                                                                                                          bulkUserCreate(users: UserCreate[]): Promise<object>;
                                                                                                                                                                                                                                                                                                          bulkUserDelete(userKeys: string[]): Promise<object>;
                                                                                                                                                                                                                                                                                                          bulkUserReplace(users: UserCreate[]): Promise<object>;
                                                                                                                                                                                                                                                                                                          create<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              userData: UserCreate,
                                                                                                                                                                                                                                                                                                          ): Promise<UserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                          delete(userKey: string): Promise<void>;
                                                                                                                                                                                                                                                                                                          get<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              userKey: string,
                                                                                                                                                                                                                                                                                                          ): Promise<UserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                          getAssignedRoles<T extends IGetUserRoles>(
                                                                                                                                                                                                                                                                                                              params: T,
                                                                                                                                                                                                                                                                                                          ): Promise<ReturnIGetUserRolesType<T>>;
                                                                                                                                                                                                                                                                                                          getById<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              userId: string,
                                                                                                                                                                                                                                                                                                          ): Promise<UserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                          getByKey<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              userKey: string,
                                                                                                                                                                                                                                                                                                          ): Promise<UserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                          list<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              params?: IUsersListParams,
                                                                                                                                                                                                                                                                                                          ): Promise<PaginatedResultUserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                          sync<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              userData: UserCreate,
                                                                                                                                                                                                                                                                                                          ): Promise<ICreateOrUpdateUserResult<Attributes>>;
                                                                                                                                                                                                                                                                                                          unassignRole(unassignment: RoleAssignmentRemove): Promise<void>;
                                                                                                                                                                                                                                                                                                          update<Attributes extends object = object>(
                                                                                                                                                                                                                                                                                                              userKey: string,
                                                                                                                                                                                                                                                                                                              userData: UserUpdate,
                                                                                                                                                                                                                                                                                                          ): Promise<UserRead<Attributes>>;
                                                                                                                                                                                                                                                                                                          waitForSync(timeout: number | null, policy?: FactsSyncTimeoutPolicy): this;
                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                      • IWaitForSync +
                                                                                                                                                                                                                                                                                                      • IWaitForSync
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • IUsersApi
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Implemented by

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:133
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Methods

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<RoleAssignmentRead>

                                                                                                                                                                                                                                                                                                      A promise that resolves with the assigned role.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:232
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Creates users in bulk.

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserCreateBulkOperation>

                                                                                                                                                                                                                                                                                                        A promise that resolves with the bulk create users report .

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<object>

                                                                                                                                                                                                                                                                                                      A promise that resolves with the bulk create users report .

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:263
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Deletes users in bulk.

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userKeys: string[]
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • userKeys: string[]

                                                                                                                                                                                                                                                                                                          The array of user keys to delete.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserDeleteBulkOperation>

                                                                                                                                                                                                                                                                                                        A promise that resolves with the bulk delete users report .

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<object>

                                                                                                                                                                                                                                                                                                      A promise that resolves with the bulk delete users report .

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:273
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Replaces users in bulk.

                                                                                                                                                                                                                                                                                                        If a user exists, it will be replaced. Otherwise, it will be created.

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserReplaceBulkOperation>

                                                                                                                                                                                                                                                                                                        A promise that resolves with the bulk replacement users report .

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<object>

                                                                                                                                                                                                                                                                                                      A promise that resolves with the bulk replacement users report .

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:285
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Creates a new user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Attributes extends object = object

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserRead>

                                                                                                                                                                                                                                                                                                        A promise that resolves to the created user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<UserRead<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves to the created user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:186
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Deletes a user.

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userKey: string
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • userKey: string

                                                                                                                                                                                                                                                                                                          The key of the user to delete.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                                                                        A promise that resolves when the user is deleted.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<void>

                                                                                                                                                                                                                                                                                                      A promise that resolves when the user is deleted.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:222
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Retrieves a user by its key.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Attributes extends object = object

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userKey: string
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • userKey: string

                                                                                                                                                                                                                                                                                                          The key of the user.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserRead>

                                                                                                                                                                                                                                                                                                        A promise that resolves to the user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<UserRead<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves to the user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:154
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Retrieves the roles assigned to a user in a given tenant (if the tenant filter is provided) or across all tenants (if the tenant filter in not provided).

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          roleFilters: IGetUserRoles
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • params: T

                                                                                                                                                                                                                                                                                                          The filters for retrieving role assignments.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<RoleAssignmentRead[]>

                                                                                                                                                                                                                                                                                                        A promise that resolves with an array of role assignments for the user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<ReturnIGetUserRolesType<T>>

                                                                                                                                                                                                                                                                                                      A promise that resolves with an array of role assignments for the user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:253
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Retrieves a user by its ID. -Alias for the get method.

                                                                                                                                                                                                                                                                                                        +Alias for the get method.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Attributes extends object = object

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userId: string
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • userId: string

                                                                                                                                                                                                                                                                                                          The ID of the user.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserRead>

                                                                                                                                                                                                                                                                                                        A promise that resolves to the user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<UserRead<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves to the user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:176
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Retrieves a user by its key. -Alias for the get method.

                                                                                                                                                                                                                                                                                                        +Alias for the get method.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Attributes extends object = object

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userKey: string
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • userKey: string

                                                                                                                                                                                                                                                                                                          The key of the user.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<UserRead>

                                                                                                                                                                                                                                                                                                        A promise that resolves to the user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<UserRead<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves to the user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:165
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                      Returns Promise<PaginatedResultUserRead<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves to a PaginatedResultUserRead object containing the list of users.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      See

                                                                                                                                                                                                                                                                                                      IUsersListParams

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:142
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                      Returns Promise<ICreateOrUpdateUserResult<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves with the result of the user creation or update operation.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:210
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Unassigns a role from a user in the scope of a given tenant.

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns Promise<void>

                                                                                                                                                                                                                                                                                                        A promise that resolves when the role is successfully unassigned from the user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns Promise<void>

                                                                                                                                                                                                                                                                                                      A promise that resolves when the role is successfully unassigned from the user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:242
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Updates a user.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Attributes extends object = object

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userKey: string
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • userKey: string

                                                                                                                                                                                                                                                                                                          The key of the user.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          userData: UserUpdate
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • userData: UserUpdate

                                                                                                                                                                                                                                                                                                        The updated data for the user.

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Returns Promise<UserRead>

                                                                                                                                                                                                                                                                                                      A promise that resolves to the updated user.

                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                      Returns Promise<UserRead<Attributes>>

                                                                                                                                                                                                                                                                                                      A promise that resolves to the updated user.

                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitApiError If the API returns an error HTTP status code.

                                                                                                                                                                                                                                                                                                      - -

                                                                                                                                                                                                                                                                                                      Throws

                                                                                                                                                                                                                                                                                                      PermitContextError If the configured ApiContext does not match the required endpoint context.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/users.ts:197
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + +

                                                                                                                                                                                                                                                                                                        Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

                                                                                                                                                                                                                                                                                                        Parameters

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                          timeout: null | number
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • timeout: number | null

                                                                                                                                                                                                                                                                                                          The maximum number of seconds to wait for the synchronization to complete. Set to null to wait indefinitely.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Returns IUsersApi

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • Optionalpolicy: FactsSyncTimeoutPolicy +

                                                                                                                                                                                                                                                                                                        Controls what happens when the timeout is reached during synchronization.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • 'ignore': Respond immediately when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • 'fail': Respond with 424 status code when data update did not apply within the timeout period
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Returns this

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • Defined in src/api/base.ts:233
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Methods +
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/IUsersListParams.html b/docs/interfaces/IUsersListParams.html index ffb18b3c..e55bdab2 100644 --- a/docs/interfaces/IUsersListParams.html +++ b/docs/interfaces/IUsersListParams.html @@ -1,219 +1,102 @@ -IUsersListParams | permitio
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                      +IUsersListParams | permitio
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                                                        Interface IUsersListParams

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        interface IUsersListParams {
                                                                                                                                                                                                                                                                                                            includeResourceInstanceRoles?: boolean;
                                                                                                                                                                                                                                                                                                            page?: number;
                                                                                                                                                                                                                                                                                                            perPage?: number;
                                                                                                                                                                                                                                                                                                            role?: string;
                                                                                                                                                                                                                                                                                                            search?: string;
                                                                                                                                                                                                                                                                                                            searchOperator?: SearchOperator;
                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Hierarchy (View Summary)

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • Defined in src/api/users.ts:118
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        includeResourceInstanceRoles?: boolean
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Includes resource instance roles in each user's associated tenant details. +The API defaults to false; the list result remains the full paginated envelope.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        page?: number

                                                                                                                                                                                                                                                                                                        the page number to fetch (default: 1)

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                        perPage?: number
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • Defined in src/api/base.ts:78
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        perPage?: number

                                                                                                                                                                                                                                                                                                        how many items to fetch per page (default: 100)

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                      • Defined in src/api/base.ts:82
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        role?: string
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                      • Defined in src/api/users.ts:125
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        search?: string
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • Defined in src/api/users.ts:119
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        searchOperator?: SearchOperator
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Matches search against user keys, emails and names using the selected operator. +The API defaults to contains when this option is omitted.

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/LimitedPaginatedResultAuditLogModel.html b/docs/interfaces/LimitedPaginatedResultAuditLogModel.html new file mode 100644 index 00000000..0051a3eb --- /dev/null +++ b/docs/interfaces/LimitedPaginatedResultAuditLogModel.html @@ -0,0 +1,74 @@ +LimitedPaginatedResultAuditLogModel | permitio
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                          Interface LimitedPaginatedResultAuditLogModel

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          interface LimitedPaginatedResultAuditLogModel {
                                                                                                                                                                                                                                                                                                              data: AuditLogModel[];
                                                                                                                                                                                                                                                                                                              page_count?: number | null;
                                                                                                                                                                                                                                                                                                              pagination_count: number;
                                                                                                                                                                                                                                                                                                              total_count: number;
                                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                          List of Audit Log Models

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          page_count?: number | null
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          pagination_count: number
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          total_count: number
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/MappingRule.html b/docs/interfaces/MappingRule.html new file mode 100644 index 00000000..0024e9a4 --- /dev/null +++ b/docs/interfaces/MappingRule.html @@ -0,0 +1,104 @@ +MappingRule | permitio
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                            Interface MappingRule

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            interface MappingRule {
                                                                                                                                                                                                                                                                                                                action?: string;
                                                                                                                                                                                                                                                                                                                headers?: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                http_method: Methods;
                                                                                                                                                                                                                                                                                                                priority?: number;
                                                                                                                                                                                                                                                                                                                resource: string;
                                                                                                                                                                                                                                                                                                                url: string;
                                                                                                                                                                                                                                                                                                                url_type?: "regex";
                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            action?: string
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The action to match against the request action

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            headers?: { [key: string]: string }
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The headers to match against the request headers

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            http_method: Methods
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The HTTP method to match against the request method

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            priority?: number
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The priority of the mapping rule. The higher the priority, the higher the precedence

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            resource: string
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The resource to match against the request resource

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            url: string
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The URL to match against the request URL

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            url_type?: "regex"
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The URL type to match against the request URL can be, 'regex' or none

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/MappingRuleUpdate.html b/docs/interfaces/MappingRuleUpdate.html new file mode 100644 index 00000000..9463c000 --- /dev/null +++ b/docs/interfaces/MappingRuleUpdate.html @@ -0,0 +1,112 @@ +MappingRuleUpdate | permitio
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                              Interface MappingRuleUpdate

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              interface MappingRuleUpdate {
                                                                                                                                                                                                                                                                                                                  action?: string;
                                                                                                                                                                                                                                                                                                                  headers?: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                  http_method: Methods;
                                                                                                                                                                                                                                                                                                                  priority?: number;
                                                                                                                                                                                                                                                                                                                  resource: string;
                                                                                                                                                                                                                                                                                                                  should_delete?: boolean;
                                                                                                                                                                                                                                                                                                                  url: string;
                                                                                                                                                                                                                                                                                                                  url_type?: "regex";
                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              action?: string
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The action to match against the request action

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              headers?: { [key: string]: string }
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The headers to match against the request headers

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              http_method: Methods
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The HTTP method to match against the request method

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              priority?: number
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The priority of the mapping rule. The higher the priority, the higher the precedence

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              resource: string
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The resource to match against the request resource

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              should_delete?: boolean
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              If true, this mapping rule will be deleted during update.

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              url: string
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The URL to match against the request URL

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              url_type?: "regex"
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              The URL type to match against the request URL can be, 'regex' or none

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/OPAEngineDecisionLog.html b/docs/interfaces/OPAEngineDecisionLog.html new file mode 100644 index 00000000..9a10422b --- /dev/null +++ b/docs/interfaces/OPAEngineDecisionLog.html @@ -0,0 +1,96 @@ +OPAEngineDecisionLog | permitio
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                Interface OPAEngineDecisionLog

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                interface OPAEngineDecisionLog {
                                                                                                                                                                                                                                                                                                                    decision_id: string;
                                                                                                                                                                                                                                                                                                                    engine?: "OPA" | null;
                                                                                                                                                                                                                                                                                                                    input?: any;
                                                                                                                                                                                                                                                                                                                    labels: OPALabels;
                                                                                                                                                                                                                                                                                                                    metrics: OPAMetrics;
                                                                                                                                                                                                                                                                                                                    path: string;
                                                                                                                                                                                                                                                                                                                    result?: any;
                                                                                                                                                                                                                                                                                                                    timestamp: string;
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                decision_id: string
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                engine?: "OPA" | null
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                input?: any
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                labels: OPALabels
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                metrics: OPAMetrics
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                path: string
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                result?: any
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                timestamp: string
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/OrgMemberRead.html b/docs/interfaces/OrgMemberRead.html index a551b7a0..5b010f2c 100644 --- a/docs/interfaces/OrgMemberRead.html +++ b/docs/interfaces/OrgMemberRead.html @@ -1,385 +1,180 @@ -OrgMemberRead | permitio
                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                +OrgMemberRead | permitio
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                  Interface OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Export

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                  • OrgMemberRead
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  created_at: string
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  created_at: string

                                                                                                                                                                                                                                                                                                                  Date and time when the account member was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:64
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  email: string

                                                                                                                                                                                                                                                                                                                  Email of the user controlling this account

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  email_verified: boolean
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Whether this email address is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:28
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  email_verified: boolean
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Whether this email address is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  family_name?: string
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:32
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  family_name?: string

                                                                                                                                                                                                                                                                                                                  Last name of the user

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  given_name?: string
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:44
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  given_name?: string

                                                                                                                                                                                                                                                                                                                  First name of the user

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:40
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  id: string

                                                                                                                                                                                                                                                                                                                  Unique id of the account member

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  identities: IdentityRead[]
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  identities: IdentityRead[]
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  invite?: InviteRead
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  invite?: InviteRead
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  is_onboarding: boolean
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:78
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  is_onboarding: boolean

                                                                                                                                                                                                                                                                                                                  Whether or not this user is currently onboarding, needs to be replaced by a user journey object

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  is_superuser: boolean
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Whether or not this user has special access to permit.io organizations

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:56
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  is_superuser: boolean
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Whether or not this user has special access to permit.io organizations

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  last_ip?: string
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:52
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  last_ip?: string

                                                                                                                                                                                                                                                                                                                  Last IP address from which this user logged in.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  last_login?: string
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:72
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  last_login?: string

                                                                                                                                                                                                                                                                                                                  Last date and time this user logged in (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  logins_count?: number
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:68
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  logins_count?: number

                                                                                                                                                                                                                                                                                                                  Total number of logins this user has performed.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:76
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  name?: string

                                                                                                                                                                                                                                                                                                                  Name of this user

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                  onboarding_step: OnboardingStep
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:36
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  onboarding_step: OnboardingStep

                                                                                                                                                                                                                                                                                                                  the step the user is currently going through in onboarding

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:60
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  picture?: string

                                                                                                                                                                                                                                                                                                                  URL to picture, photo, or avatar of the user that controls this account.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:48
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  settings: object
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Custom permit.io dashboard settings, such as preferred theme, etc.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                  OrgMemberRead

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Custom permit.io dashboard settings, such as preferred theme, etc.

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/org-member-read.ts:82
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/PDPDataRefreshResponse.html b/docs/interfaces/PDPDataRefreshResponse.html new file mode 100644 index 00000000..2a83c4d7 --- /dev/null +++ b/docs/interfaces/PDPDataRefreshResponse.html @@ -0,0 +1,72 @@ +PDPDataRefreshResponse | permitio
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                    Interface PDPDataRefreshResponse

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    interface PDPDataRefreshResponse {
                                                                                                                                                                                                                                                                                                                        pdp_ids: string[];
                                                                                                                                                                                                                                                                                                                        update_id: string;
                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    pdp_ids: string[]
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    The ids of the PDP configurations that were targeted by this refresh.

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    update_id: string
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    The id of the generated OPAL DataUpdate. It is injected as the X-Permit-Update-Id header and surfaced in PDP/OPAL logs for correlation. Because the refresh is a full-data reload (dst_path=""), the PDP confirms it by advancing PDPInstance.current_data_date once the new bundle is fetched and saved (most_recent_data_fetch_id is only set for scoped/delta updates).

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/PaginatedResultAPIKeyRead.html b/docs/interfaces/PaginatedResultAPIKeyRead.html new file mode 100644 index 00000000..2fbb24d6 --- /dev/null +++ b/docs/interfaces/PaginatedResultAPIKeyRead.html @@ -0,0 +1,68 @@ +PaginatedResultAPIKeyRead | permitio
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                      Interface PaginatedResultAPIKeyRead

                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      interface PaginatedResultAPIKeyRead {
                                                                                                                                                                                                                                                                                                                          data: APIKeyRead[];
                                                                                                                                                                                                                                                                                                                          page_count?: number | null;
                                                                                                                                                                                                                                                                                                                          total_count: number;
                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      data: APIKeyRead[]
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      List of Api Keys

                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      page_count?: number | null
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      total_count: number
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/PaginatedResultElementsUserInviteRead.html b/docs/interfaces/PaginatedResultElementsUserInviteRead.html new file mode 100644 index 00000000..66593043 --- /dev/null +++ b/docs/interfaces/PaginatedResultElementsUserInviteRead.html @@ -0,0 +1,79 @@ +PaginatedResultElementsUserInviteRead | permitio
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                        Interface PaginatedResultElementsUserInviteRead

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Full invite page; page_count, when present, counts rows on the current page.

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        interface PaginatedResultElementsUserInviteRead {
                                                                                                                                                                                                                                                                                                                            data: ElementsUserInviteRead[];
                                                                                                                                                                                                                                                                                                                            page_count?: number;
                                                                                                                                                                                                                                                                                                                            total_count: number;
                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                        • Omit<GeneratedPage, "data"> +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                          • PaginatedResultElementsUserInviteRead
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                        The returned invite rows, including legal null values.

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        page_count?: number
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        total_count: number
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/PaginatedResultGroupReadSchema.html b/docs/interfaces/PaginatedResultGroupReadSchema.html new file mode 100644 index 00000000..fc07ff34 --- /dev/null +++ b/docs/interfaces/PaginatedResultGroupReadSchema.html @@ -0,0 +1,68 @@ +PaginatedResultGroupReadSchema | permitio
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                          Interface PaginatedResultGroupReadSchema

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          interface PaginatedResultGroupReadSchema {
                                                                                                                                                                                                                                                                                                                              data: GroupReadSchema[];
                                                                                                                                                                                                                                                                                                                              page_count?: number;
                                                                                                                                                                                                                                                                                                                              total_count: number;
                                                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                          List of Group Read Schemas

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          page_count?: number
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          total_count: number
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/PaginatedResultRelationshipTupleDetailedRead.html b/docs/interfaces/PaginatedResultRelationshipTupleDetailedRead.html new file mode 100644 index 00000000..1dd0c87a --- /dev/null +++ b/docs/interfaces/PaginatedResultRelationshipTupleDetailedRead.html @@ -0,0 +1,68 @@ +PaginatedResultRelationshipTupleDetailedRead | permitio
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                            Interface PaginatedResultRelationshipTupleDetailedRead

                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            interface PaginatedResultRelationshipTupleDetailedRead {
                                                                                                                                                                                                                                                                                                                                data: RelationshipTupleDetailedRead[];
                                                                                                                                                                                                                                                                                                                                page_count?: number;
                                                                                                                                                                                                                                                                                                                                total_count: number;
                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                            List of Detailed Relationship Tuples

                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            page_count?: number
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            total_count: number
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/PaginatedResultResourceInstanceDetailedRead.html b/docs/interfaces/PaginatedResultResourceInstanceDetailedRead.html new file mode 100644 index 00000000..01660c07 --- /dev/null +++ b/docs/interfaces/PaginatedResultResourceInstanceDetailedRead.html @@ -0,0 +1,84 @@ +PaginatedResultResourceInstanceDetailedRead | permitio
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                              Interface PaginatedResultResourceInstanceDetailedRead<Attributes>

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              The full detailed page with the same attribute shape on each returned instance.

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              interface PaginatedResultResourceInstanceDetailedRead<
                                                                                                                                                                                                                                                                                                                                  Attributes extends object = object,
                                                                                                                                                                                                                                                                                                                              > {
                                                                                                                                                                                                                                                                                                                                  data: ResourceInstanceDetailedRead<Attributes>[];
                                                                                                                                                                                                                                                                                                                                  page_count?: number;
                                                                                                                                                                                                                                                                                                                                  total_count: number;
                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Type Parameters

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                              • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                              • PaginatedResultResourceInstanceDetailedRead +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                • PaginatedResultResourceInstanceDetailedRead
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                              List of Detailed Resource Instances

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              page_count?: number
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              total_count: number
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/PaginatedResultResourceRead.html b/docs/interfaces/PaginatedResultResourceRead.html new file mode 100644 index 00000000..854a72d4 --- /dev/null +++ b/docs/interfaces/PaginatedResultResourceRead.html @@ -0,0 +1,68 @@ +PaginatedResultResourceRead | permitio
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                Interface PaginatedResultResourceRead

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                interface PaginatedResultResourceRead {
                                                                                                                                                                                                                                                                                                                                    data: ResourceRead[];
                                                                                                                                                                                                                                                                                                                                    page_count?: number;
                                                                                                                                                                                                                                                                                                                                    total_count: number;
                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                data: ResourceRead[]
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                List of Resources

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                page_count?: number
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                total_count: number
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/PaginatedResultRoleAssignmentDetailedRead.html b/docs/interfaces/PaginatedResultRoleAssignmentDetailedRead.html new file mode 100644 index 00000000..70dbd7ad --- /dev/null +++ b/docs/interfaces/PaginatedResultRoleAssignmentDetailedRead.html @@ -0,0 +1,68 @@ +PaginatedResultRoleAssignmentDetailedRead | permitio
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                  Interface PaginatedResultRoleAssignmentDetailedRead

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  interface PaginatedResultRoleAssignmentDetailedRead {
                                                                                                                                                                                                                                                                                                                                      data: RoleAssignmentDetailedRead[];
                                                                                                                                                                                                                                                                                                                                      page_count?: number;
                                                                                                                                                                                                                                                                                                                                      total_count: number;
                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                  List of Role Assignment Detaileds

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  page_count?: number
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  total_count: number
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/PaginatedResultRoleAssignmentRead.html b/docs/interfaces/PaginatedResultRoleAssignmentRead.html new file mode 100644 index 00000000..59840252 --- /dev/null +++ b/docs/interfaces/PaginatedResultRoleAssignmentRead.html @@ -0,0 +1,68 @@ +PaginatedResultRoleAssignmentRead | permitio
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                    Interface PaginatedResultRoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    interface PaginatedResultRoleAssignmentRead {
                                                                                                                                                                                                                                                                                                                                        data: RoleAssignmentRead[];
                                                                                                                                                                                                                                                                                                                                        page_count?: number;
                                                                                                                                                                                                                                                                                                                                        total_count: number;
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                    List of Role Assignments

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    page_count?: number
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    total_count: number
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/PaginatedResultRoleRead.html b/docs/interfaces/PaginatedResultRoleRead.html new file mode 100644 index 00000000..e0659b72 --- /dev/null +++ b/docs/interfaces/PaginatedResultRoleRead.html @@ -0,0 +1,68 @@ +PaginatedResultRoleRead | permitio
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                      Interface PaginatedResultRoleRead

                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      interface PaginatedResultRoleRead {
                                                                                                                                                                                                                                                                                                                                          data: RoleRead[];
                                                                                                                                                                                                                                                                                                                                          page_count?: number;
                                                                                                                                                                                                                                                                                                                                          total_count: number;
                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      data: RoleRead[]
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      List of Roles

                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      page_count?: number
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      total_count: number
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/PaginatedResultTenantRead.html b/docs/interfaces/PaginatedResultTenantRead.html new file mode 100644 index 00000000..2125f6dc --- /dev/null +++ b/docs/interfaces/PaginatedResultTenantRead.html @@ -0,0 +1,84 @@ +PaginatedResultTenantRead | permitio
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                        Interface PaginatedResultTenantRead<Attributes>

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        The full tenant page with the selected attribute shape on every returned tenant.

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        interface PaginatedResultTenantRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                            data: TenantRead<Attributes>[];
                                                                                                                                                                                                                                                                                                                                            page_count?: number;
                                                                                                                                                                                                                                                                                                                                            total_count: number;
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                        • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                        • PaginatedResultTenantRead +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                          • PaginatedResultTenantRead
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                        List of Tenants

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        page_count?: number
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        total_count: number
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/PaginatedResultUserRead.html b/docs/interfaces/PaginatedResultUserRead.html index f7c86f50..d5f527e0 100644 --- a/docs/interfaces/PaginatedResultUserRead.html +++ b/docs/interfaces/PaginatedResultUserRead.html @@ -1,217 +1,84 @@ -PaginatedResultUserRead | permitio
                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                        +PaginatedResultUserRead | permitio
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                                                                          Interface PaginatedResultUserRead

                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                          Interface PaginatedResultUserRead<Attributes>

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Export

                                                                                                                                                                                                                                                                                                                                          PaginatedResultUserRead

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          The full user page with the same attribute shape on each returned user.

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          interface PaginatedResultUserRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                              data: UserRead<Attributes>[];
                                                                                                                                                                                                                                                                                                                                              page_count?: number;
                                                                                                                                                                                                                                                                                                                                              total_count: number;
                                                                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Type Parameters

                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                          • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                          • PaginatedResultUserRead
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                        • Defined in src/api/users.ts:40
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                          data: UserRead[]
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                          List of Users

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                          PaginatedResultUserRead

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                          page_count?: number
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                          PaginatedResultUserRead

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          page_count?: number
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                          total_count: number
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                          PaginatedResultUserRead

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          total_count: number
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/paginated-result-user-read.ts:21
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/ParentId.html b/docs/interfaces/ParentId.html deleted file mode 100644 index 1a98c970..00000000 --- a/docs/interfaces/ParentId.html +++ /dev/null @@ -1,173 +0,0 @@ -ParentId | permitio
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                                                                          Interface ParentId

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Parent Condition Set

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Export

                                                                                                                                                                                                                                                                                                                                          ParentId

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                          • ParentId
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file diff --git a/docs/interfaces/PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings.html b/docs/interfaces/PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings.html new file mode 100644 index 00000000..378c3d41 --- /dev/null +++ b/docs/interfaces/PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings.html @@ -0,0 +1,59 @@ +PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings | permitio
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                            Interface PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings

                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            Settings for a derived role or a derived role rule

                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            interface PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings {
                                                                                                                                                                                                                                                                                                                                                no_direct_roles_on_object?: boolean;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                            no_direct_roles_on_object?: boolean
                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            If true, the derived role or the specific rule will not apply if the resource has any direct role

                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/ProjectCreate.html b/docs/interfaces/ProjectCreate.html index ad7209a7..e15e6846 100644 --- a/docs/interfaces/ProjectCreate.html +++ b/docs/interfaces/ProjectCreate.html @@ -1,257 +1,104 @@ -ProjectCreate | permitio
                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                            +ProjectCreate | permitio
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                              - +

                                                                                                                                                                                                                                                                                                                                              Interface ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Export

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                              • ProjectCreate
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                              active_policy_repo_id?: string
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              active_policy_repo_id?: string

                                                                                                                                                                                                                                                                                                                                              the id of the policy repo to use for this project

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/project-create.ts:40
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              description?: string

                                                                                                                                                                                                                                                                                                                                              a longer description outlining the project objectives

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/project-create.ts:32
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              initial_environments?: EnvironmentCreate[]
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              The initial environments to create for this project. By default, 'Development' and 'Production' are created, specify [] (empty list) to skip that.

                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              key: string

                                                                                                                                                                                                                                                                                                                                              A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project.

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/project-create.ts:20
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              name: string

                                                                                                                                                                                                                                                                                                                                              The name of the project

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/project-create.ts:28
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              settings?: object

                                                                                                                                                                                                                                                                                                                                              the settings for this project

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                              urn_namespace?: string
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/project-create.ts:36
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              urn_namespace?: string

                                                                                                                                                                                                                                                                                                                                              Optional namespace for URNs. If empty, URNs will be generated from project key.

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                              ProjectCreate

                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/project-create.ts:24
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              On This Page

                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Properties +
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                              Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/ProjectRead.html b/docs/interfaces/ProjectRead.html index 0aafcd76..2a73c0d7 100644 --- a/docs/interfaces/ProjectRead.html +++ b/docs/interfaces/ProjectRead.html @@ -1,305 +1,136 @@ -ProjectRead | permitio
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                              +ProjectRead | permitio
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                - +

                                                                                                                                                                                                                                                                                                                                                Interface ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Export

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                • ProjectRead
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                active_policy_repo_id?: string
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                active_policy_repo_id?: string

                                                                                                                                                                                                                                                                                                                                                the id of the policy repo to use for this project

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                created_at: string
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:53
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                created_at: string

                                                                                                                                                                                                                                                                                                                                                Date and time when the project was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:33
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                description?: string

                                                                                                                                                                                                                                                                                                                                                a longer description outlining the project objectives

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:45
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                id: string

                                                                                                                                                                                                                                                                                                                                                Unique id of the project

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:25
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                key: string

                                                                                                                                                                                                                                                                                                                                                A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project.

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:17
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                name: string

                                                                                                                                                                                                                                                                                                                                                The name of the project

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                organization_id: string
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:41
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                organization_id: string

                                                                                                                                                                                                                                                                                                                                                Unique id of the organization that the project belongs to.

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:29
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                settings?: object

                                                                                                                                                                                                                                                                                                                                                the settings for this project

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                updated_at: string
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:49
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                updated_at: string

                                                                                                                                                                                                                                                                                                                                                Date and time when the project was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                urn_namespace?: string
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:37
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                urn_namespace?: string

                                                                                                                                                                                                                                                                                                                                                Optional namespace for URNs. If empty, URNs will be generated from project key.

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                ProjectRead

                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/project-read.ts:21
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                On This Page

                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Properties +
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/ProjectUpdate.html b/docs/interfaces/ProjectUpdate.html index d2363acd..293b0ed4 100644 --- a/docs/interfaces/ProjectUpdate.html +++ b/docs/interfaces/ProjectUpdate.html @@ -1,233 +1,88 @@ -ProjectUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                +ProjectUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                  Interface ProjectUpdate

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Export

                                                                                                                                                                                                                                                                                                                                                  ProjectUpdate

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                  • ProjectUpdate
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                  active_policy_repo_id?: string
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  active_policy_repo_id?: string

                                                                                                                                                                                                                                                                                                                                                  the id of the policy repo to use for this project

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                  ProjectUpdate

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/project-update.ts:29
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  description?: string

                                                                                                                                                                                                                                                                                                                                                  a longer description outlining the project objectives

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                  ProjectUpdate

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/project-update.ts:21
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  name?: string

                                                                                                                                                                                                                                                                                                                                                  The name of the project

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                  ProjectUpdate

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/project-update.ts:17
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  settings?: object

                                                                                                                                                                                                                                                                                                                                                  the settings for this project

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                  ProjectUpdate

                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/project-update.ts:25
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/ProxyConfigCreate.html b/docs/interfaces/ProxyConfigCreate.html new file mode 100644 index 00000000..4b9fe1ab --- /dev/null +++ b/docs/interfaces/ProxyConfigCreate.html @@ -0,0 +1,86 @@ +ProxyConfigCreate | permitio
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                    Interface ProxyConfigCreate

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    interface ProxyConfigCreate {
                                                                                                                                                                                                                                                                                                                                                        auth_mechanism?: AuthMechanism;
                                                                                                                                                                                                                                                                                                                                                        key: string;
                                                                                                                                                                                                                                                                                                                                                        mapping_rules?: MappingRule[];
                                                                                                                                                                                                                                                                                                                                                        name: string;
                                                                                                                                                                                                                                                                                                                                                        secret: Secret;
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    auth_mechanism?: AuthMechanism
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request. Bearer injects the secret into the Authorization header as a Bearer token, Basic injects the secret into the Authorization header as a Basic user:password, Headers injects plain headers into the request.

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    key: string
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    mapping_rules?: MappingRule[]
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method.

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    name: string
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    The name of the proxy config, for example: 'Stripe API'

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    secret: Secret
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/ProxyConfigRead.html b/docs/interfaces/ProxyConfigRead.html new file mode 100644 index 00000000..0c924895 --- /dev/null +++ b/docs/interfaces/ProxyConfigRead.html @@ -0,0 +1,134 @@ +ProxyConfigRead | permitio
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                      Interface ProxyConfigRead

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      interface ProxyConfigRead {
                                                                                                                                                                                                                                                                                                                                                          auth_mechanism?: AuthMechanism;
                                                                                                                                                                                                                                                                                                                                                          created_at: string;
                                                                                                                                                                                                                                                                                                                                                          environment_id: string;
                                                                                                                                                                                                                                                                                                                                                          id: string;
                                                                                                                                                                                                                                                                                                                                                          key: string;
                                                                                                                                                                                                                                                                                                                                                          mapping_rules?: MappingRule[];
                                                                                                                                                                                                                                                                                                                                                          name: string;
                                                                                                                                                                                                                                                                                                                                                          organization_id: string;
                                                                                                                                                                                                                                                                                                                                                          project_id: string;
                                                                                                                                                                                                                                                                                                                                                          secret: Secret;
                                                                                                                                                                                                                                                                                                                                                          updated_at: string;
                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      auth_mechanism?: AuthMechanism
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request. Bearer injects the secret into the Authorization header as a Bearer token, Basic injects the secret into the Authorization header as a Basic user:password, Headers injects plain headers into the request.

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      created_at: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Date and time when the proxy config was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      environment_id: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Unique id of the environment that the proxy config belongs to.

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      id: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Unique id of the proxy config

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      key: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      mapping_rules?: MappingRule[]
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method.

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      name: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      The name of the proxy config, for example: 'Stripe API'

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      organization_id: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Unique id of the organization that the proxy config belongs to.

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      project_id: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Unique id of the project that the proxy config belongs to.

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      secret: Secret
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      updated_at: string
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Date and time when the proxy config was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/ProxyConfigUpdate.html b/docs/interfaces/ProxyConfigUpdate.html new file mode 100644 index 00000000..6363aba2 --- /dev/null +++ b/docs/interfaces/ProxyConfigUpdate.html @@ -0,0 +1,78 @@ +ProxyConfigUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                        Interface ProxyConfigUpdate

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        interface ProxyConfigUpdate {
                                                                                                                                                                                                                                                                                                                                                            auth_mechanism?: AuthMechanism;
                                                                                                                                                                                                                                                                                                                                                            mapping_rules?: MappingRuleUpdate[];
                                                                                                                                                                                                                                                                                                                                                            name?: string;
                                                                                                                                                                                                                                                                                                                                                            secret?: Secret;
                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        auth_mechanism?: AuthMechanism
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request. Bearer injects the secret into the Authorization header as a Bearer token, Basic injects the secret into the Authorization header as a Basic user:password, Headers injects plain headers into the request.

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        mapping_rules?: MappingRuleUpdate[]
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Proxy config mapping rules, with optional should_delete flag to indicate deletion.

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        name?: string
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        The name of the proxy config, for example: 'Stripe API'

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        secret?: Secret
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/RelationCreate.html b/docs/interfaces/RelationCreate.html new file mode 100644 index 00000000..28ff3bcb --- /dev/null +++ b/docs/interfaces/RelationCreate.html @@ -0,0 +1,88 @@ +RelationCreate | permitio
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                          Interface RelationCreate

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          interface RelationCreate {
                                                                                                                                                                                                                                                                                                                                                              description?: string;
                                                                                                                                                                                                                                                                                                                                                              key: string;
                                                                                                                                                                                                                                                                                                                                                              name: string;
                                                                                                                                                                                                                                                                                                                                                              subject_resource: string;
                                                                                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          description?: string
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          An optional longer description of what this relation represents in your system

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          key: string
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation.

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          name: string
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          The name of the relation

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          subject_resource: string
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          The subject resource ID or key

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/RelationRead.html b/docs/interfaces/RelationRead.html new file mode 100644 index 00000000..75935ed2 --- /dev/null +++ b/docs/interfaces/RelationRead.html @@ -0,0 +1,160 @@ +RelationRead | permitio
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                            Interface RelationRead

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            interface RelationRead {
                                                                                                                                                                                                                                                                                                                                                                created_at: string;
                                                                                                                                                                                                                                                                                                                                                                description?: string;
                                                                                                                                                                                                                                                                                                                                                                environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                id: string;
                                                                                                                                                                                                                                                                                                                                                                key: string;
                                                                                                                                                                                                                                                                                                                                                                name: string;
                                                                                                                                                                                                                                                                                                                                                                object_resource: string;
                                                                                                                                                                                                                                                                                                                                                                object_resource_id: string;
                                                                                                                                                                                                                                                                                                                                                                organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                project_id: string;
                                                                                                                                                                                                                                                                                                                                                                subject_resource: string;
                                                                                                                                                                                                                                                                                                                                                                subject_resource_id: string;
                                                                                                                                                                                                                                                                                                                                                                updated_at: string;
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            created_at: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Date and time when the relation was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            description?: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            An optional longer description of what this relation represents in your system

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            environment_id: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Unique id of the environment that the relation belongs to.

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            id: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Unique id of the relation

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            key: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation.

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            name: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            The name of the relation

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            object_resource: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            The object resource key

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            object_resource_id: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            The object resource id

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            organization_id: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Unique id of the organization that the relation belongs to.

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            project_id: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Unique id of the project that the relation belongs to.

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            subject_resource: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            The subject resource ID or key

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            subject_resource_id: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            The subject resource id

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            updated_at: string
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Date and time when the relation was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/RelationshipTupleCreate.html b/docs/interfaces/RelationshipTupleCreate.html new file mode 100644 index 00000000..9604d8f0 --- /dev/null +++ b/docs/interfaces/RelationshipTupleCreate.html @@ -0,0 +1,88 @@ +RelationshipTupleCreate | permitio
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                              Interface RelationshipTupleCreate

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              interface RelationshipTupleCreate {
                                                                                                                                                                                                                                                                                                                                                                  object: string;
                                                                                                                                                                                                                                                                                                                                                                  relation: string;
                                                                                                                                                                                                                                                                                                                                                                  subject: string;
                                                                                                                                                                                                                                                                                                                                                                  tenant?: string;
                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              object: string
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              the resource instance on which the new relation is assigned (accepts either the resource instance id or resource_key:resource_instance_key)

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              relation: string
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              the relation to assign between the subject and object

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              subject: string
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              the resource instance assigned the new relation (accepts either the resource instance id or resource_key:resource_instance_key)

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              tenant?: string
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              The tenant the subject and object belong to. Required when neither resource instance exists yet - both are created in it. When exactly one exists, a tenant that disagrees with that instance's tenant is rejected; when both exist it is ignored, since each instance's tenant is taken from storage. Either way both instances must end up in the same tenant or the request is rejected. Accepts a tenant key, or a tenant id except on the bulk endpoint when neither instance exists yet (there a key is required).

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/RelationshipTupleCreateBulkOperation.html b/docs/interfaces/RelationshipTupleCreateBulkOperation.html new file mode 100644 index 00000000..961dd9ea --- /dev/null +++ b/docs/interfaces/RelationshipTupleCreateBulkOperation.html @@ -0,0 +1,54 @@ +RelationshipTupleCreateBulkOperation | permitio
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                Interface RelationshipTupleCreateBulkOperation

                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                interface RelationshipTupleCreateBulkOperation {
                                                                                                                                                                                                                                                                                                                                                                    operations: RelationshipTupleCreate[];
                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/RelationshipTupleDelete.html b/docs/interfaces/RelationshipTupleDelete.html new file mode 100644 index 00000000..328354c0 --- /dev/null +++ b/docs/interfaces/RelationshipTupleDelete.html @@ -0,0 +1,80 @@ +RelationshipTupleDelete | permitio
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                  Interface RelationshipTupleDelete

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  interface RelationshipTupleDelete {
                                                                                                                                                                                                                                                                                                                                                                      object: string;
                                                                                                                                                                                                                                                                                                                                                                      relation: string;
                                                                                                                                                                                                                                                                                                                                                                      subject: string;
                                                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  object: string
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  the resource instance on which the new relation is assigned (accepts either the resource instance id or resource_key:resource_instance_key)

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  relation: string
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  the relation to assign between the subject and object

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  subject: string
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  the resource instance assigned the new relation (accepts either the resource instance id or resource_key:resource_instance_key)

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/RelationshipTupleDeleteBulkOperation.html b/docs/interfaces/RelationshipTupleDeleteBulkOperation.html new file mode 100644 index 00000000..11b0505d --- /dev/null +++ b/docs/interfaces/RelationshipTupleDeleteBulkOperation.html @@ -0,0 +1,56 @@ +RelationshipTupleDeleteBulkOperation | permitio
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                    Interface RelationshipTupleDeleteBulkOperation

                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    interface RelationshipTupleDeleteBulkOperation {
                                                                                                                                                                                                                                                                                                                                                                        idents: RelationshipTupleDelete[];
                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                    List of relationship tuples objects to delete

                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/RelationshipTupleDetailedRead.html b/docs/interfaces/RelationshipTupleDetailedRead.html new file mode 100644 index 00000000..8bbb094d --- /dev/null +++ b/docs/interfaces/RelationshipTupleDetailedRead.html @@ -0,0 +1,192 @@ +RelationshipTupleDetailedRead | permitio
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                      Interface RelationshipTupleDetailedRead

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      interface RelationshipTupleDetailedRead {
                                                                                                                                                                                                                                                                                                                                                                          created_at: string;
                                                                                                                                                                                                                                                                                                                                                                          environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                          id: string;
                                                                                                                                                                                                                                                                                                                                                                          object: string;
                                                                                                                                                                                                                                                                                                                                                                          object_details?: ResourceInstanceBlockRead;
                                                                                                                                                                                                                                                                                                                                                                          object_id?: string;
                                                                                                                                                                                                                                                                                                                                                                          organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                          project_id: string;
                                                                                                                                                                                                                                                                                                                                                                          relation: string;
                                                                                                                                                                                                                                                                                                                                                                          relation_details?: StrippedRelationBlockRead;
                                                                                                                                                                                                                                                                                                                                                                          relation_id: string;
                                                                                                                                                                                                                                                                                                                                                                          subject: string;
                                                                                                                                                                                                                                                                                                                                                                          subject_details?: ResourceInstanceBlockRead;
                                                                                                                                                                                                                                                                                                                                                                          subject_id: string;
                                                                                                                                                                                                                                                                                                                                                                          tenant: string;
                                                                                                                                                                                                                                                                                                                                                                          tenant_details?: TenantBlockRead;
                                                                                                                                                                                                                                                                                                                                                                          tenant_id: string;
                                                                                                                                                                                                                                                                                                                                                                          updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      created_at: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Date and time when the relationship tuple was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      environment_id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the environment that the relationship tuple belongs to.

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      object: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      resource_key:resource_instance_key of the object

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      object_details?: ResourceInstanceBlockRead
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      The object details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      object_id?: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the object (null = all resources of this type)

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      organization_id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the organization that the relationship tuple belongs to.

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      project_id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the project that the relationship tuple belongs to.

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      relation: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      key of the assigned relation

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      relation_details?: StrippedRelationBlockRead
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      The relation details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      relation_id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the relation

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      subject: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      resource_key:resource_instance_key of the subject

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      subject_details?: ResourceInstanceBlockRead
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      The subject details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      subject_id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the subject

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      tenant: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      The tenant the relationship tuple is associated with

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      tenant_details?: TenantBlockRead
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      The tenant details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      tenant_id: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Unique id of the tenant

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      updated_at: string
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Date and time when the relationship tuple was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/RelationshipTupleRead.html b/docs/interfaces/RelationshipTupleRead.html new file mode 100644 index 00000000..a927d8ec --- /dev/null +++ b/docs/interfaces/RelationshipTupleRead.html @@ -0,0 +1,192 @@ +RelationshipTupleRead | permitio
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                        Interface RelationshipTupleRead

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        interface RelationshipTupleRead {
                                                                                                                                                                                                                                                                                                                                                                            created_at: string;
                                                                                                                                                                                                                                                                                                                                                                            environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                            id: string;
                                                                                                                                                                                                                                                                                                                                                                            object: string;
                                                                                                                                                                                                                                                                                                                                                                            object_details?: ResourceInstanceBlockRead;
                                                                                                                                                                                                                                                                                                                                                                            object_id?: string;
                                                                                                                                                                                                                                                                                                                                                                            organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                            project_id: string;
                                                                                                                                                                                                                                                                                                                                                                            relation: string;
                                                                                                                                                                                                                                                                                                                                                                            relation_details?: StrippedRelationBlockRead;
                                                                                                                                                                                                                                                                                                                                                                            relation_id: string;
                                                                                                                                                                                                                                                                                                                                                                            subject: string;
                                                                                                                                                                                                                                                                                                                                                                            subject_details?: ResourceInstanceBlockRead;
                                                                                                                                                                                                                                                                                                                                                                            subject_id: string;
                                                                                                                                                                                                                                                                                                                                                                            tenant: string;
                                                                                                                                                                                                                                                                                                                                                                            tenant_details?: TenantBlockRead;
                                                                                                                                                                                                                                                                                                                                                                            tenant_id: string;
                                                                                                                                                                                                                                                                                                                                                                            updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        created_at: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Date and time when the relationship tuple was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        environment_id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the environment that the relationship tuple belongs to.

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        object: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        resource_key:resource_instance_key of the object

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        object_details?: ResourceInstanceBlockRead
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        The object details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        object_id?: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the object (null = all resources of this type)

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        organization_id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the organization that the relationship tuple belongs to.

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        project_id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the project that the relationship tuple belongs to.

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        relation: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        key of the assigned relation

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        relation_details?: StrippedRelationBlockRead
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        The relation details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        relation_id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the relation

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        subject: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        resource_key:resource_instance_key of the subject

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        subject_details?: ResourceInstanceBlockRead
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        The subject details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        subject_id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the subject

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        tenant: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        The tenant the relationship tuple is associated with

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        tenant_details?: TenantBlockRead
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        The tenant details of the relationship tuple

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        tenant_id: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Unique id of the tenant

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        updated_at: string
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Date and time when the relationship tuple was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/ResourceActionCreate.html b/docs/interfaces/ResourceActionCreate.html index 6a784a0a..f496c18b 100644 --- a/docs/interfaces/ResourceActionCreate.html +++ b/docs/interfaces/ResourceActionCreate.html @@ -1,233 +1,106 @@ -ResourceActionCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                        +ResourceActionCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                                                                                                                                          Interface ResourceActionCreate

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Export

                                                                                                                                                                                                                                                                                                                                                                          ResourceActionCreate

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                          • ResourceActionCreate
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          attributes?: object

                                                                                                                                                                                                                                                                                                                                                                          optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                          ResourceActionCreate

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/resource-action-create.ts:29
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          description?: string

                                                                                                                                                                                                                                                                                                                                                                          An optional longer description of what this action respresents in your system

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                          ResourceActionCreate

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/resource-action-create.ts:25
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          key: string

                                                                                                                                                                                                                                                                                                                                                                          A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action.

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                          ResourceActionCreate

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/resource-action-create.ts:17
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          name: string

                                                                                                                                                                                                                                                                                                                                                                          The name of the action

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                          ResourceActionCreate

                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/resource-action-create.ts:21
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          v1compat_is_built_in?: boolean
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/ResourceActionGroupCreate.html b/docs/interfaces/ResourceActionGroupCreate.html index e1313c35..3dea2df7 100644 --- a/docs/interfaces/ResourceActionGroupCreate.html +++ b/docs/interfaces/ResourceActionGroupCreate.html @@ -1,243 +1,94 @@ -ResourceActionGroupCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                          +ResourceActionGroupCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                            - +

                                                                                                                                                                                                                                                                                                                                                                            Interface ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Export

                                                                                                                                                                                                                                                                                                                                                                            ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                            • ResourceActionGroupCreate
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                            actions?: string[]
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                            ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            attributes?: object

                                                                                                                                                                                                                                                                                                                                                                            optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                            ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-action-group-create.ts:29
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            description?: string

                                                                                                                                                                                                                                                                                                                                                                            An optional longer description of what this action group represents in your system

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                            ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-action-group-create.ts:25
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            key: string

                                                                                                                                                                                                                                                                                                                                                                            A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group.

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                            ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-action-group-create.ts:17
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            name: string

                                                                                                                                                                                                                                                                                                                                                                            The name of the action group

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                            ResourceActionGroupCreate

                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-action-group-create.ts:21
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Properties +
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/ResourceActionGroupRead.html b/docs/interfaces/ResourceActionGroupRead.html index c3f0acb8..501560e6 100644 --- a/docs/interfaces/ResourceActionGroupRead.html +++ b/docs/interfaces/ResourceActionGroupRead.html @@ -1,327 +1,150 @@ -ResourceActionGroupRead | permitio
                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                            +ResourceActionGroupRead | permitio
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                              - +

                                                                                                                                                                                                                                                                                                                                                                              Interface ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Export

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                              • ResourceActionGroupRead
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              actions?: string[]
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              attributes?: object

                                                                                                                                                                                                                                                                                                                                                                              optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              created_at: string
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:25
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              created_at: string

                                                                                                                                                                                                                                                                                                                                                                              Date and time when the action group was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:54
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              description?: string

                                                                                                                                                                                                                                                                                                                                                                              An optional longer description of what this action group represents in your system

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              environment_id: string
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:21
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              environment_id: string

                                                                                                                                                                                                                                                                                                                                                                              Unique id of the environment that the action group belongs to.

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:46
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              id: string

                                                                                                                                                                                                                                                                                                                                                                              Unique id of the action group

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:34
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              key: string

                                                                                                                                                                                                                                                                                                                                                                              A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group.

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:30
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              name: string

                                                                                                                                                                                                                                                                                                                                                                              The name of the action group

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              organization_id: string
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:17
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              organization_id: string

                                                                                                                                                                                                                                                                                                                                                                              Unique id of the organization that the action group belongs to.

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              project_id: string
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:38
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              project_id: string

                                                                                                                                                                                                                                                                                                                                                                              Unique id of the project that the action group belongs to.

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              resource_id: string
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:42
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              resource_id: string

                                                                                                                                                                                                                                                                                                                                                                              Unique id of the resource that the action group belongs to.

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                              updated_at: string
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:50
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              updated_at: string

                                                                                                                                                                                                                                                                                                                                                                              Date and time when the action group was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead

                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/resource-action-group-read.ts:58
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              On This Page

                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Properties +
                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                              Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                              \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/ResourceActionGroupUpdate.html b/docs/interfaces/ResourceActionGroupUpdate.html new file mode 100644 index 00000000..3c821ad5 --- /dev/null +++ b/docs/interfaces/ResourceActionGroupUpdate.html @@ -0,0 +1,86 @@ +ResourceActionGroupUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                Interface ResourceActionGroupUpdate

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                interface ResourceActionGroupUpdate {
                                                                                                                                                                                                                                                                                                                                                                                    actions?: string[];
                                                                                                                                                                                                                                                                                                                                                                                    attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                    description?: string;
                                                                                                                                                                                                                                                                                                                                                                                    name?: string;
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                actions?: string[]
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                description?: string
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                An optional longer description of what this action group represents in your system

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                name?: string
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                The name of the action group

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/ResourceActionRead.html b/docs/interfaces/ResourceActionRead.html index e21f14e6..203dd8ea 100644 --- a/docs/interfaces/ResourceActionRead.html +++ b/docs/interfaces/ResourceActionRead.html @@ -1,329 +1,170 @@ -ResourceActionRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                +ResourceActionRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                                                  Interface ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Export

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                  • ResourceActionRead
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  attributes?: object

                                                                                                                                                                                                                                                                                                                                                                                  optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  created_at: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:25
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  created_at: string

                                                                                                                                                                                                                                                                                                                                                                                  Date and time when the action was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:60
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  description?: string

                                                                                                                                                                                                                                                                                                                                                                                  An optional longer description of what this action respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:21
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the environment that the action belongs to.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:52
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  id: string

                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the action

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:36
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  key: string

                                                                                                                                                                                                                                                                                                                                                                                  A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:32
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  name: string

                                                                                                                                                                                                                                                                                                                                                                                  The name of the action

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:17
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the organization that the action belongs to.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  permission_name: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:44
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  permission_name: string

                                                                                                                                                                                                                                                                                                                                                                                  The name of the action, prefixed by the resource the action is acting upon.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  project_id: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:40
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  project_id: string

                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the project that the action belongs to.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  resource_id: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:48
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  resource_id: string

                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the resource that the action belongs to.

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:56
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  updated_at: string

                                                                                                                                                                                                                                                                                                                                                                                  Date and time when the action was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                  ResourceActionRead

                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/resource-action-read.ts:64
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  v1compat_is_built_in?: boolean
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/ResourceActionUpdate.html b/docs/interfaces/ResourceActionUpdate.html index 400e77f6..9db9c051 100644 --- a/docs/interfaces/ResourceActionUpdate.html +++ b/docs/interfaces/ResourceActionUpdate.html @@ -1,221 +1,98 @@ -ResourceActionUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                  +ResourceActionUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                    - +

                                                                                                                                                                                                                                                                                                                                                                                    Interface ResourceActionUpdate

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Export

                                                                                                                                                                                                                                                                                                                                                                                    ResourceActionUpdate

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                    • ResourceActionUpdate
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    attributes?: object

                                                                                                                                                                                                                                                                                                                                                                                    optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                    ResourceActionUpdate

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/resource-action-update.ts:25
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    description?: string

                                                                                                                                                                                                                                                                                                                                                                                    An optional longer description of what this action respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                    ResourceActionUpdate

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/resource-action-update.ts:21
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    name?: string

                                                                                                                                                                                                                                                                                                                                                                                    The name of the action

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                    ResourceActionUpdate

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/resource-action-update.ts:17
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    v1compat_is_built_in?: boolean
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    On This Page

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Properties +
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                    Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/ResourceAttributeCreate.html b/docs/interfaces/ResourceAttributeCreate.html index 310a8ac5..390d6cff 100644 --- a/docs/interfaces/ResourceAttributeCreate.html +++ b/docs/interfaces/ResourceAttributeCreate.html @@ -1,221 +1,72 @@ -ResourceAttributeCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                    +ResourceAttributeCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                                                                                                      Interface ResourceAttributeCreate

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Export

                                                                                                                                                                                                                                                                                                                                                                                      ResourceAttributeCreate

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                      • ResourceAttributeCreate
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      description?: string

                                                                                                                                                                                                                                                                                                                                                                                      An optional longer description of what this attribute respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                      ResourceAttributeCreate

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-attribute-create.ts:28
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      key: string

                                                                                                                                                                                                                                                                                                                                                                                      A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute.

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                      ResourceAttributeCreate

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      - - +
                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-attribute-create.ts:20
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                      The type of the attribute, we currently support: bool, number (ints, floats), time (a timestamp), string, and json.

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                      ResourceAttributeCreate

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-attribute-create.ts:24
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/ResourceAttributeRead.html b/docs/interfaces/ResourceAttributeRead.html index 269d6654..623d8dc5 100644 --- a/docs/interfaces/ResourceAttributeRead.html +++ b/docs/interfaces/ResourceAttributeRead.html @@ -1,329 +1,144 @@ -ResourceAttributeRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                      +ResourceAttributeRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                                                                                                                                        Interface ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Export

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                        • ResourceAttributeRead
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        built_in: boolean
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        built_in: boolean

                                                                                                                                                                                                                                                                                                                                                                                        Whether the attribute is built-in, and managed by the Permit system.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        created_at: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:64
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        created_at: string

                                                                                                                                                                                                                                                                                                                                                                                        Date and time when the attribute was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:56
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        description?: string

                                                                                                                                                                                                                                                                                                                                                                                        An optional longer description of what this attribute respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:24
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                        Unique id of the environment that the attribute belongs to.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:52
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        id: string

                                                                                                                                                                                                                                                                                                                                                                                        Unique id of the attribute

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:32
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        key: string

                                                                                                                                                                                                                                                                                                                                                                                        A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:28
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                        Unique id of the organization that the attribute belongs to.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        project_id: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:44
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        project_id: string

                                                                                                                                                                                                                                                                                                                                                                                        Unique id of the project that the attribute belongs to.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        resource_id: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:48
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        resource_id: string

                                                                                                                                                                                                                                                                                                                                                                                        Unique id of the resource that the attribute belongs to.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        resource_key: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:36
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        resource_key: string

                                                                                                                                                                                                                                                                                                                                                                                        A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - - +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:40
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                        The type of the attribute, we currently support: bool, number (ints, floats), time (a timestamp), string, and json.

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:20
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        updated_at: string

                                                                                                                                                                                                                                                                                                                                                                                        Date and time when the attribute was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                        ResourceAttributeRead

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-attribute-read.ts:60
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/ResourceAttributeUpdate.html b/docs/interfaces/ResourceAttributeUpdate.html index da9c860a..289aabd3 100644 --- a/docs/interfaces/ResourceAttributeUpdate.html +++ b/docs/interfaces/ResourceAttributeUpdate.html @@ -1,209 +1,64 @@ -ResourceAttributeUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                        +ResourceAttributeUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                                                                                                                                                          Interface ResourceAttributeUpdate

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Export

                                                                                                                                                                                                                                                                                                                                                                                          ResourceAttributeUpdate

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                          • ResourceAttributeUpdate
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          description?: string

                                                                                                                                                                                                                                                                                                                                                                                          An optional longer description of what this attribute respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                          ResourceAttributeUpdate

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          - - +
                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/resource-attribute-update.ts:24
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                          The type of the attribute, we currently support: bool, number (ints, floats), time (a timestamp), string, and json.

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                          ResourceAttributeUpdate

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/resource-attribute-update.ts:20
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/ResourceCreate.html b/docs/interfaces/ResourceCreate.html index 14b2c71e..ce7f1494 100644 --- a/docs/interfaces/ResourceCreate.html +++ b/docs/interfaces/ResourceCreate.html @@ -1,291 +1,138 @@ -ResourceCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                          +ResourceCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                            - +

                                                                                                                                                                                                                                                                                                                                                                                            Interface ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Export

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                            • ResourceCreate
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                            actions: {
                                                                                                                                                                                                                                                                                                                                                                                                [key: string]: ActionBlockEditable;
                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            actions: { [key: string]: ActionBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                            A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Type declaration

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                            attributes?: {
                                                                                                                                                                                                                                                                                                                                                                                                [key: string]: AttributeBlockEditable;
                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:40
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            attributes?: { [key: string]: AttributeBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                            Attributes that each resource of this type defines, and can be used in your ABAC policies.

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Type declaration

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:48
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            description?: string

                                                                                                                                                                                                                                                                                                                                                                                            An optional longer description of what this resource respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:36
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            key: string

                                                                                                                                                                                                                                                                                                                                                                                            A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource.

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:24
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            name: string

                                                                                                                                                                                                                                                                                                                                                                                            The name of the resource

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                            relations?: object
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:28
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            relations?: { [key: string]: string }

                                                                                                                                                                                                                                                                                                                                                                                            Relations to other resources. The key is the relation key, and the value is the related resource.

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                            roles?: object
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:56
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            roles?: { [key: string]: RoleBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                            Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc.

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:52
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            type_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            urn?: string

                                                                                                                                                                                                                                                                                                                                                                                            The URN (Uniform Resource Name) of the resource

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                            ResourceCreate

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/resource-create.ts:32
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            v1compat_type?: string
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Properties +
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/ResourceId.html b/docs/interfaces/ResourceId.html deleted file mode 100644 index 21e5e826..00000000 --- a/docs/interfaces/ResourceId.html +++ /dev/null @@ -1,173 +0,0 @@ -ResourceId | permitio
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                                                                                                                            Interface ResourceId

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            For ResourceSets, the id of the base resource.

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Export

                                                                                                                                                                                                                                                                                                                                                                                            ResourceId

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                            • ResourceId
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                            \ No newline at end of file diff --git a/docs/interfaces/ResourceInstanceCreate.html b/docs/interfaces/ResourceInstanceCreate.html new file mode 100644 index 00000000..9a4d9969 --- /dev/null +++ b/docs/interfaces/ResourceInstanceCreate.html @@ -0,0 +1,88 @@ +ResourceInstanceCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                              Interface ResourceInstanceCreate

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              interface ResourceInstanceCreate {
                                                                                                                                                                                                                                                                                                                                                                                                  attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                  key: string;
                                                                                                                                                                                                                                                                                                                                                                                                  resource: string;
                                                                                                                                                                                                                                                                                                                                                                                                  tenant: string;
                                                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Arbitrary resource attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              key: string
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the permit.check() API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly.

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              resource: string
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              the key of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be document.

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              tenant: string
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              the key of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps.

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/ResourceInstanceDetailedRead.html b/docs/interfaces/ResourceInstanceDetailedRead.html new file mode 100644 index 00000000..0aa1c1de --- /dev/null +++ b/docs/interfaces/ResourceInstanceDetailedRead.html @@ -0,0 +1,178 @@ +ResourceInstanceDetailedRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                Interface ResourceInstanceDetailedRead<Attributes>

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                A detailed instance retains its required relationships and caller-declared attributes.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                interface ResourceInstanceDetailedRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                                                                                    attributes?: Attributes;
                                                                                                                                                                                                                                                                                                                                                                                                    created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                    environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                    key: string;
                                                                                                                                                                                                                                                                                                                                                                                                    organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                    project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                    relationships: RelationshipTupleBlockRead[];
                                                                                                                                                                                                                                                                                                                                                                                                    resource: string;
                                                                                                                                                                                                                                                                                                                                                                                                    resource_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                    tenant: string;
                                                                                                                                                                                                                                                                                                                                                                                                    tenant_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                    updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                • ResourceInstanceDetailedRead +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                  • ResourceInstanceDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                attributes?: Attributes
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Attribute values retain the caller's declared shape when present.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Date and time when the resource instance was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the environment that the resource instance belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                id: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the resource instance

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                key: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the permit.check() API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the organization that the resource instance belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the project that the resource instance belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                relationships: RelationshipTupleBlockRead[]
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                The relationships of the resource instance.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                resource: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                the key of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be document.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                resource_id: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the resource

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                tenant: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                the key of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                tenant_id: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the tenant

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Date and time when the resource instance was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/ResourceInstanceRead.html b/docs/interfaces/ResourceInstanceRead.html new file mode 100644 index 00000000..c46464d5 --- /dev/null +++ b/docs/interfaces/ResourceInstanceRead.html @@ -0,0 +1,178 @@ +ResourceInstanceRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                  Interface ResourceInstanceRead<Attributes>

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  An instance response with an optional caller-declared attribute shape; no runtime validation.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  interface ResourceInstanceRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                                                                                      attributes?: Attributes;
                                                                                                                                                                                                                                                                                                                                                                                                      created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                      environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                      id: string;
                                                                                                                                                                                                                                                                                                                                                                                                      key: string;
                                                                                                                                                                                                                                                                                                                                                                                                      organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                      project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                      relationships?: RelationshipTupleBlockRead[];
                                                                                                                                                                                                                                                                                                                                                                                                      resource: string;
                                                                                                                                                                                                                                                                                                                                                                                                      resource_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                      tenant: string;
                                                                                                                                                                                                                                                                                                                                                                                                      tenant_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                      updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                  • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                  • ResourceInstanceRead +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • ResourceInstanceRead
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  attributes?: Attributes
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Attribute values retain the caller's declared shape when present.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Date and time when the resource instance was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the environment that the resource instance belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  id: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the resource instance

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  key: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the permit.check() API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the organization that the resource instance belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the project that the resource instance belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  relationships?: RelationshipTupleBlockRead[]
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  The relationships of the resource instance.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  resource: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  the key of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be document.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  resource_id: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  the id of the resource (type) of this resource instance.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  tenant: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  the key of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  tenant_id: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  the id of the tenant of this resource instance.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Date and time when the resource instance was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/ResourceInstanceUpdate.html b/docs/interfaces/ResourceInstanceUpdate.html new file mode 100644 index 00000000..12c2943b --- /dev/null +++ b/docs/interfaces/ResourceInstanceUpdate.html @@ -0,0 +1,64 @@ +ResourceInstanceUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                    Interface ResourceInstanceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    interface ResourceInstanceUpdate {
                                                                                                                                                                                                                                                                                                                                                                                                        attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Arbitrary resource attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/ResourceRead.html b/docs/interfaces/ResourceRead.html index 27c16f35..e0bf24d0 100644 --- a/docs/interfaces/ResourceRead.html +++ b/docs/interfaces/ResourceRead.html @@ -1,383 +1,192 @@ -ResourceRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                    +ResourceRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                                                                                                                      Interface ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Export

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                      • ResourceRead
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      action_groups?: {
                                                                                                                                                                                                                                                                                                                                                                                                          [key: string]: string[];
                                                                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                        [key: string]: string[]
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      actions?: {
                                                                                                                                                                                                                                                                                                                                                                                                          [key: string]: ActionBlockRead;
                                                                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      action_groups?: { [key: string]: string[] }
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      actions?: { [key: string]: ActionBlockRead }

                                                                                                                                                                                                                                                                                                                                                                                                      A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      attributes?: {
                                                                                                                                                                                                                                                                                                                                                                                                          [key: string]: AttributeBlockRead;
                                                                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:66
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      attributes?: { [key: string]: AttributeBlockRead }

                                                                                                                                                                                                                                                                                                                                                                                                      Attributes that each resource of this type defines, and can be used in your ABAC policies.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:74
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      created_at: string

                                                                                                                                                                                                                                                                                                                                                                                                      Date and time when the resource was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:46
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      description?: string

                                                                                                                                                                                                                                                                                                                                                                                                      An optional longer description of what this resource respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:62
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the environment that the resource belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:42
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      id: string

                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the resource

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:30
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      key: string

                                                                                                                                                                                                                                                                                                                                                                                                      A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:26
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      name: string

                                                                                                                                                                                                                                                                                                                                                                                                      The name of the resource

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:54
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the organization that the resource belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:34
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      project_id: string

                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the project that the resource belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      relations?: {
                                                                                                                                                                                                                                                                                                                                                                                                          [key: string]: RelationBlockRead;
                                                                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:38
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      relations?: { [key: string]: RelationBlockRead }

                                                                                                                                                                                                                                                                                                                                                                                                      A relations definition block, typically contained within a resource type definition block. The relations represents the ways you can interact with a protected resource.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                        [key: string]: RelationBlockRead
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      roles?: object
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:82
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      roles?: { [key: string]: ResourceRoleRead }

                                                                                                                                                                                                                                                                                                                                                                                                      Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, etc.

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:78
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      type_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      updated_at: string

                                                                                                                                                                                                                                                                                                                                                                                                      Date and time when the resource was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:50
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      urn?: string

                                                                                                                                                                                                                                                                                                                                                                                                      The URN (Uniform Resource Name) of the resource

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                      ResourceRead

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/resource-read.ts:58
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      v1compat_type?: string
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/ResourceReplace.html b/docs/interfaces/ResourceReplace.html index c2eda78d..f8c3e79c 100644 --- a/docs/interfaces/ResourceReplace.html +++ b/docs/interfaces/ResourceReplace.html @@ -1,279 +1,130 @@ -ResourceReplace | permitio
                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                      +ResourceReplace | permitio
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                                                                                                                                                        Interface ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Export

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                        • ResourceReplace
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                        actions: {
                                                                                                                                                                                                                                                                                                                                                                                                            [key: string]: ActionBlockEditable;
                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        actions: { [key: string]: ActionBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                                        A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                        attributes?: {
                                                                                                                                                                                                                                                                                                                                                                                                            [key: string]: AttributeBlockEditable;
                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        attributes?: { [key: string]: AttributeBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                                        Attributes that each resource of this type defines, and can be used in your ABAC policies.

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:44
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        description?: string

                                                                                                                                                                                                                                                                                                                                                                                                        An optional longer description of what this resource respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:32
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        name: string

                                                                                                                                                                                                                                                                                                                                                                                                        The name of the resource

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                        relations?: object
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        relations?: { [key: string]: string }

                                                                                                                                                                                                                                                                                                                                                                                                        Relations to other resources. The key is the relation key, and the value is the related resource.

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                        roles?: object
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:52
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        roles?: { [key: string]: RoleBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                                        Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc.

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:48
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        type_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        urn?: string

                                                                                                                                                                                                                                                                                                                                                                                                        The URN (Uniform Resource Name) of the resource

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                        ResourceReplace

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/resource-replace.ts:28
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        v1compat_type?: string
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/ResourceRoleCreate.html b/docs/interfaces/ResourceRoleCreate.html new file mode 100644 index 00000000..79001154 --- /dev/null +++ b/docs/interfaces/ResourceRoleCreate.html @@ -0,0 +1,116 @@ +ResourceRoleCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                          Interface ResourceRoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          interface ResourceRoleCreate {
                                                                                                                                                                                                                                                                                                                                                                                                              attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                              description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              extends?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                              granted_to?: DerivedRoleBlockEdit;
                                                                                                                                                                                                                                                                                                                                                                                                              key: string;
                                                                                                                                                                                                                                                                                                                                                                                                              name: string;
                                                                                                                                                                                                                                                                                                                                                                                                              permissions?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                              v1compat_attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                              v1compat_settings?: object;
                                                                                                                                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          description?: string
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Derived role that inherit will be applied on this role

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          key: string
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          name: string
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          permissions?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          v1compat_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          v1compat_settings?: object
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/ResourceRoleRead.html b/docs/interfaces/ResourceRoleRead.html new file mode 100644 index 00000000..6a3fb03f --- /dev/null +++ b/docs/interfaces/ResourceRoleRead.html @@ -0,0 +1,168 @@ +ResourceRoleRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                            Interface ResourceRoleRead

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            interface ResourceRoleRead {
                                                                                                                                                                                                                                                                                                                                                                                                                attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                                created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                extends?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                granted_to?: DerivedRoleBlockRead;
                                                                                                                                                                                                                                                                                                                                                                                                                id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                permissions?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                resource: string;
                                                                                                                                                                                                                                                                                                                                                                                                                resource_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Date and time when the role was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            description?: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Unique id of the environment that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            granted_to?: DerivedRoleBlockRead
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Derived role that inherit will be applied on this role

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            id: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Unique id of the role

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            key: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            name: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Unique id of the organization that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            permissions?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Unique id of the project that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            resource: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The unique resource key that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            resource_id: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Unique id of the resource that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Date and time when the role was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/ResourceRoleUpdate.html b/docs/interfaces/ResourceRoleUpdate.html new file mode 100644 index 00000000..ebc30a4b --- /dev/null +++ b/docs/interfaces/ResourceRoleUpdate.html @@ -0,0 +1,96 @@ +ResourceRoleUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                              Interface ResourceRoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              interface ResourceRoleUpdate {
                                                                                                                                                                                                                                                                                                                                                                                                                  attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                                  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                  extends?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                  granted_to?: DerivedRoleBlockEdit;
                                                                                                                                                                                                                                                                                                                                                                                                                  name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                  permissions?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              description?: string
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              Derived role that inherit will be applied on this role

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              name?: string
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              permissions?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/ResourceUpdate.html b/docs/interfaces/ResourceUpdate.html index 12877bed..1bfc1061 100644 --- a/docs/interfaces/ResourceUpdate.html +++ b/docs/interfaces/ResourceUpdate.html @@ -1,279 +1,130 @@ -ResourceUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                                                              +ResourceUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                - +

                                                                                                                                                                                                                                                                                                                                                                                                                Interface ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Export

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                • ResourceUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                actions?: {
                                                                                                                                                                                                                                                                                                                                                                                                                    [key: string]: ActionBlockEditable;
                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                actions?: { [key: string]: ActionBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                                                A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                attributes?: {
                                                                                                                                                                                                                                                                                                                                                                                                                    [key: string]: AttributeBlockEditable;
                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                attributes?: { [key: string]: AttributeBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                                                Attributes that each resource of this type defines, and can be used in your ABAC policies.

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:44
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                An optional longer description of what this resource respresents in your system

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:32
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                The name of the resource

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                relations?: object
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                relations?: { [key: string]: string }

                                                                                                                                                                                                                                                                                                                                                                                                                Relations to other resources. The key is the relation key, and the value is the related resource.

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                roles?: object
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:52
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                roles?: { [key: string]: RoleBlockEditable }

                                                                                                                                                                                                                                                                                                                                                                                                                Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc.

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:48
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                type_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                urn?: string

                                                                                                                                                                                                                                                                                                                                                                                                                The URN (Uniform Resource Name) of the resource

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                ResourceUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/resource-update.ts:28
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_path?: string
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_type?: string
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/RoleAssignmentCreate.html b/docs/interfaces/RoleAssignmentCreate.html index d95e61fe..953f0e8f 100644 --- a/docs/interfaces/RoleAssignmentCreate.html +++ b/docs/interfaces/RoleAssignmentCreate.html @@ -1,233 +1,88 @@ -RoleAssignmentCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                +RoleAssignmentCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                                                                                  Interface RoleAssignmentCreate

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Export

                                                                                                                                                                                                                                                                                                                                                                                                                  RoleAssignmentCreate

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                  • RoleAssignmentCreate
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                  resource_instance?: string
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                  RoleAssignmentCreate

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  resource_instance?: string
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)The resource instance will be implicitly created if the tenant parameter is specified and the resource instance does not exist.

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-assignment-create.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  role: string

                                                                                                                                                                                                                                                                                                                                                                                                                  the role that will be assigned (accepts either the role id or the role key)

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                  RoleAssignmentCreate

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-assignment-create.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  tenant?: string

                                                                                                                                                                                                                                                                                                                                                                                                                  the tenant the role is associated with (accepts either the tenant id or the tenant key)

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                  RoleAssignmentCreate

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-assignment-create.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  user: string

                                                                                                                                                                                                                                                                                                                                                                                                                  the user the role will be assigned to (accepts either the user id or the user key)

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                  RoleAssignmentCreate

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-assignment-create.ts:29
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/RoleAssignmentDetailedRead.html b/docs/interfaces/RoleAssignmentDetailedRead.html new file mode 100644 index 00000000..3c45f419 --- /dev/null +++ b/docs/interfaces/RoleAssignmentDetailedRead.html @@ -0,0 +1,118 @@ +RoleAssignmentDetailedRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                    Interface RoleAssignmentDetailedRead

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    interface RoleAssignmentDetailedRead {
                                                                                                                                                                                                                                                                                                                                                                                                                        created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        resource_instance?: RoleAssignmentResourceInstance;
                                                                                                                                                                                                                                                                                                                                                                                                                        role: RoleAssignmentRole;
                                                                                                                                                                                                                                                                                                                                                                                                                        tenant: RoleAssignmentTenant;
                                                                                                                                                                                                                                                                                                                                                                                                                        user: RoleAssignmentUser;
                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Date and time when the role assignment was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the environment that the role assignment belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    id: string
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the role assignment

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the organization that the role assignment belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the project that the role assignment belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    resource_instance?: RoleAssignmentResourceInstance
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    role: RoleAssignmentRole
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    the role that is assigned

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    tenant: RoleAssignmentTenant
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    the tenant the role is associated with

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    user: RoleAssignmentUser
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    the user the role is assigned to

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/RoleAssignmentRead.html b/docs/interfaces/RoleAssignmentRead.html index 2fa07181..6bbcde9d 100644 --- a/docs/interfaces/RoleAssignmentRead.html +++ b/docs/interfaces/RoleAssignmentRead.html @@ -1,365 +1,160 @@ -RoleAssignmentRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                    +RoleAssignmentRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                                                                                                                                      Interface RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Export

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                      • RoleAssignmentRead
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      created_at: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Date and time when the role assignment was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:65
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the environment that the role assignment belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:61
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the role assignment

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the organization that the role assignment belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:53
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      project_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the project that the role assignment belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      resource?: string
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      the resource type the role is associated with

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      resource_id?: string
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the resource type

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      resource_instance?: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:57
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      resource_instance?: string

                                                                                                                                                                                                                                                                                                                                                                                                                      the resource instance the role is associated with

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      resource_instance_id?: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:33
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      resource_instance_id?: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the resource instance

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:37
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      role: string

                                                                                                                                                                                                                                                                                                                                                                                                                      the role that is assigned

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      role_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      role_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the role

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:45
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      tenant?: string

                                                                                                                                                                                                                                                                                                                                                                                                                      the tenant the role is associated with

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      tenant_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:29
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      tenant_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:49
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      user: string

                                                                                                                                                                                                                                                                                                                                                                                                                      the user the role is assigned to

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      user_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      user_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                      Unique id of the user

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                      RoleAssignmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/role-assignment-read.ts:41
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/RoleAssignmentRemove.html b/docs/interfaces/RoleAssignmentRemove.html index 020a919e..1ffe8e8a 100644 --- a/docs/interfaces/RoleAssignmentRemove.html +++ b/docs/interfaces/RoleAssignmentRemove.html @@ -1,233 +1,88 @@ -RoleAssignmentRemove | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                      +RoleAssignmentRemove | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                                                                                                                                                                        Interface RoleAssignmentRemove

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Export

                                                                                                                                                                                                                                                                                                                                                                                                                        RoleAssignmentRemove

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                        • RoleAssignmentRemove
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                        resource_instance?: string
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        resource_instance?: string

                                                                                                                                                                                                                                                                                                                                                                                                                        the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                        RoleAssignmentRemove

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/role-assignment-remove.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        role: string

                                                                                                                                                                                                                                                                                                                                                                                                                        the role that will be unassigned (accepts either the role id or the role key)

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                        RoleAssignmentRemove

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                        tenant?: string
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/role-assignment-remove.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        tenant: string

                                                                                                                                                                                                                                                                                                                                                                                                                        the tenant the role is associated with (accepts either the tenant id or the tenant key)

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                        RoleAssignmentRemove

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/role-assignment-remove.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        user: string

                                                                                                                                                                                                                                                                                                                                                                                                                        the user the role will be unassigned from (accepts either the user id or the user key)

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                        RoleAssignmentRemove

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/role-assignment-remove.ts:29
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/RoleCreate.html b/docs/interfaces/RoleCreate.html index d1a5a1f9..5d7fc47a 100644 --- a/docs/interfaces/RoleCreate.html +++ b/docs/interfaces/RoleCreate.html @@ -1,255 +1,122 @@ -RoleCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                        +RoleCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                                                                                                                                                                                          Interface RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Export

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                          • RoleCreate
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/role-create.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                          optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                          granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/role-create.ts:28
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/role-create.ts:40
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Derived role that inherit will be applied on this role

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          key: string

                                                                                                                                                                                                                                                                                                                                                                                                                          A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role.

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/role-create.ts:20
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          name: string

                                                                                                                                                                                                                                                                                                                                                                                                                          The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/role-create.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          permissions?: string[]

                                                                                                                                                                                                                                                                                                                                                                                                                          list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                          RoleCreate

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/role-create.ts:32
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          v1compat_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          v1compat_is_built_in?: boolean
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          v1compat_settings?: object
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/RoleCreateBulk.html b/docs/interfaces/RoleCreateBulk.html new file mode 100644 index 00000000..bd53c72d --- /dev/null +++ b/docs/interfaces/RoleCreateBulk.html @@ -0,0 +1,124 @@ +RoleCreateBulk | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                            Interface RoleCreateBulk

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            interface RoleCreateBulk {
                                                                                                                                                                                                                                                                                                                                                                                                                                attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                                                description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                extends?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                granted_to?: DerivedRoleBlockEdit;
                                                                                                                                                                                                                                                                                                                                                                                                                                key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                permissions?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                resource?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_attributes?: object;
                                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_settings?: object;
                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            description?: string
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Derived role that inherit will be applied on this role

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            key: string
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            A URL-friendly name of the Role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the Role.

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            name: string
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            permissions?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            resource?: string
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            The resource key for the role. Optional; for tenant roles, leave empty.

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            v1compat_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            v1compat_settings?: object
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/RoleCreateBulkOperationResult.html b/docs/interfaces/RoleCreateBulkOperationResult.html new file mode 100644 index 00000000..686a39d2 --- /dev/null +++ b/docs/interfaces/RoleCreateBulkOperationResult.html @@ -0,0 +1,68 @@ +RoleCreateBulkOperationResult | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                              Interface RoleCreateBulkOperationResult

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              interface RoleCreateBulkOperationResult {
                                                                                                                                                                                                                                                                                                                                                                                                                                  created: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                  updated: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              created: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              updated: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/RoleRead.html b/docs/interfaces/RoleRead.html index c4ef7807..d36dcd27 100644 --- a/docs/interfaces/RoleRead.html +++ b/docs/interfaces/RoleRead.html @@ -1,327 +1,164 @@ -RoleRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                                                                              +RoleRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                - +

                                                                                                                                                                                                                                                                                                                                                                                                                                Interface RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Export

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                • RoleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:32
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                created_at: string

                                                                                                                                                                                                                                                                                                                                                                                                                                Date and time when the role was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:66
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the environment that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                granted_to?: DerivedRoleBlockRead
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:62
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                granted_to?: DerivedRoleBlockRead
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                A derived role defintion block, typically contained whithin a role definition. The derived role is a role that is derived from the role definition.

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the role

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:50
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                key: string

                                                                                                                                                                                                                                                                                                                                                                                                                                A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role.

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:46
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                name: string

                                                                                                                                                                                                                                                                                                                                                                                                                                The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:20
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the organization that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:54
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                permissions?: string[]

                                                                                                                                                                                                                                                                                                                                                                                                                                list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:28
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                project_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                Unique id of the project that the role belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:58
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                updated_at: string

                                                                                                                                                                                                                                                                                                                                                                                                                                Date and time when the role was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                RoleRead

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/role-read.ts:70
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                v1compat_settings?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/RoleUpdate.html b/docs/interfaces/RoleUpdate.html index b427a28a..3f5c5e79 100644 --- a/docs/interfaces/RoleUpdate.html +++ b/docs/interfaces/RoleUpdate.html @@ -1,243 +1,108 @@ -RoleUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                +RoleUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Interface RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Export

                                                                                                                                                                                                                                                                                                                                                                                                                                  RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • RoleUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-update.ts:32
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                  optional description string explaining what this role represents, or what permissions are granted to it.

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-update.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  extends?: string[]
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-update.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  granted_to?: DerivedRoleBlockEdit
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Derived role that inherit will be applied on this role

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                  The name of the role

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-update.ts:20
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  permissions?: string[]

                                                                                                                                                                                                                                                                                                                                                                                                                                  list of action keys that define what actions this resource role is permitted to do

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  RoleUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Defined in src/openapi/types/role-update.ts:28
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  v1compat_attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  v1compat_settings?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/Statistics.html b/docs/interfaces/Statistics.html deleted file mode 100644 index 7470c3fb..00000000 --- a/docs/interfaces/Statistics.html +++ /dev/null @@ -1,255 +0,0 @@ -Statistics | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Interface Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Export

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • Statistics
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  has_decision_logs: boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  members: OrgMemberReadWithGrants[]
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  policies: number
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  resources: number
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  roles: number
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  tenants: number
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  users: number
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                  Statistics

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                                                                                                                                                  Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                  \ No newline at end of file diff --git a/docs/interfaces/TaskResultEnvironmentRead.html b/docs/interfaces/TaskResultEnvironmentRead.html new file mode 100644 index 00000000..190880d0 --- /dev/null +++ b/docs/interfaces/TaskResultEnvironmentRead.html @@ -0,0 +1,80 @@ +TaskResultEnvironmentRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Interface TaskResultEnvironmentRead

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    interface TaskResultEnvironmentRead {
                                                                                                                                                                                                                                                                                                                                                                                                                                        error?: ErrorDetails | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                        result?: EnvironmentRead | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                        status: TaskStatus;
                                                                                                                                                                                                                                                                                                                                                                                                                                        task_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    error?: ErrorDetails | null
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    The error details when the task failed.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    result?: EnvironmentRead | null
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    The result of the task when the task finished.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    status: TaskStatus
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    The status of the task.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    task_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    The unique id of the task.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/TenantCreate.html b/docs/interfaces/TenantCreate.html index e497b77f..c47a9073 100644 --- a/docs/interfaces/TenantCreate.html +++ b/docs/interfaces/TenantCreate.html @@ -1,233 +1,88 @@ -TenantCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                    +TenantCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Interface TenantCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Export

                                                                                                                                                                                                                                                                                                                                                                                                                                      TenantCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • TenantCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      attributes?: object

                                                                                                                                                                                                                                                                                                                                                                                                                                      Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                      TenantCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/tenant-create.ts:29
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                      an optional longer description of the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                      TenantCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/tenant-create.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      key: string

                                                                                                                                                                                                                                                                                                                                                                                                                                      A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified).

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                      TenantCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/tenant-create.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      name: string

                                                                                                                                                                                                                                                                                                                                                                                                                                      A descriptive name for the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                      TenantCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/tenant-create.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/TenantDetails.html b/docs/interfaces/TenantDetails.html new file mode 100644 index 00000000..163ea75f --- /dev/null +++ b/docs/interfaces/TenantDetails.html @@ -0,0 +1,60 @@ +TenantDetails | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Interface TenantDetails

                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        interface TenantDetails {
                                                                                                                                                                                                                                                                                                                                                                                                                                            attributes: { [id: string]: any };
                                                                                                                                                                                                                                                                                                                                                                                                                                            key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        attributes: { [id: string]: any }
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        key: string
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/TenantRead.html b/docs/interfaces/TenantRead.html index 4463073a..bbbb2d25 100644 --- a/docs/interfaces/TenantRead.html +++ b/docs/interfaces/TenantRead.html @@ -1,317 +1,160 @@ -TenantRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                                        +TenantRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Interface TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Interface TenantRead<Attributes>

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Export

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          A tenant response with an optional caller-declared attribute shape; no runtime validation.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          interface TenantRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                                                                                                                              attributes?: Attributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                              created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              last_action_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                              updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • TenantRead
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/api/tenants.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          attributes?: Attributes
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Attribute values retain the caller's declared shape when present.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/api/tenants.ts:26
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          created_at: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Date and time when the tenant was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:37
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          an optional longer description of the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:53
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Unique id of the environment that the tenant belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:33
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Unique id of the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          key: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified).

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          last_action_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          last_action_at: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Date and time when the tenant was last active (ISO_8601 format). In other words, this is the last time a permission check was done on a resource belonging to this tenant.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:45
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          name: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          A descriptive name for the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:49
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Unique id of the organization that the tenant belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          project_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Unique id of the project that the tenant belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:29
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          updated_at: string

                                                                                                                                                                                                                                                                                                                                                                                                                                          Date and time when the tenant was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                          TenantRead

                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/openapi/types/tenant-read.ts:41
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/interfaces/TenantUpdate.html b/docs/interfaces/TenantUpdate.html index 3e29a78f..2e5cbdfd 100644 --- a/docs/interfaces/TenantUpdate.html +++ b/docs/interfaces/TenantUpdate.html @@ -1,221 +1,80 @@ -TenantUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                          +TenantUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                            - +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Interface TenantUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Export

                                                                                                                                                                                                                                                                                                                                                                                                                                            TenantUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • TenantUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Index
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            attributes?: object

                                                                                                                                                                                                                                                                                                                                                                                                                                            Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                            TenantUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/tenant-update.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            description?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                            an optional longer description of the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                            TenantUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            - +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/tenant-update.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                            A descriptive name for the tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                            TenantUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Defined in src/openapi/types/tenant-update.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/interfaces/UserCreate.html b/docs/interfaces/UserCreate.html index f42253c8..b7229e22 100644 --- a/docs/interfaces/UserCreate.html +++ b/docs/interfaces/UserCreate.html @@ -1,245 +1,96 @@ -UserCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                                                                            +UserCreate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                              - +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Interface UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Export

                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • UserCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Index
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              attributes?: object

                                                                                                                                                                                                                                                                                                                                                                                                                                              Arbitrary user attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/user-create.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              email?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                              The email of the user. If synced, will be unique inside the environment.

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                                                                                              first_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/user-create.ts:24
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              first_name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                              First name of the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/user-create.ts:28
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              key: string

                                                                                                                                                                                                                                                                                                                                                                                                                                              A unique id by which Permit will identify the user for permission checks.

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                                                                                              last_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/user-create.ts:20
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              last_name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                              Last name of the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate

                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Defined in src/openapi/types/user-create.ts:32
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              role_assignments?: UserRoleCreate[]
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              List of roles to assign to the user in the environment.

                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                              Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/interfaces/UserInTenant.html b/docs/interfaces/UserInTenant.html index dbd814cd..d6593907 100644 --- a/docs/interfaces/UserInTenant.html +++ b/docs/interfaces/UserInTenant.html @@ -1,221 +1,78 @@ -UserInTenant | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                                                                                              +UserInTenant | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                - +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Interface UserInTenant

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Export

                                                                                                                                                                                                                                                                                                                                                                                                                                                UserInTenant

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • UserInTenant
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Index
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                resource_instance_roles?: UserResourceInstanceRole[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                roles: string[]

                                                                                                                                                                                                                                                                                                                                                                                                                                                List of roles assigned to the user in that tenant

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                UserInTenant

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                status: UserStatus
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/user-in-tenant.ts:26
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                status: UserStatus

                                                                                                                                                                                                                                                                                                                                                                                                                                                Whether the user has signed in or not

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                UserInTenant

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                - +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/user-in-tenant.ts:30
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                tenant: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The tenant key which the user is associated with

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                UserInTenant

                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/openapi/types/user-in-tenant.ts:22
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/interfaces/UserInviteApprovalRead.html b/docs/interfaces/UserInviteApprovalRead.html new file mode 100644 index 00000000..68463170 --- /dev/null +++ b/docs/interfaces/UserInviteApprovalRead.html @@ -0,0 +1,174 @@ +UserInviteApprovalRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Interface UserInviteApprovalRead<Attributes>

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Approval's user result; an explicit attribute shape is a caller assertion, not validation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  interface UserInviteApprovalRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      associated_tenants?: UserInTenant[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      attributes?: Attributes | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      email?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      first_name?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      last_name?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      roles?: UserRole[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Omit<UserRead<Attributes>, "first_name" | "last_name" | "attributes"> +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • UserInviteApprovalRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  associated_tenants?: UserInTenant[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  attributes?: Attributes | null
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returned attributes retain their actual null or caller-declared shape.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Date and time when the user was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  email?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  The email of the user. If synced, will be unique inside the environment.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the environment that the user belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  first_name?: string | null
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  First name, if supplied, including null.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  key: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  A unique id by which Permit will identify the user for permission checks.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  last_name?: string | null
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Last name, if supplied, including null.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the organization that the user belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Unique id of the project that the user belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  roles?: UserRole[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Date and time when the user was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/interfaces/UserRead.html b/docs/interfaces/UserRead.html index 5288c76d..5593fda6 100644 --- a/docs/interfaces/UserRead.html +++ b/docs/interfaces/UserRead.html @@ -1,314 +1,177 @@ -UserRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +UserRead | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Interface UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Interface UserRead<Attributes>

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Export

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    A user response with an optional caller-declared attribute shape; no runtime validation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    interface UserRead<Attributes extends object = object> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                        associated_tenants?: UserInTenant[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                        attributes?: Attributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        created_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        email?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        environment_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        first_name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        last_name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        organization_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        project_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        roles?: UserRole[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                        updated_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Attributes extends object = object
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • UserRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/api/users.ts:34
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    associated_tenants?: UserInTenant[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    associated_tenants?: UserInTenant[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    attributes?: Attributes
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Attribute values retain the caller's declared shape when present.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    attributes?: object
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Arbitrary user attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/api/users.ts:36
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    created_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Date and time when the user was created (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:47
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    email?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The email of the user. If synced, will be unique inside the environment.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    environment_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:55
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    environment_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the environment that the user belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    first_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    first_name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    First name of the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:59
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:26
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    key: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    A unique id by which Permit will identify the user for permission checks.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    last_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:22
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    last_name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Last name of the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    organization_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:63
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    organization_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the organization that the user belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    project_id: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:30
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    project_id: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Unique id of the project that the user belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:34
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    roles?: UserRole[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserRead

                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    updated_at: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Date and time when the user was last updated/modified (ISO_8601 format).

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Defined in src/openapi/types/user-read.ts:51
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/interfaces/UserRole.html b/docs/interfaces/UserRole.html index 6e7f786b..2f7186c7 100644 --- a/docs/interfaces/UserRole.html +++ b/docs/interfaces/UserRole.html @@ -1,209 +1,72 @@ -UserRole | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +UserRole | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Interface UserRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Export

                                                                                                                                                                                                                                                                                                                                                                                                                                                      UserRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UserRole
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      role -tenant + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      role: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                      the role that is assigned

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                      UserRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/user-role.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      tenant: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                      the tenant the role is associated with

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                      UserRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defined in src/openapi/types/user-role.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/interfaces/UserUpdate.html b/docs/interfaces/UserUpdate.html index 67ed33fd..1efddee8 100644 --- a/docs/interfaces/UserUpdate.html +++ b/docs/interfaces/UserUpdate.html @@ -1,233 +1,88 @@ -UserUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +UserUpdate | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Interface UserUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Export

                                                                                                                                                                                                                                                                                                                                                                                                                                                        UserUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • UserUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        attributes?: object

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Arbitrary user attributes that will be used to enforce attribute-based access control policies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                        UserUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/user-update.ts:29
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        email?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                        The email of the user. If synced, will be unique inside the environment.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                        UserUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        first_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/user-update.ts:17
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        first_name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                        First name of the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                        UserUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        last_name?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/user-update.ts:21
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        last_name?: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Last name of the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Memberof

                                                                                                                                                                                                                                                                                                                                                                                                                                                        UserUpdate

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Defined in src/openapi/types/user-update.ts:25
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/interfaces/loginAsSchema.html b/docs/interfaces/loginAsSchema.html index 2e6597c1..665feaab 100644 --- a/docs/interfaces/loginAsSchema.html +++ b/docs/interfaces/loginAsSchema.html @@ -1,206 +1,68 @@ -loginAsSchema | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +loginAsSchema | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                          - +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Interface loginAsSchema

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Input schema of the loginAs method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Hierarchy

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • loginAsSchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          - +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          tenantId -userId + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          tenantId: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          tenantId: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                          The key (or ID) of the active tenant for the logged in user. The embedded user will only be able to access the active tenant.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          userId: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/api/elements.ts:52
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          userId: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                          The key (or ID) of the user the element will log in as.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Defined in src/api/elements.ts:47
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/media/CONTRIBUTING.md b/docs/media/CONTRIBUTING.md new file mode 100644 index 00000000..6bcfda78 --- /dev/null +++ b/docs/media/CONTRIBUTING.md @@ -0,0 +1,211 @@ +# Contributing + +Install the Node version from `.nvmrc` and pnpm 12.8.1. From the repository root: + +```sh +pnpm audit --audit-level=moderate +pnpm install --frozen-lockfile --ignore-scripts +pnpm hooks:install +pnpm verify +``` + +`verify` runs the frozen dependency check, Oxlint, Oxfmt, strict TypeScript, both module builds, +all local unit, module-import, and tooling tests, and the reviewed API contract inventory. +It requires no Permit credentials or Java. CI runs these checks in separate required jobs, +then validates generated contracts, workflows, packed consumers and dependency security. +Use `pnpm fix` for lint fixes and formatting, then rerun `pnpm verify`. +Hooks check files without rewriting them. + +Packed-customer fixture preparation resolves and audits an isolated dependency lock before a +frozen installation with scripts disabled. It may fetch packages and registry audit data, so a +fresh checkout does not depend on a developer's pnpm metadata cache. The copied migration skill +uses its shipped compiler lock without re-resolving it. SDK behavior tests use local fixtures; +package preparation does not contact Permit services. Cold dependency setup has a separate bounded +setup budget; behavioral assertions and failure/skip gates remain unchanged. + +The hook installer writes pinned prek shims under `permit-hooks/hooks` in the current checkout's +Git directory, then enables Git's per-worktree configuration and selects that private hook path. +Primary and linked checkouts preserve shared default/custom hook files and sibling configuration. +A failed shim installation leaves the existing hook selection intact. Repeated installation is safe. +Tool versions are pinned in the pnpm lockfile; Dependabot groups updates with a seven-day delay. +For any future remote prek hooks, use frozen commit hashes and `pnpm exec prek update +--cooldown-days 7 --freeze` when reviewing updates. + +## Builds and imports + +Authored source is ESM under `src/package.json`. Use `#src/` imports, including type-only imports +where appropriate. The root package keeps its CommonJS metadata because it publishes both +`build/index.js` and `build/index.mjs`. TypeScript emits declarations; a checked AST pass replaces +source aliases with paths that resolve inside the packed package. Do not publish source aliases +or change public entry points as an incidental tooling fix. + +TypeScript 7 is the SDK checker and emitter. TypeDoc and the generation guard need a JavaScript +compiler API, so the private `tools/compiler` workspace explicitly owns maintained TypeScript 6 +and TypeDoc. The SDK has no runtime dependency on that workspace. + +## Tests + +Use `pnpm exec vitest run --project unit path/to/file.test.ts` for focused unit work. +`pnpm test:unit` runs the complete unit project with the execution report gate; +`pnpm test:module-imports` checks the built entry points. +Add new source tests beside the code as `*.test.ts`; existing grouped `src/tests` suites can be +extended in place. Mock external boundaries and test malformed input and failures. Demonstrate +that a representative regression fails when its fix is removed. + +`pnpm test:codegen` tests the generator guard and local tooling without Java. Regeneration requires +Java 17: `pnpm generate-openapi-client` reads the reviewed committed snapshot and shared +configuration, then validates and normalizes the generated output before replacing it. +`pnpm check:openapi` compares two clean generations with each other and the committed output. +The separate `pnpm check:codegen` +guard regenerates the historical fixture using the same pinned generator and configuration. +See [the generation guide](../openapi/README.md) before refreshing the snapshot. Never replace the +historical fixture or change API shapes merely to make a tooling check pass. + +`test:integration` and `test:e2e` use a Permit backend. Run them locally only with explicit +authorization. The standard verification command uses local fixtures only. + +Gated commands write native JSON and execution summaries to `.test-results/`. They reject missing +files, empty/all-skipped suites and unreasoned skips. Missing `PDP_API_KEY` reports `UNAVAILABLE` +and exits 2 before backend tests start. Optional organization/project credentials may be absent, +but supplied keys with the wrong scope fail. Named optional gaps and the existing PER-16553 ABAC +block appear separately from executed tests as a `PARTIAL` result. `pnpm coverage` reports every +authored runtime module, excluding generated clients and tests, without a percentage threshold. + +## API operation and shape evidence + +`pnpm check:api-contracts` verifies the local AST inventory, source provenance and exact operation +omission decisions. `pnpm check:api-drift` also compares current public schema documentation with +the pinned snapshots; it makes no backend operation calls. Reports distinguish local integrity, +coverage gaps, the unavailable shared parity target and unmeasured backend behavior. See +[the evidence guide](../api-coverage/README.md) before changing a baseline or exclusion. + +## Documentation and changes + +Run `pnpm run docs` to generate API documentation, or `pnpm run docs:watch` while editing TSDoc. +Use `pnpm run docs -- --out /absolute/output/path` to inspect output without replacing tracked docs. +Keep generated documentation out of unrelated changes. +Generation fails on missing root method contracts, API group navigation/member links and broken +local files, fragments or media assets. `pnpm run check:docs` checks an existing output tree; +pass an absolute output directory to check a preview. These checks do not fetch external links +or publish the reference. Root API exports determine the grouped interface inventory. + +CI's candidate `docs` job rebuilds the public reference and checks these links. Failed, skipped, +cancelled or missing docs prevent the candidate and `SDK required checks` from passing. + +### Website publication + +Website publication uses the separate manual `Publish API reference` workflow +(`reference-pages.yaml`); it does not publish npm. After the owner switches Pages to GitHub Actions, +no push, PR, release tag or npm publication automatically deploys the website. Until that switch, +the existing legacy `main:/docs` publisher remains active. Run the manual workflow only after the +owner approves reference publication. + +Before that approved rollout, the repository owner must switch Settings → Pages → Build and +deployment → Source from the current legacy `main:/docs` source to GitHub Actions. The owner must +also configure the `github-pages` environment with a main-only deployment branch policy and +required reviewer approval. These are prerequisites, not settings applied by the workflow. +It does not run `configure-pages` or enable/switch Pages automatically. + +After the approved source commit is on main and its required checks pass, select main in the +workflow's Run workflow control and enter that exact full 40-character commit SHA in `commit`. +Another branch, repository or mismatched SHA fails before checkout. The build checks HEAD, +requires a clean tracked/untracked source checkout, rebuilds/validates docs and records the commit, +run and attempt with a digest of the actual files in `reference-source.json`. Symlinks, hard links +and excluded repository paths fail the artifact check. Only that run's uniquely named artifact +reaches the deployment job; it runs no checkout or repository code and alone receives Pages/OIDC +write permissions. + +After an authorized deployment succeeds, use the workflow's deployed URL to fetch +`reference-source.json` and compare its commit, run/attempt and content digest with the build's +`Reference source/content identity PASS` output. Check the intended public class/interface pages +and their navigation at that URL. Record this hosted verification before claiming the intended +commit is published; local builds and green CI do not establish the hosted site's identity. +The existing site is `https://permitio.github.io/permit-node/`. This rollout does not change npm +publisher settings or bypass npm's separate publication acceptance. + +Keep changes focused, preserve supported runtime behavior, and describe validation and remaining +limitations in the PR. Check [AGENTS.md](../AGENTS.md) for repository development rules. + +## Dependency security + +Install [Trivy 0.74.0](https://github.com/aquasecurity/trivy/releases/tag/v0.74.0) for the same +scanner used in CI. The audit runner uses Node built-ins and runs before SDK dependencies install: + +```sh +node scripts/audit-dependencies.mjs --locked-only --out security-preinstall +pnpm install --frozen-lockfile --ignore-scripts +pnpm build +pnpm pack --out candidate.tgz --ignore-scripts +pnpm audit:dependencies --artifact candidate.tgz --out security-report +``` + +The report covers the locked SDK runtime graph, the complete development/tooling workspace, +and two independently resolved consumers of the actual tarball. Runtime dependencies are exact +pins, so the minimum and newest supported direct versions are identical. Both consumer lanes +resolve current compatible transitive versions; neither claims to test the lowest transitive +versions. Adding dependency ranges or peer dependencies requires explicit supported-range lanes. + +The pinned pnpm resolver uses a 24-hour release delay and disables scripts. It resolves a consumer +lockfile, audits it, then performs a frozen installation only after that lane passes. Trivy's +runtime dependency graph must match an independent pnpm lock inventory. Empty results, incomplete +inventory, malformed output, process failures and unresolved consumer installs are INVALID. + +Exit codes are 0 (PASS), 1 (FAIL: fixable HIGH/CRITICAL findings) and 2 (INVALID: not completed). +All other advisories and registry severity totals remain visible in JSON and Markdown, including +findings without available fixes. Raw scanner output and each consumer lockfile are retained. +Do not add ignored advisory IDs, dependency overrides or scanner suppression files. + +CI requires these checks on Node 22.13 and 24.0. The weekly Monday workflow and manual dispatch +publish GitHub summaries and downloadable evidence; repository maintainers review failed runs. +Slack delivery requires a separately authorized destination and is not configured here. +The shared candidate security jobs scan the same versioned archive as the packed consumer jobs. +Failed, skipped, cancelled or missing candidate gates prevent the publisher from running. +npm Trusted Publishing requires Node >=22.14.0 and npm >=11.5.1; the release job validates +the npm bundled with its Node 24 runner. +The SDK supports Node >=22.13.0, including later major versions. Local behavior and packed +consumer CI retain the 22.13.0 and 24.0.0 floors and test current Node 22, 24 and 26 releases. + +Dependabot groups runtime and tooling minor/patch updates, uses `increase`, and waits seven days +(fourteen for majors). Its published support matrix currently lists pnpm through version 10; +pnpm 12 lock updates are not yet verified. Maintainers must review dependency update failures and +apply compatible pinned updates manually until the bot supports this lockfile. The scheduled +security gate does not depend on Dependabot and continues to scan all four trees. + +## Release gate rollout + +The `SDK required checks` aggregate requires the shared candidate, the explicit trusted/fork backend +path and cleanup to succeed. Candidate gates require lint, strict types, public docs, +unit/tooling tests, workflow checks, generated contracts, the versioned archive, +the floor and current-release packed consumers +and dependency security. Fork and Dependabot runs report backend coverage as UNAVAILABLE and run +local checks; same-repository backend runs fail when their required secret is missing. Failed +cleanup attempts every owned environment deletion, then fails the aggregate rather than warning +and reporting success. + +The publisher receives the archive from the same workflow run. Its SHA-256, metadata and committed +source identity must match before npm executes. Publication acceptance is separate: SDK71 has no +`releaseReady=true` contract while the shared target and Curtain Call remain unresolved. There is +no dispatch flag or manual approval boolean that substitutes for those contracts. + +The following owner rollout is proposed, not applied. First observe a successful GitHub Actions +check named exactly `SDK required checks` on the final PR commit, including a fork run and a +trusted backend run. In active ruleset `main2` (24216899), add that exact context with GitHub +Actions integration ID 15368 to `required_status_checks`; preserve every other field, including +strict checks, no bypass actors, approval and thread-resolution requirements. Verify a +missing/failing check blocks merge before relying on the setting. The 2026-10-01 read-only audit +found the list empty; legacy branch-protection lookup returned 404 because the repository uses +rulesets. + +After the acceptance blockers are resolved, propose production environment reviewers, prevent +self-review, restrict deployment to the approved release tags, and create tag rules restricting +creation, updates and deletion to the owner's release process. The same audit found no production +protection rules/deployment policy and no tag rulesets. These settings require a separate concrete +owner approval; retain existing branch rules and do not grant a bypass to get a release through. + +Before an authorized release, an npm package owner must verify the active Trusted Publisher binds +`permitio/permit-node`, `node_sdk_publish.yaml` and `production`, with publication permission and +appropriate account protection. Public registry provenance for 2.7.6 confirms that historical +workflow identity, but does not prove the current trust configuration. Read-only `npm trust list` +returned E401 in the audit; no authentication, ownership or publisher settings were changed. +No credentials belong in the archive, validation evidence or workflow logs. Website reference +publication remains separate from npm publication. diff --git a/docs/media/MIGRATION-1.md b/docs/media/MIGRATION-1.md new file mode 100644 index 00000000..a282e5b2 --- /dev/null +++ b/docs/media/MIGRATION-1.md @@ -0,0 +1,176 @@ +# OpenAPI rebaseline migration inventory + +This major-version rebaseline replaces the old generated source with the reviewed 2026-09-30 +public contract and the existing Elements login supplement. It generates 264 operations across +165 paths, with 335 source schemas and 400 TypeScript files. Internal inline schemas explain why +the generated file count exceeds the source schema count. + +## Public SDK changes + +- The runtime export `EnvironmentCopyConflictStrategyEnum` is replaced by + `EnvironmentCopyConflictStrategy`. The CJS and ESM root surfaces each still contain 31 named + exports; this is their only removed/added runtime name. +- The unused `Statistics` type export is removed. The implicit-grants settings type is now + `PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings`, replacing + `PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings`. +- `ResourceInstanceCreate.tenant`, `ResourceInstanceRead.tenant` and `tenant_id`, + `RoleAssignmentRemove.tenant`, and `UserRoleRemove.tenant` are required by the reviewed schema. + Callers must supply tenant information where required. +- Resource roles are named `ResourceRoleRead` dictionary values. Role `granted_to` uses the + current `DerivedRoleBlockRead`/`DerivedRoleBlockEdit` models. Role inheritance remains optional + `string[]` for create/read/update on both global and resource roles. +- Generated list methods preserve array-or-pagination-envelope unions. High-level condition-set, + tenant, resource-instance and relationship-tuple lists retain their array contract by unwrapping + the envelope when present. High-level role/resource lists still honor `includeTotalCount`. +- Generated resource-relation listing returns `PaginatedResultRelationRead`. The existing + `permit.api.resourceRelations.list()` returns its `data` array, matching its declared contract. +- Generated role-assignment user/role/tenant filters are arrays. Existing high-level singleton + string parameters are serialized as one unbracketed query value, preserving encoded keys. +- Explicit `apiUrl` and PDP routing keep precedence over an injected Axios `baseURL`, preserving + the previous SDK behavior despite the upstream generator helper change. +- Generated unassignment returns `RoleAssignmentRead`. The two current high-level unassign methods + retain their void result. The deprecated `unassignRole` returns its actual + `AxiosResponse`. +- `bulkUserCreate`, `bulkUserDelete`, `bulkUserReplace`, `bulkRelationshipTuples`, and + `bulkUnRelationshipTuples` return unspecified `object` results. Their old request-payload return + types were incorrect; the backend's empty result schemas remain unresolved. Request shapes are + still typed and are not used as substitute result contracts. + +## Generated-only removals + +The public snapshot omits 34 of the 195 previously generated operations. The existing Elements +login route is preserved by its narrow supplement; the other 33 generated-only operations are +removed. These methods were not called by high-level SDK wrappers. This inventory records the +removed generated declarations; it does not claim that every omitted backend route stopped +working. The refreshed public snapshot adds 102 operations. + +| Former generated class file | Method | Route | +| ------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `authentication-api.ts` | `devLogin` | `POST /v2/auth/devlogin` | +| `authentication-api.ts` | `elementsFeLoginAs` | `POST /v2/auth/{env_id}/elements_fe_login_as` | +| `authentication-api.ts` | `login` | `POST /v2/auth/login` | +| `authentication-api.ts` | `loginElements` | `GET /v2/auth/login_elements` | +| `authentication-api.ts` | `logoutGet` | `GET /v2/auth/logout` | +| `authentication-api.ts` | `logoutPost` | `POST /v2/auth/logout` | +| `authentication-api.ts` | `me` | `GET /v2/auth/me` | +| `authentication-api.ts` | `switchOrganization` | `POST /v2/auth/switch_org/{org_id}` | +| `condition-sets-api.ts` | `getConditionSetPossibleParents` | `GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/possible_parents` | +| `decision-logs-api.ts` | `listPdpDecisionLogs` | `GET /v2/pdps/{proj_id}/{env_id}/decision-logs/{pdp_id}` | +| `decision-logs-ingress-api.ts` | `insertOpaDecisionLogs` | `POST /v2/decision-logs/ingress` | +| `default-api.ts` | `dummy` | `GET /v2/stress/dummy` | +| `default-api.ts` | `dummyDb` | `GET /v2/stress/db/dummy` | +| `default-api.ts` | `getOrganizationV2StressDbOrganizationGet` | `GET /v2/stress/db/organization` | +| `default-api.ts` | `getOrganizationWithAuthn` | `GET /v2/stress/db/organization_auth` | +| `default-api.ts` | `getOrganizationWithAuthz` | `GET /v2/stress/db/organization_authz` | +| `elements-configs-api.ts` | `getElementsTypeConfig` | `GET /v2/elements/{proj_id}/{env_id}/{element_type}` | +| `elements-configs-api.ts` | `updateElementsTypePermissions` | `PATCH /v2/elements/{proj_id}/{env_id}/{element_type}` | +| `instructions-api.ts` | `listLanguageInstructions` | `GET /v2/{proj_id}/{env_id}/get_instructions` | +| `opaldata-api.ts` | `getDataForConditionSet` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_sets/{condition_set_id}` | +| `opaldata-api.ts` | `getDataForResource` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_types/{resource_id}` | +| `opaldata-api.ts` | `getDataForRole` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/roles/{role_id}` | +| `opaldata-api.ts` | `getDataForSetRule` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_set_rules/{user_set_id}/{resource_set_id}` | +| `opaldata-api.ts` | `getDataForTenant` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/tenants/{tenant_id}` | +| `opaldata-api.ts` | `getDataForUser` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users/{user_id}` | +| `policy-api.ts` | `getOpalDataSources` | `GET /v2/opal/data/config` | +| `policy-api.ts` | `getOpalDataSourcesOpalDataConfigGet` | `GET /opal/data/config` | +| `policy-decision-points-api.ts` | `getAuthenticatingPdpConfigValues` | `POST /v2/pdps/me/config` | +| `policy-decision-points-api.ts` | `getAuthenticatingPdpConfigValuesLegacy` | `GET /v2/pdps/me/config` | +| `policy-decision-points-api.ts` | `opalDataCallback` | `POST /v2/pdps/me/opal_data_callback` | +| `policy-decision-points-api.ts` | `pushPdpState` | `POST /v2/pdps/me/state` | +| `roles-api.ts` | `addParentRole` | `PUT /v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}` | +| `roles-api.ts` | `removeParentRole` | `DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}` | + +The packed declaration surface grows from 356 to 434 files. The following generated declaration +files are removed, including names replaced by current schema models. All remaining declarations +are checked by the strict SDK build and packed-consumer checks. + +- `api/decision-logs-api.d.ts` +- `api/decision-logs-ingress-api.d.ts` +- `api/elements-configs-api.d.ts` +- `api/instructions-api.d.ts` +- `api/opaldata-api.d.ts` +- `api/policy-api.d.ts` +- `types/action-block.d.ts` +- `types/activity-details.d.ts` +- `types/actor.d.ts` +- `types/allow.d.ts` +- `types/allowed-result.d.ts` +- `types/apikey-info.d.ts` +- `types/apikey-viewer-context.d.ts` +- `types/attribute-block.d.ts` +- `types/attributes.d.ts` +- `types/audit-log-objects.d.ts` +- `types/audit-log.d.ts` +- `types/audit-logs.d.ts` +- `types/authn-me-apikey-read.d.ts` +- `types/authn-me-member-read.d.ts` +- `types/authn-me-read.d.ts` +- `types/authn-me-user-read.d.ts` +- `types/condition-set-data.d.ts` +- `types/data-entry-report.d.ts` +- `types/data-source-entry.d.ts` +- `types/data-update-report.d.ts` +- `types/derived-role-rule.d.ts` +- `types/derived-role.d.ts` +- `types/detailed-audit-log.d.ts` +- `types/dev-login.d.ts` +- `types/editable.d.ts` +- `types/elements-env-type-read.d.ts` +- `types/elements-env-type-update.d.ts` +- `types/entry.d.ts` +- `types/environment-regeneration.d.ts` +- `types/full-data.d.ts` +- `types/full-regeneration.d.ts` +- `types/granted-to.d.ts` +- `types/granted-to1.d.ts` +- `types/granted-to2.d.ts` +- `types/invite-attempt-result.d.ts` +- `types/jwks.d.ts` +- `types/labels.d.ts` +- `types/language-instructions.d.ts` +- `types/login-result.d.ts` +- `types/member-info.d.ts` +- `types/member-viewer-context.d.ts` +- `types/message.d.ts` +- `types/new.d.ts` +- `types/opadecision-log.d.ts` +- `types/opal-common-schemas-data-data-source-config.d.ts` +- `types/opal-common.d.ts` +- `types/organization-regeneration.d.ts` +- `types/paginated-result-audit-log.d.ts` +- `types/paginated-result-opadecision-log.d.ts` +- `types/payload.d.ts` +- `types/pdp.d.ts` +- `types/pdpinfo.d.ts` +- `types/pdpopainfo.d.ts` +- `types/pdpstate-update.d.ts` +- `types/pdpstate.d.ts` +- `types/permit-backend-opal-api-data-data-source-config.d.ts` +- `types/permit-backend-schemas-schema-derived-role-derived-role-settings.d.ts` +- `types/permit-backend-schemas-schema-opal-data-derived-role-settings.d.ts` +- `types/policy-synchronizer-regeneration.d.ts` +- `types/programming-language.d.ts` +- `types/project-regeneration.d.ts` +- `types/resource-sets.d.ts` +- `types/resource-type-data.d.ts` +- `types/resources.d.ts` +- `types/response-get-data-for-condition-set-v2-internal-opal-data-org-id-proj-id-env-id-condition-sets-condition-set-id-get.d.ts` +- `types/response-get-data-for-resource-v2-internal-opal-data-org-id-proj-id-env-id-resource-types-resource-id-get.d.ts` +- `types/response-get-data-for-role-v2-internal-opal-data-org-id-proj-id-env-id-roles-role-id-get.d.ts` +- `types/response-get-data-for-tenant-v2-internal-opal-data-org-id-proj-id-env-id-tenants-tenant-id-get.d.ts` +- `types/response-get-data-for-user-v2-internal-opal-data-org-id-proj-id-env-id-users-user-id-get.d.ts` +- `types/role-block.d.ts` +- `types/role-data.d.ts` +- `types/scope.d.ts` +- `types/settings.d.ts` +- `types/statistics.d.ts` +- `types/target-env.d.ts` +- `types/tenant-data.d.ts` +- `types/user-data.d.ts` +- `types/user-felogin-request-input.d.ts` +- `types/user-sets.d.ts` +- `types/viewer-context.d.ts` +- `types/viewer-grant.d.ts` +- `types/viewer.d.ts` +- `types/webhook-create.d.ts` +- `types/when.d.ts` diff --git a/docs/media/MIGRATION.md b/docs/media/MIGRATION.md new file mode 100644 index 00000000..b55a612c --- /dev/null +++ b/docs/media/MIGRATION.md @@ -0,0 +1,356 @@ +# Migrating to Permit Node SDK 3.0 + +This guide describes the upcoming 3.0 behavior. The reviewed candidate identifies itself as +3.0.0 and remains unpublished. Check the official release before +changing production requirements. Compare your actual installed 2.x version: some fixes were already +present in recent 2.x source. Stable IDs below are shared with the scanner and release notes. + +The inventory compares the official npm 2.7.5 package and the reviewed main source separately. +Published 2.7.5 already had root CJS/ESM exports and the 29 flat methods, but no SDK retry options. +Statements about retained retry or routing behavior refer to reviewed main, not every 2.x release. + +## Upgrade and compatibility + +### P1 — Dependency and lock + +After 3.0 is released, update the direct `permitio` requirement and regenerate the application lock +with your package manager. Check every workspace, deployment image and independent consumer. Review +transitive pins rather than assuming a successful install migrated application behavior. + +### C1 — Supported Node versions + +Use Node `>=22.13.0`, including later major versions. The former `>=10` requirement no longer +applies. Check CI, containers, deployment providers and local pins. Validation retains the 22.13.0 +and 24.0.0 floors and exercises current releases of Node 22, 24 and 26. + +### C2 — Imports and modules + +Both native CommonJS and ES modules remain supported; there is no forced module conversion. +Use `require('permitio')` or `import { Permit } from 'permitio'`. Both loaders expose named exports. +Root-only package exports already existed in 2.x. If you bypassed them with generated/internal file +paths, review those imports: generated files and the physical runtime layout changed. Do not replace +them with another internal path. The historical generated inventory lists removed declarations. + +`ResourceRelationsApi`, `ResourceRolesApi`, `ApiContextLevel` and `PermitContextChangeError` are +now named root exports. Use the grouped clients through `permit.api.resourceRelations` and +`permit.api.resourceRoles`, and use their exported classes for constructor identity checks. + +### C3 — Direct use of former transitive dependencies + +The SDK no longer brings in `@bitauth/libauth`, `path-to-regexp`, `require-in-the-middle` or +`url-parse`. If application code imports these packages, declare and review its own dependencies. +Do not add them back to Permit. Review dependency changes through the application lock and audit. + +## API migration + +### A1 — Flat methods are removed + +The 29 deprecated methods directly under `permit.api` are absent in 3.0. There are no compatibility +shims or warnings that keep them callable. Below, `api` means `permit.api`; supply the corresponding +typed arguments and await calls as before. Read A3 before adapting consumers of returned values. + +| Removed call | Grouped replacement | +| -------------------------------------------- | ------------------------------------------------- | +| `api.listUsers()` | `(await api.users.list()).data` | +| `api.listRoles()` | `api.roles.list()` | +| `api.listConditionSets(type, page, perPage)` | `api.conditionSets.list({ type, page, perPage })` | +| `api.listConditionSetsRules(page, perPage)` | `api.conditionSetRules.list({ page, perPage })` | +| `api.getUser(key)` | `api.users.get(key)` | +| `api.getTenant(key)` | `api.tenants.get(key)` | +| `api.listTenants(page)` | `api.tenants.list({ page })` | +| `api.getRole(key)` | `api.roles.get(key)` | +| `api.getAssignedRoles(user, tenant)` | `api.users.getAssignedRoles({ user, tenant })` | +| `api.createResource(data)` | `api.resources.create(data)` | +| `api.updateResource(key, data)` | `api.resources.update(key, data)` | +| `api.deleteResource(key)` | `api.resources.delete(key)` | +| `api.createUser(data)` | `api.users.create(data)` | +| `api.syncUser(data)` | `(await api.users.sync(data)).user` | +| `api.updateUser(key, data)` | `api.users.update(key, data)` | +| `api.deleteUser(key)` | `api.users.delete(key)` | +| `api.createTenant(data)` | `api.tenants.create(data)` | +| `api.updateTenant(key, data)` | `api.tenants.update(key, data)` | +| `api.deleteTenant(key)` | `api.tenants.delete(key)` | +| `api.createRole(data)` | `api.roles.create(data)` | +| `api.updateRole(key, data)` | `api.roles.update(key, data)` | +| `api.deleteRole(key)` | `api.roles.delete(key)` | +| `api.assignRole(data)` | `api.users.assignRole(data)` | +| `api.unassignRole(data)` | `api.users.unassignRole(data)` | +| `api.createConditionSet(data)` | `api.conditionSets.create(data)` | +| `api.updateConditionSet(key, data)` | `api.conditionSets.update(key, data)` | +| `api.deleteConditionSet(key)` | `api.conditionSets.delete(key)` | +| `api.assignConditionSetRule(data)` | `api.conditionSetRules.create(data)` | +| `api.unassignConditionSetRule(data)` | `api.conditionSetRules.delete(data)` | + +### A2 — Method bag, five legacy exports, and context alias + +Remove `api.getMethods()`. For callbacks keep the grouped method's receiver with a closure, such as +`const getUser = (key: string) => permit.api.users.get(key)`. + +| Removed export | Replacement | +| ---------------------- | ----------------------------------------------------- | +| `DeprecatedApiClient` | `permit.api`, or `ApiClient` for direct construction | +| `IDeprecatedPermitApi` | `IPermitApi` | +| `IDeprecatedReadApis` | The applicable grouped interface, such as `IUsersApi` | +| `IDeprecatedWriteApis` | The applicable grouped interface, such as `IUsersApi` | +| `ContextTransform` | Transform context in application code before the call | + +Use `permit.config.apiContext.permittedAccessLevel` instead of the removed `ApiContext.level`. +There was no public runtime transform registration API. Do not invent a global-context setter or +register an unused transform. Two additional removed root exports are covered under T1. + +### A3 — Returned values and runtime corrections + +- Flat `listUsers()` returned an array; grouped `users.list()` returns a page. Read `page.data`. +- Flat `syncUser()` returned the record; grouped `users.sync()` returns `{ user, created }`. +- Flat `assignConditionSetRule()` returned an array; grouped `conditionSetRules.create()` returns + one record. Existing grouped create already had this shape; it now rejects an empty success body + instead of returning `undefined`. +- Grouped deletes/unassignments are typed `Promise`: use completion, not response body, + status or headers. Only `users.unassignRole()` and `roleAssignments.unassign()` now explicitly + resolve `undefined`; they were declared void in 2.x but returned bodies. Other unchanged void + wrappers can expose empty Axios response text for HTTP 204; do not require identical empty + runtime values or treat them as substantive results. +- Ordinary condition-set, tenant, instance, tuple and resource-relation lists keep their declared + array result, unwrapping a server pagination envelope when required. Do not add `.data` to these + high-level array results. Generated-only clients can have different result unions. + +### A4 — Condition filters + +`conditionSets.list()` accepts optional `{ type, page, perPage }`; no type lists both kinds. +`conditionSetRules.list()` accepts omitted, empty or partial filters. Both default to page 1 and +100 records per page. `permissionKey: 'write'` filters by the action key/ID; rule create/read +permission is canonical `document:write`. The SDK forwards filters unchanged. Do not confuse a +permission's persisted representation with the GET action filter. Use full typed read records. + +## Configuration and errors + +### F1 — Effective constructor validation and logging defaults + +Use `IPermitOptions` for constructor input. Supply a nonempty token without whitespace/control +characters, after `PERMIT_API_KEY` fallback, and absolute HTTP(S) `pdp`/`apiUrl` URLs. Validate +deployment variables before construction. Base URLs cannot contain literal query (`?`) or +fragment (`#`) components, even empty trailing delimiters. Remove those components rather than +expecting the SDK to strip them. Existing path prefixes and encoded path characters such as +`%3F` and `%23` remain supported, including existing environment URL defaults. Logger levels, +booleans, timeout and retry values are checked. Invalid effective options throw `TypeError` +before HTTP, without echoing credentials. +Use complete instances from `axios.create()` and a genuine current-version `ApiContext`, rather +than partial mock objects. Explicit `undefined` is permitted for constructor options. + +Unset `PERMIT_LOG_JSON` now selects JSON lines. Explicit `log.json: false` produced JSON in 2.x +and now selects pretty output. Environment value `false` also selects pretty output; case and +surrounding whitespace are ignored. Update log parsers, or explicitly set `log.json: true`. +Pretty output writes synchronously on the calling thread; blocked stdout can delay the application. +The default JSON output keeps Pino's default destination and is preferred for production collection. +Logs omit raw configuration, credentials, full attributes, request bodies and private errors. + +### F2 — Configuration and API context ownership + +SDK-owned settings and nested log/tenancy/retry options are copied and frozen. Construct a new +client to change token, routes or these settings. The config reference is readonly; do not replace +`permit.config` to rotate settings. Caller Axios instances and callbacks stay live. + +A supplied initial `ApiContext` is validated and copied. Change selection afterward through +`permit.config.apiContext`, within the key's validated scope, once permissions are available. +Mutating the originally supplied context no longer changes this client. Current CJS/ESM contexts +interoperate; an old-version/plain context is not a supported substitute. Concurrent wrappers +share one scope lookup, and a failed lookup allows a later retry. + +### E1 — PDP errors and non-throwing results + +Catch `PermitPDPStatusError` before `PermitConnectionError`: the status class now extends the +connection class. HTTP failures and malformed successful PDP bodies retain the specific status +class with safe `statusCode`/`responseBody`; transport failures have safe cause/code metadata. +Stop matching raw/private error text or assuming raw request/body identity is retained. + +With `throwOnError: false`, check failure returns `false`, bulk failure returns one `false` per +input rather than `[]`, permissions return `{}`, and all-tenants return `[]`. These are denial +fallbacks, not proof a policy denied a healthy request. New discovery exceptions are covered in N3. + +### E2 — REST and scope error snapshots + +`PermitApiError` is named and non-generic. `originalError` is a detached bounded Axios snapshot, +not the caller's thrown object. `request` is `undefined`; response data and formatted error bodies +are `unknown`. Narrow them before reading fields. Use `status`, `code` and safe cause metadata. +Do not rely on sockets, hooks, raw headers/bodies, identity, stacks or private server messages. +Non-Axios adapter/hook failures are normalized too. Scope errors expose safe status/code/cause as +`PermitContextError`. Update log pipelines that relied on raw error or user/resource contents. + +## Wire and enforcement review + +### W1 — Literal and whole-result validation + +Authorization mocks and custom PDPs must return literal booleans. Bulk responses must contain +exactly one valid decision per input, including zero. One malformed member invalidates the whole +bulk, permissions or all-tenant result; no partial allow result is accepted. All-tenant entries +require `allow: true` and a string tenant key. Permission entries validate arrays/details, default +missing permissions/attributes, and omit nullable optional members. Legal own dictionary keys and +additive fields survive. Update truthy/incomplete fixtures and verify the live policy contract. +Sparse bulk slots reject before partial dispatch. `useOpa: true` on bulk/permission queries now +rejects through their configured throw/deny policy instead of being ignored; only check supports it. + +### W2 — OPA request hooks now receive JSON text + +The SDK serializes enforcement bodies before Axios merging to preserve legal `__proto__` and +`constructor` own keys. Supplied OPA interceptors/transforms receive a JSON string, including the +OPA input envelope. Parse/edit/stringify that text if a hook changes it; do not access it as a raw +object. Direct caller requests keep the caller's own shape. Circular/unsupported serialization +inputs produce safe `PermitError` before HTTP, or the operation's configured denial fallback. +Review custom adapters/hooks manually; the scanner cannot prove their transformations correct. + +### W3 — All-tenants requests + +`checkAllTenants(user, action, resource, context?, sdk?)` keeps its public call shape. Its request +sends actual normalized JSON input/context with SDK Authorization/language headers to +`allowed/all-tenants`; these are not misplaced body header/params objects. It parses +`allowed_tenants` and validates every grant. It does not inject the default resource tenant for +an all-tenant query. Update wire mocks and custom proxy expectations; keep authorization semantics. + +### W4 — Retries and shared timeout budget + +Retries are opt-in, as on reviewed main; published 2.7.5 had no SDK retry options. `maxRetries` +counts retries after the initial attempt. SDK REST POST/PATCH +writes are excluded even if listed; cancellation, invalid configuration and a non-boolean custom +predicate are not made safe by a retry condition. PDP/OPA authorization POST can retry when enabled. +Caller-owned retries/redirects remain the caller's responsibility. + +A positive timeout covers failed attempts plus delays; each retry receives the remaining Axios +timeout. Caller adapters must honor it; arbitrary hooks are not interrupted by a wall-clock timer. +Per-call timeout `0` disables that timeout instead of falling through to the configured value. +SDK timeout applies to PDP/OPA; REST/Elements use the caller transport's timeout defaults. + +### W5 — Injected Axios ownership + +REST/Elements use `axiosInstance`; PDP has an internal transport; OPA uses `opaAxiosInstance`. +The SDK no longer registers handlers or rewrites caller defaults. Direct caller requests get no +SDK retries/logging. Current adapters, transforms, interceptors and default headers stay live on +every SDK attempt, including both Axios module entries. Explicit SDK Bearer credentials/routes +prevail over default Basic auth, `baseURL` or `allowAbsoluteUrls: false`. Intentional caller hooks +can still rewrite requests. Review applications relying on old shared-client pollution or doubled +retry policies. Explicit SDK routing precedence is retained from reviewed main. + +### W6 — Context and snapshots + +Per-check context now overrides call context, which overrides existing internal global context. +Review policies or fixtures that depended on per-check context being ignored. Legal own context +keys survive; request inputs are normalized without mutating the caller's resource. Filtering +uses a synchronous object-array snapshot. No new public global context registration API is added. + +## Type review + +### T1 — Removed symbols and generated models + +Replace root `EnvironmentCopyConflictStrategyEnum` with `EnvironmentCopyConflictStrategy`. +Root `Statistics` is removed without a generic substitute. Together with A2, exactly seven root +names were removed from the reviewed main baseline. The generated derivation-settings name becomes +`PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings` and is available from `permitio` +alongside the resource-role method contracts. Other generated-only internal imports need review. +Resource-role and `granted_to` dictionaries use current named models. Review the historical +[generated inventory][inventory] and compile against the final package, not its old counts. + +Required fields include `ResourceInstanceCreate.tenant`, `ResourceInstanceRead.tenant/tenant_id`, +`RoleAssignmentRemove.tenant` and generated-only `UserRoleRemove.tenant`. Supply actual tenants in +typed fixtures. Role inheritance remains optional `string[]`; it is not a new stricter behavior. +Server-generated array/envelope unions and generated removals do not imply backend route removal. + +### T2 — Unspecified bulk results + +`users.bulkUserCreate`, `bulkUserDelete`, `bulkUserReplace`, +`relationshipTuples.bulkRelationshipTuples` and `bulkUnRelationshipTuples` return `object`. +Their old request-payload result types were incorrect. Do not read synthetic counts, operation +arrays or processing reports; verify persisted outcomes through readbacks when needed. + +### T3 — Strict consumer types + +Constructor input is `IPermitOptions`; effective config is readonly `IPermitConfig`. Narrow unknown +error data and shape unions. `roleAssignments.list()` correctly reflects literal, dynamic, optional +and correlated detail/count flags; its existing wire behavior is retained. Prefer `listDetailed()` +when a guaranteed detailed envelope is appropriate. With `exactOptionalPropertyTypes`, omit absent +generated properties instead of explicitly setting `undefined`; constructor options are different. +Downstream projects are not forced to adopt the SDK's compiler flags. Import `CheckConfig`, +`ICheckQuery`, `IUserPermissions` and the named pagination/list result contracts from `permitio` +for explicit call and result annotations. `FormattedAxiosError` describes sanitized REST +diagnostics; its `error` body remains unknown until narrowed. + +## Additions, not compulsory replacements + +### N1 — Groups + +Eight GA Groups wrappers preserve full envelopes and typed key/ID behavior. Group-to-group routes +remain deferred. Adopt these operations only when needed; they are not replacements for every role. + +### N2 — Membership, detailed reads and refresh + +`tenants.addUser()` creates a new user; an existing user is a duplicate error, not a generic +membership association. Three `listDetailed()` methods preserve their full detailed envelopes. +These operations always use the control plane even with facts proxying or waitForSync enabled. +`pdps.refresh({ reason })` is an environment refresh acknowledgement, not reload completion or an +individual-PDP refresh API. Do not treat acknowledgements as synchronization guarantees. + +### N3 — Permission context, discovery and filtering + +Permission context uses the fifth `getUserPermissions()` config argument. `getAuthorizedUsers()` +returns a validated full envelope for container/cloud PDP contracts. `getUserTenants()` is container +role-derived tenant discovery, not general membership or a cloud endpoint. An unavailable 404 always +rejects with actionable status, including non-throwing mode. New discovery/filter `useOpa` always +rejects. Other operational failures follow their documented error policy: normalized empty +authorized-user envelope, or empty tenant/filter arrays in non-throwing mode. + +`filterObjects()` evaluates one dense readonly array through bulk decisions, preserving original +identity, order and duplicates. Only known resource fields are dispatched. Object request context +overrides call context; extra application fields remain in returned objects only. Empty inputs do +not bypass unsupported-option validation. URL checks and AuthZEN remain deferred. + +## What scanning cannot certify + +The read-only scanner identifies supported syntax and local Permit binding provenance. A COMPLETE +report means traversal/parsing completed for declared supported inputs, not that an application is +semantically migrated. Always review constructor environment values, authorization policy/results, +OPA hooks, error/log consumers, returned values, generated types, timeouts and external code. +REVIEW_REQUIRED marks unresolved/dynamic/escaped SDK sites. INCOMPLETE records parse/read failures, +unsupported wrappers, escaped/broken symlinks or zero supported sources. Exclusions are listed. +The scanner never executes target code, scripts, configuration modules or target dependencies. + +[inventory]: https://github.com/permitio/permit-node/blob/90b49a1878f0/openapi/MIGRATION.md + +## Complete migrated consumer + +Both entry styles are supported. Validate the effective token; this example performs only a read. +The environment key selects its scope automatically. Broader keys need an allowed environment +selection through `permit.config.apiContext` after scope initialization. + +```ts +import { Permit, PermitApiError } from 'permitio'; + +async function listUsers() { + const token = process.env['PERMIT_API_KEY']; + if (!token || /[\s\p{Cc}]/u.test(token)) { + throw new Error('Set PERMIT_API_KEY to a nonempty whitespace-free API key.'); + } + const permit = new Permit({ token }); + try { + const page = await permit.api.users.list({ page: 1, perPage: 20 }); + return page.data; + } catch (error: unknown) { + if (error instanceof PermitApiError) { + console.error('Permit users read failed', { status: error.status, code: error.code }); + } + throw error; + } +} + +void listUsers(); +``` + +For CommonJS, use `const { Permit, PermitApiError } = require('permitio')` and the same grouped +calls. Strict CJS/ESM fixtures and private loopback tests validate the packed entries. + +## Migrate with an agent + +The package contains [the customer migration skill](skills/permit-node-3-migration/SKILL.md). +Copy the whole `skills/permit-node-3-migration` directory from the package into your agent's skill +directory. Install its locked compiler prerequisite with pnpm and lifecycle scripts disabled, +as described in SKILL.md; then run its read-only scanner against the application directory. +Review the stable IDs above alongside the scanner's findings and coverage limitations. The scanner +does not perform edits, network calls or execute application code. A clean scan does not replace +policy, transport, generated-type and real consumer verification. diff --git a/docs/media/Node.png b/docs/media/Node.png new file mode 100644 index 00000000..f25dc216 Binary files /dev/null and b/docs/media/Node.png differ diff --git a/docs/media/README.md b/docs/media/README.md new file mode 100644 index 00000000..5962a22f --- /dev/null +++ b/docs/media/README.md @@ -0,0 +1,149 @@ +# Reviewed OpenAPI generation + +`permit-api.json` preserves the exact bytes of the public OpenAPI 3.1.0 document captured on +2026-09-30 from . `provenance.json` records its SHA-256, +164 paths, 263 operations and 333 schemas. Regeneration reads this committed snapshot; it does +not fetch a moving API definition. The generated API's `info.version` remains the backend's +`2.0.0`; that value is separate from the OpenAPI document version `3.1.0`. + +Use the locked Node/pnpm toolchain and Java 17: + +```sh +pnpm generate-openapi-client +pnpm check:openapi +pnpm check:codegen +pnpm verify +``` + +`generator.json` is the single configuration for production generation and the historical +fixture guard. `openapitools.json` pins generator 7.25.0. Both commands verify its recorded JAR +SHA-256 before invoking the generator. If the archive is missing, they download that exact version +from Maven Central and verify its bytes before caching or execution. The verified archive is cached at +`node_modules/.cache/openapi-generator/7.25.0.jar` and invoked directly with Java 17, using +`JAVA_HOME/bin/java` when `JAVA_HOME` is set or `java` from `PATH` otherwise. Both commands +validate the prepared schema; neither skips validation. +The normalizer applies strict compiler-compatible imports and annotations before Oxfmt. Generation +checks all model shapes and the TypeScript 7 SDK build before replacing the previous generated tree. +A failure leaves the previous tree intact. Only generated TypeScript files are installed, so stale +models and APIs are removed. Temporary files are cleaned up even when generation fails. + +`check:openapi` generates twice into independent directories, applies the same normalization and +formatting, and compares every TypeScript filename and byte, then compares the result with +`src/openapi`. CI runs this exact command alongside the historical fixture guard. Unit tests +exercise missing output, process errors, unexpected diagnostics, schema drift, degraded unions, +empty interfaces and tuple widening. Strict consumer tests protect role inheritance, required +tenant fields and representative request/response types. + +## Reviewed corrections + +`scripts/openapi-source.mjs` applies the following changes to an in-memory copy. Each correction +checks the original shape and fails if the upstream schema changes; unrelated duplicate tags, +unknown primitive types and unresolved references fail validation. + +| Source pointer | Correction and basis | +| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `/tags/4`, `/tags/19` | Remove the second identical `Bulk Operations` tag. OpenAPI requires unique tag names. | +| `/components/schemas/OPALUpdateCallback/properties/callbacks/items/anyOf/1/items` | Move the two tuple entries into `prefixItems`, retain `minItems` and `maxItems` of 2, and set `items: false`, using OpenAPI 3.1/JSON Schema tuple syntax. | +| `/components/schemas/ProxyConfig{Create,Read,Update}/properties/secret/anyOf` | Replace the nonstandard `HeadersAuth`, `BasicAuth` and `BearerAuth` primitive names with the documented header dictionary or string shapes. Preserve the basic-auth pattern and bearer-token minimum length. No null branch is inferred. | + +Preparation also restores the null branch of exactly `APIKeyScopeRead.project_id` and +`APIKeyScopeRead.environment_id`. The captured public OpenAPI omits their nullability; the +[pinned public Python model](https://github.com/permitio/permit-python/blob/ef80ae2393b4c74e400fdd40ca838d589ee43709/permit/api/models.py) +declares both as `Optional[UUID]` with a `None` default. The checked correction uses OpenAPI 3.1 +`type: ['string', 'null']`, preserving UUID format and optionality. It requires the complete +original read-scope shape, including required nonnullable `organization_id`, so upstream changes +fail before generation. `APIKeyCreate`, the captured snapshot and its provenance remain +unchanged. Generated-shape guards and strict consumers check both nullable fields and +all three fields' requiredness. + +The same pinned public Python model explicitly marks ten `APIKeyRead` fields nullable: +`project_id`, `environment_id`, `object_type`, `access_level`, `name`, `secret`, +`created_by_member`, `last_used_at`, `env` and `project`. Preparation adds only those null +branches, preserving captured metadata, reference targets and defaults. Organization ID, +owner type, record ID and creation time remain required and nonnullable. Exactly +`PaginatedResult_APIKeyRead_.page_count` also gains its published optional null branch; +`data` and `total_count` remain required and nonnullable. Complete original model shapes +and field requiredness are checked before correction, and generation checks every repaired +property. No creation input or nested model fields are widened. + +`elements-login.json` supplements only the existing `POST /v2/auth/elements_login_as` wrapper route +and its two request/response models. The contract was verified against backend OpenAPI on the +capture date; its hash is recorded separately. This route is absent from the public document but +is still used by `permit.elements.loginAs()`. Preparation fails if the route becomes published, +so the exception must then be reviewed and removed. Other routes omitted by the public snapshot +are accounted for in [migration notes](MIGRATION.md), without retaining obsolete generated files. + +The audit read graph has one additional checked correction: 71 explicit `Optional` output +fields across 16 schemas accept `null`, matching the pinned public +[Python models](https://github.com/permitio/permit-python/blob/ef80ae2393b4c74e400fdd40ca838d589ee43709/permit/api/models.py). +The exact fields and source link are in `scripts/fixtures/audit-read-nullability.json`. +Each original schema is hash checked before correction. Required fields, formats, defaults, +constraints, unconstrained data and other schemas retain their captured definitions. +These schemas are not reachable from any captured request body or parameter; preparation +rejects a new direct or transitive input use before widening an input contract. The captured +snapshot and its provenance remain unchanged. Strict consumers cover nullable nested output +and retain negative controls for required fields, engine payloads and request inputs. + +## Generator adaptations and unresolved source contracts + +The small `model.mustache` override adds dispatch to `modelAnyOf.mustache`, which emits TypeScript +unions. The rest of the template comes from generator 7.25.0. Without this change, array-or-page +responses lose their array branch and the proxy secret becomes an empty interface. A checked +post-generation repair restores `CallbacksInner` to `string | [string, OPALHttpFetcherConfig]`; +the generator otherwise widens the tuple to `Array`. Both defects have negative regressions. +A second checked repair preserves the SDK's explicit API/PDP base-path precedence over an injected +Axios instance's default `baseURL`. The new upstream helper would otherwise send requests to the +instance default. Actual-request tests cover scope discovery, REST facts and proxied facts routing. +The Axios request helper retains `ReturnType>`, removing the +upstream generic Promise assertion so declarations preserve Axios's actual response type. + +The checked `typeMappings` setting maps the generator's `set` representation to `Array`. +`MonthlyUsage.monthly_tenants` is a JSON array; Axios does not construct a JavaScript `Set`. +The prepared source keeps the captured UUID item schema, `uniqueItems: true` and empty default. +The compiler shape guard rejects a regenerated `Set` declaration. This generated model +is shipped as a declaration; it is not a supported root export or high-level organizations API. + +Preparation also corrects exactly eight checked descriptions: data-generator derived-role settings, +invite approval, GroupAssignment/GroupCreate/GroupReadSchema, detailed relationship-tuple and +resource-instance pages, and TenantBlockRead. It checks each original string before replacing it, +fails on upstream drift and leaves other model descriptions unchanged. +The pinned generator flattens description newlines. A checked output repair restores the five +long corrected property comments before formatting and type checks. It requires one exact +generated occurrence for each property and leaves other comments and schema metadata unchanged. + +The only accepted generator diagnostics are its OpenAPI 3.1 beta notice, the known tuple-name +warning, and its safe `Object` to `ModelObject` rename. Each has a specific comment in the runner; +all other warnings and every error fail generation. Completion metadata, syntax checks, model +shape checks and strict compilation still apply to the whole output. + +Nine bulk-result schemas are empty source objects: create/delete relationship tuples, resource +instances and tenants, plus create/delete/replace users. They remain unspecified objects in the +generated API. The affected high-level user and tuple bulk methods return `Promise`; +they no longer claim that the request payload is the response. No success counts or result fields +are invented. Backend result-schema completion remains outstanding. + +The source explicitly permits unconstrained audit data, nested dictionaries and the untyped array +branch of `DataSourceEntryWithPollingInterval.data`. The guard allows only those reviewed fields +and that exact union. It rejects whole-model `any` degradation and empty interfaces. + +The generated surface includes the published Groups, tenant-membership and PDP refresh routes. +Groups includes four routes tagged EAP and two deprecated routes; their source annotations are +preserved. This rebaseline does not add high-level wrappers for those features. + +## Refreshing the snapshot + +Save a new public response to a temporary file and review its paths, schema changes and wire +contracts before replacing `permit-api.json`. Update the capture date, hash and inventory in +`provenance.json`, then review whether each exact correction and the Elements supplement is still +needed. Run regeneration, the two-generation comparison, the historical fixture guard and +`pnpm verify`. Review generated additions/removals and update the migration inventory. Do not +update expectations merely to accept a degraded type. + +The environment copy task has a separate checked read correction. Exactly +`TaskResult_EnvironmentRead_.result` and `.error` gain a null branch, preserving their original +metadata, optionality, referenced models and required `task_id`/`status`. The official +[background-task examples at permitio/docs 6ec47cd3f04da6fa1bc9d48226ccbe781b304f77](https://github.com/permitio/docs/blob/6ec47cd3f04da6fa1bc9d48226ccbe781b304f77/docs/api/background-tasks.mdx) +show null result/error for processing and null result for failure. The captured snapshot and its +provenance stay unchanged. The correction refuses source-shape drift or new direct/transitive +request uses, including supplemental operations. Other task-result schemas are unchanged. +Generated shape controls reject lost null branches, changed requiredness and collapsed types. diff --git a/docs/modules.html b/docs/modules.html index c13129fe..d26b7e7c 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,301 +1,51 @@ -permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Enumerations

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Classes

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Interfaces

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            APIKeyRead -ActionBlockEditable -ActionBlockRead -AttributeBlockEditable -AttributeBlockRead -BulkRoleAssignmentReport -BulkRoleUnAssignmentReport -ConditionSetCreate -ConditionSetRead -ConditionSetRuleCreate -ConditionSetRuleRead -ConditionSetRuleRemove -ConditionSetUpdate -Context -ContextTransform -EmbeddedLoginRequestOutputWithContent -EnvironmentCopy -EnvironmentCopyScope -EnvironmentCopyScopeFilters -EnvironmentCopyTarget -EnvironmentCreate -EnvironmentRead -EnvironmentStats -EnvironmentUpdate -IConditionSetRulesApi -IConditionSetsApi -ICreateOrUpdateUserResult -IDeprecatedPermitApi -IDeprecatedReadApis -IDeprecatedWriteApis -IEnvironmentsApi -IGetUserRoles -IListActionGroups -IListActions -IListAttributes -IListConditionSetRules -IListEnvironments -IListResourceUsers -IListRoleAssignments -IListTenantUsers -IListTenantsParams -IPagination -IPermitApi -IPermitClient -IPermitConfig -IPermitElementsApi -IProjectsApi -IResource -IResourceActionGroupsApi -IResourceActionsApi -IResourceAttributesApi -IResourcesApi -IRoleAssignmentsApi -IRolesApi -ITenantsApi -IUser -IUsersApi -IUsersListParams -OrgMemberRead -PaginatedResultUserRead -ParentId -ProjectCreate -ProjectRead -ProjectUpdate -ResourceActionCreate -ResourceActionGroupCreate -ResourceActionGroupRead -ResourceActionRead -ResourceActionUpdate -ResourceAttributeCreate -ResourceAttributeRead -ResourceAttributeUpdate -ResourceCreate -ResourceId -ResourceRead -ResourceReplace -ResourceUpdate -RoleAssignmentCreate -RoleAssignmentRead -RoleAssignmentRemove -RoleCreate -RoleRead -RoleUpdate -Statistics -TenantCreate -TenantRead -TenantUpdate -UserCreate -UserInTenant -UserRead -UserRole -UserUpdate -loginAsSchema -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Aliases

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Variables

                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ApiContextLevel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ApiKeyLevel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ElementsApiErrors
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ApiClient
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ApiContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ApiKeysApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetRulesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ElementsClient
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GroupsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PdpsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Permit
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitApiError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitConnectionError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitContextChangeError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitContextError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitPDPStatusError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProjectsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProxyConfigsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTuplesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceAttributesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceInstancesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceRelationsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceRolesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourcesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleAssignmentsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RolesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TenantsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserAttributesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserInvitesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UsersApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ActionBlockEditable
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ActionBlockRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              APIKeyCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              APIKeyRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              APIKeyScopeRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AttributeBlockEditable
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AttributeBlockRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogModel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogObjectsModel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AVPEngineDecisionLog
                                                                                                                                                                                                                                                                                                                                                                                                                                                              BulkRoleAssignmentReport
                                                                                                                                                                                                                                                                                                                                                                                                                                                              BulkRoleUnAssignmentReport
                                                                                                                                                                                                                                                                                                                                                                                                                                                              CheckConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                              CheckUrlConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetRuleCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetRuleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetRuleRemove
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Context
                                                                                                                                                                                                                                                                                                                                                                                                                                                              DerivedRoleRuleCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              DerivedRoleRuleDelete
                                                                                                                                                                                                                                                                                                                                                                                                                                                              DerivedRoleRuleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              DetailedAuditLogModel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              DummyEngineModel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ElementsUserInviteApprove
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ElementsUserInviteCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ElementsUserInviteRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ElementsUserInviteUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EmbeddedLoginRequestOutputWithContent
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCopy
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCopyScope
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCopyScopeFilters
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCopyTarget
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentStats
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ErrorDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                              FormattedAxiosError
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GenericEngineDecisionLog
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GetUserPermissionsConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GroupAddRole
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GroupAssignUser
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GroupCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GroupRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              GroupReadSchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IApiKeysApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IAuditLogsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IAuthorizedUserAssignment
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IAuthorizedUsersResult
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IBaseGetUserRoles
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IBaseListRoleAssignments
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ICheckQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IConditionSetRulesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IConditionSetsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ICreateOrUpdateUserResult
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IEnvironmentsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IFilterObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IGroupsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListActionGroups
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListActions
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListApiKeys
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListAttributes
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListAuditLogs
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListConditionSetRules
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListConditionSets
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListEnvironments
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListGroups
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListRelations
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListRelationshipTuples
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListResourceInstanceDetailedParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListResourceInstanceParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListResourceInstanceUsers
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListResourceRoles
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListTenantsParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListTenantUsers
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListUserInvites
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ILocalRoleAssignment
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ILocalRoleAssignmentsQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPagination
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPdpsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPermitApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPermitClient
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPermitConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPermitElementsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPermitOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IProjectsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IProxyConfigsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IRelationshipTuplesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResource
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourceActionGroupsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourceActionsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourceAttributesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourceInstancesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourceRelationsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourceRolesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IResourcesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IRetryConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IRoleAssignmentsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IRolesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ITenantsApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IUser
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IUserAttributesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IUserInvitesApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IUserPermissions
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IUsersApi
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IUsersListParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                              LimitedPaginatedResultAuditLogModel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              loginAsSchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRule
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRuleUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              OPAEngineDecisionLog
                                                                                                                                                                                                                                                                                                                                                                                                                                                              OrgMemberRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultAPIKeyRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultElementsUserInviteRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultGroupReadSchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultRelationshipTupleDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultResourceInstanceDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultResourceRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultRoleAssignmentDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultRoleAssignmentRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultRoleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultTenantRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PaginatedResultUserRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PDPDataRefreshResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProjectCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProjectRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProjectUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProxyConfigCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProxyConfigRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ProxyConfigUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTupleCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTupleCreateBulkOperation
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTupleDelete
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTupleDeleteBulkOperation
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTupleDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RelationshipTupleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionGroupUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceActionUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceAttributeCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceAttributeRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceAttributeUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceInstanceCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceInstanceDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceInstanceRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceInstanceUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceReplace
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceRoleCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceRoleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceRoleUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleAssignmentCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleAssignmentDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleAssignmentRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleAssignmentRemove
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleCreateBulk
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleCreateBulkOperationResult
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RoleUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TaskResultEnvironmentRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TenantCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TenantDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TenantRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TenantUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserCreate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserInTenant
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserInviteApprovalRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserRole
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              APIKeyOwnerType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AttributeType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogQueryType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogSortKey
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuthMechanism
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCopyConflictStrategy
                                                                                                                                                                                                                                                                                                                                                                                                                                                              FactsSyncTimeoutPolicy
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IAction
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IEnvironmentPdpDataRefreshRequest
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IGetUserRoles
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListRoleAssignments
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IListRoleAssignmentsDetailed
                                                                                                                                                                                                                                                                                                                                                                                                                                                              IPaginationExtended
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRuleUpdateUrlTypeEnum
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRuleUrlTypeEnum
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MemberAccessLevel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MemberAccessObj
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ParentId
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawData
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawData1
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ResourceId
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RetryConditionFn
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReturnIGetUserRolesType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReturnListRoleAssignments
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReturnPaginationType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Secret
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TaskStatus
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserInviteStatus
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              APIKeyOwnerType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AttributeType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogQueryType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuditLogSortKey
                                                                                                                                                                                                                                                                                                                                                                                                                                                              AuthMechanism
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ConditionSetType
                                                                                                                                                                                                                                                                                                                                                                                                                                                              EnvironmentCopyConflictStrategy
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRuleUpdateUrlTypeEnum
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRuleUrlTypeEnum
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MemberAccessLevel
                                                                                                                                                                                                                                                                                                                                                                                                                                                              MemberAccessObj
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RETRYABLE_STATUS_CODES
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TaskStatus
                                                                                                                                                                                                                                                                                                                                                                                                                                                              UserInviteStatus
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              On This Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Enumerations +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Classes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Interfaces +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ActionBlockEditableActionBlockReadAPIKeyCreateAPIKeyReadAPIKeyScopeReadAttributeBlockEditableAttributeBlockReadAuditLogModelAuditLogObjectsModelAVPEngineDecisionLogBulkRoleAssignmentReportBulkRoleUnAssignmentReportCheckConfigCheckUrlConfigConditionSetCreateConditionSetReadConditionSetRuleCreateConditionSetRuleReadConditionSetRuleRemoveConditionSetUpdateContextDerivedRoleRuleCreateDerivedRoleRuleDeleteDerivedRoleRuleReadDetailedAuditLogModelDummyEngineModelElementsUserInviteApproveElementsUserInviteCreateElementsUserInviteReadElementsUserInviteUpdateEmbeddedLoginRequestOutputWithContentEnvironmentCopyEnvironmentCopyScopeEnvironmentCopyScopeFiltersEnvironmentCopyTargetEnvironmentCreateEnvironmentReadEnvironmentStatsEnvironmentUpdateErrorDetailsFormattedAxiosErrorGenericEngineDecisionLogGetUserPermissionsConfigGroupAddRoleGroupAssignUserGroupCreateGroupReadGroupReadSchemaIApiKeysApiIAuditLogsApiIAuthorizedUserAssignmentIAuthorizedUsersResultIBaseGetUserRolesIBaseListRoleAssignmentsICheckQueryIConditionSetRulesApiIConditionSetsApiICreateOrUpdateUserResultIEnvironmentsApiIFilterObjectIGroupsApiIListActionGroupsIListActionsIListApiKeysIListAttributesIListAuditLogsIListConditionSetRulesIListConditionSetsIListEnvironmentsIListGroupsIListRelationsIListRelationshipTuplesIListResourceInstanceDetailedParamsIListResourceInstanceParamsIListResourceInstanceUsersIListResourceRolesIListTenantsParamsIListTenantUsersIListUserInvitesILocalRoleAssignmentILocalRoleAssignmentsQueryIPaginationIPdpsApiIPermitApiIPermitClientIPermitConfigIPermitElementsApiIPermitOptionsIProjectsApiIProxyConfigsApiIRelationshipTuplesApiIResourceIResourceActionGroupsApiIResourceActionsApiIResourceAttributesApiIResourceInstancesApiIResourceRelationsApiIResourceRolesApiIResourcesApiIRetryConfigIRoleAssignmentsApiIRolesApiITenantsApiIUserIUserAttributesApiIUserInvitesApiIUserPermissionsIUsersApiIUsersListParamsLimitedPaginatedResultAuditLogModelloginAsSchemaMappingRuleMappingRuleUpdateOPAEngineDecisionLogOrgMemberReadPaginatedResultAPIKeyReadPaginatedResultElementsUserInviteReadPaginatedResultGroupReadSchemaPaginatedResultRelationshipTupleDetailedReadPaginatedResultResourceInstanceDetailedReadPaginatedResultResourceReadPaginatedResultRoleAssignmentDetailedReadPaginatedResultRoleAssignmentReadPaginatedResultRoleReadPaginatedResultTenantReadPaginatedResultUserReadPDPDataRefreshResponsePermitBackendSchemasSchemaDerivedRoleRuleDerivationSettingsProjectCreateProjectReadProjectUpdateProxyConfigCreateProxyConfigReadProxyConfigUpdateRelationCreateRelationReadRelationshipTupleCreateRelationshipTupleCreateBulkOperationRelationshipTupleDeleteRelationshipTupleDeleteBulkOperationRelationshipTupleDetailedReadRelationshipTupleReadResourceActionCreateResourceActionGroupCreateResourceActionGroupReadResourceActionGroupUpdateResourceActionReadResourceActionUpdateResourceAttributeCreateResourceAttributeReadResourceAttributeUpdateResourceCreateResourceInstanceCreateResourceInstanceDetailedReadResourceInstanceReadResourceInstanceUpdateResourceReadResourceReplaceResourceRoleCreateResourceRoleReadResourceRoleUpdateResourceUpdateRoleAssignmentCreateRoleAssignmentDetailedReadRoleAssignmentReadRoleAssignmentRemoveRoleCreateRoleCreateBulkRoleCreateBulkOperationResultRoleReadRoleUpdateTaskResultEnvironmentReadTenantCreateTenantDetailsTenantReadTenantUpdateUserCreateUserInTenantUserInviteApprovalReadUserReadUserRoleUserUpdate
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Aliases +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Variables +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/types/APIKeyOwnerType.html b/docs/types/APIKeyOwnerType.html new file mode 100644 index 00000000..8a81e90e --- /dev/null +++ b/docs/types/APIKeyOwnerType.html @@ -0,0 +1,35 @@ +APIKeyOwnerType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Alias APIKeyOwnerType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                APIKeyOwnerType: typeof APIKeyOwnerType[keyof typeof APIKeyOwnerType]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/types/AttributeType.html b/docs/types/AttributeType.html new file mode 100644 index 00000000..4fc7e4ce --- /dev/null +++ b/docs/types/AttributeType.html @@ -0,0 +1,35 @@ +AttributeType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Alias AttributeType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  AttributeType: typeof AttributeType[keyof typeof AttributeType]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  supported attribute primitives

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/types/AuditLogQueryType.html b/docs/types/AuditLogQueryType.html new file mode 100644 index 00000000..87aa9115 --- /dev/null +++ b/docs/types/AuditLogQueryType.html @@ -0,0 +1,35 @@ +AuditLogQueryType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Alias AuditLogQueryType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    AuditLogQueryType: typeof AuditLogQueryType[keyof typeof AuditLogQueryType]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Filter audit logs by the type of query that generated them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/types/AuditLogSortKey.html b/docs/types/AuditLogSortKey.html new file mode 100644 index 00000000..c3f94b19 --- /dev/null +++ b/docs/types/AuditLogSortKey.html @@ -0,0 +1,35 @@ +AuditLogSortKey | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Type Alias AuditLogSortKey

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      AuditLogSortKey: typeof AuditLogSortKey[keyof typeof AuditLogSortKey]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/types/AuthMechanism.html b/docs/types/AuthMechanism.html new file mode 100644 index 00000000..d8a3b747 --- /dev/null +++ b/docs/types/AuthMechanism.html @@ -0,0 +1,35 @@ +AuthMechanism | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Alias AuthMechanism

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        AuthMechanism: typeof AuthMechanism[keyof typeof AuthMechanism]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/types/ConditionSetType.html b/docs/types/ConditionSetType.html new file mode 100644 index 00000000..bf78f65a --- /dev/null +++ b/docs/types/ConditionSetType.html @@ -0,0 +1,35 @@ +ConditionSetType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Type Alias ConditionSetType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ConditionSetType: typeof ConditionSetType[keyof typeof ConditionSetType]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/types/EnvironmentCopyConflictStrategy.html b/docs/types/EnvironmentCopyConflictStrategy.html new file mode 100644 index 00000000..97a4c712 --- /dev/null +++ b/docs/types/EnvironmentCopyConflictStrategy.html @@ -0,0 +1,35 @@ +EnvironmentCopyConflictStrategy | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Alias EnvironmentCopyConflictStrategy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            EnvironmentCopyConflictStrategy: typeof EnvironmentCopyConflictStrategy[keyof typeof EnvironmentCopyConflictStrategy]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/types/EnvironmentCopyConflictStrategyEnum.html b/docs/types/EnvironmentCopyConflictStrategyEnum.html deleted file mode 100644 index 48379e57..00000000 --- a/docs/types/EnvironmentCopyConflictStrategyEnum.html +++ /dev/null @@ -1,165 +0,0 @@ -EnvironmentCopyConflictStrategyEnum | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type alias EnvironmentCopyConflictStrategyEnum

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            EnvironmentCopyConflictStrategyEnum: typeof EnvironmentCopyConflictStrategyEnum[keyof typeof EnvironmentCopyConflictStrategyEnum]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \ No newline at end of file diff --git a/docs/types/FactsSyncTimeoutPolicy.html b/docs/types/FactsSyncTimeoutPolicy.html new file mode 100644 index 00000000..cddf97ad --- /dev/null +++ b/docs/types/FactsSyncTimeoutPolicy.html @@ -0,0 +1,32 @@ +FactsSyncTimeoutPolicy | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Alias FactsSyncTimeoutPolicy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FactsSyncTimeoutPolicy: "ignore" | "fail"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/types/IAction.html b/docs/types/IAction.html index 40616f52..bf50c5a0 100644 --- a/docs/types/IAction.html +++ b/docs/types/IAction.html @@ -1,168 +1,35 @@ -IAction | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +IAction | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type alias IAction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Alias IAction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                IAction: string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Respresents an action the user is attempting to do on a protected resource. Passed as part of the input to the permit.check() function.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Defined in src/enforcement/interfaces.ts:69
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                \ No newline at end of file + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/types/IEnvironmentPdpDataRefreshRequest.html b/docs/types/IEnvironmentPdpDataRefreshRequest.html new file mode 100644 index 00000000..9919c716 --- /dev/null +++ b/docs/types/IEnvironmentPdpDataRefreshRequest.html @@ -0,0 +1,34 @@ +IEnvironmentPdpDataRefreshRequest | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Alias IEnvironmentPdpDataRefreshRequest

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  IEnvironmentPdpDataRefreshRequest: Pick<PDPDataRefreshRequest, "reason">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Environment-wide refresh accepts a reason; shard targeting is a per-PDP operation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/types/IGetUserRoles.html b/docs/types/IGetUserRoles.html new file mode 100644 index 00000000..c00b70f1 --- /dev/null +++ b/docs/types/IGetUserRoles.html @@ -0,0 +1,32 @@ +IGetUserRoles | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Alias IGetUserRoles

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    IGetUserRoles:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | IBaseGetUserRoles
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | IGetUserRolesWithTotalCount
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | IGetUserRolesWithDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/types/IListRoleAssignments.html b/docs/types/IListRoleAssignments.html new file mode 100644 index 00000000..fa67a5ef --- /dev/null +++ b/docs/types/IListRoleAssignments.html @@ -0,0 +1,32 @@ +IListRoleAssignments | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Type Alias IListRoleAssignments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      IListRoleAssignments: IBaseListRoleAssignments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/types/IListRoleAssignmentsDetailed.html b/docs/types/IListRoleAssignmentsDetailed.html new file mode 100644 index 00000000..651ba7de --- /dev/null +++ b/docs/types/IListRoleAssignmentsDetailed.html @@ -0,0 +1,41 @@ +IListRoleAssignmentsDetailed | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Alias IListRoleAssignmentsDetailed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        IListRoleAssignmentsDetailed: Omit<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            IBaseListRoleAssignments,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            "detailed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | "includeTotalCount",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > & { resource?: string }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Filters for the dedicated detailed endpoint, which always includes total counts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Optionalresource?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Resource type key or ID to filter by.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/types/IPaginationExtended.html b/docs/types/IPaginationExtended.html new file mode 100644 index 00000000..86308533 --- /dev/null +++ b/docs/types/IPaginationExtended.html @@ -0,0 +1,32 @@ +IPaginationExtended | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Type Alias IPaginationExtended

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          IPaginationExtended: IBasePaginationExtended | IPaginationForceIncludeTotal
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/types/MappingRuleUpdateUrlTypeEnum.html b/docs/types/MappingRuleUpdateUrlTypeEnum.html new file mode 100644 index 00000000..e4667277 --- /dev/null +++ b/docs/types/MappingRuleUpdateUrlTypeEnum.html @@ -0,0 +1,33 @@ +MappingRuleUpdateUrlTypeEnum | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Alias MappingRuleUpdateUrlTypeEnum

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MappingRuleUpdateUrlTypeEnum: typeof MappingRuleUpdateUrlTypeEnum[keyof typeof MappingRuleUpdateUrlTypeEnum]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/types/MappingRuleUrlTypeEnum.html b/docs/types/MappingRuleUrlTypeEnum.html new file mode 100644 index 00000000..356c14aa --- /dev/null +++ b/docs/types/MappingRuleUrlTypeEnum.html @@ -0,0 +1,33 @@ +MappingRuleUrlTypeEnum | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Alias MappingRuleUrlTypeEnum

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              MappingRuleUrlTypeEnum: typeof MappingRuleUrlTypeEnum[keyof typeof MappingRuleUrlTypeEnum]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/types/MemberAccessLevel.html b/docs/types/MemberAccessLevel.html new file mode 100644 index 00000000..9976f7d9 --- /dev/null +++ b/docs/types/MemberAccessLevel.html @@ -0,0 +1,35 @@ +MemberAccessLevel | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Alias MemberAccessLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                MemberAccessLevel: typeof MemberAccessLevel[keyof typeof MemberAccessLevel]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/types/MemberAccessObj.html b/docs/types/MemberAccessObj.html new file mode 100644 index 00000000..b885779d --- /dev/null +++ b/docs/types/MemberAccessObj.html @@ -0,0 +1,35 @@ +MemberAccessObj | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Alias MemberAccessObj

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  MemberAccessObj: typeof MemberAccessObj[keyof typeof MemberAccessObj]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/types/Methods.html b/docs/types/Methods.html new file mode 100644 index 00000000..3b7ea325 --- /dev/null +++ b/docs/types/Methods.html @@ -0,0 +1,35 @@ +Methods | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Alias Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods: typeof Methods[keyof typeof Methods]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/types/ParentId.html b/docs/types/ParentId.html new file mode 100644 index 00000000..8a1c7fb6 --- /dev/null +++ b/docs/types/ParentId.html @@ -0,0 +1,39 @@ +ParentId | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Type Alias ParentId

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ParentId: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/types/RawData.html b/docs/types/RawData.html new file mode 100644 index 00000000..b8702a6d --- /dev/null +++ b/docs/types/RawData.html @@ -0,0 +1,32 @@ +RawData | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Alias RawData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/types/RawData1.html b/docs/types/RawData1.html new file mode 100644 index 00000000..1e9ccd48 --- /dev/null +++ b/docs/types/RawData1.html @@ -0,0 +1,32 @@ +RawData1 | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Type Alias RawData1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/types/ResourceId.html b/docs/types/ResourceId.html new file mode 100644 index 00000000..835ab071 --- /dev/null +++ b/docs/types/ResourceId.html @@ -0,0 +1,39 @@ +ResourceId | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Alias ResourceId

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ResourceId: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/types/RetryConditionFn.html b/docs/types/RetryConditionFn.html new file mode 100644 index 00000000..b1a2cf10 --- /dev/null +++ b/docs/types/RetryConditionFn.html @@ -0,0 +1,46 @@ +RetryConditionFn | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Alias RetryConditionFn

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              RetryConditionFn: (error: AxiosError) => boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Function type for custom retry condition evaluation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • (error: AxiosError): boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • error: AxiosError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/types/ReturnIGetUserRolesType.html b/docs/types/ReturnIGetUserRolesType.html new file mode 100644 index 00000000..727fa427 --- /dev/null +++ b/docs/types/ReturnIGetUserRolesType.html @@ -0,0 +1,36 @@ +ReturnIGetUserRolesType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Alias ReturnIGetUserRolesType<T>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReturnIGetUserRolesType: T extends IGetUserRolesWithTotalCount
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ? T extends IGetUserRolesWithDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ? PaginatedResultRoleAssignmentDetailedRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        : PaginatedResultRoleAssignmentRead
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    : T extends IGetUserRolesWithDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ? RoleAssignmentDetailedRead[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        : RoleAssignmentRead[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/types/ReturnListRoleAssignments.html b/docs/types/ReturnListRoleAssignments.html new file mode 100644 index 00000000..c5d4260c --- /dev/null +++ b/docs/types/ReturnListRoleAssignments.html @@ -0,0 +1,36 @@ +ReturnListRoleAssignments | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Alias ReturnListRoleAssignments<T>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReturnListRoleAssignments: T extends unknown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ? RoleAssignmentListResult<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          "detailed" extends keyof T ? T["detailed"] : false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          "includeTotalCount" extends keyof T ? T["includeTotalCount"] : false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      : never
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/types/ReturnPaginationType.html b/docs/types/ReturnPaginationType.html new file mode 100644 index 00000000..0c896593 --- /dev/null +++ b/docs/types/ReturnPaginationType.html @@ -0,0 +1,38 @@ +ReturnPaginationType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Alias ReturnPaginationType<T, Y, Z>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReturnPaginationType: T extends IPaginationForceIncludeTotal ? Y : Z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Parameters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/types/Secret.html b/docs/types/Secret.html new file mode 100644 index 00000000..145bc392 --- /dev/null +++ b/docs/types/Secret.html @@ -0,0 +1,39 @@ +Secret | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Type Alias Secret

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Secret: string | { [key: string]: string }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Permit.io API +Authorization as a service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The version of the OpenAPI document: 2.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +https://openapi-generator.tech +Do not edit the class manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/types/TaskStatus.html b/docs/types/TaskStatus.html new file mode 100644 index 00000000..5d33a063 --- /dev/null +++ b/docs/types/TaskStatus.html @@ -0,0 +1,35 @@ +TaskStatus | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Alias TaskStatus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        TaskStatus: typeof TaskStatus[keyof typeof TaskStatus]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/types/UserInviteStatus.html b/docs/types/UserInviteStatus.html new file mode 100644 index 00000000..022665da --- /dev/null +++ b/docs/types/UserInviteStatus.html @@ -0,0 +1,35 @@ +UserInviteStatus | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Type Alias UserInviteStatus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          UserInviteStatus: typeof UserInviteStatus[keyof typeof UserInviteStatus]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/variables/APIKeyOwnerType.html b/docs/variables/APIKeyOwnerType.html new file mode 100644 index 00000000..0aaaf6a4 --- /dev/null +++ b/docs/variables/APIKeyOwnerType.html @@ -0,0 +1,46 @@ +APIKeyOwnerType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Variable APIKeyOwnerTypeConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            APIKeyOwnerType: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Elements: "elements";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Member: "member";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NatsPdpConfig: "nats_pdp_config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                PdpConfig: "pdp_config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReadonlyElements: "elements"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReadonlyMember: "member"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReadonlyNatsPdpConfig: "nats_pdp_config"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReadonlyPdpConfig: "pdp_config"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/variables/AttributeType.html b/docs/variables/AttributeType.html new file mode 100644 index 00000000..9a94f5ea --- /dev/null +++ b/docs/variables/AttributeType.html @@ -0,0 +1,54 @@ +AttributeType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Variable AttributeTypeConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              AttributeType: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Array: "array";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Bool: "bool";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Json: "json";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Number: "number";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Object: "object";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ObjectArray: "object_array";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  String: "string";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Time: "time";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              supported attribute primitives

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyArray: "array"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyBool: "bool"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyJson: "json"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyNumber: "number"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyObject: "object"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyObjectArray: "object_array"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyString: "string"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyTime: "time"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/variables/AuditLogQueryType.html b/docs/variables/AuditLogQueryType.html new file mode 100644 index 00000000..466852bb --- /dev/null +++ b/docs/variables/AuditLogQueryType.html @@ -0,0 +1,46 @@ +AuditLogQueryType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Variable AuditLogQueryTypeConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                AuditLogQueryType: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Check: "check";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    GetAuthorizedUsers: "get_authorized_users";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    GetUserPermissions: "get_user_permissions";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    None: "none";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Filter audit logs by the type of query that generated them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyCheck: "check"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyGetAuthorizedUsers: "get_authorized_users"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyGetUserPermissions: "get_user_permissions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyNone: "none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/variables/AuditLogSortKey.html b/docs/variables/AuditLogSortKey.html new file mode 100644 index 00000000..9c9a7675 --- /dev/null +++ b/docs/variables/AuditLogSortKey.html @@ -0,0 +1,42 @@ +AuditLogSortKey | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Variable AuditLogSortKeyConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  AuditLogSortKey: { None: "None"; Timestamp: "timestamp" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyNone: "None"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyTimestamp: "timestamp"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/variables/AuthMechanism.html b/docs/variables/AuthMechanism.html new file mode 100644 index 00000000..e1176ba6 --- /dev/null +++ b/docs/variables/AuthMechanism.html @@ -0,0 +1,44 @@ +AuthMechanism | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Variable AuthMechanismConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    AuthMechanism: { Basic: "Basic"; Bearer: "Bearer"; Headers: "Headers" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ReadonlyBasic: "Basic"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ReadonlyBearer: "Bearer"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ReadonlyHeaders: "Headers"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/variables/ConditionSetType.html b/docs/variables/ConditionSetType.html new file mode 100644 index 00000000..ef5fe63f --- /dev/null +++ b/docs/variables/ConditionSetType.html @@ -0,0 +1,42 @@ +ConditionSetType | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Variable ConditionSetTypeConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ConditionSetType: { Resourceset: "resourceset"; Userset: "userset" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ReadonlyResourceset: "resourceset"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ReadonlyUserset: "userset"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/variables/EnvironmentCopyConflictStrategy.html b/docs/variables/EnvironmentCopyConflictStrategy.html new file mode 100644 index 00000000..02e6fd4d --- /dev/null +++ b/docs/variables/EnvironmentCopyConflictStrategy.html @@ -0,0 +1,42 @@ +EnvironmentCopyConflictStrategy | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Variable EnvironmentCopyConflictStrategyConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        EnvironmentCopyConflictStrategy: { Fail: "fail"; Overwrite: "overwrite" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ReadonlyFail: "fail"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ReadonlyOverwrite: "overwrite"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/variables/EnvironmentCopyConflictStrategyEnum-1.html b/docs/variables/EnvironmentCopyConflictStrategyEnum-1.html deleted file mode 100644 index 496c7033..00000000 --- a/docs/variables/EnvironmentCopyConflictStrategyEnum-1.html +++ /dev/null @@ -1,172 +0,0 @@ -EnvironmentCopyConflictStrategyEnum | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Variable EnvironmentCopyConflictStrategyEnumConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        EnvironmentCopyConflictStrategyEnum: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Fail: "fail";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Overwrite: "overwrite";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Readonly Fail: "fail"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Readonly Overwrite: "overwrite"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file diff --git a/docs/variables/MappingRuleUpdateUrlTypeEnum.html b/docs/variables/MappingRuleUpdateUrlTypeEnum.html new file mode 100644 index 00000000..380fce52 --- /dev/null +++ b/docs/variables/MappingRuleUpdateUrlTypeEnum.html @@ -0,0 +1,38 @@ +MappingRuleUpdateUrlTypeEnum | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Variable MappingRuleUpdateUrlTypeEnumConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          MappingRuleUpdateUrlTypeEnum: { Regex: "regex" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ReadonlyRegex: "regex"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/variables/MappingRuleUrlTypeEnum.html b/docs/variables/MappingRuleUrlTypeEnum.html new file mode 100644 index 00000000..75d6f611 --- /dev/null +++ b/docs/variables/MappingRuleUrlTypeEnum.html @@ -0,0 +1,38 @@ +MappingRuleUrlTypeEnum | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Variable MappingRuleUrlTypeEnumConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MappingRuleUrlTypeEnum: { Regex: "regex" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReadonlyRegex: "regex"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/variables/MemberAccessLevel.html b/docs/variables/MemberAccessLevel.html new file mode 100644 index 00000000..b4dcffde --- /dev/null +++ b/docs/variables/MemberAccessLevel.html @@ -0,0 +1,46 @@ +MemberAccessLevel | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Variable MemberAccessLevelConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              MemberAccessLevel: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Admin: "admin";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NoAccess: "no_access";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read: "read";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Write: "write";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyAdmin: "admin"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyNoAccess: "no_access"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyRead: "read"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ReadonlyWrite: "write"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/variables/MemberAccessObj.html b/docs/variables/MemberAccessObj.html new file mode 100644 index 00000000..126a00ef --- /dev/null +++ b/docs/variables/MemberAccessObj.html @@ -0,0 +1,44 @@ +MemberAccessObj | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Variable MemberAccessObjConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                MemberAccessObj: { Env: "env"; Org: "org"; Project: "project" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyEnv: "env"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyOrg: "org"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ReadonlyProject: "project"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/variables/Methods.html b/docs/variables/Methods.html new file mode 100644 index 00000000..39c8debe --- /dev/null +++ b/docs/variables/Methods.html @@ -0,0 +1,52 @@ +Methods | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Variable MethodsConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Delete: "delete";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get: "get";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Head: "head";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Options: "options";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Patch: "patch";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Post: "post";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Put: "put";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyDelete: "delete"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyGet: "get"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyOptions: "options"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyPatch: "patch"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyPost: "post"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReadonlyPut: "put"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/variables/RETRYABLE_STATUS_CODES.html b/docs/variables/RETRYABLE_STATUS_CODES.html new file mode 100644 index 00000000..cd7e975c --- /dev/null +++ b/docs/variables/RETRYABLE_STATUS_CODES.html @@ -0,0 +1,35 @@ +RETRYABLE_STATUS_CODES | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Variable RETRYABLE_STATUS_CODESConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RETRYABLE_STATUS_CODES: readonly number[] = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HTTP status codes that should trigger a retry. +Frozen so consumers cannot mutate the SDK-wide retry behavior.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/variables/TaskStatus.html b/docs/variables/TaskStatus.html new file mode 100644 index 00000000..037b3670 --- /dev/null +++ b/docs/variables/TaskStatus.html @@ -0,0 +1,46 @@ +TaskStatus | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Variable TaskStatusConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TaskStatus: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Cancelled: "cancelled";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Failure: "failure";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Processing: "processing";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Success: "success";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ReadonlyCancelled: "cancelled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ReadonlyFailure: "failure"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ReadonlyProcessing: "processing"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ReadonlySuccess: "success"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/variables/UserInviteStatus.html b/docs/variables/UserInviteStatus.html new file mode 100644 index 00000000..aa172148 --- /dev/null +++ b/docs/variables/UserInviteStatus.html @@ -0,0 +1,42 @@ +UserInviteStatus | permitio
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      permitio + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Preparing search index...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Variable UserInviteStatusConst

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        UserInviteStatus: { Approved: "approved"; Pending: "pending" } = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        An enumeration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Declaration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ReadonlyApproved: "approved"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ReadonlyPending: "pending"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diff --git a/openapi/MIGRATION.md b/openapi/MIGRATION.md new file mode 100644 index 00000000..a282e5b2 --- /dev/null +++ b/openapi/MIGRATION.md @@ -0,0 +1,176 @@ +# OpenAPI rebaseline migration inventory + +This major-version rebaseline replaces the old generated source with the reviewed 2026-09-30 +public contract and the existing Elements login supplement. It generates 264 operations across +165 paths, with 335 source schemas and 400 TypeScript files. Internal inline schemas explain why +the generated file count exceeds the source schema count. + +## Public SDK changes + +- The runtime export `EnvironmentCopyConflictStrategyEnum` is replaced by + `EnvironmentCopyConflictStrategy`. The CJS and ESM root surfaces each still contain 31 named + exports; this is their only removed/added runtime name. +- The unused `Statistics` type export is removed. The implicit-grants settings type is now + `PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings`, replacing + `PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings`. +- `ResourceInstanceCreate.tenant`, `ResourceInstanceRead.tenant` and `tenant_id`, + `RoleAssignmentRemove.tenant`, and `UserRoleRemove.tenant` are required by the reviewed schema. + Callers must supply tenant information where required. +- Resource roles are named `ResourceRoleRead` dictionary values. Role `granted_to` uses the + current `DerivedRoleBlockRead`/`DerivedRoleBlockEdit` models. Role inheritance remains optional + `string[]` for create/read/update on both global and resource roles. +- Generated list methods preserve array-or-pagination-envelope unions. High-level condition-set, + tenant, resource-instance and relationship-tuple lists retain their array contract by unwrapping + the envelope when present. High-level role/resource lists still honor `includeTotalCount`. +- Generated resource-relation listing returns `PaginatedResultRelationRead`. The existing + `permit.api.resourceRelations.list()` returns its `data` array, matching its declared contract. +- Generated role-assignment user/role/tenant filters are arrays. Existing high-level singleton + string parameters are serialized as one unbracketed query value, preserving encoded keys. +- Explicit `apiUrl` and PDP routing keep precedence over an injected Axios `baseURL`, preserving + the previous SDK behavior despite the upstream generator helper change. +- Generated unassignment returns `RoleAssignmentRead`. The two current high-level unassign methods + retain their void result. The deprecated `unassignRole` returns its actual + `AxiosResponse`. +- `bulkUserCreate`, `bulkUserDelete`, `bulkUserReplace`, `bulkRelationshipTuples`, and + `bulkUnRelationshipTuples` return unspecified `object` results. Their old request-payload return + types were incorrect; the backend's empty result schemas remain unresolved. Request shapes are + still typed and are not used as substitute result contracts. + +## Generated-only removals + +The public snapshot omits 34 of the 195 previously generated operations. The existing Elements +login route is preserved by its narrow supplement; the other 33 generated-only operations are +removed. These methods were not called by high-level SDK wrappers. This inventory records the +removed generated declarations; it does not claim that every omitted backend route stopped +working. The refreshed public snapshot adds 102 operations. + +| Former generated class file | Method | Route | +| ------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `authentication-api.ts` | `devLogin` | `POST /v2/auth/devlogin` | +| `authentication-api.ts` | `elementsFeLoginAs` | `POST /v2/auth/{env_id}/elements_fe_login_as` | +| `authentication-api.ts` | `login` | `POST /v2/auth/login` | +| `authentication-api.ts` | `loginElements` | `GET /v2/auth/login_elements` | +| `authentication-api.ts` | `logoutGet` | `GET /v2/auth/logout` | +| `authentication-api.ts` | `logoutPost` | `POST /v2/auth/logout` | +| `authentication-api.ts` | `me` | `GET /v2/auth/me` | +| `authentication-api.ts` | `switchOrganization` | `POST /v2/auth/switch_org/{org_id}` | +| `condition-sets-api.ts` | `getConditionSetPossibleParents` | `GET /v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/possible_parents` | +| `decision-logs-api.ts` | `listPdpDecisionLogs` | `GET /v2/pdps/{proj_id}/{env_id}/decision-logs/{pdp_id}` | +| `decision-logs-ingress-api.ts` | `insertOpaDecisionLogs` | `POST /v2/decision-logs/ingress` | +| `default-api.ts` | `dummy` | `GET /v2/stress/dummy` | +| `default-api.ts` | `dummyDb` | `GET /v2/stress/db/dummy` | +| `default-api.ts` | `getOrganizationV2StressDbOrganizationGet` | `GET /v2/stress/db/organization` | +| `default-api.ts` | `getOrganizationWithAuthn` | `GET /v2/stress/db/organization_auth` | +| `default-api.ts` | `getOrganizationWithAuthz` | `GET /v2/stress/db/organization_authz` | +| `elements-configs-api.ts` | `getElementsTypeConfig` | `GET /v2/elements/{proj_id}/{env_id}/{element_type}` | +| `elements-configs-api.ts` | `updateElementsTypePermissions` | `PATCH /v2/elements/{proj_id}/{env_id}/{element_type}` | +| `instructions-api.ts` | `listLanguageInstructions` | `GET /v2/{proj_id}/{env_id}/get_instructions` | +| `opaldata-api.ts` | `getDataForConditionSet` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_sets/{condition_set_id}` | +| `opaldata-api.ts` | `getDataForResource` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_types/{resource_id}` | +| `opaldata-api.ts` | `getDataForRole` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/roles/{role_id}` | +| `opaldata-api.ts` | `getDataForSetRule` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_set_rules/{user_set_id}/{resource_set_id}` | +| `opaldata-api.ts` | `getDataForTenant` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/tenants/{tenant_id}` | +| `opaldata-api.ts` | `getDataForUser` | `GET /v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users/{user_id}` | +| `policy-api.ts` | `getOpalDataSources` | `GET /v2/opal/data/config` | +| `policy-api.ts` | `getOpalDataSourcesOpalDataConfigGet` | `GET /opal/data/config` | +| `policy-decision-points-api.ts` | `getAuthenticatingPdpConfigValues` | `POST /v2/pdps/me/config` | +| `policy-decision-points-api.ts` | `getAuthenticatingPdpConfigValuesLegacy` | `GET /v2/pdps/me/config` | +| `policy-decision-points-api.ts` | `opalDataCallback` | `POST /v2/pdps/me/opal_data_callback` | +| `policy-decision-points-api.ts` | `pushPdpState` | `POST /v2/pdps/me/state` | +| `roles-api.ts` | `addParentRole` | `PUT /v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}` | +| `roles-api.ts` | `removeParentRole` | `DELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}` | + +The packed declaration surface grows from 356 to 434 files. The following generated declaration +files are removed, including names replaced by current schema models. All remaining declarations +are checked by the strict SDK build and packed-consumer checks. + +- `api/decision-logs-api.d.ts` +- `api/decision-logs-ingress-api.d.ts` +- `api/elements-configs-api.d.ts` +- `api/instructions-api.d.ts` +- `api/opaldata-api.d.ts` +- `api/policy-api.d.ts` +- `types/action-block.d.ts` +- `types/activity-details.d.ts` +- `types/actor.d.ts` +- `types/allow.d.ts` +- `types/allowed-result.d.ts` +- `types/apikey-info.d.ts` +- `types/apikey-viewer-context.d.ts` +- `types/attribute-block.d.ts` +- `types/attributes.d.ts` +- `types/audit-log-objects.d.ts` +- `types/audit-log.d.ts` +- `types/audit-logs.d.ts` +- `types/authn-me-apikey-read.d.ts` +- `types/authn-me-member-read.d.ts` +- `types/authn-me-read.d.ts` +- `types/authn-me-user-read.d.ts` +- `types/condition-set-data.d.ts` +- `types/data-entry-report.d.ts` +- `types/data-source-entry.d.ts` +- `types/data-update-report.d.ts` +- `types/derived-role-rule.d.ts` +- `types/derived-role.d.ts` +- `types/detailed-audit-log.d.ts` +- `types/dev-login.d.ts` +- `types/editable.d.ts` +- `types/elements-env-type-read.d.ts` +- `types/elements-env-type-update.d.ts` +- `types/entry.d.ts` +- `types/environment-regeneration.d.ts` +- `types/full-data.d.ts` +- `types/full-regeneration.d.ts` +- `types/granted-to.d.ts` +- `types/granted-to1.d.ts` +- `types/granted-to2.d.ts` +- `types/invite-attempt-result.d.ts` +- `types/jwks.d.ts` +- `types/labels.d.ts` +- `types/language-instructions.d.ts` +- `types/login-result.d.ts` +- `types/member-info.d.ts` +- `types/member-viewer-context.d.ts` +- `types/message.d.ts` +- `types/new.d.ts` +- `types/opadecision-log.d.ts` +- `types/opal-common-schemas-data-data-source-config.d.ts` +- `types/opal-common.d.ts` +- `types/organization-regeneration.d.ts` +- `types/paginated-result-audit-log.d.ts` +- `types/paginated-result-opadecision-log.d.ts` +- `types/payload.d.ts` +- `types/pdp.d.ts` +- `types/pdpinfo.d.ts` +- `types/pdpopainfo.d.ts` +- `types/pdpstate-update.d.ts` +- `types/pdpstate.d.ts` +- `types/permit-backend-opal-api-data-data-source-config.d.ts` +- `types/permit-backend-schemas-schema-derived-role-derived-role-settings.d.ts` +- `types/permit-backend-schemas-schema-opal-data-derived-role-settings.d.ts` +- `types/policy-synchronizer-regeneration.d.ts` +- `types/programming-language.d.ts` +- `types/project-regeneration.d.ts` +- `types/resource-sets.d.ts` +- `types/resource-type-data.d.ts` +- `types/resources.d.ts` +- `types/response-get-data-for-condition-set-v2-internal-opal-data-org-id-proj-id-env-id-condition-sets-condition-set-id-get.d.ts` +- `types/response-get-data-for-resource-v2-internal-opal-data-org-id-proj-id-env-id-resource-types-resource-id-get.d.ts` +- `types/response-get-data-for-role-v2-internal-opal-data-org-id-proj-id-env-id-roles-role-id-get.d.ts` +- `types/response-get-data-for-tenant-v2-internal-opal-data-org-id-proj-id-env-id-tenants-tenant-id-get.d.ts` +- `types/response-get-data-for-user-v2-internal-opal-data-org-id-proj-id-env-id-users-user-id-get.d.ts` +- `types/role-block.d.ts` +- `types/role-data.d.ts` +- `types/scope.d.ts` +- `types/settings.d.ts` +- `types/statistics.d.ts` +- `types/target-env.d.ts` +- `types/tenant-data.d.ts` +- `types/user-data.d.ts` +- `types/user-felogin-request-input.d.ts` +- `types/user-sets.d.ts` +- `types/viewer-context.d.ts` +- `types/viewer-grant.d.ts` +- `types/viewer.d.ts` +- `types/webhook-create.d.ts` +- `types/when.d.ts` diff --git a/openapi/README.md b/openapi/README.md new file mode 100644 index 00000000..5962a22f --- /dev/null +++ b/openapi/README.md @@ -0,0 +1,149 @@ +# Reviewed OpenAPI generation + +`permit-api.json` preserves the exact bytes of the public OpenAPI 3.1.0 document captured on +2026-09-30 from . `provenance.json` records its SHA-256, +164 paths, 263 operations and 333 schemas. Regeneration reads this committed snapshot; it does +not fetch a moving API definition. The generated API's `info.version` remains the backend's +`2.0.0`; that value is separate from the OpenAPI document version `3.1.0`. + +Use the locked Node/pnpm toolchain and Java 17: + +```sh +pnpm generate-openapi-client +pnpm check:openapi +pnpm check:codegen +pnpm verify +``` + +`generator.json` is the single configuration for production generation and the historical +fixture guard. `openapitools.json` pins generator 7.25.0. Both commands verify its recorded JAR +SHA-256 before invoking the generator. If the archive is missing, they download that exact version +from Maven Central and verify its bytes before caching or execution. The verified archive is cached at +`node_modules/.cache/openapi-generator/7.25.0.jar` and invoked directly with Java 17, using +`JAVA_HOME/bin/java` when `JAVA_HOME` is set or `java` from `PATH` otherwise. Both commands +validate the prepared schema; neither skips validation. +The normalizer applies strict compiler-compatible imports and annotations before Oxfmt. Generation +checks all model shapes and the TypeScript 7 SDK build before replacing the previous generated tree. +A failure leaves the previous tree intact. Only generated TypeScript files are installed, so stale +models and APIs are removed. Temporary files are cleaned up even when generation fails. + +`check:openapi` generates twice into independent directories, applies the same normalization and +formatting, and compares every TypeScript filename and byte, then compares the result with +`src/openapi`. CI runs this exact command alongside the historical fixture guard. Unit tests +exercise missing output, process errors, unexpected diagnostics, schema drift, degraded unions, +empty interfaces and tuple widening. Strict consumer tests protect role inheritance, required +tenant fields and representative request/response types. + +## Reviewed corrections + +`scripts/openapi-source.mjs` applies the following changes to an in-memory copy. Each correction +checks the original shape and fails if the upstream schema changes; unrelated duplicate tags, +unknown primitive types and unresolved references fail validation. + +| Source pointer | Correction and basis | +| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `/tags/4`, `/tags/19` | Remove the second identical `Bulk Operations` tag. OpenAPI requires unique tag names. | +| `/components/schemas/OPALUpdateCallback/properties/callbacks/items/anyOf/1/items` | Move the two tuple entries into `prefixItems`, retain `minItems` and `maxItems` of 2, and set `items: false`, using OpenAPI 3.1/JSON Schema tuple syntax. | +| `/components/schemas/ProxyConfig{Create,Read,Update}/properties/secret/anyOf` | Replace the nonstandard `HeadersAuth`, `BasicAuth` and `BearerAuth` primitive names with the documented header dictionary or string shapes. Preserve the basic-auth pattern and bearer-token minimum length. No null branch is inferred. | + +Preparation also restores the null branch of exactly `APIKeyScopeRead.project_id` and +`APIKeyScopeRead.environment_id`. The captured public OpenAPI omits their nullability; the +[pinned public Python model](https://github.com/permitio/permit-python/blob/ef80ae2393b4c74e400fdd40ca838d589ee43709/permit/api/models.py) +declares both as `Optional[UUID]` with a `None` default. The checked correction uses OpenAPI 3.1 +`type: ['string', 'null']`, preserving UUID format and optionality. It requires the complete +original read-scope shape, including required nonnullable `organization_id`, so upstream changes +fail before generation. `APIKeyCreate`, the captured snapshot and its provenance remain +unchanged. Generated-shape guards and strict consumers check both nullable fields and +all three fields' requiredness. + +The same pinned public Python model explicitly marks ten `APIKeyRead` fields nullable: +`project_id`, `environment_id`, `object_type`, `access_level`, `name`, `secret`, +`created_by_member`, `last_used_at`, `env` and `project`. Preparation adds only those null +branches, preserving captured metadata, reference targets and defaults. Organization ID, +owner type, record ID and creation time remain required and nonnullable. Exactly +`PaginatedResult_APIKeyRead_.page_count` also gains its published optional null branch; +`data` and `total_count` remain required and nonnullable. Complete original model shapes +and field requiredness are checked before correction, and generation checks every repaired +property. No creation input or nested model fields are widened. + +`elements-login.json` supplements only the existing `POST /v2/auth/elements_login_as` wrapper route +and its two request/response models. The contract was verified against backend OpenAPI on the +capture date; its hash is recorded separately. This route is absent from the public document but +is still used by `permit.elements.loginAs()`. Preparation fails if the route becomes published, +so the exception must then be reviewed and removed. Other routes omitted by the public snapshot +are accounted for in [migration notes](MIGRATION.md), without retaining obsolete generated files. + +The audit read graph has one additional checked correction: 71 explicit `Optional` output +fields across 16 schemas accept `null`, matching the pinned public +[Python models](https://github.com/permitio/permit-python/blob/ef80ae2393b4c74e400fdd40ca838d589ee43709/permit/api/models.py). +The exact fields and source link are in `scripts/fixtures/audit-read-nullability.json`. +Each original schema is hash checked before correction. Required fields, formats, defaults, +constraints, unconstrained data and other schemas retain their captured definitions. +These schemas are not reachable from any captured request body or parameter; preparation +rejects a new direct or transitive input use before widening an input contract. The captured +snapshot and its provenance remain unchanged. Strict consumers cover nullable nested output +and retain negative controls for required fields, engine payloads and request inputs. + +## Generator adaptations and unresolved source contracts + +The small `model.mustache` override adds dispatch to `modelAnyOf.mustache`, which emits TypeScript +unions. The rest of the template comes from generator 7.25.0. Without this change, array-or-page +responses lose their array branch and the proxy secret becomes an empty interface. A checked +post-generation repair restores `CallbacksInner` to `string | [string, OPALHttpFetcherConfig]`; +the generator otherwise widens the tuple to `Array`. Both defects have negative regressions. +A second checked repair preserves the SDK's explicit API/PDP base-path precedence over an injected +Axios instance's default `baseURL`. The new upstream helper would otherwise send requests to the +instance default. Actual-request tests cover scope discovery, REST facts and proxied facts routing. +The Axios request helper retains `ReturnType>`, removing the +upstream generic Promise assertion so declarations preserve Axios's actual response type. + +The checked `typeMappings` setting maps the generator's `set` representation to `Array`. +`MonthlyUsage.monthly_tenants` is a JSON array; Axios does not construct a JavaScript `Set`. +The prepared source keeps the captured UUID item schema, `uniqueItems: true` and empty default. +The compiler shape guard rejects a regenerated `Set` declaration. This generated model +is shipped as a declaration; it is not a supported root export or high-level organizations API. + +Preparation also corrects exactly eight checked descriptions: data-generator derived-role settings, +invite approval, GroupAssignment/GroupCreate/GroupReadSchema, detailed relationship-tuple and +resource-instance pages, and TenantBlockRead. It checks each original string before replacing it, +fails on upstream drift and leaves other model descriptions unchanged. +The pinned generator flattens description newlines. A checked output repair restores the five +long corrected property comments before formatting and type checks. It requires one exact +generated occurrence for each property and leaves other comments and schema metadata unchanged. + +The only accepted generator diagnostics are its OpenAPI 3.1 beta notice, the known tuple-name +warning, and its safe `Object` to `ModelObject` rename. Each has a specific comment in the runner; +all other warnings and every error fail generation. Completion metadata, syntax checks, model +shape checks and strict compilation still apply to the whole output. + +Nine bulk-result schemas are empty source objects: create/delete relationship tuples, resource +instances and tenants, plus create/delete/replace users. They remain unspecified objects in the +generated API. The affected high-level user and tuple bulk methods return `Promise`; +they no longer claim that the request payload is the response. No success counts or result fields +are invented. Backend result-schema completion remains outstanding. + +The source explicitly permits unconstrained audit data, nested dictionaries and the untyped array +branch of `DataSourceEntryWithPollingInterval.data`. The guard allows only those reviewed fields +and that exact union. It rejects whole-model `any` degradation and empty interfaces. + +The generated surface includes the published Groups, tenant-membership and PDP refresh routes. +Groups includes four routes tagged EAP and two deprecated routes; their source annotations are +preserved. This rebaseline does not add high-level wrappers for those features. + +## Refreshing the snapshot + +Save a new public response to a temporary file and review its paths, schema changes and wire +contracts before replacing `permit-api.json`. Update the capture date, hash and inventory in +`provenance.json`, then review whether each exact correction and the Elements supplement is still +needed. Run regeneration, the two-generation comparison, the historical fixture guard and +`pnpm verify`. Review generated additions/removals and update the migration inventory. Do not +update expectations merely to accept a degraded type. + +The environment copy task has a separate checked read correction. Exactly +`TaskResult_EnvironmentRead_.result` and `.error` gain a null branch, preserving their original +metadata, optionality, referenced models and required `task_id`/`status`. The official +[background-task examples at permitio/docs 6ec47cd3f04da6fa1bc9d48226ccbe781b304f77](https://github.com/permitio/docs/blob/6ec47cd3f04da6fa1bc9d48226ccbe781b304f77/docs/api/background-tasks.mdx) +show null result/error for processing and null result for failure. The captured snapshot and its +provenance stay unchanged. The correction refuses source-shape drift or new direct/transitive +request uses, including supplemental operations. Other task-result schemas are unchanged. +Generated shape controls reject lost null branches, changed requiredness and collapsed types. diff --git a/openapi/elements-login.json b/openapi/elements-login.json new file mode 100644 index 00000000..2494f04e --- /dev/null +++ b/openapi/elements-login.json @@ -0,0 +1,115 @@ +{ + "paths": { + "/v2/auth/elements_login_as": { + "post": { + "tags": ["Authentication"], + "summary": "Elements Login As", + "operationId": "elements_login_as", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Permit Session" + }, + "name": "permit_session", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserLoginRequestInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbeddedLoginRequestOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + } + }, + "schemas": { + "UserLoginRequestInput": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id", + "description": "ID or key of the user for whom to generate a token" + }, + "tenant_id": { + "type": "string", + "title": "Tenant Id", + "description": "ID or key of the tenant to which access is requested" + } + }, + "type": "object", + "required": ["user_id", "tenant_id"], + "title": "UserLoginRequestInput" + }, + "EmbeddedLoginRequestOutput": { + "properties": { + "error": { + "type": "string", + "title": "Error", + "description": "If the login request failed, this field will contain the error message" + }, + "error_code": { + "type": "integer", + "title": "Error Code", + "description": "If the login request failed, this field will contain the error code" + }, + "token": { + "type": "string", + "title": "Token", + "description": "The auth token that lets your users login into permit elements" + }, + "extra": { + "type": "string", + "title": "Extra", + "description": "Extra data that you can pass to the login request" + }, + "redirect_url": { + "type": "string", + "title": "Redirect Url", + "description": "The full URL to which the user should be redirected in order to complete the login process" + }, + "element_bearer_token": { + "type": "string", + "title": "Element Bearer Token", + "description": "The bearer token that lets your users login into permit elements" + } + }, + "type": "object", + "required": ["redirect_url"], + "title": "EmbeddedLoginRequestOutput" + } + } +} diff --git a/openapi/generator.json b/openapi/generator.json new file mode 100644 index 00000000..143e9e02 --- /dev/null +++ b/openapi/generator.json @@ -0,0 +1,18 @@ +{ + "generatorName": "typescript-axios", + "additionalProperties": { + "useSingleRequestParameter": true, + "withSeparateModelsAndApi": true, + "apiPackage": "api", + "modelPackage": "types" + }, + "globalProperties": { + "apiDocs": "false", + "modelDocs": "false", + "apiTests": "false", + "modelTests": "false" + }, + "typeMappings": { + "set": "Array" + } +} diff --git a/openapi/pdp/cloud.json b/openapi/pdp/cloud.json new file mode 100644 index 00000000..cd9aac6f --- /dev/null +++ b/openapi/pdp/cloud.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"Cloud PDP API","description":"Permit.io - Cloud Policy Decision Point","license":{"name":""},"version":"0.1.0"},"paths":{"/.well-known/authzen-configuration":{"get":{"tags":["authzen"],"operationId":"authzen_metadata_handler","responses":{"200":{"description":"PDP metadata retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthZenMetadataResponse"}}}},"401":{"description":"Unauthorized"}}}},"/access/v1/evaluation":{"post":{"tags":["authzen"],"operationId":"access_evaluation_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}},{"name":"Cache-Control","in":"header","description":"Cache control directives","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessEvaluationRequest"}}},"required":true},"responses":{"200":{"description":"Access evaluation completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessEvaluationResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/access/v1/evaluations":{"post":{"tags":["authzen"],"operationId":"access_evaluations_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessEvaluationsRequest"}}},"required":true},"responses":{"200":{"description":"Access evaluations completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessEvaluationsResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/access/v1/search/action":{"post":{"tags":["authzen"],"operationId":"search_action_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionSearchRequest"}}},"required":true},"responses":{"200":{"description":"Action search completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionSearchResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/access/v1/search/resource":{"post":{"tags":["authzen"],"operationId":"search_resource_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceSearchRequest"}}},"required":true},"responses":{"200":{"description":"Resource search completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceSearchResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/access/v1/search/subject":{"post":{"tags":["authzen"],"summary":"Subject search endpoint - finds subjects that can access a resource","operationId":"search_subject_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectSearchRequest"}}},"required":true},"responses":{"200":{"description":"Subject search completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectSearchResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/allowed":{"post":{"tags":["authz"],"operationId":"allowed_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedQuery"}}},"required":true},"responses":{"200":{"description":"Permission check completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/allowed/bulk":{"post":{"tags":["authz"],"operationId":"bulk_allowed_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AllowedQuery"}}}},"required":true},"responses":{"200":{"description":"Bulk permission check completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAuthorizationResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/authorized_users":{"post":{"tags":["authz"],"operationId":"authorized_users_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedUsersQuery"}}},"required":true},"responses":{"200":{"description":"Authorized users retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedUsersResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user-permissions":{"post":{"tags":["authz"],"operationId":"user_permissions_handler","parameters":[{"name":"Authorization","in":"header","description":"Authorization header","required":true,"schema":{"type":"string"}},{"name":"X-Request-ID","in":"header","description":"Request Identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionsQuery"}}},"required":true},"responses":{"200":{"description":"User permissions retrieved successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UserPermissionsResult"},"propertyNames":{"type":"string"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"AccessEvaluationRequest":{"type":"object","description":"AuthZen Evaluation Request - the main request object for the Authorization API","required":["subject","resource","action"],"properties":{"action":{"$ref":"#/components/schemas/AuthZenAction","description":"Action being performed"},"context":{"type":["object","null"],"description":"Context for the evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"resource":{"$ref":"#/components/schemas/AuthZenResource","description":"Resource being accessed"},"subject":{"$ref":"#/components/schemas/AuthZenSubject","description":"Subject (user) making the request"}}},"AccessEvaluationResponse":{"type":"object","description":"AuthZen Evaluation Response - the main response object for the Authorization API","required":["decision"],"properties":{"context":{"type":["object","null"],"description":"Optional additional context","additionalProperties":{},"propertyNames":{"type":"string"}},"decision":{"type":"boolean","description":"The decision whether to allow or deny the action"}}},"AccessEvaluationsRequest":{"type":"object","description":"AuthZen Evaluations Request - for batch evaluation of multiple access requests","required":["evaluations"],"properties":{"action":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthZenAction","description":"Action being performed - used as default for all evaluations"}]},"context":{"type":["object","null"],"description":"Context for the evaluation - used as default for all evaluations","additionalProperties":{},"propertyNames":{"type":"string"}},"evaluations":{"type":"array","items":{"$ref":"#/components/schemas/IndividualEvaluation"},"description":"List of individual evaluations to perform"},"options":{"type":["object","null"],"description":"Options for controlling evaluation behavior","additionalProperties":{},"propertyNames":{"type":"string"}},"resource":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthZenResource","description":"Resource being accessed - used as default for all evaluations"}]},"subject":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthZenSubject","description":"Subject (user) making the request - used as default for all evaluations"}]}}},"AccessEvaluationsResponse":{"type":"object","description":"AuthZen Evaluations Response - contains decisions for all requests","required":["evaluations"],"properties":{"evaluations":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationResult"},"description":"List of evaluation results"}}},"ActionSearchRequest":{"type":"object","description":"AuthZen Action Search Request - to find what actions a subject can perform on a resource","required":["subject","resource"],"properties":{"context":{"type":"object","description":"Context for the evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"page":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageRequest","description":"Pagination parameters"}]},"resource":{"$ref":"#/components/schemas/AuthZenResource","description":"Resource being accessed"},"subject":{"$ref":"#/components/schemas/AuthZenSubject","description":"Subject making the request"}}},"ActionSearchResponse":{"type":"object","description":"AuthZen Action Search Response - contains list of actions the subject can perform on the resource","required":["results"],"properties":{"context":{"type":"object","description":"Optional additional context","additionalProperties":{},"propertyNames":{"type":"string"}},"page":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageResponse","description":"Pagination information"}]},"results":{"type":"array","items":{"$ref":"#/components/schemas/AuthZenAction"},"description":"List of actions the subject can perform"}}},"AllowedQuery":{"type":"object","description":"Authorization query parameters for the allowed endpoint","required":["user","action","resource"],"properties":{"action":{"type":"string","description":"The action the user wants to perform"},"context":{"type":"object","description":"Additional context for permission evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"resource":{"$ref":"#/components/schemas/Resource","description":"The resource the user wants to access"},"sdk":{"type":["string","null"],"description":"SDK identifier"},"user":{"$ref":"#/components/schemas/User","description":"User making the request"}}},"AllowedResult":{"type":"object","description":"Response type for the allowed endpoint","required":["allow"],"properties":{"allow":{"type":"boolean","description":"Whether the action is allowed"},"debug":{"type":["object","null"],"description":"Debug information","additionalProperties":{},"propertyNames":{"type":"string"}},"query":{"type":["object","null"],"description":"Query details for debugging","additionalProperties":{},"propertyNames":{"type":"string"}},"result":{"type":"boolean","description":"Result (deprecated field for backward compatibility)"}}},"AuthZenAction":{"type":"object","description":"AuthZen Action - represents the action in AuthZen protocol","required":["name"],"properties":{"name":{"type":"string","description":"Name of the action"},"properties":{"type":["object","null"],"description":"Optional properties of the action","additionalProperties":{},"propertyNames":{"type":"string"}}}},"AuthZenMetadataResponse":{"type":"object","description":"AuthZen PDP Metadata Response - provides information about the PDP capabilities","required":["policy_decision_point","access_evaluation_endpoint","access_evaluations_endpoint","search_subject_endpoint","search_action_endpoint","search_resource_endpoint"],"properties":{"access_evaluation_endpoint":{"type":"string"},"access_evaluations_endpoint":{"type":"string"},"policy_decision_point":{"type":"string"},"search_action_endpoint":{"type":"string"},"search_resource_endpoint":{"type":"string"},"search_subject_endpoint":{"type":"string"}}},"AuthZenResource":{"type":"object","description":"AuthZen Resource - represents the resource in AuthZen protocol","required":["type"],"properties":{"id":{"type":["string","null"],"description":"Unique identifier of the resource"},"properties":{"type":["object","null"],"description":"Optional properties of the resource","additionalProperties":{},"propertyNames":{"type":"string"}},"type":{"type":"string","description":"Type of the resource"}}},"AuthZenSubject":{"type":"object","description":"AuthZen Subject - represents the user in AuthZen protocol","required":["type"],"properties":{"id":{"type":"string","description":"Unique identifier of the subject"},"properties":{"type":["object","null"],"description":"Optional properties of the subject","additionalProperties":{},"propertyNames":{"type":"string"}},"type":{"type":"string","description":"Type of the subject"}}},"AuthorizedUserAssignment":{"type":"object","description":"User assignment details in the authorized users response","required":["user","tenant","resource","role"],"properties":{"resource":{"type":"string","description":"Resource identifier"},"role":{"type":"string","description":"Role assigned to the user"},"tenant":{"type":"string","description":"Tenant key"},"user":{"type":"string","description":"User key"}}},"AuthorizedUsersQuery":{"type":"object","description":"Query parameters for the authorized users endpoint","required":["action","resource"],"properties":{"action":{"type":"string","description":"The action to check"},"context":{"type":"object","description":"Additional context for permission evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"resource":{"$ref":"#/components/schemas/Resource","description":"The resource to check access for"},"sdk":{"type":["string","null"],"description":"SDK identifier"}}},"AuthorizedUsersResult":{"type":"object","description":"Response type for the authorized users endpoint","required":["resource","tenant","users"],"properties":{"resource":{"type":"string","description":"Resource identifier"},"tenant":{"type":"string","description":"Tenant identifier"},"users":{"type":"object","description":"Map of user keys to their assignments","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizedUserAssignment"}},"propertyNames":{"type":"string"}}}},"BulkAuthorizationQuery":{"type":"object","description":"Request type for bulk authorization checks","required":["checks"],"properties":{"checks":{"type":"array","items":{"$ref":"#/components/schemas/AllowedQuery"},"description":"List of individual authorization queries"}}},"BulkAuthorizationResult":{"type":"object","description":"Response type for bulk authorization checks","required":["allow"],"properties":{"allow":{"type":"array","items":{"$ref":"#/components/schemas/AllowedResult"},"description":"List of authorization results, one for each check"}}},"ErrorResponse":{"type":"object","description":"Error response format","required":["message","code"],"properties":{"code":{"type":"integer","format":"int32","minimum":0},"message":{"type":"string"}}},"EvaluationResult":{"type":"object","description":"Individual evaluation result","required":["decision"],"properties":{"context":{"type":["object","null"],"description":"Optional additional context","additionalProperties":{},"propertyNames":{"type":"string"}},"decision":{"type":"boolean","description":"The decision whether to allow or deny the action"}}},"IndividualEvaluation":{"type":"object","description":"Individual evaluation in a batch request","properties":{"action":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthZenAction","description":"Action being performed - overrides the default"}]},"context":{"type":["object","null"],"description":"Context for the evaluation - overrides the default","additionalProperties":{},"propertyNames":{"type":"string"}},"resource":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthZenResource","description":"Resource being accessed - overrides the default"}]},"subject":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthZenSubject","description":"Subject (user) making the request - overrides the default"}]}}},"PageRequest":{"type":"object","description":"Pagination request parameters","properties":{"next_token":{"type":["string","null"],"description":"Token for retrieving the next page of results"},"size":{"type":["integer","null"],"format":"int32","description":"Maximum number of results to return per page"}}},"PageResponse":{"type":"object","description":"Pagination response parameters","properties":{"next_token":{"type":["string","null"],"description":"Token for retrieving the next page of results, empty if no more results"}}},"Resource":{"type":"object","required":["type"],"properties":{"attributes":{"type":"object","description":"Additional resource attributes","additionalProperties":{},"propertyNames":{"type":"string"}},"key":{"type":["string","null"],"description":"Unique identifier for the resource (optional)"},"tenant":{"type":["string","null"],"description":"Tenant for this resource (optional)"},"type":{"type":"string","description":"Type of the resource"}}},"ResourceDetails":{"type":"object","required":["key","type"],"properties":{"attributes":{"type":"object","description":"Additional resource attributes","additionalProperties":{},"propertyNames":{"type":"string"}},"key":{"type":"string","description":"Unique identifier for the resource"},"type":{"type":"string","description":"Type of the resource"}}},"ResourceSearchRequest":{"type":"object","description":"AuthZen Resource Search Request - to find resources a subject can access","required":["subject","action","resource"],"properties":{"action":{"$ref":"#/components/schemas/AuthZenAction","description":"Action being performed"},"context":{"type":"object","description":"Context for the evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"page":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageRequest","description":"Pagination parameters"}]},"resource":{"$ref":"#/components/schemas/AuthZenResource","description":"Resource type to filter by"},"subject":{"$ref":"#/components/schemas/AuthZenSubject","description":"Subject making the request"}}},"ResourceSearchResponse":{"type":"object","description":"AuthZen Resource Search Response - contains list of resources a subject can access","required":["results"],"properties":{"context":{"type":"object","description":"Optional additional context","additionalProperties":{},"propertyNames":{"type":"string"}},"page":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageResponse","description":"Pagination information"}]},"results":{"type":"array","items":{"$ref":"#/components/schemas/AuthZenResource"},"description":"List of resources the subject can access"}}},"SubjectSearchRequest":{"type":"object","description":"AuthZen Subject Search Request - to find subjects with access to a resource","required":["subject","resource","action"],"properties":{"action":{"$ref":"#/components/schemas/AuthZenAction","description":"Action being performed"},"context":{"type":["object","null"],"description":"Context for the evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"page":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageRequest","description":"Pagination token for subsequent pages"}]},"resource":{"$ref":"#/components/schemas/AuthZenResource","description":"Resource being accessed"},"subject":{"$ref":"#/components/schemas/AuthZenSubject","description":"Subject being searched for"}}},"SubjectSearchResponse":{"type":"object","description":"AuthZen Subject Search Response - contains list of subjects with access to a resource","required":["results"],"properties":{"context":{"type":["object","null"],"description":"Optional additional context","additionalProperties":{},"propertyNames":{"type":"string"}},"page":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageResponse","description":"Pagination information"}]},"results":{"type":"array","items":{"$ref":"#/components/schemas/AuthZenSubject"},"description":"List of subjects with access"}}},"TenantDetails":{"type":"object","required":["key"],"properties":{"attributes":{"type":"object","description":"Additional tenant attributes","additionalProperties":{},"propertyNames":{"type":"string"}},"key":{"type":"string","description":"Unique identifier for the tenant"}}},"User":{"type":"object","required":["key"],"properties":{"attributes":{"type":"object","description":"Additional user attributes","additionalProperties":{},"propertyNames":{"type":"string"}},"email":{"type":["string","null"],"description":"User's email address"},"first_name":{"type":["string","null"],"description":"User's first name"},"key":{"type":"string","description":"Unique identifier for the user"},"last_name":{"type":["string","null"],"description":"User's last name"}}},"UserPermissionsQuery":{"type":"object","required":["user"],"properties":{"context":{"type":"object","description":"Additional context for permission evaluation","additionalProperties":{},"propertyNames":{"type":"string"}},"resource_types":{"type":["array","null"],"items":{"type":"string"},"description":"List of resource types to return. A non-empty list keeps only the entries\nwhose resource type is listed, so tenant entries (`__tenant:`) come\nback only when `__tenant` is listed. Absent or empty returns every type."},"resources":{"type":["array","null"],"items":{"type":"string"},"description":"List of resource identifiers to check in format of \"type:instance\""},"tenants":{"type":["array","null"],"items":{"type":"string"},"description":"List of tenant identifiers to check"},"user":{"$ref":"#/components/schemas/User","description":"User details"}}},"UserPermissionsResult":{"type":"object","required":["permissions"],"properties":{"permissions":{"type":"array","items":{"type":"string"},"description":"List of permissions in format \"action:resource\""},"resource":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResourceDetails","description":"Resource details"}]},"roles":{"type":["array","null"],"items":{"type":"string"},"description":"List of roles assigned to the user"},"tenant":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TenantDetails","description":"Tenant details"}]}}}}},"tags":[{"name":"authz","description":"Authorization APIs"},{"name":"authzen","description":"AuthZen APIs"}]} \ No newline at end of file diff --git a/openapi/pdp/container.json b/openapi/pdp/container.json new file mode 100644 index 00000000..06bdf6ef --- /dev/null +++ b/openapi/pdp/container.json @@ -0,0 +1 @@ +{"components":{"schemas":{"AllTenantsAuthorizationResult":{"properties":{"allowed_tenants":{"default":[],"items":{"$ref":"#/components/schemas/_AllTenantsAuthorizationResult"},"title":"Allowed Tenants","type":"array"}},"title":"AllTenantsAuthorizationResult","type":"object"},"AuthorizationQuery":{"description":"the format of is_allowed() input","properties":{"action":{"title":"Action","type":"string"},"context":{"title":"Context","type":"object"},"resource":{"$ref":"#/components/schemas/Resource"},"sdk":{"title":"Sdk","type":"string"},"user":{"$ref":"#/components/schemas/User"}},"required":["user","action","resource"],"title":"AuthorizationQuery","type":"object"},"AuthorizationQueryV1":{"description":"the format of is_allowed() input","properties":{"action":{"title":"Action","type":"string"},"context":{"title":"Context","type":"object"},"resource":{"$ref":"#/components/schemas/ResourceV1"},"user":{"title":"User","type":"string"}},"required":["user","action","resource"],"title":"AuthorizationQueryV1","type":"object"},"AuthorizationResult":{"properties":{"allow":{"default":false,"title":"Allow","type":"boolean"},"debug":{"title":"Debug","type":"object"},"query":{"title":"Query","type":"object"},"result":{"default":false,"title":"Result","type":"boolean"}},"title":"AuthorizationResult","type":"object"},"AuthorizedUserAssignment":{"properties":{"resource":{"description":"The resource that the user is authorized for","title":"Resource","type":"string"},"role":{"description":"The role that the user is assigned to","title":"Role","type":"string"},"tenant":{"description":"The tenant that the user is authorized for","title":"Tenant","type":"string"},"user":{"description":"The user that is authorized","title":"User","type":"string"}},"required":["user","tenant","resource","role"],"title":"AuthorizedUserAssignment","type":"object"},"AuthorizedUsersAuthorizationQuery":{"description":"the format of authorized_users input","properties":{"action":{"title":"Action","type":"string"},"context":{"title":"Context","type":"object"},"resource":{"$ref":"#/components/schemas/Resource"},"sdk":{"title":"Sdk","type":"string"}},"required":["action","resource"],"title":"AuthorizedUsersAuthorizationQuery","type":"object"},"AuthorizedUsersResult":{"examples":[{"resource":"repo:*","tenant":"default","users":{"user1":[{"resource":"__tenant:default","role":"admin","tenant":"default","user":"user1"}]}},{"resource":"repo:OPAL","tenant":"default","users":{"user1":[{"resource":"repo:OPAL","role":"admin","tenant":"default","user":"user1"},{"resource":"__tenant:default","role":"admin","tenant":"default","user":"user1"}]}}],"properties":{"resource":{"description":"The resource that the result is about.Can be either 'resource:*' or 'resource:resource_instance'","title":"Resource","type":"string"},"tenant":{"description":"The tenant that the result is about","title":"Tenant","type":"string"},"users":{"additionalProperties":{"items":{"$ref":"#/components/schemas/AuthorizedUserAssignment"},"type":"array"},"description":"A key value mapping of the users that are authorized for the resource.The key is the user key and the value is a list of assignments allowing the user to performthe requested action","title":"Users","type":"object"}},"required":["resource","tenant","users"],"title":"AuthorizedUsersResult","type":"object"},"BulkAuthorizationResult":{"properties":{"allow":{"default":[],"items":{"$ref":"#/components/schemas/AuthorizationResult"},"title":"Allow","type":"array"}},"title":"BulkAuthorizationResult","type":"object"},"CallbackEntry":{"description":"An entry in the callbacks register.\n\nthis schema is used by the callbacks api","properties":{"config":{"allOf":[{"$ref":"#/components/schemas/HttpFetcherConfig"}],"description":"optional http config for the target url (i.e: http method, headers, etc)","title":"Config"},"key":{"description":"unique id to identify this callback (optional)","title":"Key","type":"string"},"url":{"description":"http/https url to call back on update","title":"Url","type":"string"}},"required":["url"],"title":"CallbackEntry","type":"object"},"ConnectivityActionResult":{"properties":{"status":{"enum":["disabled","already_disabled","enabled","already_enabled"],"title":"Status","type":"string"}},"required":["status"],"title":"ConnectivityActionResult","type":"object"},"ConnectivityStatus":{"properties":{"offline_mode_enabled":{"title":"Offline Mode Enabled","type":"boolean"},"opal_server_connectivity_disabled":{"title":"Opal Server Connectivity Disabled","type":"boolean"}},"required":["opal_server_connectivity_disabled","offline_mode_enabled"],"title":"ConnectivityStatus","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"HttpFetcherConfig":{"description":"Config for HttpFetchProvider's Adding HTTP headers.","properties":{"data":{"title":"Data"},"fetcher":{"description":"indicates to OPAL client that it should use a custom FetcherProvider to fetch the data","title":"Fetcher","type":"string"},"headers":{"title":"Headers","type":"object"},"is_json":{"default":true,"title":"Is Json","type":"boolean"},"method":{"allOf":[{"$ref":"#/components/schemas/HttpMethods"}],"default":"get"},"process_data":{"default":true,"title":"Process Data","type":"boolean"}},"title":"HttpFetcherConfig","type":"object"},"HttpMethods":{"description":"An enumeration.","enum":["get","post","put","patch","head","delete"],"title":"HttpMethods"},"KongAuthorizationInput":{"properties":{"client_ip":{"title":"Client Ip","type":"string"},"consumer":{"$ref":"#/components/schemas/KongAuthorizationInputConsumer"},"request":{"$ref":"#/components/schemas/KongAuthorizationInputRequest"},"route":{"$ref":"#/components/schemas/KongAuthorizationInputRoute"},"service":{"$ref":"#/components/schemas/KongAuthorizationInputService"}},"required":["request"],"title":"KongAuthorizationInput","type":"object"},"KongAuthorizationInputConsumer":{"properties":{"id":{"format":"uuid","title":"Id","type":"string"},"username":{"title":"Username","type":"string"}},"required":["id","username"],"title":"KongAuthorizationInputConsumer","type":"object"},"KongAuthorizationInputRequest":{"properties":{"http":{"$ref":"#/components/schemas/KongAuthorizationInputRequestHttp"}},"required":["http"],"title":"KongAuthorizationInputRequest","type":"object"},"KongAuthorizationInputRequestHttp":{"properties":{"headers":{"additionalProperties":{"type":"string"},"title":"Headers","type":"object"},"host":{"title":"Host","type":"string"},"method":{"title":"Method","type":"string"},"path":{"title":"Path","type":"string"},"port":{"title":"Port","type":"integer"},"querystring":{"additionalProperties":{"type":"string"},"title":"Querystring","type":"object"},"scheme":{"title":"Scheme","type":"string"},"tls":{"title":"Tls","type":"object"}},"required":["host","port","tls","method","scheme","path","querystring","headers"],"title":"KongAuthorizationInputRequestHttp","type":"object"},"KongAuthorizationInputRoute":{"properties":{"created_at":{"title":"Created At","type":"integer"},"https_redirect_status_code":{"title":"Https Redirect Status Code","type":"integer"},"id":{"format":"uuid","title":"Id","type":"string"},"path_handling":{"title":"Path Handling","type":"string"},"paths":{"items":{"type":"string"},"title":"Paths","type":"array"},"preserve_host":{"title":"Preserve Host","type":"boolean"},"protocols":{"items":{"type":"string"},"title":"Protocols","type":"array"},"regex_priority":{"title":"Regex Priority","type":"integer"},"request_buffering":{"title":"Request Buffering","type":"boolean"},"response_buffering":{"title":"Response Buffering","type":"boolean"},"service":{"$ref":"#/components/schemas/KongAuthorizationInputRouteService"},"strip_path":{"title":"Strip Path","type":"boolean"},"updated_at":{"title":"Updated At","type":"integer"},"ws_id":{"format":"uuid","title":"Ws Id","type":"string"}},"required":["id","paths","protocols","strip_path","created_at","ws_id","request_buffering","updated_at","preserve_host","regex_priority","response_buffering","https_redirect_status_code","path_handling","service"],"title":"KongAuthorizationInputRoute","type":"object"},"KongAuthorizationInputRouteService":{"properties":{"id":{"format":"uuid","title":"Id","type":"string"}},"required":["id"],"title":"KongAuthorizationInputRouteService","type":"object"},"KongAuthorizationInputService":{"properties":{"connect_timeout":{"title":"Connect Timeout","type":"integer"},"created_at":{"title":"Created At","type":"integer"},"host":{"title":"Host","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"port":{"title":"Port","type":"integer"},"procotol":{"title":"Procotol","type":"string"},"read_timeout":{"title":"Read Timeout","type":"integer"},"retries":{"title":"Retries","type":"integer"},"updated_at":{"title":"Updated At","type":"integer"},"write_timeout":{"title":"Write Timeout","type":"integer"},"ws_id":{"format":"uuid","title":"Ws Id","type":"string"}},"required":["host","created_at","connect_timeout","id","procotol","name","read_timeout","port","updated_at","ws_id","retries","write_timeout"],"title":"KongAuthorizationInputService","type":"object"},"KongAuthorizationQuery":{"description":"the format of is_allowed_kong() input","properties":{"input":{"$ref":"#/components/schemas/KongAuthorizationInput"}},"required":["input"],"title":"KongAuthorizationQuery","type":"object"},"KongAuthorizationResult":{"properties":{"result":{"default":false,"title":"Result","type":"boolean"}},"title":"KongAuthorizationResult","type":"object"},"PolicyStoreAuth":{"description":"An enumeration.","enum":["none","token","oauth","tls"],"title":"PolicyStoreAuth"},"PolicyStoreDetails":{"description":"represents a policy store endpoint - contains the policy store's:\n- location (url)\n- type\n- credentials","properties":{"auth_type":{"allOf":[{"$ref":"#/components/schemas/PolicyStoreAuth"}],"default":"none","description":"the type of authentication is supported for the policy store."},"oauth_client_id":{"description":"optional OAuth client id required by the policy store","title":"Oauth Client Id","type":"string"},"oauth_client_secret":{"description":"optional OAuth client secret required by the policy store","title":"Oauth Client Secret","type":"string"},"oauth_server":{"description":"optional OAuth server required by the policy store","title":"Oauth Server","type":"string"},"token":{"description":"optional access token required by the policy store","title":"Token","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/PolicyStoreTypes"}],"default":"OPA","description":"the type of policy store, currently only OPA is officially supported"},"url":{"description":"the url that OPA can be found in. if localhost is the host - it means OPA is on the same hostname as OPAL client.","title":"Url","type":"string"}},"required":["url"],"title":"PolicyStoreDetails","type":"object"},"PolicyStoreTypes":{"description":"An enumeration.","enum":["OPA","CEDAR","MOCK"],"title":"PolicyStoreTypes"},"Resource":{"properties":{"attributes":{"title":"Attributes","type":"object"},"context":{"title":"Context","type":"object"},"key":{"title":"Key","type":"string"},"tenant":{"title":"Tenant","type":"string"},"type":{"title":"Type","type":"string"}},"required":["type"],"title":"Resource","type":"object"},"ResourceV1":{"deprecated":true,"properties":{"attributes":{"title":"Attributes","type":"object"},"context":{"title":"Context","type":"object"},"id":{"title":"Id","type":"string"},"tenant":{"title":"Tenant","type":"string"},"type":{"title":"Type","type":"string"}},"required":["type"],"title":"ResourceV1","type":"object"},"RoleAssignment":{"description":"The format of a role assignment","example":[{"role":"admin","tenant":"stripe-inc","user":"jane@coolcompany.com"},{"resource_instance":"document:doc-1234","role":"admin","tenant":"stripe-inc","user":"jane@coolcompany.com"}],"properties":{"resource_instance":{"description":"the resource instance the role is associated with","title":"Resource Instance","type":"string"},"role":{"description":"the role that is assigned","title":"Role","type":"string"},"tenant":{"description":"the tenant the role is associated with","title":"Tenant","type":"string"},"user":{"description":"the user the role is assigned to","title":"User","type":"string"}},"required":["user","role","tenant"],"title":"RoleAssignment","type":"object"},"TriggerResponse":{"description":"The result of a forced-reload trigger.","example":{"status":"ok","triggered":true},"properties":{"status":{"default":"ok","description":"Always `ok`. Retained verbatim from the pre-debounce body so SDKs never error-spiral.","enum":["ok"],"title":"Status","type":"string"},"triggered":{"description":"`true` if this call dispatched a reload, `false` if it was coalesced into a recent or in-flight one. `false` is a success - see the endpoint description.","title":"Triggered","type":"boolean"}},"required":["triggered"],"title":"TriggerResponse","type":"object"},"UrlAuthorizationQuery":{"description":"the format of is_allowed_url() input","properties":{"context":{"title":"Context","type":"object"},"http_method":{"title":"Http Method","type":"string"},"sdk":{"title":"Sdk","type":"string"},"tenant":{"title":"Tenant","type":"string"},"url":{"format":"uri","maxLength":65536,"minLength":1,"title":"Url","type":"string"},"user":{"$ref":"#/components/schemas/User"}},"required":["user","http_method","url","tenant"],"title":"UrlAuthorizationQuery","type":"object"},"User":{"properties":{"attributes":{"title":"Attributes","type":"object"},"email":{"title":"Email","type":"string"},"firstName":{"title":"Firstname","type":"string"},"key":{"title":"Key","type":"string"},"lastName":{"title":"Lastname","type":"string"}},"required":["key"],"title":"User","type":"object"},"UserPermissionsQuery":{"properties":{"context":{"title":"Context","type":"object"},"resource_types":{"items":{"type":"string"},"title":"Resource Types","type":"array"},"resources":{"items":{"type":"string"},"title":"Resources","type":"array"},"tenants":{"items":{"type":"string"},"title":"Tenants","type":"array"},"user":{"$ref":"#/components/schemas/User"}},"required":["user"],"title":"UserPermissionsQuery","type":"object"},"UserTenantsQuery":{"properties":{"context":{"title":"Context","type":"object"},"user":{"$ref":"#/components/schemas/User"}},"required":["user"],"title":"UserTenantsQuery","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"_AllTenantsAuthorizationResult":{"properties":{"allow":{"default":false,"title":"Allow","type":"boolean"},"debug":{"title":"Debug","type":"object"},"query":{"title":"Query","type":"object"},"result":{"default":false,"title":"Result","type":"boolean"},"tenant":{"$ref":"#/components/schemas/_TenantDetails"}},"required":["tenant"],"title":"_AllTenantsAuthorizationResult","type":"object"},"_ResourceDetails":{"properties":{"attributes":{"default":{},"title":"Attributes","type":"object"},"key":{"title":"Key","type":"string"},"type":{"title":"Type","type":"string"}},"required":["key","type"],"title":"_ResourceDetails","type":"object"},"_TenantDetails":{"properties":{"attributes":{"default":{},"title":"Attributes","type":"object"},"key":{"title":"Key","type":"string"}},"required":["key"],"title":"_TenantDetails","type":"object"},"_UserPermissionsResult":{"properties":{"permissions":{"items":{"pattern":"^.+:.+$","type":"string"},"pattern":"^.+:.+$","title":"Permissions","type":"array"},"resource":{"$ref":"#/components/schemas/_ResourceDetails"},"roles":{"items":{"type":"string"},"title":"Roles","type":"array"},"tenant":{"$ref":"#/components/schemas/_TenantDetails"}},"title":"_UserPermissionsResult","type":"object"}},"securitySchemes":{"PDP token":{"description":"PDP API key as a bearer token","scheme":"bearer","type":"http"}}},"info":{"description":"The PDP (Policy decision point) container wraps Open Policy Agent (OPA) with a higher-level API intended for fine grained application-level authorization. The PDP automatically handles pulling policy updates in real-time from a centrally managed cloud-service (api.permit.io).","title":"Permit.io PDP","version":"0.2.0"},"openapi":"3.1.0","paths":{"/allowed":{"post":{"operationId":"is_allowed_allowed_post","parameters":[{"in":"header","name":"x-permit-sdk-language","required":false,"schema":{"title":"X-Permit-Sdk-Language","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AuthorizationQuery"},{"$ref":"#/components/schemas/AuthorizationQueryV1"}],"title":"Query"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Is Allowed","tags":["Authorization API"]}},"/allowed/all-tenants":{"post":{"operationId":"is_allowed_all_tenants_allowed_all_tenants_post","parameters":[{"in":"header","name":"x-permit-sdk-language","required":false,"schema":{"title":"X-Permit-Sdk-Language","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllTenantsAuthorizationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Is Allowed All Tenants","tags":["Authorization API"]}},"/allowed/bulk":{"post":{"operationId":"is_allowed_bulk_allowed_bulk_post","parameters":[{"in":"header","name":"x-permit-sdk-language","required":false,"schema":{"title":"X-Permit-Sdk-Language","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AuthorizationQuery"},"title":"Queries","type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAuthorizationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Is Allowed Bulk","tags":["Authorization API"]}},"/allowed_url":{"post":{"operationId":"is_allowed_url_allowed_url_post","parameters":[{"in":"header","name":"x-permit-sdk-language","required":false,"schema":{"title":"X-Permit-Sdk-Language","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlAuthorizationQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Is Allowed Url","tags":["Authorization API"]}},"/authorized_users":{"post":{"operationId":"authorized_users_authorized_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedUsersAuthorizationQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedUsersResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Authorized Users","tags":["Authorization API"]}},"/callbacks":{"get":{"description":"List all the callbacks currently registered by OPAL client.","operationId":"list_callbacks_callbacks_get","parameters":[{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CallbackEntry"},"title":"Response List Callbacks Callbacks Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Callbacks","tags":["Callbacks"]},"post":{"description":"Register a new callback by OPAL client, to be called on OPA state\nupdates.","operationId":"register_callback_callbacks_post","parameters":[{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackEntry"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackEntry"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Register Callback","tags":["Callbacks"]}},"/callbacks/{key}":{"delete":{"description":"Unregisters a callback identified by its key (if such callback is\nindeed registered).","operationId":"get_callback_by_key_callbacks__key__delete","parameters":[{"in":"path","name":"key","required":true,"schema":{"title":"Key","type":"string"}},{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Callback By Key","tags":["Callbacks"]},"get":{"description":"Get a callback by its key (if such callback is indeed\nregistered).","operationId":"get_callback_by_key_callbacks__key__get","parameters":[{"in":"path","name":"key","required":true,"schema":{"title":"Key","type":"string"}},{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackEntry"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Callback By Key","tags":["Callbacks"]}},"/data-updater/trigger":{"post":{"description":"Requests a full reload of base policy data from the control plane. Redundant triggers are coalesced: if a reload is already in flight, or one was dispatched within the debounce window, this call is absorbed into it. Returns 200 either way; `triggered` reports whether this call dispatched a reload (`true`) or was coalesced into another one (`false`).\n\n**`false` is a success, not a failure - do not retry on it.** A coalesced trigger is not dropped: the PDP schedules a follow-up reload that begins *after* your call, within `PDP_TRIGGER_DEBOUNCE_SECONDS` (default 10s). Retrying sooner is coalesced again and only adds load to the control plane.\n\nThis is a best-effort refresh, not a read-your-writes barrier: 200 means the reload was dispatched, not that the new data has been loaded. Use the facts API's `X-Wait-timeout` when you need to block on a specific write.\n\nReturns 503 if the data updater is disabled on this PDP - a configuration state, so retrying will not help. Returns 502 or 504 with a `Retry-After` header if the control plane could not be reached; honour that header rather than retrying immediately.","operationId":"trigger_data_update_data_updater_trigger_post","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}},"description":"Successful Response"},"502":{"description":"The control plane rejected or failed the data-source config request"},"503":{"description":"The data updater is disabled on this PDP"},"504":{"description":"The control plane did not answer the data-source config request in time"}},"security":[{"PDP token":[]}],"summary":"Trigger a full base-data reload","tags":["Data Updater"]}},"/facts/relationship_tuples":{"post":{"operationId":"create_relationship_tuple_facts_relationship_tuples_post","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Create Relationship Tuple","tags":["Local Facts API"]}},"/facts/resource_instances":{"post":{"operationId":"create_resource_instance_facts_resource_instances_post","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Create Resource Instance","tags":["Local Facts API"]}},"/facts/resource_instances/{instance_id}":{"patch":{"operationId":"update_resource_instance_facts_resource_instances__instance_id__patch","parameters":[{"in":"path","name":"instance_id","required":true,"schema":{"title":"Instance Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Update Resource Instance","tags":["Local Facts API"]}},"/facts/role_assignments":{"delete":{"operationId":"delete_role_assignment_facts_role_assignments_delete","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Delete Role Assignment","tags":["Local Facts API"]},"post":{"operationId":"create_role_assignment_facts_role_assignments_post","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Create Role Assignment","tags":["Local Facts API"]}},"/facts/tenants":{"post":{"operationId":"create_tenant_facts_tenants_post","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Create Tenant","tags":["Local Facts API"]}},"/facts/users":{"post":{"operationId":"create_user_facts_users_post","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Create User","tags":["Local Facts API"]}},"/facts/users/{user_id}":{"patch":{"operationId":"update_user_facts_users__user_id__patch","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"title":"User Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Update User","tags":["Local Facts API"]},"put":{"operationId":"sync_user_facts_users__user_id__put","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"title":"User Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Sync User","tags":["Local Facts API"]}},"/facts/users/{user_id}/roles":{"delete":{"operationId":"unassign_user_role_facts_users__user_id__roles_delete","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"title":"User Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Unassign User Role","tags":["Local Facts API"]},"post":{"operationId":"assign_user_role_facts_users__user_id__roles_post","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"title":"User Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Assign User Role","tags":["Local Facts API"]}},"/healthchecks/opa/healthy":{"get":{"operationId":"health_opa_healthcheck_healthchecks_opa_healthy_get","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Proxy healthy healthcheck - OPAL_OPA_HEALTH_CHECK_POLICY_ENABLED must be set to True","tags":["Cloud API Proxy"]}},"/healthchecks/opa/ready":{"get":{"operationId":"ready_opa_healthcheck_healthchecks_opa_ready_get","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Proxy ready healthcheck - OPAL_OPA_HEALTH_CHECK_POLICY_ENABLED must be set to True","tags":["Cloud API Proxy"]}},"/healthchecks/opa/system":{"get":{"operationId":"system_opa_healthcheck_healthchecks_opa_system_get","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Proxy system data - OPAL_OPA_HEALTH_CHECK_POLICY_ENABLED must be set to True","tags":["Cloud API Proxy"]}},"/kong":{"post":{"operationId":"is_allowed_kong_kong_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KongAuthorizationQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KongAuthorizationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Is Allowed Kong","tags":["Authorization API"]}},"/local/role_assignments":{"get":{"description":"Get all role assignments stored in the PDP.\n\nYou can filter the results by providing optional filters.","operationId":"list_role_assignments_local_role_assignments_get","parameters":[{"description":"optional user filter, will only return role assignments granted to this user.","in":"query","name":"user","required":false,"schema":{"description":"optional user filter, will only return role assignments granted to this user.","title":"User","type":"string"}},{"description":"optional role filter, will only return role assignments granting this role.","in":"query","name":"role","required":false,"schema":{"description":"optional role filter, will only return role assignments granting this role.","title":"Role","type":"string"}},{"description":"optional tenant filter, will only return role assignments granted in that tenant.","in":"query","name":"tenant","required":false,"schema":{"description":"optional tenant filter, will only return role assignments granted in that tenant.","title":"Tenant","type":"string"}},{"description":"optional resource **type** filter, will only return role assignments granted on that resource type.","in":"query","name":"resource","required":false,"schema":{"description":"optional resource **type** filter, will only return role assignments granted on that resource type.","title":"Resource","type":"string"}},{"description":"optional resource instance filter, will only return role assignments granted on that resource instance.","in":"query","name":"resource_instance","required":false,"schema":{"description":"optional resource instance filter, will only return role assignments granted on that resource instance.","title":"Resource Instance","type":"string"}},{"description":"The page number (starts from 1).","in":"query","name":"page","required":false,"schema":{"default":1,"description":"The page number (starts from 1).","minimum":1.0,"title":"Page","type":"integer"}},{"description":"The number of results per page (max 100).","in":"query","name":"per_page","required":false,"schema":{"default":30,"description":"The number of results per page (max 100).","maximum":100.0,"minimum":1.0,"title":"Per Page","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RoleAssignment"},"title":"Response List Role Assignments Local Role Assignments Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"List Role Assignments","tags":["Local Queries"]}},"/nginx_allowed":{"post":{"operationId":"is_allowed_nginx_nginx_allowed_post","parameters":[{"in":"header","name":"permit-user-key","required":false,"schema":{"title":"Permit-User-Key","type":"string"}},{"in":"header","name":"permit-tenant-id","required":false,"schema":{"title":"Permit-Tenant-Id","type":"string"}},{"in":"header","name":"permit-action","required":false,"schema":{"title":"Permit-Action","type":"string"}},{"in":"header","name":"permit-resource-type","required":false,"schema":{"title":"Permit-Resource-Type","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Is Allowed Nginx","tags":["Authorization API"]}},"/opal-server/connectivity":{"get":{"description":"Returns the current connectivity state to the OPAL server and whether offline mode is enabled.","operationId":"get_connectivity_status_opal_server_connectivity_get","parameters":[{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectivityStatus"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get OPAL server connectivity status","tags":["OPAL Server Connectivity"]}},"/opal-server/connectivity/disable":{"post":{"description":"Stops the policy and data updaters, disconnecting from the OPAL server. Requires offline mode to be enabled. The policy store continues serving from its current state.","operationId":"disable_connectivity_opal_server_connectivity_disable_post","parameters":[{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectivityActionResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Disable OPAL server connectivity","tags":["OPAL Server Connectivity"]}},"/opal-server/connectivity/enable":{"post":{"description":"Starts the policy and data updaters, reconnecting to the OPAL server. Triggers a full rehydration (policy refetch + data refetch), identical to a reconnect. Requires offline mode to be enabled.","operationId":"enable_connectivity_opal_server_connectivity_enable_post","parameters":[{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectivityActionResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Enable OPAL server connectivity","tags":["OPAL Server Connectivity"]}},"/policy-store/config":{"get":{"deprecated":true,"operationId":"get_policy_store_details_policy_store_config_get","parameters":[{"in":"header","name":"authorization","required":false,"schema":{"title":"Authorization","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyStoreDetails"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Policy Store Details","tags":["Policy Store"]}},"/policy-updater/trigger":{"post":{"description":"Requests a full policy reload from the control plane. Redundant triggers are coalesced: if a reload is already in flight, or one was dispatched within the debounce window, this call is absorbed into it. Returns 200 either way; `triggered` reports whether this call dispatched a reload (`true`) or was coalesced into another one (`false`).\n\n**`false` is a success, not a failure - do not retry on it.** A coalesced trigger is not dropped: the PDP schedules a follow-up reload that begins *after* your call, within `PDP_TRIGGER_DEBOUNCE_SECONDS` (default 10s). Retrying sooner is coalesced again and only adds load to the control plane.\n\nThis is a best-effort refresh, not a read-your-writes barrier: 200 means the reload was dispatched, not that the new policy has been loaded.","operationId":"trigger_policy_update_policy_updater_trigger_post","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}},"description":"Successful Response"}},"security":[{"PDP token":[]}],"summary":"Trigger a full policy reload","tags":["Policy Updater"]}},"/user-permissions":{"post":{"operationId":"Get_User_Permissions_user_permissions_post","parameters":[{"in":"header","name":"x-permit-sdk-language","required":false,"schema":{"title":"X-Permit-Sdk-Language","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionsQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/_UserPermissionsResult"},"title":"Response Get User Permissions User Permissions Post","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Get User Permissions","tags":["Authorization API"]}},"/user-tenants":{"post":{"operationId":"Get_User_Tenants_user_tenants_post","parameters":[{"in":"header","name":"x-permit-sdk-language","required":false,"schema":{"title":"X-Permit-Sdk-Language","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTenantsQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/_TenantDetails"},"title":"Response Get User Tenants User Tenants Post","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"PDP token":[]}],"summary":"Get User Tenants","tags":["Authorization API"]}}},"tags":[{"description":"Authorization queries to OPA. These queries are answered locally by OPA and do not require the cloud service. Latency should be very low (< 20ms per query)","name":"Authorization API"},{"description":"These queries are done locally against the sidecar and do not involve a network round-trip to Permit.io cloud API. Therefore they are safe to use with reasonable performance (i.e: with negligible latency) in the context of a user request.","name":"Local Queries"},{"description":"API to manually trigger and control the local policy caching and refetching.","name":"Policy Updater"},{"description":"These endpoints proxy the Permit.io cloud api, and therefore **incur high-latency**. You should not use the cloud API in the standard request flow of users, i.e in places where the incurred added latency will affect your entire api. A good place to call the cloud API will be in one-time user events such as user registration (i.e: calling sync user, assigning initial user roles, etc.). The sidecar will proxy to the cloud every request prefixed with '/sdk'.","externalDocs":{"description":"The cloud api complete docs are located here:","url":"https://api.permit.io/redoc"},"name":"Cloud API Proxy"}]} \ No newline at end of file diff --git a/openapi/permit-api.json b/openapi/permit-api.json new file mode 100644 index 00000000..542eed47 --- /dev/null +++ b/openapi/permit-api.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"Permit.io API","description":"\nAuthorization as a service\n","version":"2.0.0"},"paths":{"/v2/members/me":{"get":{"tags":["Members"],"summary":"Get the authenticated account member","description":"Gets the authenticated account member's details.","operationId":"get_authenticated_member","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberReadWithGrants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/members":{"get":{"tags":["Members"],"summary":"List Organization Members","description":"Lists all the account members that current active account has access to, optionally filtering by project or environment.\nThe active account/organization is determined by the API Key used or by the authenticated session id.","operationId":"list_organization_members","parameters":[{"required":false,"schema":{"type":"string","format":"uuid","title":"Project Id"},"name":"project_id","in":"query"},{"required":false,"schema":{"type":"string","format":"uuid","title":"Env Id"},"name":"env_id","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgMemberReadWithGrants"},"type":"array","title":"Response List Organization Members V2 Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Members"],"summary":"Invite new members","description":"Create an organization member if needed, and grant it permissions.\n\nThe member can be specified either by ID (for an existing member), or by email (for either an existing member or a new one).\n\nFor a new member, an invite will be sent.","operationId":"create_organization_members","parameters":[{"required":false,"schema":{"type":"string","title":"Inviter Name"},"name":"inviter_name","in":"query"},{"required":false,"schema":{"type":"string","title":"Inviter Email"},"name":"inviter_email","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberReadWithGrants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Members"],"summary":"Remove permission","description":"Remove permissions from a member. If the last permissions a member has are removed, the member is also deleted.","operationId":"delete_organization_permissions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberRemovePermissions"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/members/{member_id}":{"get":{"tags":["Members"],"summary":"Get Organization Member","description":"Gets a single account member by its id or email address. matching the given member,\nif no such member exists under the current active account (organization), returns 404.","operationId":"get_organization_member","parameters":[{"description":"Either the unique id (UUID) of the account member, or the email address of the account member.","required":true,"schema":{"type":"string","title":"Member Id","description":"Either the unique id (UUID) of the account member, or the email address of the account member."},"example":"42f0e113-219b-4bb9-ba90-e2c904761be2","name":"member_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberReadWithGrants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Members"],"summary":"Remove member","description":"Deletes an account member matching the given id or email address.\nThe member will be removed from the active account in permit.io.\n\nIf the member is the only member in its account (organization), returns 400 (bad request),\ndue to nobody remains with access to the account, meaning deletion of the entire account (org).\nTo completely remove an account, call DELETE `/orgs/{org}`.","operationId":"delete_organization_member","parameters":[{"description":"Either the unique id (UUID) of the account member, or the email address of the account member.","required":true,"schema":{"type":"string","title":"Member Id","description":"Either the unique id (UUID) of the account member, or the email address of the account member."},"example":"42f0e113-219b-4bb9-ba90-e2c904761be2","name":"member_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Members"],"summary":"Edit members","description":"Updates an account member's settings.","operationId":"update_organization_member","parameters":[{"description":"Either the unique id (UUID) of the account member, or the email address of the account member.","required":true,"schema":{"type":"string","title":"Member Id","description":"Either the unique id (UUID) of the account member, or the email address of the account member."},"example":"42f0e113-219b-4bb9-ba90-e2c904761be2","name":"member_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberReadWithGrants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key/{proj_id}/{env_id}":{"get":{"tags":["API Keys"],"summary":"Get Environment Api Key","operationId":"get_environment_api_key","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key/scope":{"get":{"tags":["API Keys"],"summary":"Get Api Key Scope","operationId":"get_api_key_scope","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyScopeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key":{"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"Lists all the api_keys under the active organization.","operationId":"list_api_keys","parameters":[{"required":false,"schema":{"$ref":"#/components/schemas/MemberAccessObj"},"name":"object_type","in":"query"},{"description":"Optional project filter by project id or key","required":false,"schema":{"type":"string","title":"Proj Id","description":"Optional project filter by project id or key"},"name":"proj_id","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_APIKeyRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Creates a new api_key under the active organization.","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key/{api_key_id}":{"get":{"tags":["API Keys"],"summary":"Get Api Key","description":"Gets a single api_key matching the given api_key_id, if such api_key exists.","operationId":"get_api_key","parameters":[{"description":"The unique id of the API key","required":true,"schema":{"type":"string","title":"Api Key Id","description":"The unique id of the API key"},"example":"42f0e113-219b-4bb9-ba90-e2c904761ce1","name":"api_key_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Deletes the api_key and all its related data.","operationId":"delete_api_key","parameters":[{"description":"The unique id of the API key","required":true,"schema":{"type":"string","title":"Api Key Id","description":"The unique id of the API key"},"example":"42f0e113-219b-4bb9-ba90-e2c904761ce1","name":"api_key_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/api-key/{api_key_id}/rotate-secret":{"post":{"tags":["API Keys"],"summary":"Rotate API Key","description":"Rotates the API key of the PDP container with id `pdp_id`.\n\nThe rotation of the API key revokes the old API key and issues a new API key to the PDP.","operationId":"rotate_api_key","parameters":[{"description":"The unique id of the API key","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id","description":"The unique id of the API key"},"example":"42f0e113-219b-4bb9-ba90-e2c904761ce1","name":"api_key_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Lists all the organizations that can be accessed by the\nauthenticated actor (i.e: human team member or api key).","operationId":"list_organizations","parameters":[{"description":"Text search for the org name or key or id","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Search","description":"Text search for the org name or key or id"},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationRead"},"type":"array","title":"Response List Organizations V2 Orgs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Organizations"],"summary":"Create Organization","description":"If you want to create org via API, reach out to us and we will add the permission to your API token","operationId":"create_organization","parameters":[{"required":false,"schema":{"type":"string","title":"Page Full Url","default":"page_full_url"},"name":"page_full_url","in":"cookie"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationReadWithAPIKey"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}":{"get":{"tags":["Organizations"],"summary":"Get Organization","description":"Gets a single organization (Permit.io account) matching the given org_id,\nif such org exists and can be accessed by the authenticated actor.","operationId":"get_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Organizations"],"summary":"Delete Organization","description":"Schedules an organization (Permit.io account) for permanent deletion.\n\nEffective immediately, the organization disappears from `GET /v2/orgs`\n(list) and direct lookups (`GET /v2/orgs/{id}`); subsequent `PATCH` and\n`DELETE` calls on it return 404. To preserve recoverability during the\ngrace period, member grants and existing API keys are intentionally\nretained — support can restore the organization until the cutoff is\nreached. After the grace period the organization and all of its data\nare permanently removed.\n\n**Contract change:** This endpoint previously returned `204 No Content`\nwith an empty body and an immediate hard-delete. It now returns\n`202 Accepted` with a JSON body describing when the permanent deletion\nwill occur. Existing clients that branched on `status == 204` need to be\nupdated.\n\nError responses are documented in the OpenAPI ``responses`` block above.","operationId":"delete_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScheduleDeleteResponse"}}}},"404":{"description":"Organization not found, or already scheduled for deletion."},"409":{"description":"Concurrent deletion request detected (race between two callers)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Organizations"],"summary":"Update Organization","description":"Updates the organization's profile.","operationId":"update_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/active/org":{"get":{"tags":["Organizations"],"summary":"Get Active Organization","description":"Gets a single organization (Permit.io account) matching the given org_id,\nif such org exists and can be accessed by the authenticated actor.","operationId":"get_active_organization","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}/restore":{"post":{"tags":["Organizations"],"summary":"Restore Organization","description":"Restores a soft-deleted organization. Superuser-only endpoint.\n\nClears the deleted_at timestamp so the organization becomes visible again.\nUUID-only: slug lookup is not accepted because org keys are only unique\namong active orgs (partial unique index on `key WHERE deleted_at IS NULL`).\nIdempotent: calling restore on an already-active org returns the current row.\nReturns 403 if the caller is not a superuser.\nReturns 404 if no organization with the given id exists.\nReturns 409 if another active org has reused this org's key while it was\nsoft-deleted — the key must be freed before this org can be restored.\nReturns 422 if org_id is not a valid UUID.","operationId":"restore_organization","parameters":[{"description":"Organization UUID (slug not accepted)","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Organization UUID (slug not accepted)"},"name":"org_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"403":{"description":"Superuser access required"},"404":{"description":"Organization not found"},"409":{"description":"An active organization with the same key already exists; the key must be freed before this org can be restored."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}/stats":{"get":{"tags":["Organizations"],"summary":"Stats Organization","operationId":"stats_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/data-export":{"post":{"tags":["Data Export"],"summary":"Start an export of your organization's data","description":"Start a background export of **your** organization's data and return a\ntask id. Poll `GET /v2/data-export/{task_id}` until it succeeds to get a\nshort-lived download URL for the `permit-org-export--.tar.gz`\n(one `data/.csv` per table + `manifest.json`).\n\nRequires an Organization API key with ADMIN access; write/read-only keys are\nrejected. The organization is taken from the key, so this only ever exports\nyour own organization. The archive contains your plaintext API-key secrets\n(so a self-hosted import keeps working without re-issuing keys) — treat the\ndownload URL and the file as credentials.","operationId":"start_organization_export","responses":{"202":{"description":"Export job accepted; poll the result endpoint with the task id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResult_OrgExportResult_"}}}},"403":{"description":"The API key lacks ADMIN access to the organization — the archive contains every plaintext API-key secret, so a write/read-only key is rejected (same gate as GET /v2/api-key/{id})"},"503":{"description":"Export storage is not configured — try again later"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/data-export/{task_id}":{"get":{"tags":["Data Export"],"summary":"Get the status / download URL of an export","description":"Poll an export started by `POST /v2/data-export`. While it runs the\nstatus is `processing`; on `success` the `result` carries a short-lived\npresigned `download_url`; on `failure` the `error` explains why (e.g. the\norg is too large for the self-service export). Only exports of your own\norganization are visible.","operationId":"get_organization_export","parameters":[{"description":"The export task id from the POST response","required":true,"schema":{"type":"string","title":"Task Id","description":"The export task id from the POST response"},"name":"task_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResult_OrgExportResult_"}}}},"403":{"description":"The API key lacks ADMIN access to the organization — the archive contains every plaintext API-key secret, so a write/read-only key is rejected (same gate as GET /v2/api-key/{id})"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}/invites":{"get":{"tags":["Invites"],"summary":"List Organization Invites","description":"Lists pending organization invites","operationId":"list_organization_invites","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InviteRead"},"type":"array","title":"Response List Organization Invites V2 Orgs Org Id Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Invites"],"summary":"Invite Members To Organization","description":"Invite new members into the organization.","operationId":"invite_members_to_organization","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"required":false,"schema":{"type":"string","title":"Inviter Name"},"name":"inviter_name","in":"query"},{"required":false,"schema":{"type":"string","title":"Inviter Email"},"name":"inviter_email","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InviteCreate"},"type":"array","title":"Invites"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiInviteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/orgs/{org_id}/invites/{invite_id}":{"delete":{"tags":["Invites"],"summary":"Cancel Invite","description":"Cancels an invite that was sent to a new member.","operationId":"cancel_invite","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Id of the invite to cancel","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id","description":"Id of the invite to cancel"},"name":"invite_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects":{"get":{"tags":["Projects"],"summary":"List Projects","description":"Lists all the projects under the active organization.","operationId":"list_projects","parameters":[{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectRead"},"type":"array","title":"Response List Projects V2 Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Projects"],"summary":"Create Project","description":"Creates a new project under the active organization.","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}":{"get":{"tags":["Projects"],"summary":"Get Project","description":"Gets a single project matching the given proj_id, if such project exists.","operationId":"get_project","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Projects"],"summary":"Delete Project","description":"Deletes the project and all its related data.","operationId":"delete_project","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Projects"],"summary":"Update Project","description":"Updates the project.","operationId":"update_project","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}/stats":{"get":{"tags":["Environments"],"summary":"Stats Environments","operationId":"stats_environments","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs":{"get":{"tags":["Environments"],"summary":"List Environments","description":"Lists all the environments under a given project.","operationId":"list_environments","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnvironmentReadWithEmailConfig"},"type":"array","title":"Response List Environments V2 Projects Proj Id Envs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Environments"],"summary":"Create Environment","description":"Creates a new environment under a given project.","operationId":"create_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}":{"get":{"tags":["Environments"],"summary":"Get Environment","description":"Gets a single environment matching the given env_id, if such environment exists.","operationId":"get_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentReadWithEmailConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Environments"],"summary":"Delete Environment","description":"Deletes an environment and all its related data.","operationId":"delete_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Environments"],"summary":"Update Environment","description":"Updates the environment.","operationId":"update_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}/copy":{"post":{"tags":["Environments"],"summary":"Copy Environment","description":"Copy environment\n\nThis endpoint either duplicates an existing environment to a new environment\nin the same project, or copies from an existing environment to another\nexisting environment.\n\nThe `scope` object controls which objects will be copied to the target\nenvironment.\n\nTo clone to a new environment, the user must have write permissions\nto the containing project. To clone into an existing environment,\nthe user must have write permissions to the target environment.\n\nCopying environments across projects or organizations is not\nallowed.","operationId":"copy_environment","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCopy"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}/copy/async":{"post":{"tags":["Environments"],"summary":"Copy Environment Async","description":"Copy environment\n\nThis endpoint either duplicates an existing environment to a new environment\nin the same project, or copies from an existing environment to another\nexisting environment.\n\nThe `scope` object controls which objects will be copied to the target\nenvironment.\n\nTo clone to a new environment, the user must have write permissions\nto the containing project. To clone into an existing environment,\nthe user must have write permissions to the target environment.\n\nCopying environments across projects or organizations is not\nallowed.","operationId":"copy_environment_async","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","required":false,"schema":{"type":"number","title":"Wait","description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","default":0,"lte":60},"name":"wait","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCopy"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResult_EnvironmentRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result":{"get":{"tags":["Environments"],"summary":"Get Copy Environment Task Result","description":"Get the result of a copy environment task.","operationId":"get_copy_environment_async_result","parameters":[{"description":"The unique id of the task.","required":true,"schema":{"type":"string","title":"Task Id","description":"The unique id of the task."},"name":"task_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","required":false,"schema":{"type":"number","title":"Wait","description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","default":0,"lte":60},"name":"wait","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResult_EnvironmentRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/envs/{env_id}/test_jwks":{"post":{"tags":["Environments"],"summary":"Test Jwks By Url","description":"Test Jwks Url.","operationId":"test_jwks_by_url","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"URL of JWKs to test","required":false,"schema":{"type":"string","title":"Url","description":"URL of JWKs to test"},"name":"url","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Test Jwks By Url V2 Projects Proj Id Envs Env Id Test Jwks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/bulk/roles":{"put":{"tags":["Bulk Operations"],"summary":"Bulk Create Or Replace Roles","description":"Create or replace roles in bulk.","operationId":"bulk_create_or_replace_roles","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreateBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreateBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/condition_sets":{"get":{"tags":["Condition Sets"],"summary":"List Condition Sets","description":"Lists all condition sets matching a filter.","operationId":"list_condition_sets","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the condition sets name or key","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the condition sets name or key"},"name":"search","in":"query"},{"description":"if provided, will return only the condition sets of the specified type. e.g: only user sets.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"if provided, will return only the condition sets of the specified type. e.g: only user sets."},"name":"type","in":"query"},{"description":"Include total count in response","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"Include total count in response","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaginatedResult_ConditionSetRead_"},{"items":{"$ref":"#/components/schemas/ConditionSetRead"},"type":"array"}],"title":"Response List Condition Sets V2 Schema Proj Id Env Id Condition Sets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Condition Sets"],"summary":"Create Condition Set","description":"Creates a new condition set (can be either a user set or a resource set).","operationId":"create_condition_set","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}":{"get":{"tags":["Condition Sets"],"summary":"Get Condition Set","description":"Gets a single condition set, if such condition set exists.","operationId":"get_condition_set","parameters":[{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Condition Set Id","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Condition Sets"],"summary":"Delete Condition Set","description":"Deletes a condition set and all its related data.\nThis includes any permissions granted to said condition set (i.e: any matching condition set users_with_role).","operationId":"delete_condition_set","parameters":[{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Condition Set Id","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Condition Sets"],"summary":"Update Condition Set","description":"Partially updates a condition set.\nFields that will be provided will be completely overwritten.","operationId":"update_condition_set","parameters":[{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Condition Set Id","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/ancestors":{"get":{"tags":["Condition Sets"],"summary":"Get Condition Set Ancestors","description":"Gets all ancestors (parent, parent of parent, and so on)","operationId":"get_condition_set_ancestors","parameters":[{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Condition Set Id","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConditionSetRead"},"type":"array","title":"Response Get Condition Set Ancestors V2 Schema Proj Id Env Id Condition Sets Condition Set Id Ancestors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/descendants":{"get":{"tags":["Condition Sets"],"summary":"Get Condition Set Descendants","description":"Gets all descendants (children, children of children, and so on)","operationId":"get_condition_set_descendants","parameters":[{"description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Condition Set Id","description":"Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\")."},"name":"condition_set_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConditionSetRead"},"type":"array","title":"Response Get Condition Set Descendants V2 Schema Proj Id Env Id Condition Sets Condition Set Id Descendants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants":{"post":{"tags":["Implicit Grants"],"summary":"Create Implicit Grant","description":"Creates an implicit grant on a given role","operationId":"create_implicit_grant","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DerivedRoleRuleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DerivedRoleRuleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Implicit Grants"],"summary":"Delete Implicit Grant","description":"Deletes an implicit grant on a given role","operationId":"delete_implicit_grant","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DerivedRoleRuleDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions":{"put":{"tags":["Implicit Grants"],"summary":"Update Implicit Grants Conditions","description":"Update the `when` for implicit grants on a given role","operationId":"update_implicit_grants_conditions","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups":{"get":{"tags":["Resource Action Groups"],"summary":"List Resource Action Groups","description":"Lists all the action groups defined on the resource.","operationId":"list_resource_action_groups","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceActionGroupRead"},"type":"array","title":"Response List Resource Action Groups V2 Schema Proj Id Env Id Resources Resource Id Action Groups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Action Groups"],"summary":"Create Resource Action Group","description":"Creates a new action group that can affect the resource.","operationId":"create_resource_action_group","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionGroupCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionGroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}":{"get":{"tags":["Resource Action Groups"],"summary":"Get Resource Action Group","description":"Gets a single action group defined on the resource, if such action exists.","operationId":"get_resource_action_group","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Action Group Id","description":"Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\")."},"example":"my_action_group","name":"action_group_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionGroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Action Groups"],"summary":"Delete Resource Action Group","description":"Deletes the action and all its related data.\nThis includes any permissions granted to perform the action.","operationId":"delete_resource_action_group","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Action Group Id","description":"Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\")."},"example":"my_action_group","name":"action_group_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Action Groups"],"summary":"Update Resource Action Group","description":"Partially updates the action defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_action_group","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Action Group Id","description":"Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\")."},"example":"my_action_group","name":"action_group_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionGroupUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionGroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions":{"get":{"tags":["Resource Actions"],"summary":"List Resource Actions","description":"Lists all the actions defined on the resource.","operationId":"list_resource_actions","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceActionRead"},"type":"array","title":"Response List Resource Actions V2 Schema Proj Id Env Id Resources Resource Id Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Actions"],"summary":"Create Resource Action","description":"Creates a new action that can affect the resource.","operationId":"create_resource_action","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}":{"get":{"tags":["Resource Actions"],"summary":"Get Resource Action","description":"Gets a single action defined on the resource, if such action exists.","operationId":"get_resource_action","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Action Id","description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\")."},"name":"action_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Actions"],"summary":"Delete Resource Action","description":"Deletes the action and all its related data.\nThis includes any permissions granted to perform the action.","operationId":"delete_resource_action","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Action Id","description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\")."},"name":"action_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Actions"],"summary":"Update Resource Action","description":"Partially updates the action defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_action","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Action Id","description":"Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\")."},"name":"action_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes":{"get":{"tags":["Resource Attributes"],"summary":"List Resource Attributes","description":"Lists all the attributes defined on the resource.","operationId":"list_resource_attributes","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceAttributeRead"},"type":"array","title":"Response List Resource Attributes V2 Schema Proj Id Env Id Resources Resource Id Attributes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Attributes"],"summary":"Create Resource Attribute","description":"Creates a new attribute as part of the resource definition.","operationId":"create_resource_attribute","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}":{"get":{"tags":["Resource Attributes"],"summary":"Get Resource Attribute","description":"Gets a single attribute defined on the resource, if such attribute exists.","operationId":"get_resource_attribute","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Attribute Id","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Attributes"],"summary":"Delete Resource Attribute","description":"Deletes the attribute and all its related data.\n\nNote: If the attribute is used by policies, removing it will cause the\nattribute to evaluate as `undefined`.","operationId":"delete_resource_attribute","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Attribute Id","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Attributes"],"summary":"Update Resource Attribute","description":"Partially updates the attribute defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_attribute","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Attribute Id","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations":{"get":{"tags":["Resource Relations"],"summary":"List Resource Relations","description":"List relations on a given resource","operationId":"list_resource_relations","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_RelationRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Relations"],"summary":"Create Resource Relation","description":"Creates a resource relation to another resource","operationId":"create_resource_relation","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}":{"get":{"tags":["Resource Relations"],"summary":"Get Resource Relation","description":"Get a resource relation","operationId":"get_resource_relation","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Relation Id","description":"Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\")."},"name":"relation_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Relations"],"summary":"Delete Resource Relation","description":"Deletes a resource relation","operationId":"delete_resource_relation","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Relation Id","description":"Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\")."},"name":"relation_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles":{"get":{"tags":["Resource Roles"],"summary":"List Resource Roles","description":"Lists all the roles defined on the resource.","operationId":"list_resource_roles","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceRoleRead"},"type":"array","title":"Response List Resource Roles V2 Schema Proj Id Env Id Resources Resource Id Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Roles"],"summary":"Create Resource Role","description":"Creates a new role associated with the resource.","operationId":"create_resource_role","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}":{"get":{"tags":["Resource Roles"],"summary":"Get Resource Role","description":"Gets a single role defined on the resource, if such role exists.","operationId":"get_resource_role","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Roles"],"summary":"Delete Resource Role","description":"Deletes the role and all its related data.\nThis includes any permissions granted to said role.","operationId":"delete_resource_role","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Roles"],"summary":"Update Resource Role","description":"Partially updates the role defined on a resource.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_role","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions":{"post":{"tags":["Resource Roles"],"summary":"Assign Permissions to Role","description":"Assign permissions to role.\n\nIf some of the permissions specified are already assigned, will skip them.","operationId":"assign_permissions_to_resource_role","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Roles"],"summary":"Remove Permissions from Role","description":"Remove permissions from role.\n\nIf some of the permissions specified are already unassigned, will skip them.","operationId":"remove_permissions_from_resource_role","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/ancestors":{"get":{"tags":["Resource Roles"],"summary":"Get Resource Role Ancestors","operationId":"get_resource_role_ancestors","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/descendants":{"get":{"tags":["Resource Roles"],"summary":"Get Resource Role Descendants","operationId":"get_resource_role_descendants","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRoleList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources":{"get":{"tags":["Resources"],"summary":"List Resources","description":"Lists all the resources defined in your schema.","operationId":"list_resources","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Whether to include or exclude built-in resources, default is False","required":false,"schema":{"type":"boolean","title":"Include Built In","description":"Whether to include or exclude built-in resources, default is False","default":false},"name":"include_built_in","in":"query"},{"description":"Include total count in response","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"Include total count in response","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"Text search for the object name or key","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the object name or key"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaginatedResult_ResourceRead_"},{"items":{"$ref":"#/components/schemas/ResourceRead"},"type":"array"}],"title":"Response List Resources V2 Schema Proj Id Env Id Resources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resources"],"summary":"Create Resource","description":"Creates a new resource (a type of object you may protect with permissions).","operationId":"create_resource","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/resources/{resource_id}":{"get":{"tags":["Resources"],"summary":"Get Resource","description":"Gets a single resource, if such resource exists.","operationId":"get_resource","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Resources"],"summary":"Replace Resource","description":"Replaces the resource definition, or creates it if it doesn't exist.\n\n- If some actions are removed or renamed from the resource definition,\nrole and permissions assignments for these actions will be revoked.","operationId":"replace_resource","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceReplace"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resources"],"summary":"Delete Resource","description":"Deletes the resource and all its related data.","operationId":"delete_resource","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resources"],"summary":"Update Resource","description":"Partially updates the resource definition.\nFields that will be provided will be completely overwritten.","operationId":"update_resource","parameters":[{"description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Resource Id","description":"Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\")."},"example":"my_resource","name":"resource_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles":{"get":{"tags":["Roles"],"summary":"List Roles","description":"Lists all tenant roles.","operationId":"list_roles","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Include total count in response","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"Include total count in response","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"Text search for the object name or key","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the object name or key"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaginatedResult_RoleRead_"},{"items":{"$ref":"#/components/schemas/RoleRead"},"type":"array"}],"title":"Response List Roles V2 Schema Proj Id Env Id Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Roles"],"summary":"Create Role","description":"Creates a new tenant role.","operationId":"create_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}":{"get":{"tags":["Roles"],"summary":"Get Role","description":"Gets a single tenant role, if such role exists.","operationId":"get_role","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Roles"],"summary":"Delete Role","description":"Deletes a tenant role and all its related data.\nThis includes any permissions granted to said role.","operationId":"delete_role","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Roles"],"summary":"Update Role","description":"Partially updates a tenant role.\nFields that will be provided will be completely overwritten.","operationId":"update_role","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions":{"post":{"tags":["Roles"],"summary":"Assign Permissions To Role","description":"Assign permissions to role.\n\nIf some of the permissions specified are already assigned, will skip them.","operationId":"assign_permissions_to_role","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Roles"],"summary":"Remove Permissions From Role","description":"Remove permissions from role.\n\nIf some of the permissions specified are already unassigned, will skip them.","operationId":"remove_permissions_from_role","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveRolePermissions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}/ancestors":{"get":{"tags":["Roles"],"summary":"Get Role Ancestors","operationId":"get_role_ancestors","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/roles/{role_id}/descendants":{"get":{"tags":["Roles"],"summary":"Get Role Descendants","operationId":"get_role_descendants","parameters":[{"description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Role Id","description":"Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\")."},"name":"role_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/users/attributes":{"get":{"tags":["User Attributes"],"summary":"List User Attributes","description":"Lists all the attributes defined on the User resource.","operationId":"list_user_attributes","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"required":false,"schema":{"type":"string","title":"Resource Id","default":"__user"},"name":"resource_id","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceAttributeRead"},"type":"array","title":"Response List User Attributes V2 Schema Proj Id Env Id Users Attributes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["User Attributes"],"summary":"Create User Attribute","description":"Creates a new attribute for the User resource.","operationId":"create_user_attribute","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"required":false,"schema":{"type":"string","title":"Resource Id","default":"__user"},"name":"resource_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}":{"get":{"tags":["User Attributes"],"summary":"Get User Attribute","description":"Gets a single attribute defined on the User resource, if such attribute exists.","operationId":"get_user_attribute","parameters":[{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Attribute Id","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"required":false,"schema":{"type":"string","title":"Resource Id","default":"__user"},"name":"resource_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["User Attributes"],"summary":"Delete User Attribute","description":"Deletes the attribute and all its related data.\n\nNote: If the attribute is used by policies, removing it will cause the\nattribute to evaluate as `undefined`.","operationId":"delete_user_attribute","parameters":[{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Attribute Id","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"required":false,"schema":{"type":"string","title":"Resource Id","default":"__user"},"name":"resource_id","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["User Attributes"],"summary":"Update User Attribute","description":"Partially updates the attribute defined on the User resource.\nFields that will be provided will be completely overwritten.","operationId":"update_user_attribute","parameters":[{"description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Attribute Id","description":"Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\")."},"name":"attribute_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"required":false,"schema":{"type":"string","title":"Resource Id","default":"__user"},"name":"resource_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceAttributeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/direct":{"get":{"tags":["Groups"],"summary":"List Direct Group","description":"Paginated list of groups with various filters.","operationId":"list_direct_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The tenant key or id to filter by","required":false,"schema":{"type":"string","title":"Tenant","description":"The tenant key or id to filter by"},"name":"tenant","in":"query"},{"description":"The resource key or id to filter by","required":false,"schema":{"type":"string","title":"Resource","description":"The resource key or id to filter by"},"name":"resource","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"Text search for the object name or key","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the object name or key"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_GroupReadSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}":{"get":{"tags":["Groups"],"summary":"Get Direct Group","description":"Retrieve a specific group by its instance key.","operationId":"get_direct_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupReadSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/children":{"get":{"tags":["Groups"],"summary":"List group children (EAP)","description":"List group children of a specific group.","operationId":"list_group_children","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_GroupReadSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/parents":{"get":{"tags":["Groups"],"summary":"List group parents (EAP)","description":"List group parents of a specific group.","operationId":"list_group_parents","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_GroupReadSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users":{"get":{"tags":["Groups"],"summary":"List group users (EAP)","description":"Paginated list of all users in a group.","operationId":"list_group_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_GroupUserReadSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles":{"get":{"tags":["Groups"],"summary":"List group roles (EAP)","description":"Paginated list of all roles assigned to a group.","operationId":"list_group_roles","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_GroupRoleReadSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Groups"],"summary":"Assign Role To Group","description":"Assign a role to a group -\nIt will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role.","operationId":"assign_role_to_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAddRole"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Groups"],"summary":"Remove Role From Group","description":"Remove a role from a group-\nIt will remove the derivation from the member role to this role.","operationId":"remove_role_from_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAddRole"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}":{"get":{"tags":["Groups"],"summary":"Get Group","description":"Retrieve a specific group by its instance key.","operationId":"get_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Groups"],"summary":"Delete Group","description":"Delete a group by its instance key.","operationId":"delete_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups":{"get":{"tags":["Groups"],"summary":"List Group","description":"List all groups.","operationId":"list_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The tenant key or id to filter by","required":false,"schema":{"type":"string","title":"Tenant","description":"The tenant key or id to filter by"},"name":"tenant","in":"query"},{"description":"The resource key or id to filter by","required":false,"schema":{"type":"string","title":"Resource","description":"The resource key or id to filter by"},"name":"resource","in":"query"},{"description":"Include total count in response(will make the request slower)","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"Include total count in response(will make the request slower)","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"Text search for the object name or key","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the object name or key"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GroupRead"},"type":"array","title":"Response List Group V2 Schema Proj Id Env Id Groups Get","description":"List of Groups"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]},"post":{"tags":["Groups"],"summary":"Create Group","description":"Create a new group.","operationId":"create_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}":{"put":{"tags":["Groups"],"summary":"Assign User To Group","description":"Assign a user to a group -\nThis user will inherit the group's roles.","operationId":"assign_user_to_group","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAssignUser"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Groups"],"summary":"Remove User From Group","description":"Remove a user from a group-\nThis user will be removed from the member role of the group, and will no longer inherit the group's roles.","operationId":"remove_user_from_group","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAssignUser"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group":{"put":{"tags":["Groups"],"summary":"Assign Group To Group","description":"Assign a group to a group -\nThis group will inherit the group's roles.","operationId":"assign_group_to_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAssignment"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Groups"],"summary":"Remove Group From Group","description":"Remove a group from a group-\nThis group will be removed from the member role of the group, and will no longer inherit the group's roles.","operationId":"remove_group_from_group","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."},"example":"my_instance_group","name":"group_instance_key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAssignment"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/users":{"get":{"tags":["Users"],"summary":"List Users","description":"Lists all the users defined within an environment.","operationId":"list_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the user","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the user"},"name":"search","in":"query"},{"description":"The search operator to use. `contains` performs a substring match on email, key, first_name, and last_name. `startswith` performs a prefix match on email, key, first_name, and last_name.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/SearchOperator"}],"description":"The search operator to use. `contains` performs a substring match on email, key, first_name, and last_name. `startswith` performs a prefix match on email, key, first_name, and last_name.","default":"contains"},"name":"search_operator","in":"query"},{"description":"Match users with a specific role. To filter users without any roles, send an empty string.","required":false,"schema":{"type":"string","title":"Role","description":"Match users with a specific role. To filter users without any roles, send an empty string."},"name":"role","in":"query"},{"description":"Should add resource instance roles","required":false,"schema":{"type":"boolean","title":"Include Resource Instance Roles","description":"Should add resource instance roles","default":false},"name":"include_resource_instance_roles","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_UserRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Users"],"summary":"Create User","description":"Creates a new user inside the Permit.io system, from that point forward\nyou may run permission checks on that user.\n\nReturns 201 if the user is created, 409 if the user already exists or if an inline role\nassignment names a tenant other than the one its resource instance already exists in.\nUser is identified by its key, and you can only create one user with the same key inside a Permit environment.","operationId":"create_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/users/{user_id}":{"get":{"tags":["Users"],"summary":"Get User","description":"Gets a user, if such user exists. Otherwise returns 404.","operationId":"get_user","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Users"],"summary":"Replace User","description":"Replace User / Sync User upsert a user in the system.\nIf the user already exists, it will update the user with the new data.\nIf the user does not exist, it will create a new user with the provided data.\n\nThe user is identified by its key, and you can only create one user with the same key inside a Permit environment.\nA 200 status code will be returned if the user already exists, and a 201 status code will be returned if the user is created.","operationId":"replace_user","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"An existing user was replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"201":{"description":"An new user was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"409":{"description":"An inline role assignment names a tenant other than the one its resource instance already exists in; nothing is written"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Users"],"summary":"Delete User","description":"Deletes the user and all its related data.","operationId":"delete_user","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Users"],"summary":"Update User","description":"Partially updates the user definition.\nFields that will be provided will be completely overwritten.","operationId":"update_user","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/users/{user_id}/roles":{"post":{"tags":["Users"],"summary":"Assign Role To User","description":"Assigns a role to the user within the tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.","operationId":"assign_role_to_user","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Users"],"summary":"Unassign Role From User","description":"Unassigns the role from the user within the tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.\n\nIf the role is not actually assigned, will return 404.","operationId":"unassign_role_from_user","parameters":[{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Return Deleted","description":"Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true","default":false},"name":"return_deleted","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleRemove"}}},"required":true},"responses":{"200":{"description":"Role assignment removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"204":{"description":"Role assignment removed successfully"},"404":{"description":"Role assignment not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users":{"get":{"tags":["Tenants"],"summary":"List Tenant Users","operationId":"list_tenant_users","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Match users with a specific role","required":false,"schema":{"type":"string","title":"Role","description":"Match users with a specific role"},"name":"role","in":"query"},{"description":"Should add resource instance roles","required":false,"schema":{"type":"boolean","title":"Include Resource Instance Roles","description":"Should add resource instance roles","default":false},"name":"include_resource_instance_roles","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_UserRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Tenants"],"summary":"Add User To Tenant","description":"Create and add user to a tenant.","operationId":"add_user_to_tenant","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants":{"get":{"tags":["Tenants"],"summary":"List Tenants","description":"Lists all the tenants defined within an env.","operationId":"list_tenants","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the tenant name or key","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the tenant name or key"},"name":"search","in":"query"},{"description":"Include total count in response","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"Include total count in response","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaginatedResult_TenantRead_"},{"items":{"$ref":"#/components/schemas/TenantRead"},"type":"array"}],"title":"Response List Tenants V2 Facts Proj Id Env Id Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Tenants"],"summary":"Create Tenant","description":"Creates a new tenant inside the Permit.io system.\n\nIf the tenant is already created: will return 200 instead of 201,\nand will return the existing tenant object in the response body.","operationId":"create_tenant","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}":{"get":{"tags":["Tenants"],"summary":"Get Tenant","description":"Gets a tenant, if such tenant exists. Otherwise returns 404.","operationId":"get_tenant","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Tenants"],"summary":"Delete Tenant","description":"Deletes the tenant and all its related data.","operationId":"delete_tenant","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Tenants"],"summary":"Update Tenant","description":"Partially updates the tenant definition.\nFields that will be provided will be completely overwritten.","operationId":"update_tenant","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}":{"delete":{"tags":["Tenants"],"summary":"Delete Tenant User","description":"Deletes a user under a tenant.","operationId":"delete_tenant_user","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/role_assignments/detailed":{"get":{"tags":["Role Assignments"],"summary":"List Role Assignments Detailed","description":"Lists the role assignments defined within an environment.\n\n- If the `user` filter is present, will only return the role assignments of that user (supports multiple).\n- If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple).\n- If the `role` filter is present, will only return role assignments that are granting that role (supports multiple).\n- If the `resource` filter is present, will only return role assignments for resource instances of that resource type.\n- If the `resource_instance` filter is present, will only return role assignments for that resource instance.\n\nProviding both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant.\nIf multiple tenants are received, the last tenant will be compared with the resource instance.","operationId":"list_role_assignments_detailed","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"User","description":"optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each."},"name":"user","in":"query"},{"description":"optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Role","description":"optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each."},"name":"role","in":"query"},{"description":"optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Tenant","description":"optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`."},"name":"tenant","in":"query"},{"description":"optional resource **type** filter, will only return role assignments granted on that resource type.","required":false,"schema":{"type":"string","title":"Resource","description":"optional resource **type** filter, will only return role assignments granted on that resource type."},"name":"resource","in":"query"},{"description":"optional resource instance filter, will only return role assignments granted on that resource instance.","required":false,"schema":{"type":"string","title":"Resource Instance","description":"optional resource instance filter, will only return role assignments granted on that resource instance."},"name":"resource_instance","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 1000).","required":false,"schema":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 1000).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_RoleAssignmentDetailedRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/role_assignments":{"get":{"tags":["Role Assignments"],"summary":"List Role Assignments","description":"Lists the role assignments defined within an environment.\n\n- If the `user` filter is present, will only return the role assignments of that user (supports multiple).\n- If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple).\n- If the `role` filter is present, will only return role assignments that are granting that role (supports multiple).\n- If the `resource` filter is present, will only return role assignments for resource instances of that resource type.\n- If the `resource_instance` filter is present, will only return role assignments for that resource instance.\n\nProviding both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant.\nIf multiple tenants are received, the last tenant will be compared with the resource instance.","operationId":"list_role_assignments","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"User","description":"optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each."},"name":"user","in":"query"},{"description":"optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Role","description":"optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each."},"name":"role","in":"query"},{"description":"optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Tenant","description":"optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`."},"name":"tenant","in":"query"},{"description":"optional resource **type** filter, will only return role assignments granted on that resource type.","required":false,"schema":{"type":"string","title":"Resource","description":"optional resource **type** filter, will only return role assignments granted on that resource type."},"name":"resource","in":"query"},{"description":"optional resource instance filter, will only return role assignments granted on that resource instance.","required":false,"schema":{"type":"string","title":"Resource Instance","description":"optional resource instance filter, will only return role assignments granted on that resource instance."},"name":"resource_instance","in":"query"},{"description":"Whether to return full details about the user, tenant and role","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Detailed","description":"Whether to return full details about the user, tenant and role","default":false},"name":"detailed","in":"query"},{"description":"If true, returns the list of role assignments and the total count.","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"If true, returns the list of role assignments and the total count.","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 1000).","required":false,"schema":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 1000).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/RoleAssignmentRead"},"type":"array"},{"$ref":"#/components/schemas/PaginatedResult_RoleAssignmentRead_"},{"items":{"$ref":"#/components/schemas/RoleAssignmentDetailedRead"},"type":"array"},{"$ref":"#/components/schemas/PaginatedResult_RoleAssignmentDetailedRead_"}],"title":"Response List Role Assignments V2 Facts Proj Id Env Id Role Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Role Assignments"],"summary":"Assign Role","description":"Assigns a role to a user within a tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.","operationId":"assign_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"409":{"description":"Conflict - including a request whose tenant differs from the tenant the named resource instance already exists in."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Role Assignments"],"summary":"Unassign Role","description":"Unassigns a user role within a tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.\n\nIf the role is not actually assigned, will return 404.","operationId":"unassign_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Return Deleted","description":"Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true","default":false},"name":"return_deleted","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRemove"}}},"required":true},"responses":{"200":{"description":"Role assignment removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"204":{"description":"Role assignment removed successfully"},"404":{"description":"Role assignment not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/role_assignments/bulk":{"post":{"tags":["Role Assignments","Bulk Operations"],"summary":"Bulk create role assignments","operationId":"bulk_assign_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Policy for missing users - 'fail': Fail the entire operation if a user is missing; 'ignore': Skip assignments for missing users; 'create': Create missing users and continue with the operation","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/MissingUserPolicy"}],"description":"Policy for missing users - 'fail': Fail the entire operation if a user is missing; 'ignore': Skip assignments for missing users; 'create': Create missing users and continue with the operation","default":"fail"},"name":"missing_user_policy","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RoleAssignmentCreate"},"type":"array","title":"Role Assignments In"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRoleAssignmentReport"}}}},"409":{"description":"Conflict - including a request whose tenant differs from the tenant the named resource instance already exists in. The whole batch is rejected and nothing is created."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Role Assignments","Bulk Operations"],"summary":"Bulk Unassign Role","operationId":"bulk_unassign_role","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RoleAssignmentRemove"},"type":"array","title":"Role Assignment In"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRoleUnAssignmentReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/set_rules":{"get":{"tags":["Condition Set Rules"],"summary":"List Set Permissions","description":"Lists the condition set rules matching the filter.\n- If the `user_set` filter is present, will only return the permissions set of that user set.\n- If the `permission` filter is present, will only return the permissions sets that equals to the queried permission.\n- If the `resource_set` filter is present, will only return the permissions set of that resource set.","operationId":"list_set_permissions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"optional user set filter, will only return rules where the permission is granted to this user set","required":false,"schema":{"type":"string","title":"User Set","description":"optional user set filter, will only return rules where the permission is granted to this user set"},"name":"user_set","in":"query"},{"description":"optional permission filter, will only return condition set rules granting this permission","required":false,"schema":{"type":"string","title":"Permission","description":"optional permission filter, will only return condition set rules granting this permission"},"name":"permission","in":"query"},{"description":"optional resource set filter, will only return rules where the permission is granted on this resource set","required":false,"schema":{"type":"string","title":"Resource Set","description":"optional resource set filter, will only return rules where the permission is granted on this resource set"},"name":"resource_set","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConditionSetRuleRead"},"type":"array","title":"Response List Set Permissions V2 Facts Proj Id Env Id Set Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Condition Set Rules"],"summary":"Assign Set Permissions","description":"Grant permissions to a user set *on* a resource set.\n\nIf the permission is already granted, it is skipped.","operationId":"assign_set_permissions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRuleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConditionSetRuleRead"},"type":"array","title":"Response Assign Set Permissions V2 Facts Proj Id Env Id Set Rules Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Condition Set Rules"],"summary":"Unassign Set Permissions","description":"Revokes permissions to a user set *on* a resource set.\n\nIf the permission is not granted, it is skipped.","operationId":"unassign_set_permissions","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionSetRuleRemove"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/resource_instances/detailed":{"get":{"tags":["Resource Instances"],"summary":"List Resource Instances Detailed","description":"Lists all the resource instances defined within an environment.","operationId":"list_resource_instances_detailed","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The tenant key or id to filter by","required":false,"schema":{"type":"string","title":"Tenant","description":"The tenant key or id to filter by"},"name":"tenant","in":"query"},{"description":"The resource key or id to filter by","required":false,"schema":{"type":"string","title":"Resource","description":"The resource key or id to filter by"},"name":"resource","in":"query"},{"description":"The resource instance key or id to filter by, matched exactly (supports multi-value like this url?search=key-1&search=key-2). Split larger key sets into successive requests of at most 100 values each.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Search","description":"The resource instance key or id to filter by, matched exactly (supports multi-value like this url?search=key-1&search=key-2). Split larger key sets into successive requests of at most 100 values each."},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_ResourceInstanceDetailedRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/resource_instances":{"get":{"tags":["Resource Instances"],"summary":"List Resource Instances","description":"Lists all the resource instances defined within an environment.","operationId":"list_resource_instances","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The tenant key or id to filter by","required":false,"schema":{"type":"string","title":"Tenant","description":"The tenant key or id to filter by"},"name":"tenant","in":"query"},{"description":"The resource key or id to filter by","required":false,"schema":{"type":"string","title":"Resource","description":"The resource key or id to filter by"},"name":"resource","in":"query"},{"description":"The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2). Each value also matches partially against the key (case-insensitive), so a single value may match multiple instances — mind `per_page` when batching. Use the `/detailed` route when you have exact keys.","required":false,"schema":{"items":{"type":"string"},"type":"array","maxItems":25,"title":"Search","description":"The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2). Each value also matches partially against the key (case-insensitive), so a single value may match multiple instances — mind `per_page` when batching. Use the `/detailed` route when you have exact keys."},"name":"search","in":"query"},{"description":"If true, will return the relationships of the resource instance.","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Detailed","description":"If true, will return the relationships of the resource instance.","default":false},"name":"detailed","in":"query"},{"description":"Include total count in response(will make the request slower)","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"Include total count in response(will make the request slower)","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResourceInstanceRead"},"type":"array"},{"$ref":"#/components/schemas/PaginatedResult_ResourceInstanceRead_"}],"title":"Response List Resource Instances V2 Facts Proj Id Env Id Resource Instances Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Resource Instances"],"summary":"Create Resource Instance","description":"Creates a new instance inside the Permit.io system.\n\nIf the instance is already created: will return 200 instead of 201,\nand will return the existing instance object in the response body.","operationId":"create_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}":{"get":{"tags":["Resource Instances"],"summary":"Get Resource Instance","description":"Gets a instance, if such instance exists. Otherwise returns 404.","operationId":"get_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'","required":true,"schema":{"type":"string","title":"Instance Id","description":"f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'"},"name":"instance_id","in":"path"},{"description":"If true, will return the relationships of the resource instance.","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Detailed","description":"If true, will return the relationships of the resource instance.","default":false},"name":"detailed","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Resource Instances"],"summary":"Delete Resource Instance","description":"Deletes the instance and all its related data.","operationId":"delete_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'","required":true,"schema":{"type":"string","title":"Instance Id","description":"f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'"},"name":"instance_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Resource Instances"],"summary":"Update Resource Instance","description":"Partially updates the instance definition.\nFields that will be provided will be completely overwritten.","operationId":"update_resource_instance","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'","required":true,"schema":{"type":"string","title":"Instance Id","description":"f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'"},"name":"instance_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/proxy_configs":{"get":{"tags":["Proxy Config"],"summary":"List Proxy Configs","description":"Lists all the proxy configs defined within an environment.","operationId":"list_proxy_configs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProxyConfigRead"},"type":"array","title":"Response List Proxy Configs V2 Facts Proj Id Env Id Proxy Configs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Proxy Config"],"summary":"Create Proxy Config","description":"Creates a new proxy config inside the Permit.io system.\n\nIf the proxy config is already created: will return 200 instead of 201,\nand will return the existing proxy config object in the response body.","operationId":"create_proxy_config","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyConfigCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}":{"get":{"tags":["Proxy Config"],"summary":"Get Proxy Config","description":"Gets a proxy config, if such proxy config exists. Otherwise returns 404.","operationId":"get_proxy_config","parameters":[{"description":"Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proxy Config Id","description":"Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\")."},"name":"proxy_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Proxy Config"],"summary":"Delete Proxy Config","description":"Deletes the proxy config and all its related data.","operationId":"delete_proxy_config","parameters":[{"description":"Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proxy Config Id","description":"Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\")."},"name":"proxy_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Proxy Config"],"summary":"Update Proxy Config","description":"Partially updates the proxy config definition.\nFields that will be provided will be completely overwritten.","operationId":"update_proxy_config","parameters":[{"description":"Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proxy Config Id","description":"Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\")."},"name":"proxy_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/bulk/users":{"put":{"tags":["Bulk Operations"],"summary":"Bulk Replace Users","operationId":"bulk_replace_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReplaceBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReplaceBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Bulk Operations"],"summary":"Bulk Create Users","operationId":"bulk_create_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreateBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreateBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Bulk Operations"],"summary":"Bulk Delete Users","operationId":"bulk_delete_users","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeleteBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeleteBulkOperationResult"}}}},"400":{"description":"The idents list was empty"},"403":{"description":"The caller is not permitted to delete users in this environment, or the idents list exceeded the maximum allowed bulk size"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/bulk/tenants":{"post":{"tags":["Bulk Operations"],"summary":"Bulk Create Tenants","operationId":"bulk_create_tenants","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Bulk Operations"],"summary":"Bulk Delete Tenants","operationId":"bulk_delete_tenants","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeleteBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeleteBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/bulk/resource_instances":{"put":{"tags":["Bulk Operations"],"summary":"Bulk Replace Resource Instances","description":"Creates or replaces Resource Instances.\nIf a resource instance with `key` and `resource` already exists,\nit will be replaced.","operationId":"bulk_replace_resource_instances","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceCreateBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceCreateBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Bulk Operations"],"summary":"Bulk Delete Resource Instances","description":"Deletes many Resource Instances.","operationId":"bulk_delete_resource_instances","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceDeleteBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInstanceDeleteBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/email_configurations":{"get":{"tags":["Email Configurations"],"summary":"Get Email Configuration","description":"Gets the email configuration defined within an environment.","operationId":"get_email_configuration","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigurationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Email Configurations"],"summary":"Create Or Update Email Configuration","description":"Create new configuration or updates the email configuration","operationId":"create_or_update_email_configuration","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigurationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigurationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/email_configurations/send_test_email":{"post":{"tags":["Email Configurations"],"summary":"Send Test Email","description":"Sends a test email to the email address defined in the user.","operationId":"send_test_email","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigurationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/email_templates/":{"get":{"tags":["Email Templates"],"summary":"List Templates","description":"Lists all the email configurations defined within an environment.","operationId":"list_templates","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailTemplateRead"},"type":"array","title":"Response List Templates V2 Facts Proj Id Env Id Email Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}":{"get":{"tags":["Email Templates"],"summary":"Get Template By Type","description":"Lists all the email configurations defined within an environment.","operationId":"get_template_by_type","parameters":[{"required":true,"schema":{"$ref":"#/components/schemas/EmailTemplateType"},"name":"template_type","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Email Templates"],"summary":"Update Template By Type","description":"Updates an email template by a given type.","operationId":"update_template_by_type","parameters":[{"required":true,"schema":{"$ref":"#/components/schemas/EmailTemplateType"},"name":"template_type","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}/send_test_email":{"post":{"tags":["Email Templates"],"summary":"Send Test Email By Type","operationId":"send_test_email_by_type","parameters":[{"required":true,"schema":{"$ref":"#/components/schemas/EmailTemplateType"},"name":"template_type","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed":{"get":{"tags":["Relationship tuples"],"summary":"List Relationship Tuples Detailed","description":"Lists the relationship tuples defined within an environment.","operationId":"list_relationship_tuples_detailed","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"The tenant key or id to filter by","required":false,"schema":{"type":"string","title":"Tenant","description":"The tenant key or id to filter by"},"name":"tenant","in":"query"},{"description":"The subject to filter by, accepts either the resource instance id or resource_type:resource_instance","required":false,"schema":{"type":"string","title":"Subject","description":"The subject to filter by, accepts either the resource instance id or resource_type:resource_instance"},"name":"subject","in":"query"},{"description":"The relation id or key to filter by","required":false,"schema":{"type":"string","title":"Relation","description":"The relation id or key to filter by"},"name":"relation","in":"query"},{"description":"The object to filter by, accepts either the resource instance id or resource_type:resource_instance","required":false,"schema":{"type":"string","title":"Object","description":"The object to filter by, accepts either the resource instance id or resource_type:resource_instance"},"name":"object","in":"query"},{"description":"The object type to filter by, accepts resource type id or key","required":false,"schema":{"type":"string","title":"Object Type","description":"The object type to filter by, accepts resource type id or key"},"name":"object_type","in":"query"},{"description":"The subject type to filter by, accepts resource type id or key","required":false,"schema":{"type":"string","title":"Subject Type","description":"The subject type to filter by, accepts resource type id or key"},"name":"subject_type","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_RelationshipTupleDetailedRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/relationship_tuples":{"get":{"tags":["Relationship tuples"],"summary":"List Relationship Tuples","description":"Lists the relationship tuples defined within an environment.","operationId":"list_relationship_tuples","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"If true, will return the full subject and object resource instances.","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Detailed","description":"If true, will return the full subject and object resource instances.","default":false},"name":"detailed","in":"query"},{"description":"If true, returns the list of resource instances and the total count.","required":false,"deprecated":true,"schema":{"type":"boolean","title":"Include Total Count","description":"If true, returns the list of resource instances and the total count.","default":false},"name":"include_total_count","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"The tenant key or id to filter by","required":false,"schema":{"type":"string","title":"Tenant","description":"The tenant key or id to filter by"},"name":"tenant","in":"query"},{"description":"The subject to filter by, accepts either the resource instance id or resource_type:resource_instance","required":false,"schema":{"type":"string","title":"Subject","description":"The subject to filter by, accepts either the resource instance id or resource_type:resource_instance"},"name":"subject","in":"query"},{"description":"The relation id or key to filter by","required":false,"schema":{"type":"string","title":"Relation","description":"The relation id or key to filter by"},"name":"relation","in":"query"},{"description":"The object to filter by, accepts either the resource instance id or resource_type:resource_instance","required":false,"schema":{"type":"string","title":"Object","description":"The object to filter by, accepts either the resource instance id or resource_type:resource_instance"},"name":"object","in":"query"},{"description":"The object type to filter by, accepts resource type id or key","required":false,"schema":{"type":"string","title":"Object Type","description":"The object type to filter by, accepts resource type id or key"},"name":"object_type","in":"query"},{"description":"The subject type to filter by, accepts resource type id or key","required":false,"schema":{"type":"string","title":"Subject Type","description":"The subject type to filter by, accepts resource type id or key"},"name":"subject_type","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/RelationshipTupleRead"},"type":"array"},{"$ref":"#/components/schemas/PaginatedResult_RelationshipTupleRead_"}],"title":"Response List Relationship Tuples V2 Facts Proj Id Env Id Relationship Tuples Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Relationship tuples"],"summary":"Create Relationship Tuple","description":"Create a relationship between two resource instances using a relation.","operationId":"create_relationship_tuple","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleRead"}}}},"400":{"description":"Invalid request - including a tuple whose subject and object resource instances are in different tenants."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Relationship tuples"],"summary":"Delete Relationship Tuple","description":"Delete a relationship between two resource instances.","operationId":"delete_relationship_tuple","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk":{"post":{"tags":["Relationship tuples"],"summary":"Bulk create relationship tuples","operationId":"bulk_create_relationship_tuples","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleCreateBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleCreateBulkOperationResult"}}}},"400":{"description":"Invalid request - including a tuple whose subject and object resource instances are in different tenants. The whole batch is rejected and nothing is created."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Relationship tuples"],"summary":"Bulk Delete Relationship Tuples","operationId":"bulk_delete_relationship_tuples","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleDeleteBulkOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTupleDeleteBulkOperationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/user_invites":{"get":{"tags":["User Invites"],"summary":"List User Invites","operationId":"list_user_invites","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"optional role filter, will only return invited users with this role.","required":false,"schema":{"type":"string","title":"Role","description":"optional role filter, will only return invited users with this role."},"name":"role","in":"query"},{"description":"optional tenant filter, will only return invited users in that tenant.","required":false,"schema":{"type":"string","title":"Tenant","description":"optional tenant filter, will only return invited users in that tenant."},"name":"tenant","in":"query"},{"description":"optional search, will only return invited users to that email, key or name.","required":false,"schema":{"type":"string","title":"Search","description":"optional search, will only return invited users to that email, key or name."},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_ElementsUserInviteRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["User Invites"],"summary":"Create User Invite","operationId":"create_user_invite","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserInviteCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserInviteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}":{"get":{"tags":["User Invites"],"summary":"Get User Invite","operationId":"get_user_invite","parameters":[{"description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Invite Id","description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\")."},"name":"user_invite_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserInviteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["User Invites"],"summary":"Delete User Invite","operationId":"delete_user_invite","parameters":[{"description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Invite Id","description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\")."},"name":"user_invite_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["User Invites"],"summary":"Update User Invite","operationId":"update_user_invite","parameters":[{"description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Invite Id","description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\")."},"name":"user_invite_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserInviteUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserInviteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve":{"post":{"tags":["User Invites"],"summary":"Approve User Invite","operationId":"approve_user_invite","parameters":[{"description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Invite Id","description":"Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\")."},"name":"user_invite_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserInviteApprove"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"400":{"description":"The user already approved or the email requested doesn't match the email of the invite.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}":{"get":{"tags":["Access Requests (EAP)"],"summary":"List Access Requests","operationId":"list_access_requests","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Optional status filter, will only return access requests with this status.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"Optional status filter, will only return access requests with this status."},"name":"status","in":"query"},{"description":"Optional role filter, will only return access request granted with that role.","required":false,"schema":{"type":"string","title":"Role","description":"Optional role filter, will only return access request granted with that role."},"name":"role","in":"query"},{"description":"Optional resource filter, will only return access request granted in that resource.","required":false,"schema":{"type":"string","title":"Resource","description":"Optional resource filter, will only return access request granted in that resource."},"name":"resource","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_AccessRequestList_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Access Requests (EAP)"],"summary":"Create Access Request","operationId":"create_access_request","parameters":[{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestUserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}":{"get":{"tags":["Access Requests (EAP)"],"summary":"Get Access Request","operationId":"get_access_request","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/reviewer":{"patch":{"tags":["Access Requests (EAP)"],"summary":"Update Access Request Reviewer","operationId":"update_access_request_reviewer","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/approve":{"put":{"tags":["Access Requests (EAP)"],"summary":"Approve Access Request","operationId":"approve_access_request","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestApproved"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/deny":{"put":{"tags":["Access Requests (EAP)"],"summary":"Deny Access Request","operationId":"deny_access_request","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestReviewDeny"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestDenied"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/cancel":{"put":{"tags":["Access Requests (EAP)"],"summary":"Cancel Access Request","operationId":"cancel_access_request","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Tenant Id","description":"Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")."},"example":"my_tenant","name":"tenant_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"example":"my_user","name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestCanceled"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs":{"get":{"tags":["Policy Decision Points"],"summary":"List PDP configurations","operationId":"list_pdp_configs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PDPConfigRead"},"type":"array","title":"Response List Pdp Configs V2 Pdps Proj Id Env Id Configs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/values":{"get":{"tags":["Policy Decision Points"],"summary":"Get PDP configuration","description":"Gets the configuration values for the PDP container with id `pdp_id`.\n\nThe config values returned are considered \"overrides\", meaning they are overriding\nany default values given to the container by the user.","operationId":"get_pdp_config_values","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"type":"string","format":"uuid","title":"Pdp Id","description":"The unique id of the pdp"},"example":"42f0e413-219b-4bb9-ba90-c2c904761be1","name":"pdp_id","in":"path"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/enable":{"put":{"tags":["Policy Decision Points"],"summary":"Enable debug audit logs","description":"Enables debug audit logs for the PDP container with id `pdp_id`.","operationId":"enable_debug_audit_logs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"type":"string","format":"uuid","title":"Pdp Id","description":"The unique id of the pdp"},"example":"42f0e413-219b-4bb9-ba90-c2c904761be1","name":"pdp_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/disable":{"put":{"tags":["Policy Decision Points"],"summary":"Disable debug audit logs","description":"Disabled debug audit logs for the PDP container with id `pdp_id`.","operationId":"disable_debug_audit_logs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"type":"string","format":"uuid","title":"Pdp Id","description":"The unique id of the pdp"},"example":"42f0e413-219b-4bb9-ba90-c2c904761be1","name":"pdp_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/rotate-api-key":{"post":{"tags":["Policy Decision Points"],"summary":"Rotate PDP API Key","description":"Rotates the API key of the PDP container with id `pdp_id`.\n\nThe rotation of the API key revokes the old API key and issues a new API key to the PDP.\n\nFor the per-environment PDP v3 credentials row this rotates the environment's NATS\ncredentials instead of minting a token: every EdgePDP in the environment is revoked\nand fresh bootstrap credentials are minted (PER-15666). That runs as an awaited\nCelery task, so this call can take up to `NATS_ROTATION_TIMEOUT_SECONDS`.","operationId":"rotate_pdp_api_key","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"type":"string","format":"uuid","title":"Pdp Id","description":"The unique id of the pdp"},"example":"42f0e413-219b-4bb9-ba90-c2c904761be1","name":"pdp_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/refresh":{"post":{"tags":["Policy Decision Points"],"summary":"Refresh data for all PDPs in the environment","description":"Triggers an out-of-band data refresh for **all** PDPs in the environment.\n\nPublishes an OPAL data update instructing each PDP to immediately re-pull its\nfull authorization data, instead of waiting for the next periodic poll. Use\nthis to propagate external-data-source-backed changes in realtime.\n\n`shard_id` is not accepted here: sharding is a per-PDP topology, so a single\nshard target is meaningless across a heterogeneous environment. Target a shard\nvia the single-PDP endpoint (`POST .../configs/{pdp_id}/refresh`) instead.","operationId":"refresh_environment_pdp_data","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPDataRefreshRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPDataRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/refresh":{"post":{"tags":["Policy Decision Points"],"summary":"Refresh PDP data","description":"Triggers an out-of-band data refresh for the PDP container with id `pdp_id`.\n\nPublishes an OPAL data update instructing the PDP to immediately re-pull its\nfull authorization data, instead of waiting for the next periodic poll.","operationId":"refresh_pdp_data","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"The unique id of the pdp","required":true,"schema":{"type":"string","format":"uuid","title":"Pdp Id","description":"The unique id of the pdp"},"example":"42f0e413-219b-4bb9-ba90-c2c904761be1","name":"pdp_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPDataRefreshRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPDataRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/configs/migrate-shards":{"post":{"tags":["Policy Decision Points"],"summary":"Migrate PDP Config number of shards","description":"The migration process is as followed:\n1. Perform request to this endpoint with the new number of shards\n2. A new PDP Config will be created with the new number of shards and a new api-key\n3. Create a new PDP cluster with the same instances as the number of shards defined in the new PDP Config\n4. Wait for the new PDP cluster to be ready\n5. Update your PDP load balancer to point to the new PDP cluster\n\nMore info can be found here https://docs.permit.io/concepts/pdp-sharding","operationId":"migrate_shards","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPShardMigration"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PDPConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/audit_logs":{"get":{"tags":["Audit Logs"],"summary":"List Audit Logs","operationId":"list_audit_logs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Filter by pdp config id","required":false,"schema":{"type":"string","format":"uuid","title":"Pdp Id","description":"Filter by pdp config id"},"name":"pdp_id","in":"query"},{"description":"List of user keys or emails to filter by","required":false,"schema":{"items":{"type":"string","maxLength":500},"type":"array","title":"Users","description":"List of user keys or emails to filter by"},"name":"users","in":"query"},{"description":"Filter by decision result","required":false,"schema":{"type":"boolean","title":"Decision","description":"Filter by decision result"},"name":"decision","in":"query"},{"description":"Filter by resources","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Resources","description":"Filter by resources"},"name":"resources","in":"query"},{"description":"Filter by tenant","required":false,"schema":{"type":"string","title":"Tenant","description":"Filter by tenant"},"name":"tenant","in":"query"},{"description":"Filter by action","required":false,"schema":{"type":"string","title":"Action","description":"Filter by action"},"name":"action","in":"query"},{"description":"Filter by timestamp from","required":false,"schema":{"type":"integer","title":"Timestamp From","description":"Filter by timestamp from"},"name":"timestamp_from","in":"query"},{"description":"Filter by timestamp to","required":false,"schema":{"type":"integer","title":"Timestamp To","description":"Filter by timestamp to"},"name":"timestamp_to","in":"query"},{"description":"Sort by column","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogSortKey"}],"description":"Sort by column","default":"timestamp"},"name":"sort_by","in":"query"},{"description":"Filter by the type of query that generated the audit log.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'check' - permit/root, permit/check, permit/bulk
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'get_user_permissions' - permit/user_permissions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'get_authorized_users' - permit/authorized_users, permit/authorized_users_new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'none' - All queries","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogQueryType"}],"description":"Filter by the type of query that generated the audit log.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'check' - permit/root, permit/check, permit/bulk
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'get_user_permissions' - permit/user_permissions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'get_authorized_users' - permit/authorized_users, permit/authorized_users_new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        'none' - All queries","default":"check"},"name":"query","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitedPaginatedResult_AuditLogModel_"}}}},"400":{"description":"Overreach of pagination limits","content":{"application/json":{"example":{"id":"68e714fffae14561ad1fec770a7b91e9","title":"The request was invalid","error_code":"PAGINATION_SIZE_OVERREACHED","message":"We are sorry for the inconvenience, Max number of results for this API is 10000. To obtain additional results readjust the query's time window, or apply additional filters.. Please check the request and try again.\nIf the issue keeps happening, contact our support on Slack for further guidance."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}":{"get":{"tags":["Audit Logs"],"summary":"Get detailed audit log","operationId":"get_detailed_audit_log","parameters":[{"description":"The unique id of the audit log","required":true,"schema":{"type":"string","format":"uuid","title":"Log Id","description":"The unique id of the audit log"},"example":"42f0e113-219b-4bb9-ba90-e2c904761be1","name":"log_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedAuditLogModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/repos":{"get":{"tags":["Policy Git Repositories"],"summary":"List Policy Repos","description":"Lists all the policy repositories under a given project.","operationId":"list_policy_repos","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyRepoRead"},"type":"array","title":"Response List Policy Repos V2 Projects Proj Id Repos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Policy Git Repositories"],"summary":"Create Policy Repo","description":"Creates a new policy repository configuration under a given project.\nThe given repository is created with status 'pending', it will be changed and used as the 'active' repository for\nthe policy only after a successful attempt to use it.\nThe repository main branch must be present in the remote.","operationId":"create_policy_repo","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRepoCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRepoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/repos/active":{"get":{"tags":["Policy Git Repositories"],"summary":"Get Active Policy Repo","description":"Gets the currently active repository, if such repository exists.","operationId":"get_active_policy_repo","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRepoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/repos/disable":{"put":{"tags":["Policy Git Repositories"],"summary":"Disable Active Policy Repo","description":"Disable the currently active policy repo, this action means to turn off the gitops feature.\nIf there is no active policy repo, this action will do nothing.","operationId":"disable_active_policy_repo","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/repos/{repo_id}/activate":{"put":{"tags":["Policy Git Repositories"],"summary":"Activate Policy Repo","description":"Disable the currently active policy repo, this action means to turn off the gitops feature.\nIf there is no active policy repo, this action will do nothing.","operationId":"activate_policy_repo","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Repo Id","description":"Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\")."},"example":"my_policy_repo","name":"repo_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"400":{"description":"Invalid policy repo status"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/repos/{repo_id}":{"get":{"tags":["Policy Git Repositories"],"summary":"Get Policy Repo","description":"Gets a single repository matching the given repo_id, if such repository exists.","operationId":"get_policy_repo","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Repo Id","description":"Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\")."},"example":"my_policy_repo","name":"repo_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRepoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Policy Git Repositories"],"summary":"Delete Policy Repo","description":"Deletes an environment and all its related data.","operationId":"delete_policy_repo","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Repo Id","description":"Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\")."},"example":"my_policy_repo","name":"repo_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config":{"get":{"tags":["Elements Configs (EAP)"],"summary":"List Elements Configs","description":"Lists all the elements_configs under the active organization.","operationId":"list_elements_configs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaginatedResult_ElementsConfigRead_"},{"items":{"$ref":"#/components/schemas/ElementsConfigRead"},"type":"array"}],"title":"Response List Elements Configs V2 Elements Proj Id Env Id Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Elements Configs (EAP)"],"summary":"Create Elements Config","description":"Creates a new elements_config under the active organization.","operationId":"create_elements_config","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsConfigCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}":{"get":{"tags":["Elements Configs (EAP)"],"summary":"Get Elements Config","description":"Gets a single elements_config matching the given elements_config_id, if such elements_config exists.","operationId":"get_elements_config","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Elements Configs (EAP)"],"summary":"Update Elements Config","description":"Updates the elements_config.","operationId":"update_elements_config","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/runtime":{"get":{"tags":["Elements Configs (EAP)"],"summary":"Get Elements Config Runtime","description":"Gets a single elements_config matching the given elements_config_id, if such elements_config exists.","operationId":"get_elements_config_runtime","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsConfigRuntimeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/{elements_config_id}":{"delete":{"tags":["Elements Configs (EAP)"],"summary":"Delete Elements Config","description":"Deletes the elements_config and all its related data.","operationId":"delete_elements_config","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users":{"get":{"tags":["Users Elements Data"],"summary":"List users","description":"Lists all the users defined within an environment.","operationId":"elements_list_users","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_UserRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Users Elements Data"],"summary":"Create user","description":"Creates a new user inside the Permit.io system, from that point forward\nyou may run permission checks on that user.\n\nIf the user is already created: will return 200 instead of 201,\nand will return the existing user object in the response body.","operationId":"elements_create_user","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserRead"},{"$ref":"#/components/schemas/ElementsUserInviteRead"}],"title":"Response Elements Create User V2 Elements Proj Id Env Id Config Elements Config Id Data Users Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}":{"delete":{"tags":["Users Elements Data"],"summary":"Delete user","operationId":"elements_delete_user","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/user-invites":{"get":{"tags":["Users Elements Data"],"summary":"List all Elements User Invites","description":"List all Elements User Invites for the current environment and tenant.","operationId":"list_elements_user_invites","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Status of the user invite","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/UserInviteStatus"}],"description":"Status of the user invite"},"name":"status","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_ElementsUserInviteRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/roles":{"get":{"tags":["Users Elements Data"],"summary":"List roles","description":"Lists all the users defined within an environment.","operationId":"elements_list_roles","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ElementsRoleRead"},"type":"array","title":"Response Elements List Roles V2 Elements Proj Id Env Id Config Elements Config Id Data Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles":{"post":{"tags":["Users Elements Data"],"summary":"Assign role to user","description":"Assigns a role to the user within the tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.","operationId":"elements_assign_role_to_user","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserRoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Users Elements Data"],"summary":"Unassign role from user","description":"Unassigns the role from the user within the tenant.\n\nThe tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.\n\nIf the role is not actually assigned, will return 404.","operationId":"elements_unassign_role_from_user","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"User Id","description":"Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")."},"name":"user_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementsUserRoleRemove"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/active":{"post":{"tags":["Users Elements Data"],"summary":"Set Config Active","description":"Updates the embed_config.","operationId":"set_config_active","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/audit_logs":{"get":{"tags":["Audit Elements Data"],"summary":"List audit logs","description":"Lists audit logs for for specific elements config (tenant scope)","operationId":"elements_list_audit_logs","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Text search for the email field","required":false,"schema":{"type":"string","title":"Search","description":"Text search for the email field"},"name":"search","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitedPaginatedResult_AuditLogModel_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests":{"get":{"tags":["Access Requests (EAP)"],"summary":"List Access Requests","operationId":"list_access_requests_v2_elements__proj_id___env_id__config__elements_config_id__access_requests_get","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Optional status filter, will only return access requests with this status.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"Optional status filter, will only return access requests with this status."},"name":"status","in":"query"},{"description":"Optional tenant filter, will only return access request granted in that tenant.","required":false,"schema":{"type":"string","title":"Tenant","description":"Optional tenant filter, will only return access request granted in that tenant."},"name":"tenant","in":"query"},{"description":"Optional role filter, will only return access request granted with that role.","required":false,"schema":{"type":"string","title":"Role","description":"Optional role filter, will only return access request granted with that role."},"name":"role","in":"query"},{"description":"Optional resource filter, will only return access request granted in that resource.","required":false,"schema":{"type":"string","title":"Resource","description":"Optional resource filter, will only return access request granted in that resource."},"name":"resource","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"},{"description":"For ReBAC Elements, the resource instance ID or key to work on","required":false,"schema":{"type":"string","title":"Resource Instance Id","description":"For ReBAC Elements, the resource instance ID or key to work on"},"name":"resource_instance_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_AccessRequestList_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Access Requests (EAP)"],"summary":"Create Access Request","operationId":"create_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests_post","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestUserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}":{"get":{"tags":["Access Requests (EAP)"],"summary":"Get Access Request","operationId":"get_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests__access_request_id__get","parameters":[{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/reviewer":{"patch":{"tags":["Access Requests (EAP)"],"summary":"Update Access Request Reviewer","operationId":"update_access_request_reviewer_v2_elements__proj_id___env_id__config__elements_config_id__access_requests__access_request_id__reviewer_patch","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/approve":{"put":{"tags":["Access Requests (EAP)"],"summary":"Approve Access Request","operationId":"approve_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests__access_request_id__approve_put","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestApproved"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/deny":{"put":{"tags":["Access Requests (EAP)"],"summary":"Deny Access Request","operationId":"deny_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests__access_request_id__deny_put","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestReviewDeny"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestDenied"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/cancel":{"put":{"tags":["Access Requests (EAP)"],"summary":"Cancel Access Request","operationId":"cancel_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests__access_request_id__cancel_put","parameters":[{"description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Access Request Id","description":"Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\")."},"example":"42f0e113-219b-4bb9-ba90-c2c904761be1","name":"access_request_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestCanceled"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval":{"get":{"tags":["Operation Approval (EAP)"],"summary":"List Operation Approvals","operationId":"list_operation_approvals","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Optional status filter, will only return access requests with this status.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"Optional status filter, will only return access requests with this status."},"name":"status","in":"query"},{"description":"Optional resource filter, will only return access request granted in that resource.","required":false,"schema":{"type":"string","title":"Resource","description":"Optional resource filter, will only return access request granted in that resource."},"name":"resource","in":"query"},{"description":"Optional resource instance filter, will only return access request granted in that resource instance.","required":false,"schema":{"type":"string","title":"Resource Instance","description":"Optional resource instance filter, will only return access request granted in that resource instance."},"name":"resource_instance","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_OperationApprovalList_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Operation Approval (EAP)"],"summary":"Create Operation Approval","operationId":"create_operation_approval","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalUserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}":{"get":{"tags":["Operation Approval (EAP)"],"summary":"Get Operation Approval","operationId":"get_operation_approval","parameters":[{"description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Operation Approval Id","description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\")."},"example":"my_operation_approval","name":"operation_approval_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/reviewer":{"patch":{"tags":["Operation Approval (EAP)"],"summary":"Update Operation Approval Reviewer","operationId":"update_operation_approval_reviewer","parameters":[{"description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Operation Approval Id","description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\")."},"example":"my_operation_approval","name":"operation_approval_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/approve":{"put":{"tags":["Operation Approval (EAP)"],"summary":"Approve Operation Approval","operationId":"approve_operation_approval","parameters":[{"description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Operation Approval Id","description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\")."},"example":"my_operation_approval","name":"operation_approval_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalApproved"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/deny":{"put":{"tags":["Operation Approval (EAP)"],"summary":"Deny Operation Approval","operationId":"deny_operation_approval","parameters":[{"description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Operation Approval Id","description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\")."},"example":"my_operation_approval","name":"operation_approval_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalReview"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalDenied"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/cancel":{"put":{"tags":["Operation Approval (EAP)"],"summary":"Cancel Operation Approval","operationId":"cancel_operation_approval","parameters":[{"description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Operation Approval Id","description":"Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\")."},"example":"my_operation_approval","name":"operation_approval_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Elements Config Id","description":"Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\")."},"example":"my_elements_config","name":"elements_config_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationApprovalCanceled"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/deprecated/history":{"get":{"summary":"List Api Events","description":"Fetches all API History events for given filters.","operationId":"list_api_events","parameters":[{"description":"HTTP methods to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Method","description":"HTTP methods to include in search"},"name":"method","in":"query"},{"description":"API paths to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Path","description":"API paths to include in search"},"name":"path","in":"query"},{"description":"Filter by API request success/failure","required":false,"schema":{"type":"boolean","title":"Success","description":"Filter by API request success/failure"},"name":"success","in":"query"},{"description":"HTTP status codes to include in search","required":false,"schema":{"items":{"type":"integer"},"type":"array","title":"Status Code","description":"HTTP status codes to include in search"},"name":"status_code","in":"query"},{"description":"IPs of clients to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Client Ip","description":"IPs of clients to include in search"},"name":"client_ip","in":"query"},{"description":"Actor type to search (member, user, api_key)","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Type","description":"Actor type to search (member, user, api_key)"},"name":"actor_type","in":"query"},{"description":"Actor ID to search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Id","description":"Actor ID to search"},"name":"actor_id","in":"query"},{"description":"Actor display name to search","required":false,"schema":{"type":"string","title":"Actor Display Name","description":"Actor display name to search"},"name":"actor_display_name","in":"query"},{"description":"Projects to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Project Id","description":"Projects to include in search"},"name":"project_id","in":"query"},{"description":"Environments to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Env Id","description":"Environments to include in search"},"name":"env_id","in":"query"},{"description":"Retrieve only events after this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp From","description":"Retrieve only events after this timestamp (seconds since epoch)"},"name":"timestamp_from","in":"query"},{"description":"Retrieve only events before this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp Until","description":"Retrieve only events before this timestamp (seconds since epoch)"},"name":"timestamp_until","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_APIHistoryEventRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/deprecated/history/{event_id}":{"get":{"summary":"Get Api Event","description":"Returns full information, including request and response bodies, for one event.","operationId":"get_api_event","parameters":[{"required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"},"name":"event_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIHistoryEventFullRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/deprecated/history/{event_id}/request":{"get":{"summary":"Get Request Body","operationId":"get_request_body","parameters":[{"required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"},"name":"event_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","format":"binary","title":"Response Get Request Body V2 Deprecated History Event Id Request Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/deprecated/history/{event_id}/response":{"get":{"summary":"Get Response Body","operationId":"get_response_body","parameters":[{"required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"},"name":"event_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","format":"binary","title":"Response Get Response Body V2 Deprecated History Event Id Response Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/history":{"get":{"tags":["API History"],"summary":"List Api Events","description":"Fetches all API History events for given filters.\nAvailable to members with Viewer (or higher) role.","operationId":"list_api_events_v2_history_get","parameters":[{"description":"HTTP methods to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Method","description":"HTTP methods to include in search"},"name":"method","in":"query"},{"description":"API paths to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Path","description":"API paths to include in search"},"name":"path","in":"query"},{"description":"Filter by API request success/failure","required":false,"schema":{"type":"boolean","title":"Success","description":"Filter by API request success/failure"},"name":"success","in":"query"},{"description":"HTTP status codes to include in search","required":false,"schema":{"items":{"type":"integer"},"type":"array","title":"Status Code","description":"HTTP status codes to include in search"},"name":"status_code","in":"query"},{"description":"IPs of clients to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Client Ip","description":"IPs of clients to include in search"},"name":"client_ip","in":"query"},{"description":"Actor type to search (member, user, api_key)","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Type","description":"Actor type to search (member, user, api_key)"},"name":"actor_type","in":"query"},{"description":"Actor ID to search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Id","description":"Actor ID to search"},"name":"actor_id","in":"query"},{"description":"Actor display name to search","required":false,"schema":{"type":"string","title":"Actor Display Name","description":"Actor display name to search"},"name":"actor_display_name","in":"query"},{"description":"Projects to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Project Id","description":"Projects to include in search"},"name":"project_id","in":"query"},{"description":"Environments to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Env Id","description":"Environments to include in search"},"name":"env_id","in":"query"},{"description":"Retrieve only events after this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp From","description":"Retrieve only events after this timestamp (seconds since epoch)"},"name":"timestamp_from","in":"query"},{"description":"Retrieve only events before this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp Until","description":"Retrieve only events before this timestamp (seconds since epoch)"},"name":"timestamp_until","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitedPaginatedResult_APIHistoryEventRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/history/{event_id}":{"get":{"tags":["API History"],"summary":"Get Api Event","description":"Returns full information, including request and response bodies, for one event.","operationId":"get_api_event_v2_history__event_id__get","parameters":[{"required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"},"name":"event_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIHistoryEventFullRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/history/{event_id}/request":{"get":{"tags":["API History"],"summary":"Get Request Body","operationId":"get_request_body_v2_history__event_id__request_get","parameters":[{"required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"},"name":"event_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","format":"binary","title":"Response Get Request Body V2 History Event Id Request Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/history/{event_id}/response":{"get":{"tags":["API History"],"summary":"Get Response Body","operationId":"get_response_body_v2_history__event_id__response_get","parameters":[{"required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"},"name":"event_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","format":"binary","title":"Response Get Response Body V2 History Event Id Response Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/activity":{"get":{"tags":["Activity Log"],"summary":"List Activity Events","description":"Fetches all API History events for given filters.\nAvailable to members with Viewer (or higher) role.","operationId":"list_activity_events","parameters":[{"description":"Actor ID to search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Id","description":"Actor ID to search"},"name":"actor_id","in":"query"},{"description":"Actor display name to search","required":false,"schema":{"type":"string","title":"Actor Display Name","description":"Actor display name to search"},"name":"actor_display_name","in":"query"},{"description":"Actor type to search (member, user, api_key)","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Type","description":"Actor type to search (member, user, api_key)"},"name":"actor_type","in":"query"},{"description":"Projects to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Project Id","description":"Projects to include in search"},"name":"project_id","in":"query"},{"description":"Environments to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Env Id","description":"Environments to include in search"},"name":"env_id","in":"query"},{"description":"Retrieve only events after this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp From","description":"Retrieve only events after this timestamp (seconds since epoch)"},"name":"timestamp_from","in":"query"},{"description":"Retrieve only events before this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp Until","description":"Retrieve only events before this timestamp (seconds since epoch)"},"name":"timestamp_until","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitedPaginatedResult_ActivityLogEventRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/activity/types":{"get":{"tags":["Activity Log"],"summary":"List Activity Types","operationId":"list_activity_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/deprecated/activity":{"get":{"summary":"List Activity Events","description":"Fetches all API History events for given filters.","operationId":"list_activity_events_v2_deprecated_activity_get","parameters":[{"description":"Actor ID to search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Id","description":"Actor ID to search"},"name":"actor_id","in":"query"},{"description":"Actor display name to search","required":false,"schema":{"type":"string","title":"Actor Display Name","description":"Actor display name to search"},"name":"actor_display_name","in":"query"},{"description":"Actor type to search (member, user, api_key)","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Actor Type","description":"Actor type to search (member, user, api_key)"},"name":"actor_type","in":"query"},{"description":"Projects to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Project Id","description":"Projects to include in search"},"name":"project_id","in":"query"},{"description":"Environments to include in search","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Env Id","description":"Environments to include in search"},"name":"env_id","in":"query"},{"description":"Retrieve only events after this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp From","description":"Retrieve only events after this timestamp (seconds since epoch)"},"name":"timestamp_from","in":"query"},{"description":"Retrieve only events before this timestamp (seconds since epoch)","required":false,"schema":{"type":"integer","title":"Timestamp Until","description":"Retrieve only events before this timestamp (seconds since epoch)"},"name":"timestamp_until","in":"query"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult_ActivityLogEventRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/deprecated/activity/types":{"get":{"summary":"List Activity Types","operationId":"list_activity_types_v2_deprecated_activity_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/policy_guards/scopes":{"get":{"tags":["Policy Guards (EAP)"],"summary":"List Policy Guard Scopes","description":"List all guarding policies scopes.","operationId":"list_policy_guard_scopes","parameters":[{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyGuardScopeRead"},"type":"array","title":"Response List Policy Guard Scopes V2 Policy Guards Scopes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Policy Guards (EAP)"],"summary":"Create Policy Guard Scope","description":"Create a new Policy guard scope.","operationId":"create_policy_guard_scope","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardScopeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardScopeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/policy_guards/scopes/{policy_guard_scope_id}":{"get":{"tags":["Policy Guards (EAP)"],"summary":"Get Policy Guard Scope","description":"Get a Policy guard scope.","operationId":"get_policy_guard_scope","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardScopeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Policy Guards (EAP)"],"summary":"Delete Policy Guard Scope","description":"Delete a Policy guard scope.","operationId":"delete_policy_guard_scope","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/policy_guards/scopes/{policy_guard_scope_id}/associate":{"post":{"tags":["Policy Guards (EAP)"],"summary":"Associate Policy Guard Scope","description":"associate a project to a Policy guard scope.","operationId":"associate_policy_guard_scope","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"},{"description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","required":false,"schema":{"type":"number","title":"Wait","description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","default":0,"lte":60},"name":"wait","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardScopeAssociate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResult_PolicyGuardScopeRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/policy_guards/scopes/{policy_guard_scope_id}/disassociate":{"delete":{"tags":["Policy Guards (EAP)"],"summary":"Disassociate Policy Guard Scope","description":"Disassociate a project from a Policy guard scope.","operationId":"disassociate_policy_guard_scope","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardScopeAssociate"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/policy_guards/scopes/{policy_guard_scope_id}/rules":{"get":{"tags":["Policy Guards (EAP)"],"summary":"List Policy Guard Rules","description":"List all rules for a Policy guard scope.","operationId":"list_policy_guard_rules","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"},{"description":"Page number of the results to fetch, starting at 1.","required":false,"schema":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number of the results to fetch, starting at 1.","default":1},"name":"page","in":"query"},{"description":"The number of results per page (max 100).","required":false,"schema":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Per Page","description":"The number of results per page (max 100).","default":30},"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyGuardRuleRead"},"type":"array","title":"Response List Policy Guard Rules V2 Policy Guards Scopes Policy Guard Scope Id Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Policy Guards (EAP)"],"summary":"Create Policy Guard Rule","description":"Create a policy guard rule.","operationId":"create_policy_guard_rule","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"},{"description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","required":false,"schema":{"type":"number","title":"Wait","description":"Time in seconds to wait for the task to complete. Default is 0, means no wait.","default":0,"lte":60},"name":"wait","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardRuleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResult_PolicyGuardScopeRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Policy Guards (EAP)"],"summary":"Delete Policy Guard Rule","description":"Remove a policy guard rule.","operationId":"delete_policy_guard_rule","parameters":[{"description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Policy Guard Scope Id","description":"Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\")."},"example":"my_policy_guard_scope","name":"policy_guard_scope_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyGuardRuleItem"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/projects/{proj_id}/{env_id}/opal_scope":{"get":{"tags":["Scope Configurations"],"summary":"Get Scope Config","description":"Returns the custom OPAL Scope config for given environment, if exists.\nIf not custom config is set, return 404.","operationId":"get_scope_config","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Scope Configurations"],"summary":"Set Scope Config","description":"Set or update the custom OPAL Scope config for a given environment.","operationId":"set_scope_config","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeConfigSet"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Scope Configurations"],"summary":"Reset Scope Config","description":"Reset the custom OPAL Scope config for a given environment to the default.","operationId":"reset_scope_config","parameters":[{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/audit-log-replay":{"post":{"tags":["Audit Log Replay"],"summary":"Run the audit log replay","description":"Run the audit log replay with the given parameters. This will replay PDP requests based on audit logs.","operationId":"run_audit_log_replay","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogReplayRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogReplayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/optimized":{"get":{"tags":["OPAL Data ( EAP )"],"summary":"Get All Data Optimized","operationId":"get_all_data_optimized","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__FullData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}":{"get":{"tags":["OPAL Data ( EAP )"],"summary":"Get All Data","operationId":"get_all_data","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Timeout for the data generation in the new data generation mode","required":false,"schema":{"type":"number","maximum":1800.0,"exclusiveMinimum":0.0,"title":"Timeout","description":"Timeout for the data generation in the new data generation mode","default":600.0},"name":"timeout","in":"query"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__FullData"},{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__FullData"}],"title":"Response Get All Data V2 Internal Opal Data Org Id Proj Id Env Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users":{"get":{"tags":["OPAL Data ( EAP )"],"summary":"Get All Users Data","operationId":"get_all_users_data","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Timeout for the data generation in the new data generation mode","required":false,"schema":{"type":"number","maximum":1800.0,"exclusiveMinimum":0.0,"title":"Timeout","description":"Timeout for the data generation in the new data generation mode","default":600.0},"name":"timeout","in":"query"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__UserData"},"type":"object"},{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__UserData"},"type":"object"}],"title":"Response Get All Users Data V2 Internal Opal Data Org Id Proj Id Env Id Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/role_assignments":{"get":{"tags":["OPAL Data ( EAP )"],"summary":"Get All Role Assignments Data","operationId":"get_all_role_assignments_data","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Timeout for the data generation in the new data generation mode","required":false,"schema":{"type":"number","maximum":1800.0,"exclusiveMinimum":0.0,"title":"Timeout","description":"Timeout for the data generation in the new data generation mode","default":600.0},"name":"timeout","in":"query"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object","title":"Response Get All Role Assignments Data V2 Internal Opal Data Org Id Proj Id Env Id Role Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_instances":{"get":{"tags":["OPAL Data ( EAP )"],"summary":"Get All Resource Instances Data","operationId":"get_all_resource_instances_data","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Timeout for the data generation in the new data generation mode","required":false,"schema":{"type":"number","maximum":1800.0,"exclusiveMinimum":0.0,"title":"Timeout","description":"Timeout for the data generation in the new data generation mode","default":600.0},"name":"timeout","in":"query"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__ResourceInstanceAttributeData"},"type":"object"},{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__ResourceInstanceAttributeData"},"type":"object"}],"title":"Response Get All Resource Instances Data V2 Internal Opal Data Org Id Proj Id Env Id Resource Instances Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/relationships":{"get":{"tags":["OPAL Data ( EAP )"],"summary":"Get All Relationships Data","operationId":"get_all_relationships_data","parameters":[{"description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","description":"Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\")."},"example":"my_organization","name":"org_id","in":"path"},{"description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Proj Id","description":"Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")."},"example":"my_project","name":"proj_id","in":"path"},{"description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").","required":true,"schema":{"type":"string","title":"Env Id","description":"Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")."},"example":"my_environment","name":"env_id","in":"path"},{"description":"Timeout for the data generation in the new data generation mode","required":false,"schema":{"type":"number","maximum":1800.0,"exclusiveMinimum":0.0,"title":"Timeout","description":"Timeout for the data generation in the new data generation mode","default":600.0},"name":"timeout","in":"query"},{"required":false,"schema":{"type":"integer","minimum":0.0,"title":"X-Shard-Id"},"name":"X-Shard-ID","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Response Get All Relationships Data V2 Internal Opal Data Org Id Proj Id Env Id Relationships Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"APIHistoryEventFullRead":{"properties":{"request_body":{"type":"string","format":"binary","title":"Request Body"},"response_body":{"type":"string","format":"binary","title":"Response Body"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"timestamp_utc":{"type":"string","format":"date-time","title":"Timestamp Utc"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"success":{"type":"boolean","title":"Success"},"status":{"type":"integer","title":"Status"},"request_id":{"type":"string","format":"uuid","title":"Request Id"},"client_ip":{"type":"string","title":"Client Ip"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"type":"string","format":"uuid","title":"Actor Id"},"actor_display_name":{"type":"string","title":"Actor Display Name"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_key":{"type":"string","title":"Project Key"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"env_key":{"type":"string","title":"Env Key"},"env_id":{"type":"string","format":"uuid","title":"Env Id"},"id":{"type":"string","format":"uuid","title":"Id"}},"additionalProperties":false,"type":"object","required":["timestamp","method","path","success","status","client_ip","actor_type","actor_id","id"],"title":"APIHistoryEventFullRead"},"APIHistoryEventRead":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"timestamp_utc":{"type":"string","format":"date-time","title":"Timestamp Utc"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"success":{"type":"boolean","title":"Success"},"status":{"type":"integer","title":"Status"},"request_id":{"type":"string","format":"uuid","title":"Request Id"},"client_ip":{"type":"string","title":"Client Ip"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"type":"string","format":"uuid","title":"Actor Id"},"actor_display_name":{"type":"string","title":"Actor Display Name"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_key":{"type":"string","title":"Project Key"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"env_key":{"type":"string","title":"Env Key"},"env_id":{"type":"string","format":"uuid","title":"Env Id"},"id":{"type":"string","format":"uuid","title":"Id"}},"additionalProperties":false,"type":"object","required":["timestamp","method","path","success","status","client_ip","actor_type","actor_id","id"],"title":"APIHistoryEventRead"},"APIKeyCreate":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id"},"object_type":{"allOf":[{"$ref":"#/components/schemas/MemberAccessObj"}],"default":"env"},"access_level":{"allOf":[{"$ref":"#/components/schemas/MemberAccessLevel"}],"default":"admin"},"owner_type":{"allOf":[{"$ref":"#/components/schemas/APIKeyOwnerType"}],"default":"member"},"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["organization_id"],"title":"APIKeyCreate"},"APIKeyOwnerType":{"type":"string","enum":["pdp_config","member","elements","nats_pdp_config"],"title":"APIKeyOwnerType","description":"An enumeration."},"APIKeyRead":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id"},"object_type":{"allOf":[{"$ref":"#/components/schemas/MemberAccessObj"}],"default":"env"},"access_level":{"allOf":[{"$ref":"#/components/schemas/MemberAccessLevel"}],"default":"admin"},"owner_type":{"$ref":"#/components/schemas/APIKeyOwnerType"},"name":{"type":"string","title":"Name"},"id":{"type":"string","format":"uuid","title":"Id"},"secret":{"type":"string","title":"Secret"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by_member":{"$ref":"#/components/schemas/OrgMemberRead"},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At"},"env":{"$ref":"#/components/schemas/EnvironmentRead"},"project":{"$ref":"#/components/schemas/ProjectRead"}},"additionalProperties":false,"type":"object","required":["organization_id","owner_type","id","created_at"],"title":"APIKeyRead"},"APIKeyScopeRead":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the api_key belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the api_key belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the api_key belongs to."}},"additionalProperties":false,"type":"object","required":["organization_id"],"title":"APIKeyScopeRead"},"AVPEngineDecisionLog":{"properties":{"engine":{"type":"string","enum":["AVP"],"title":"Engine","default":"AVP"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"tenant":{"type":"string","title":"Tenant"},"process_time_ms":{"type":"integer","title":"Process Time Ms"},"input":{"type":"object","title":"Input"},"result":{"type":"object","title":"Result"}},"type":"object","required":["timestamp","tenant","input","result"],"title":"AVPEngineDecisionLog"},"AccessRequestApproved":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"access_request_details":{"allOf":[{"$ref":"#/components/schemas/AccessRequestDetails"}],"title":"Access Request Details","description":"details of the access request, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting access"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the access request"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the access request belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the access request belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the access request belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the access request was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the access request was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the access"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the access request was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"access_request"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the access request"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the access request"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","status"],"title":"AccessRequestApproved","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"},"reason":"done onboarding","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"approved","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"new employee","type":"access_request"}},"AccessRequestCanceled":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"access_request_details":{"allOf":[{"$ref":"#/components/schemas/AccessRequestDetails"}],"title":"Access Request Details","description":"details of the access request, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting access"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the access request"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the access request belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the access request belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the access request belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the access request was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the access request was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the access"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the access request was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"access_request"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the access request"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the access request"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","status"],"title":"AccessRequestCanceled","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"},"reason":"done onboarding","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"canceled","type":"access_request"}},"AccessRequestCreateDetails":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"tenant id or key that the user is requesting access to"},"resource":{"type":"string","title":"Resource","description":"resource id or key that the user is requesting access to"},"resource_instance":{"type":"string","title":"Resource Instance","description":"resource instance id or key that the user is requesting access to"},"role":{"type":"string","title":"Role","description":"role id or key that the user is requesting access to"}},"additionalProperties":false,"type":"object","required":["tenant","role"],"title":"AccessRequestCreateDetails"},"AccessRequestDenied":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"access_request_details":{"allOf":[{"$ref":"#/components/schemas/AccessRequestDetails"}],"title":"Access Request Details","description":"details of the access request, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting access"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the access request"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the access request belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the access request belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the access request belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the access request was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the access request was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the access"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the access request was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"access_request"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the access request"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the access request"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","status"],"title":"AccessRequestDenied","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"},"reason":"done onboarding","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"denied","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"need more info","type":"access_request"}},"AccessRequestDetails":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"tenant id or key that the user is requesting access to"},"resource":{"type":"string","title":"Resource","description":"resource id or key that the user is requesting access to"},"resource_instance":{"type":"string","title":"Resource Instance","description":"Either the unique id of the resource instance that the user is requesting access to, or the URL-friendly key of the (i.e: file:my_file)"},"role":{"type":"string","title":"Role","description":"role id or key that the user is requesting access to"},"element_config_id":{"type":"string","title":"Element Config Id","description":"element config id or key that the user is requesting access request from"}},"additionalProperties":false,"type":"object","required":["tenant","resource","role"],"title":"AccessRequestDetails"},"AccessRequestList":{"properties":{"access_request_details":{"allOf":[{"$ref":"#/components/schemas/AccessRequestDetails"}],"title":"Access Request Details","description":"details of the access request, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting access"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the access request"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the access request belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the access request belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the access request belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the access request was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the access request was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the access"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the access request was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"access_request"},"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the access request"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the access request"},"requesting_user_email":{"type":"string","title":"Requesting User Email","description":"email of the user that is requesting the access"},"requesting_user_first_name":{"type":"string","title":"Requesting User First Name","description":"first name of the user that is requesting the access"},"requesting_user_last_name":{"type":"string","title":"Requesting User Last Name","description":"last name of the user that is requesting the access"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","status"],"title":"AccessRequestList","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"},"reason":"string","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"pending","type":"access_request","requesting_user_email":"john@example.com","requesting_user_first_name":"John","requesting_user_last_name":"Doe"}},"AccessRequestRead":{"properties":{"access_request_details":{"allOf":[{"$ref":"#/components/schemas/AccessRequestDetails"}],"title":"Access Request Details","description":"details of the access request, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting access"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the access request"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the access request belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the access request belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the access request belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the access request was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the access request was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the access"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the access request was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"access_request"},"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the access request"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the access request"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","status"],"title":"AccessRequestRead","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"},"reason":"string","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"approved","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"new employee","type":"access_request"}},"AccessRequestReview":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"role":{"type":"string","title":"Role","description":"role id or key that the user is requesting access to"}},"additionalProperties":false,"type":"object","title":"AccessRequestReview","example":{"reviewer_comment":"new employee","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"}},"AccessRequestReviewDeny":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"}},"additionalProperties":false,"type":"object","title":"AccessRequestReviewDeny","example":{"reviewer_comment":"need more info"}},"AccessRequestUserCreate":{"properties":{"access_request_details":{"allOf":[{"$ref":"#/components/schemas/AccessRequestCreateDetails"}],"title":"Access Request Details","description":"details of the access request, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting access"}},"additionalProperties":false,"type":"object","required":["access_request_details"],"title":"AccessRequestUserCreate","example":{"access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66","role":"ac4e70c8-d5be-48af-93eb-760f58fc91a9"},"reason":"done onboarding"}},"ActionBlockEditable":{"properties":{"name":{"type":"string","title":"Name","description":"a more descriptive name for the action"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this action represents in your system"},"attributes":{"type":"object","title":"Attributes"},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true}},"additionalProperties":false,"type":"object","title":"ActionBlockEditable"},"ActionBlockRead":{"properties":{"name":{"type":"string","title":"Name","description":"a more descriptive name for the action"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this action represents in your system"},"attributes":{"type":"object","title":"Attributes"},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the action"},"key":{"type":"string","title":"Key","description":"action key"}},"additionalProperties":false,"type":"object","required":["id"],"title":"ActionBlockRead"},"ActionObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"ActionObj"},"ActivityDetailsList":{"properties":{"kind":{"type":"string","enum":["list"],"title":"Kind","default":"list"},"type":{"type":"string","title":"Type"},"items":{"items":{"$ref":"#/components/schemas/ActivityDetailsObjectData"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["type","items"],"title":"ActivityDetailsList"},"ActivityDetailsObject":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"kind":{"type":"string","enum":["object"],"title":"Kind","default":"object"},"type":{"type":"string","title":"Type"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ActivityDetailsObject"},"ActivityDetailsObjectData":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"}},"additionalProperties":false,"type":"object","title":"ActivityDetailsObjectData"},"ActivityLogEventRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"activity_id":{"type":"string","title":"Activity Id"},"activity_description":{"type":"string","title":"Activity Description"},"activity_details":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/ActivityDetailsObject"},{"$ref":"#/components/schemas/ActivityDetailsList"}],"discriminator":{"propertyName":"kind","mapping":{"object":"#/components/schemas/ActivityDetailsObject","list":"#/components/schemas/ActivityDetailsList"}}},"type":"object","title":"Activity Details"},"client_ip":{"type":"string","title":"Client Ip"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"type":"string","format":"uuid","title":"Actor Id"},"actor_display_name":{"type":"string","title":"Actor Display Name"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_key":{"type":"string","title":"Project Key"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"env_key":{"type":"string","title":"Env Key"},"env_id":{"type":"string","format":"uuid","title":"Env Id"}},"additionalProperties":false,"type":"object","required":["id","timestamp","client_ip","actor_type","actor_id"],"title":"ActivityLogEventRead"},"AddRolePermissions":{"properties":{"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"List of permissions to assign to the role. If a permission is already granted to the role it is skipped. Each permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\"."}},"additionalProperties":false,"type":"object","required":["permissions"],"title":"AddRolePermissions","example":{"permissions":["document:write"]}},"ApproveMessage":{"properties":{"message":{"type":"string","title":"Message"}},"additionalProperties":false,"type":"object","required":["message"],"title":"ApproveMessage"},"AttributeBlockEditable":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"type":"string","title":"Description","description":"optional description string explaining what data this attribute will store"}},"additionalProperties":false,"type":"object","required":["type"],"title":"AttributeBlockEditable"},"AttributeBlockRead":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"type":"string","title":"Description","description":"optional description string explaining what data this attribute will store"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the attribute"},"key":{"type":"string","title":"Key","description":"action key"}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"AttributeBlockRead"},"AttributeType":{"type":"string","enum":["bool","number","string","time","array","json","object","object_array"],"title":"AttributeType","description":"supported attribute primitives"},"AuditLogModel":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"raw_data":{"anyOf":[{"$ref":"#/components/schemas/OPAEngineDecisionLog"},{"$ref":"#/components/schemas/AVPEngineDecisionLog"},{"$ref":"#/components/schemas/GenericEngineDecisionLog"},{"$ref":"#/components/schemas/DummyEngineModel"}],"title":"Raw Data","hidden_from_schema":true},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"created_at":{"type":"string","format":"date-time","title":"Created At","hidden_from_schema":true},"query":{"type":"string","title":"Query"},"user_key":{"type":"string","title":"User Key"},"user_email":{"type":"string","title":"User Email"},"user_name":{"type":"string","title":"User Name"},"resource_type":{"type":"string","title":"Resource Type"},"tenant":{"type":"string","title":"Tenant"},"action":{"type":"string","title":"Action"},"decision":{"type":"boolean","title":"Decision"},"reason":{"type":"string","title":"Reason"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"env_id":{"type":"string","format":"uuid","title":"Env Id"},"pdp_config_id":{"type":"string","format":"uuid","title":"Pdp Config Id"},"input":{"title":"Input"},"result":{"title":"Result"},"context":{"title":"Context"}},"additionalProperties":false,"type":"object","required":["id","timestamp","org_id","project_id","env_id"],"title":"AuditLogModel"},"AuditLogObjectsModel":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_object":{"anyOf":[{"$ref":"#/components/schemas/OrganizationObj"},{"type":"object"}],"title":"Organization Object"},"project_object":{"anyOf":[{"$ref":"#/components/schemas/ProjectObj"},{"type":"object"}],"title":"Project Object"},"environment_object":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentObj"},{"type":"object"}],"title":"Environment Object"},"pdp_config_object":{"anyOf":[{"$ref":"#/components/schemas/PdpConfigObj"},{"type":"object"}],"title":"Pdp Config Object"},"user_object":{"$ref":"#/components/schemas/UserObj"},"action_object":{"$ref":"#/components/schemas/ActionObj"},"resource_type_object":{"$ref":"#/components/schemas/ResourceTypeObj"},"tenant_object":{"$ref":"#/components/schemas/TenantObj"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","title":"AuditLogObjectsModel"},"AuditLogQueryType":{"type":"string","enum":["check","get_user_permissions","get_authorized_users","none"],"title":"AuditLogQueryType","description":"Filter audit logs by the type of query that generated them."},"AuditLogReplayRequest":{"properties":{"pdp_url":{"type":"string","title":"Pdp Url","description":"URL of the PDP to test against","example":"http://mydomain.com:7766"},"start_time":{"type":"integer","title":"Start Time","description":"Start time for the query (in seconds since epoch). Defaults to 24 hours ago.","example":1616432400},"end_time":{"type":"integer","title":"End Time","description":"End time for the query (in seconds since epoch). Defaults to current time.","example":1616518800},"concurrency_limit":{"type":"integer","title":"Concurrency Limit","description":"Concurrency limit for processing documents (max: 5)","default":10,"example":10},"graceful_shutdown_s":{"type":"integer","title":"Graceful Shutdown S","description":"Graceful shutdown time in seconds","default":60,"example":60}},"type":"object","required":["pdp_url"],"title":"AuditLogReplayRequest","description":"Request model for audit log replay"},"AuditLogReplayResponse":{"properties":{"message":{"type":"string","title":"Message"},"document_count":{"type":"integer","title":"Document Count"}},"type":"object","required":["message","document_count"],"title":"AuditLogReplayResponse","description":"Response model for audit log replay"},"AuditLogSortKey":{"type":"string","enum":["None","timestamp"],"title":"AuditLogSortKey","description":"An enumeration."},"AuthMechanism":{"type":"string","enum":["Bearer","Basic","Headers"],"title":"AuthMechanism","description":"An enumeration."},"BillingTierType":{"type":"string","enum":["free","startup","pro","enterprise","internal","trial"],"title":"BillingTierType","description":"An enumeration."},"BulkRoleAssignmentReport":{"properties":{"assignments_created":{"type":"integer","title":"Assignments Created","default":0}},"additionalProperties":false,"type":"object","title":"BulkRoleAssignmentReport"},"BulkRoleUnAssignmentReport":{"properties":{"assignments_removed":{"type":"integer","title":"Assignments Removed","default":0}},"additionalProperties":false,"type":"object","title":"BulkRoleUnAssignmentReport"},"ConditionSet":{"properties":{"key":{"type":"string","title":"Key","description":"The key of the condition set."},"attribute":{"type":"string","title":"Attribute","description":"The attribute of the condition set."},"operator":{"type":"string","title":"Operator","description":"The operator of the condition set."},"value":{"type":"string","title":"Value","description":"The value of the condition set."}},"additionalProperties":false,"type":"object","required":["key","attribute","operator","value"],"title":"ConditionSet"},"ConditionSetCreate":{"properties":{"key":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name."},"type":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"the type of the set: UserSet or ResourceSet","default":"userset"},"autogenerated":{"type":"boolean","title":"Autogenerated","description":"whether the set was autogenerated by the system.","default":false},"resource_id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Resource Id","description":"For ResourceSets, the id of the base resource."},"name":{"type":"string","title":"Name","description":"A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'"},"description":{"type":"string","title":"Description","description":"an optional longer description of the set"},"conditions":{"type":"object","title":"Conditions","description":"a boolean expression that consists of multiple conditions, with and/or logic.","default":{}},"parent_id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Parent Id","description":"Parent Condition Set"}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ConditionSetCreate","example":{"key":"na_based_employees","name":"US or Canada based employees","type":"userset","conditions":{"allOf":[{"user.role":{"equals":"employee"}},{"user.location":{"in":["US","Canada"]}}]}}},"ConditionSetRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name."},"type":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"the type of the set: UserSet or ResourceSet","default":"userset"},"autogenerated":{"type":"boolean","title":"Autogenerated","description":"whether the set was autogenerated by the system.","default":false},"resource_id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Resource Id","description":"For ResourceSets, the id of the base resource."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the condition set"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the condition set belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the condition set belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the condition set belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the condition set was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the condition set was last updated/modified (ISO_8601 format)."},"resource":{"$ref":"#/components/schemas/ResourceRead"},"name":{"type":"string","title":"Name","description":"A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'"},"description":{"type":"string","title":"Description","description":"an optional longer description of the set"},"conditions":{"type":"object","title":"Conditions","description":"a boolean expression that consists of multiple conditions, with and/or logic.","default":{}},"parent_id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Parent Id","description":"Parent Condition Set"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","name"],"title":"ConditionSetRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","resource_id":"e05f8571-f31e-20b2-2c45-15ae74cfb0f1","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"na_based_employees","name":"US or Canada based employees","description":"All employees based in the US or Canada","type":"userset","autogenerated":false,"conditions":{"allOf":[{"user.role":{"equals":"employee"}},{"user.location":{"in":["US","Canada"]}}]}}},"ConditionSetRuleCreate":{"properties":{"user_set":{"type":"string","title":"User Set","description":"The userset that will be given permission, i.e: all the users matching this rule will be given the specified permission"},"permission":{"type":"string","title":"Permission","description":"The permission that will be granted to the userset *on* the resourceset. The permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\"."},"resource_set":{"type":"string","title":"Resource Set","description":"The resourceset that represents the resources that are granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted *permission*"},"is_role":{"type":"boolean","title":"Is Role","description":"if True, will set the condition set rule to the role's autogen user-set.","default":false},"is_resource":{"type":"boolean","title":"Is Resource","description":"if True, will set the condition set rule to the resource's autogen resource-set.","default":false}},"additionalProperties":false,"type":"object","required":["user_set","permission","resource_set"],"title":"ConditionSetRuleCreate","example":{"user_set":"us_based_employees","permission":"repository:clone","resource_set":"private_repos"}},"ConditionSetRuleRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the condition set rule"},"key":{"type":"string","title":"Key","description":"A unique id by which Permit will identify this condition set rule."},"user_set":{"type":"string","title":"User Set","description":"the userset that is currently granted permissions, i.e: all the users matching this rule are granted the permission on the resourceset"},"permission":{"type":"string","title":"Permission","description":"a permission that is currently granted to the userset *on* the resourceset."},"resource_set":{"type":"string","title":"Resource Set","description":"the resourceset that represents the resources that are currently granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted *permission*"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the condition set rule belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the condition set rule belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the condition set rule belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the condition set rule was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the condition set rule was last updated/modified (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["id","key","user_set","permission","resource_set","organization_id","project_id","environment_id","created_at","updated_at"],"title":"ConditionSetRuleRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"us_based_employees_can_repository_clone_private_repos","user_set":"us_based_employees","permission":"repository:clone","resource_set":"private_repos","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:16:22Z"}},"ConditionSetRuleRemove":{"properties":{"user_set":{"type":"string","title":"User Set","description":"The userset that will be unassigned these permission, i.e: all the users matching this rule will lose the specified permission"},"permission":{"type":"string","title":"Permission","description":"The permission that will be removed from the userset *on* the resourceset. The permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\"."},"resource_set":{"type":"string","title":"Resource Set","description":"The resourceset that represents the resources that are no longer granted for access, i.e: all the resources matching this rule can no longer be accessed by the userset, and will be revoked the specified *permission*"},"is_role":{"type":"boolean","title":"Is Role","description":"if True, will set the condition set rule to the role's autogen user-set.","default":false},"is_resource":{"type":"boolean","title":"Is Resource","description":"if True, will set the condition set rule to the resource's autogen resource-set.","default":false}},"additionalProperties":false,"type":"object","required":["user_set","permission","resource_set"],"title":"ConditionSetRuleRemove","example":{"user_set":"us_based_employees","permission":"repository:clone","resource_set":"private_repos"}},"ConditionSetType":{"type":"string","enum":["userset","resourceset"],"title":"ConditionSetType","description":"An enumeration."},"ConditionSetUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"A descriptive name for the set, i.e: 'US based employees' or 'Users behind VPN'"},"description":{"type":"string","title":"Description","description":"an optional longer description of the set"},"conditions":{"type":"object","title":"Conditions","description":"a boolean expression that consists of multiple conditions, with and/or logic.","default":{}},"parent_id":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Parent Id","description":"Parent Condition Set"}},"additionalProperties":false,"type":"object","title":"ConditionSetUpdate","example":{"name":"US based managers","conditions":{"allOf":[{"user.role":{"equals":"manager"}},{"user.location":{"in":["US"]}}]}}},"DataSourceConfig":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/DataSourceEntryWithPollingInterval"},"type":"array","title":"Entries","description":"list of data sources and how to fetch from them","default":[]}},"type":"object","title":"DataSourceConfig","description":"Static list of Data Source Entries returned to client.\n\nAnswers this question for the client: from where should i get the\nfull picture of data i need? (as opposed to incremental data\nupdates)"},"DataSourceEntryWithPollingInterval":{"properties":{"url":{"type":"string","title":"Url","description":"Url source to query for data"},"config":{"type":"object","title":"Config","description":"Suggested fetcher configuration (e.g. auth or method) to fetch data with"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","description":"topics the data applies to","default":["policy_data"]},"dst_path":{"type":"string","title":"Dst Path","description":"OPA data api path to store the document at","default":""},"save_method":{"type":"string","title":"Save Method","description":"Method used to write into OPA - PUT/PATCH, when using the PATCH method the data field should conform to the JSON patch schema defined in RFC 6902(https://datatracker.ietf.org/doc/html/rfc6902#section-3)","default":"PUT"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/JSONPatchAction"},"type":"array"},{"items":{},"type":"array"},{"type":"object"}],"title":"Data","description":"Data payload to embed within the data update (instead of having the client fetch it from the url)."},"periodic_update_interval":{"type":"number","title":"Periodic Update Interval","description":"Polling interval to refresh data from data source"}},"type":"object","required":["url"],"title":"DataSourceEntryWithPollingInterval","description":"Data source configuration - where client's should retrieve data from and how they should store it"},"DerivedRoleBlockEdit":{"properties":{"when":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}],"title":"When","description":"the settings of the derived role","default":{"no_direct_roles_on_object":false}},"users_with_role":{"items":{"$ref":"#/components/schemas/DerivedRoleRuleCreate"},"type":"array","title":"Users With Role","description":"the rules of the derived role","default":[]}},"additionalProperties":false,"type":"object","title":"DerivedRoleBlockEdit","example":{"users_with_role":[{"role":"Admin","on_resource":"organization","linked_by_relation":"owner"}]}},"DerivedRoleBlockRead":{"properties":{"when":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}],"title":"When","description":"the settings of the derived role","default":{"no_direct_roles_on_object":false}},"id":{"type":"string","format":"uuid","title":"Id","description":"The unique id of the derived_role"},"users_with_role":{"items":{"$ref":"#/components/schemas/DerivedRoleRuleRead"},"type":"array","title":"Users With Role","description":"the rules of the derived role","default":[]}},"additionalProperties":false,"type":"object","required":["id"],"title":"DerivedRoleBlockRead","example":{"id":"6acf18ef-aec4-4c49-993d-4a234f3259f5","users_with_role":[{"role":"Admin","on_resource":"organization","linked_by_relation":"owner","role_id":"f4026ebd-2b89-4438-aaee-f2c6f1f5d3c8","resource_id":"3b9ad025-8fcc-4332-bad7-ce8f71a88e29","relation_id":"c10bafe4-5304-4ee8-9eb9-c081a5b16149"}]}},"DerivedRoleRuleCreate":{"properties":{"role":{"type":"string","title":"Role","description":"the role key that needs to exist on the related resource (from the relation)"},"on_resource":{"type":"string","title":"On Resource","description":"the resource key that needs to exist on the related role (from the relation)"},"linked_by_relation":{"type":"string","title":"Linked By Relation","description":"the relation key that needs to exist between the resource and the related resource"},"when":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}],"title":"When","description":"the settings of the derived role rule","default":{"no_direct_roles_on_object":false}}},"additionalProperties":false,"type":"object","required":["role","on_resource","linked_by_relation"],"title":"DerivedRoleRuleCreate","example":{"role":"Admin","on_resource":"organization","linked_by_relation":"owner"}},"DerivedRoleRuleDelete":{"properties":{"role":{"type":"string","title":"Role","description":"the role key that needs to exist on the related resource (from the relation)"},"on_resource":{"type":"string","title":"On Resource","description":"the resource key that needs to exist on the related role (from the relation)"},"linked_by_relation":{"type":"string","title":"Linked By Relation","description":"the relation key that needs to exist between the resource and the related resource"},"when":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}],"title":"When","description":"the settings of the derived role rule","default":{"no_direct_roles_on_object":false}}},"additionalProperties":false,"type":"object","required":["role","on_resource","linked_by_relation"],"title":"DerivedRoleRuleDelete","example":{"role":"Admin","on_resource":"organization","linked_by_relation":"owner"}},"DerivedRoleRuleRead":{"properties":{"role_id":{"type":"string","format":"uuid","title":"Role Id","description":"the role id that needs to exist on the related resource (from the relation)"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"the resource id that needs to exist on the related role (from the relation)"},"relation_id":{"type":"string","format":"uuid","title":"Relation Id","description":"the relation id that needs to exist between the resource and the related resource"},"role":{"type":"string","title":"Role","description":"the role key that needs to exist on the related resource (from the relation)"},"on_resource":{"type":"string","title":"On Resource","description":"the resource key that needs to exist on the related role (from the relation)"},"linked_by_relation":{"type":"string","title":"Linked By Relation","description":"the relation key that needs to exist between the resource and the related resource"},"when":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_derived_role_rule__DerivationSettings"}],"title":"When","description":"the settings of the derived role rule","default":{"no_direct_roles_on_object":false}}},"additionalProperties":false,"type":"object","required":["role_id","resource_id","relation_id","role","on_resource","linked_by_relation"],"title":"DerivedRoleRuleRead","example":{"role":"Admin","on_resource":"organization","linked_by_relation":"owner","role_id":"f4026ebd-2b89-4438-aaee-f2c6f1f5d3c8","resource_id":"3b9ad025-8fcc-4332-bad7-ce8f71a88e29","relation_id":"c10bafe4-5304-4ee8-9eb9-c081a5b16149"}},"DetailedAuditLogModel":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"raw_data":{"anyOf":[{"$ref":"#/components/schemas/OPAEngineDecisionLog"},{"$ref":"#/components/schemas/AVPEngineDecisionLog"},{"$ref":"#/components/schemas/GenericEngineDecisionLog"},{"$ref":"#/components/schemas/DummyEngineModel"}],"title":"Raw Data"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"created_at":{"type":"string","format":"date-time","title":"Created At","hidden_from_schema":true},"query":{"type":"string","title":"Query"},"user_key":{"type":"string","title":"User Key"},"user_email":{"type":"string","title":"User Email"},"user_name":{"type":"string","title":"User Name"},"resource_type":{"type":"string","title":"Resource Type"},"tenant":{"type":"string","title":"Tenant"},"action":{"type":"string","title":"Action"},"decision":{"type":"boolean","title":"Decision"},"reason":{"type":"string","title":"Reason"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"env_id":{"type":"string","format":"uuid","title":"Env Id"},"pdp_config_id":{"type":"string","format":"uuid","title":"Pdp Config Id"},"input":{"title":"Input"},"result":{"title":"Result"},"context":{"title":"Context"},"objects":{"allOf":[{"$ref":"#/components/schemas/AuditLogObjectsModel"}],"title":"Objects","default":{}}},"type":"object","required":["id","raw_data","timestamp","org_id","project_id","env_id"],"title":"DetailedAuditLogModel"},"DummyEngineModel":{"properties":{"engine":{"$ref":"#/components/schemas/Engine"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","title":"DummyEngineModel","description":"dummy engine class in case we couldn't parse the log but we didn't want to drop it"},"ElementsConfigCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the elements_config (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_config."},"name":{"type":"string","title":"Name","description":"The name of the elements_config"},"elements_type":{"allOf":[{"$ref":"#/components/schemas/ElementsType"}],"description":"The type of the elements interface, e.g: user management"},"settings":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"boolean"}]},"type":"object","title":"Settings","description":"Obj with the options of the elements interface, e.g: primary color"},"email_notifications":{"type":"boolean","title":"Email Notifications","description":"Whether to send email notifications to users using your Email Provider you set","default":false},"roles_to_levels":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Roles To Levels","description":"Obj with levels as keys and role ids as values"},"webhook":{"$ref":"#/components/schemas/WebhookCreateWithElements"}},"additionalProperties":false,"type":"object","required":["key","name","elements_type","settings","roles_to_levels"],"title":"ElementsConfigCreate"},"ElementsConfigRead":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the elements_config (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_config."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the elements_config"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the elements_config belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the elements_config belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the elements_config belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the elements_config was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the elements_config was last updated/modified (ISO_8601 format)."},"is_active":{"type":"boolean","title":"Is Active"},"name":{"type":"string","title":"Name","description":"The name of the elements_config"},"elements_type":{"allOf":[{"$ref":"#/components/schemas/ElementsType"}],"description":"The type of the elements interface, e.g: user management"},"settings":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"boolean"}]},"type":"object","title":"Settings","description":"Obj with the options of the elements interface, e.g: primary color"},"email_notifications":{"type":"boolean","title":"Email Notifications","description":"Whether to send email notifications to users using your Email Provider you set","default":false},"roles_to_levels":{"additionalProperties":{"items":{"$ref":"#/components/schemas/PermissionLevelRoleRead"},"type":"array"},"type":"object","title":"Roles To Levels","description":"Obj with levels as keys and role ids as values"},"webhook":{"$ref":"#/components/schemas/WebhookRead"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","is_active","name","elements_type","settings","roles_to_levels"],"title":"ElementsConfigRead"},"ElementsConfigRuntimeRead":{"properties":{"config":{"$ref":"#/components/schemas/ElementsConfigRead"},"current_permission_level":{"$ref":"#/components/schemas/ElementsPermissionLevel"}},"additionalProperties":false,"type":"object","required":["config","current_permission_level"],"title":"ElementsConfigRuntimeRead"},"ElementsConfigUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the elements_config"},"elements_type":{"allOf":[{"$ref":"#/components/schemas/ElementsType"}],"description":"The type of the elements interface, e.g: user management"},"settings":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"boolean"}]},"type":"object","title":"Settings","description":"Obj with the options of the elements interface, e.g: primary color"},"email_notifications":{"type":"boolean","title":"Email Notifications","description":"Whether to send email notifications to users using your Email Provider you set","default":false},"roles_to_levels":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Roles To Levels","description":"Obj with levels as keys and role ids as values"},"webhook":{"$ref":"#/components/schemas/WebhookUpdate"}},"additionalProperties":false,"type":"object","required":["roles_to_levels"],"title":"ElementsConfigUpdate"},"ElementsPermissionLevel":{"type":"string","enum":["LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","HIDDEN","UNCONFIGURED"],"title":"ElementsPermissionLevel","description":"An enumeration."},"ElementsRoleRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the role"},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"name":{"type":"string","title":"Name","description":"The name of the role"},"permission_level":{"$ref":"#/components/schemas/ElementsPermissionLevel"}},"additionalProperties":false,"type":"object","required":["id","key","name","permission_level"],"title":"ElementsRoleRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"editor","name":"Editor","permission_level":"LEVEL_2"}},"ElementsType":{"type":"string","enum":["user_management","audit_log","approval_flow","operation_approval","approval_management"],"title":"ElementsType","description":"An enumeration."},"ElementsUserCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9|@+\\-\\._]+$","title":"Key","description":"A unique id by which Permit will identify the user for permission checks."},"email":{"type":"string","format":"email","title":"Email","description":"The email of the user. If synced, will be unique inside the environment."},"first_name":{"type":"string","title":"First Name","description":"First name of the user."},"last_name":{"type":"string","title":"Last Name","description":"Last name of the user."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary user attributes that will be used to enforce attribute-based access control policies.","default":{}},"role_assignments":{"items":{"$ref":"#/components/schemas/UserRoleCreate"},"type":"array","title":"Role Assignments","description":"List of roles to assign to the user in the environment."},"role":{"type":"string","title":"Role"}},"additionalProperties":false,"type":"object","required":["key"],"title":"ElementsUserCreate","example":{"key":"user|892179821739812389327","email":"jane@coolcompany.com","first_name":"Jane","last_name":"Doe","attributes":{"department":"marketing","age":30,"subscription":{"tier":"pro","expired":false}},"role":"admin"}},"ElementsUserInviteApprove":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"The email of the user that being invited"},"key":{"type":"string","pattern":"^[A-Za-z0-9|@+\\-\\._]+$","title":"Key","description":"The key of the elements user invite"},"attributes":{"type":"object","title":"Attributes","description":"The attributes of the user"}},"additionalProperties":false,"type":"object","required":["email","key","attributes"],"title":"ElementsUserInviteApprove"},"ElementsUserInviteCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9|@+\\-\\._]+$","title":"Key","description":"The key of the user that is being invited"},"status":{"allOf":[{"$ref":"#/components/schemas/UserInviteStatus"}],"description":"The status of the user invite"},"email":{"type":"string","format":"email","title":"Email","description":"The email of the user that being invited"},"first_name":{"type":"string","title":"First Name","description":"The first name of the user that is being invited"},"last_name":{"type":"string","title":"Last Name","description":"The last name of the user that is being invited"},"role_id":{"type":"string","format":"uuid","title":"Role Id","description":"The role of the user that is being invited"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"The tenant id of the user that is being invited"},"resource_instance_id":{"type":"string","format":"uuid","title":"Resource Instance Id","description":"The resource instance id of the user that is being invited"}},"additionalProperties":false,"type":"object","required":["key","status","email","first_name","last_name","role_id","tenant_id","resource_instance_id"],"title":"ElementsUserInviteCreate"},"ElementsUserInviteRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the elements_user_invite"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the elements_user_invite belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the elements_user_invite belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the elements_user_invite belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the elements_user_invite was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the elements_user_invite was last updated/modified (ISO_8601 format)."},"key":{"type":"string","pattern":"^[A-Za-z0-9|@+\\-\\._]+$","title":"Key","description":"The key of the user that is being invited"},"status":{"allOf":[{"$ref":"#/components/schemas/UserInviteStatus"}],"description":"The status of the user invite"},"email":{"type":"string","format":"email","title":"Email","description":"The email of the user that being invited"},"first_name":{"type":"string","title":"First Name","description":"The first name of the user that is being invited"},"last_name":{"type":"string","title":"Last Name","description":"The last name of the user that is being invited"},"role_id":{"type":"string","format":"uuid","title":"Role Id","description":"The role of the user that is being invited"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"The tenant id of the user that is being invited"},"resource_instance_id":{"type":"string","format":"uuid","title":"Resource Instance Id","description":"The resource instance id of the user that is being invited"}},"additionalProperties":false,"type":"object","required":["id","organization_id","project_id","environment_id","created_at","updated_at","key","status","email","first_name","last_name","role_id","tenant_id","resource_instance_id"],"title":"ElementsUserInviteRead"},"ElementsUserInviteUpdate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9|@+\\-\\._]+$","title":"Key","description":"The key of the user that is being invited"},"status":{"allOf":[{"$ref":"#/components/schemas/UserInviteStatus"}],"description":"The status of the user invite"},"email":{"type":"string","format":"email","title":"Email","description":"The email of the user that being invited"},"first_name":{"type":"string","title":"First Name","description":"The first name of the user that is being invited"},"last_name":{"type":"string","title":"Last Name","description":"The last name of the user that is being invited"},"role_id":{"type":"string","format":"uuid","title":"Role Id","description":"The role of the user that is being invited"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"The tenant id of the user that is being invited"},"resource_instance_id":{"type":"string","format":"uuid","title":"Resource Instance Id","description":"The resource instance id of the user that is being invited"}},"additionalProperties":false,"type":"object","required":["key","status","email","first_name","last_name","role_id","tenant_id","resource_instance_id"],"title":"ElementsUserInviteUpdate"},"ElementsUserRoleCreate":{"properties":{"role":{"type":"string","title":"Role","description":"the role that will be assigned (accepts either the role id or the role key)"}},"additionalProperties":false,"type":"object","required":["role"],"title":"ElementsUserRoleCreate","example":{"role":"admin"}},"ElementsUserRoleRemove":{"properties":{"role":{"type":"string","title":"Role","description":"the role that will be unassigned (accepts either the role id or the role key)"}},"additionalProperties":false,"type":"object","required":["role"],"title":"ElementsUserRoleRemove","example":{"role":"editor"}},"EmailConfigurationCreate":{"oneOf":[{"$ref":"#/components/schemas/SMTPEmailConfigurationCreate"},{"$ref":"#/components/schemas/MailgunEmailConfigurationCreate"}],"additionalProperties":false,"title":"EmailConfigurationCreate","discriminator":{"propertyName":"email_provider_type","mapping":{"smtp":"#/components/schemas/SMTPEmailConfigurationCreate","mailgun":"#/components/schemas/MailgunEmailConfigurationCreate"}}},"EmailConfigurationRead":{"oneOf":[{"$ref":"#/components/schemas/SMTPEmailConfigurationRead"},{"$ref":"#/components/schemas/MailgunEmailConfigurationRead"}],"additionalProperties":false,"title":"EmailConfigurationRead","discriminator":{"propertyName":"email_provider_type","mapping":{"smtp":"#/components/schemas/SMTPEmailConfigurationRead","mailgun":"#/components/schemas/MailgunEmailConfigurationRead"}}},"EmailMessageKeys":{"type":"string","enum":["approval_flows_deny","user_management_invite","approval_flows_approve","approval_flows_request","test_email"],"title":"EmailMessageKeys","description":"An enumeration."},"EmailTemplateMessage":{"properties":{"message_type":{"allOf":[{"$ref":"#/components/schemas/EmailMessageKeys"}],"description":"The key of the message, can be either 'approval_flows_deny', 'approval_flows_approve', 'approval_flows_request'"},"message_content":{"type":"string","title":"Message Content","description":"The value of the message"}},"additionalProperties":false,"type":"object","required":["message_type","message_content"],"title":"EmailTemplateMessage"},"EmailTemplateRead":{"properties":{"template_type":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateType"}],"description":"The type of the email template, can be either 'approval_flows' or 'user_management'"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the EmailTemplate"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the EmailTemplate belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the EmailTemplate belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the EmailTemplate belongs to."},"from_address":{"type":"string","format":"email","title":"From Address","description":"The from address the mails will be sent from"},"redirect_to":{"type":"string","maxLength":65536,"minLength":1,"format":"uri","title":"Redirect To","description":"The redirect url the user will be redirected to after clicking the link in the email"},"url_ttl":{"type":"string","title":"Url Ttl","description":"The time to live of the url in the email, in seconds"},"subject":{"type":"string","title":"Subject","description":"The subject of the email template"},"messages":{"items":{"$ref":"#/components/schemas/EmailTemplateMessage"},"type":"array","title":"Messages","description":"The messages of the email template"}},"additionalProperties":false,"type":"object","required":["template_type","id","organization_id","project_id","environment_id","from_address","redirect_to","url_ttl","subject","messages"],"title":"EmailTemplateRead"},"EmailTemplateType":{"type":"string","enum":["approval_flows","user_management","test_email"],"title":"EmailTemplateType","description":"An enumeration."},"EmailTemplateUpdate":{"properties":{"from_address":{"type":"string","format":"email","title":"From Address","description":"The from address the mails will be sent from"},"redirect_to":{"type":"string","maxLength":65536,"minLength":1,"format":"uri","title":"Redirect To","description":"The redirect url the user will be redirected to after clicking the link in the email"},"url_ttl":{"type":"string","title":"Url Ttl","description":"The time to live of the url in the email, in seconds"},"subject":{"type":"string","title":"Subject","description":"The subject of the email template"},"messages":{"items":{"$ref":"#/components/schemas/EmailTemplateMessage"},"type":"array","title":"Messages","description":"The messages of the email template"}},"additionalProperties":false,"type":"object","required":["from_address","redirect_to","url_ttl","subject","messages"],"title":"EmailTemplateUpdate"},"Engine":{"type":"string","enum":["OPA","AVP","GENERIC"],"title":"Engine","description":"An enumeration."},"EnvironmentCopy":{"properties":{"target_env":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyTarget"}],"title":"Target Env","description":"If copying a new environment, the environment configuration. If copying to an existing environment, the environment identifier"},"conflict_strategy":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyConflictStrategy"}],"description":"Action to take when detecting a conflict when copying. Only applies to copying into an existing environment","default":"fail"},"scope":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyScope"}],"title":"Scope","description":"Filters to include and exclude copied objects","default":{"resources":{"include":[],"exclude":[]},"roles":{"include":[],"exclude":[]},"user_sets":{"include":[],"exclude":[]},"resource_sets":{"include":[],"exclude":[]},"custom_policies":{"include":[],"exclude":[]}}}},"additionalProperties":false,"type":"object","required":["target_env"],"title":"EnvironmentCopy"},"EnvironmentCopyConflictStrategy":{"type":"string","enum":["fail","overwrite"],"title":"EnvironmentCopyConflictStrategy","description":"An enumeration."},"EnvironmentCopyScope":{"properties":{"resources":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyScopeFilters"}],"title":"Resources","description":"Resources to copy","default":{"include":[],"exclude":[]}},"roles":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyScopeFilters"}],"title":"Roles","description":"Roles to copy","default":{"include":[],"exclude":[]}},"user_sets":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyScopeFilters"}],"title":"User Sets","description":"User sets to copy","default":{"include":[],"exclude":[]}},"resource_sets":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyScopeFilters"}],"title":"Resource Sets","description":"Resource sets to copy","default":{"include":[],"exclude":[]}},"custom_policies":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCopyScopeFilters"}],"title":"Custom Policies","description":"Custom policies to copy","default":{"include":[],"exclude":[]}}},"additionalProperties":false,"type":"object","title":"EnvironmentCopyScope"},"EnvironmentCopyScopeFilters":{"properties":{"include":{"items":{"type":"string"},"type":"array","title":"Include","description":"Objects to include (use * as wildcard)","default":[]},"exclude":{"items":{"type":"string"},"type":"array","title":"Exclude","description":"Object to exclude (use * as wildcard)","default":[]}},"additionalProperties":false,"type":"object","title":"EnvironmentCopyScopeFilters"},"EnvironmentCopyTarget":{"properties":{"existing":{"type":"string","title":"Existing","description":"Identifier of an existing environment to copy into"},"new":{"allOf":[{"$ref":"#/components/schemas/EnvironmentCreate"}],"title":"New","description":"Description of the environment to create. This environment must not already exist."}},"additionalProperties":false,"type":"object","title":"EnvironmentCopyTarget"},"EnvironmentCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment."},"name":{"type":"string","title":"Name","description":"The name of the environment"},"description":{"type":"string","title":"Description","description":"an optional longer description of the environment"},"custom_branch_name":{"type":"string","title":"Custom Branch Name","description":"when using gitops feature, an optional branch name for the environment"},"jwks":{"allOf":[{"$ref":"#/components/schemas/JwksConfig"}],"title":"Jwks","description":"jwks for element frontend only login"},"settings":{"type":"object","title":"Settings","description":"the settings for this environment"}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"EnvironmentCreate"},"EnvironmentObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"EnvironmentObj"},"EnvironmentRead":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the environment"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the environment belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the environment belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the environment was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the environment was last updated/modified (ISO_8601 format)."},"avp_policy_store_id":{"type":"string","title":"Avp Policy Store Id","hidden_from_schema":true},"name":{"type":"string","title":"Name","description":"The name of the environment"},"description":{"type":"string","title":"Description","description":"an optional longer description of the environment"},"custom_branch_name":{"type":"string","title":"Custom Branch Name","description":"when using gitops feature, an optional branch name for the environment"},"jwks":{"allOf":[{"$ref":"#/components/schemas/JwksConfig"}],"title":"Jwks","description":"jwks for element frontend only login"},"settings":{"type":"object","title":"Settings","description":"the settings for this environment"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","created_at","updated_at","name"],"title":"EnvironmentRead"},"EnvironmentReadWithEmailConfig":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the environment"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the environment belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the environment belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the environment was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the environment was last updated/modified (ISO_8601 format)."},"avp_policy_store_id":{"type":"string","title":"Avp Policy Store Id","hidden_from_schema":true},"name":{"type":"string","title":"Name","description":"The name of the environment"},"description":{"type":"string","title":"Description","description":"an optional longer description of the environment"},"custom_branch_name":{"type":"string","title":"Custom Branch Name","description":"when using gitops feature, an optional branch name for the environment"},"jwks":{"allOf":[{"$ref":"#/components/schemas/JwksConfig"}],"title":"Jwks","description":"jwks for element frontend only login"},"settings":{"type":"object","title":"Settings","description":"the settings for this environment"},"email_configuration":{"type":"string","format":"uuid","title":"Email Configuration"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","created_at","updated_at","name","email_configuration"],"title":"EnvironmentReadWithEmailConfig"},"EnvironmentStatistics":{"properties":{"roles":{"type":"integer","minimum":0.0,"title":"Roles"},"users":{"type":"integer","minimum":0.0,"title":"Users"},"policies":{"type":"integer","minimum":0.0,"title":"Policies"},"resources":{"type":"integer","minimum":0.0,"title":"Resources"},"tenants":{"type":"integer","minimum":0.0,"title":"Tenants"},"has_decision_logs":{"type":"boolean","title":"Has Decision Logs"},"members":{"items":{"$ref":"#/components/schemas/OrgMemberReadWithGrants"},"type":"array","title":"Members"},"mau":{"type":"integer","minimum":0.0,"title":"Mau"}},"additionalProperties":false,"type":"object","required":["roles","users","policies","resources","tenants","has_decision_logs","members","mau"],"title":"EnvironmentStatistics"},"EnvironmentStats":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the environment"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the environment belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the environment belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the environment was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the environment was last updated/modified (ISO_8601 format)."},"avp_policy_store_id":{"type":"string","title":"Avp Policy Store Id","hidden_from_schema":true},"name":{"type":"string","title":"Name","description":"The name of the environment"},"description":{"type":"string","title":"Description","description":"an optional longer description of the environment"},"custom_branch_name":{"type":"string","title":"Custom Branch Name","description":"when using gitops feature, an optional branch name for the environment"},"jwks":{"allOf":[{"$ref":"#/components/schemas/JwksConfig"}],"title":"Jwks","description":"jwks for element frontend only login"},"settings":{"type":"object","title":"Settings","description":"the settings for this environment"},"pdp_configs":{"items":{"$ref":"#/components/schemas/PDPConfigRead"},"type":"array","title":"Pdp Configs"},"stats":{"$ref":"#/components/schemas/EnvironmentStatistics"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","created_at","updated_at","name","pdp_configs","stats"],"title":"EnvironmentStats"},"EnvironmentUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the environment"},"description":{"type":"string","title":"Description","description":"an optional longer description of the environment"},"custom_branch_name":{"type":"string","title":"Custom Branch Name","description":"when using gitops feature, an optional branch name for the environment"},"jwks":{"allOf":[{"$ref":"#/components/schemas/JwksConfig"}],"title":"Jwks","description":"jwks for element frontend only login"},"settings":{"type":"object","title":"Settings","description":"the settings for this environment"}},"additionalProperties":false,"type":"object","title":"EnvironmentUpdate"},"ErrorCode":{"type":"string","enum":["INVALID_INPUT","INVALID_JWKS_CONFIGURATION","UNEXPECTED_ERROR","NOT_FOUND","DUPLICATE_ENTITY","EMPTY_DECISION_LOGS","MISSING_REQUEST_ATTRIBUTE","FORBIDDEN_ACCESS","INVALID_PERMISSION_FORMAT","MISSING_PERMISSIONS","UNSUPPORTED_ATTRIBUTE_TYPE","MISSING_RESOURCE_ATTRIBUTE","MISMATCH_ATTRIBUTES_TYPES","INVALID_POLICY_REPO_STATUS","INVALID_SMTP_CONFIGURATION","MISMATCH_RESOURCE_INSTANCES_TENANTS","PAGINATION_SIZE_OVERREACHED","MISMATCH_RELATION_TYPE","CONCURRENT_OPERATION_DISALLOWED","UNAUTHORIZED"],"title":"ErrorCode","description":"An enumeration."},"ErrorDetails":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"support_link":{"type":"string","maxLength":65536,"minLength":1,"format":"uri","title":"Support Link"},"error_code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","title":"Message","default":""},"additional_info":{"title":"Additional Info"}},"type":"object","required":["id","title","error_code"],"title":"ErrorDetails"},"FailedInvite":{"properties":{"email":{"type":"string","title":"Email"},"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["email","reason"],"title":"FailedInvite"},"GenericEngineDecisionLog":{"properties":{"engine":{"type":"string","enum":["GENERIC"],"title":"Engine","default":"GENERIC"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"decision":{"type":"boolean","title":"Decision"},"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"process_time_ms":{"type":"integer","title":"Process Time Ms","default":0},"query":{"type":"string","title":"Query"},"user_key":{"type":"string","title":"User Key"},"user_email":{"type":"string","title":"User Email"},"user_name":{"type":"string","title":"User Name"},"action":{"type":"string","title":"Action"},"resource_type":{"type":"string","title":"Resource Type"},"tenant":{"type":"string","title":"Tenant"},"input":{"title":"Input"},"result":{"title":"Result"},"context":{"title":"Context"}},"additionalProperties":false,"type":"object","required":["timestamp","decision"],"title":"GenericEngineDecisionLog","description":"Generic decision log format for external or custom integrations.\n\nAccepts a flat JSON payload with explicit fields rather than requiring\nengine-specific nested structures. Unknown fields are rejected to prevent\nunbounded storage growth."},"GroupAddRole":{"properties":{"role":{"type":"string","title":"Role","description":"The role key or id that will be assigned to the group."},"resource":{"type":"string","title":"Resource","description":"The resource key or id that the role belongs to."},"resource_instance":{"type":"string","title":"Resource Instance","description":"The resource instance key or id that the role belongs to."},"tenant":{"type":"string","title":"Tenant","description":"The tenant key or id that the role belongs to."}},"type":"object","required":["role","resource","resource_instance","tenant"],"title":"GroupAddRole","example":{"role":"admin","resource":"rnd","resource_instance":"backend","tenant":"business"}},"GroupAssignUser":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"The tenant key or id that the user belongs to."}},"type":"object","required":["tenant"],"title":"GroupAssignUser","example":{"tenant":"business"}},"GroupAssignment":{"properties":{"group_instance_key":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the (i.e: file:my_file)"}},"type":"object","required":["group_instance_key"],"title":"GroupAssignment"},"GroupCreate":{"properties":{"group_resource_type_key":{"type":"string","title":"Group Resource Type Key","description":"The key of the resource type that the group belongs to.","default":"group"},"group_instance_key":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the (i.e: file:my_file)"},"group_tenant":{"type":"string","title":"Group Tenant","description":"The tenant key or id that the group belongs to."}},"additionalProperties":false,"type":"object","required":["group_instance_key","group_tenant"],"title":"GroupCreate","example":{"group_resource_type_key":"company","group_instance_key":"Acme","group_tenant":"business"}},"GroupRead":{"properties":{"assigned_roles":{"items":{"type":"string"},"type":"array","title":"Assigned Roles","description":"List of roles that are assigned to this group"},"users":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Users","description":"List of user ids that are assigned to this group"},"group_resource_type_key":{"type":"string","title":"Group Resource Type Key","description":"The key of the resource type that the group belongs to.","default":"group"},"group_instance_key":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the (i.e: file:my_file)"},"group_tenant":{"type":"string","title":"Group Tenant","description":"The tenant key or id that the group belongs to."}},"additionalProperties":false,"type":"object","required":["group_instance_key","group_tenant"],"title":"GroupRead","example":{"group_resource_type_key":"company","group_instance_key":"Acme","group_tenant":"business","assigned_roles":["rnd:backend#admin","marketing:social_media#editor"],"users":["user_1","user_2"]}},"GroupReadSchema":{"properties":{"group_resource_type_key":{"type":"string","title":"Group Resource Type Key","description":"The key of the resource type that the group belongs to.","default":"group"},"group_instance_key":{"type":"string","title":"Group Instance Key","description":"Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the (i.e: file:my_file)"},"group_tenant":{"type":"string","title":"Group Tenant","description":"The tenant key or id that the group belongs to."},"id":{"type":"string","format":"uuid","title":"Id"}},"additionalProperties":false,"type":"object","required":["group_instance_key","group_tenant","id"],"title":"GroupReadSchema","example":{"id":"123e4567-e89b-12d3-a456-426614174000","group_resource_type_key":"company","group_instance_key":"Acme","group_tenant":"business"}},"GroupRoleReadSchema":{"properties":{"key":{"type":"string","title":"Key"},"resource_instance":{"$ref":"#/components/schemas/GroupRoleResourceReadOnly"},"resource":{"$ref":"#/components/schemas/GroupRoleResourceReadOnly"}},"additionalProperties":false,"type":"object","required":["key","resource_instance","resource"],"title":"GroupRoleReadSchema","example":{"key":"admin","resource_instance":{"id":"123e4567-e89b-12d3-a456-426614174000","key":"resource_instance"},"resource":{"id":"123e4567-e89b-12d3-a456-426614174000","key":"resource"}}},"GroupRoleResourceReadOnly":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"}},"additionalProperties":false,"type":"object","required":["id","key"],"title":"GroupRoleResourceReadOnly"},"GroupUserReadSchema":{"properties":{"key":{"type":"string","title":"Key"},"id":{"type":"string","format":"uuid","title":"Id"}},"additionalProperties":false,"type":"object","required":["key","id"],"title":"GroupUserReadSchema","example":{"key":"user@permit.io","id":"123e4567-e89b-12d3-a456-426614174000"}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HistoricalUsage":{"properties":{"current_month":{"$ref":"#/components/schemas/MonthlyUsage"},"previous_month":{"$ref":"#/components/schemas/MonthlyUsage"},"two_months_ago":{"$ref":"#/components/schemas/MonthlyUsage"}},"additionalProperties":false,"type":"object","title":"HistoricalUsage"},"HttpMethods":{"enum":["get","post","put","patch","head","delete"],"title":"HttpMethods","description":"An enumeration."},"IdentityRead":{"properties":{"user_id":{"type":"string","title":"User Id","description":"Unique User Id of this identity in the identity provider (including the provider type)"},"provider":{"type":"string","title":"Provider","description":"The identity provider type this identity came from"},"sub":{"type":"string","title":"Sub","description":"Unique User Id of this identity in the identity provider (NOT including the provider type)"},"email":{"type":"string","format":"email","title":"Email","description":"Email connected to this account identity"},"email_verified":{"type":"boolean","title":"Email Verified","description":"Whether this email address connected to this account identity is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email."},"auth0_info":{"type":"object","title":"Auth0 Info","description":"Raw user info json coming from our identity provider and matching a specific account identity"}},"additionalProperties":false,"type":"object","required":["user_id","provider","sub","email","email_verified","auth0_info"],"title":"IdentityRead"},"InviteCreate":{"properties":{"member_id":{"type":"string","format":"uuid","title":"Member Id","description":"Unique id of the invite"},"email":{"type":"string","format":"email","title":"Email","description":"The invited member's email address"},"role":{"allOf":[{"$ref":"#/components/schemas/MemberAccessLevel"}],"description":"The role the member will be assigned with","default":"admin"}},"additionalProperties":false,"type":"object","required":["email"],"title":"InviteCreate"},"InviteRead":{"properties":{"member_id":{"type":"string","format":"uuid","title":"Member Id","description":"Unique id of the invite"},"email":{"type":"string","format":"email","title":"Email","description":"The invited member's email address"},"role":{"allOf":[{"$ref":"#/components/schemas/MemberAccessLevel"}],"description":"The role the member will be assigned with","default":"admin"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the invite"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the invite belongs to."},"invite_code":{"type":"string","format":"uuid","title":"Invite Code","description":"The invite code that is sent to the member's email"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the invite was created (ISO_8601 format)."},"status":{"allOf":[{"$ref":"#/components/schemas/InviteStatus"}],"description":"The status of the invite (pending, failed, etc)"},"failed_reason":{"type":"string","title":"Failed Reason","description":"if failed, the reason the invitation failed"}},"additionalProperties":false,"type":"object","required":["email","id","organization_id","invite_code","created_at","status"],"title":"InviteRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","invite_code":"40ef0e48-a11f-4963-a229-e396c9eeefff","email":"jane@coolcompany.com","role":"admin","created_at":"2019-08-24T14:15:22Z","status":"pending","failed_reason":""}},"InviteStatus":{"type":"string","enum":["pending","accepted","failed","canceled"],"title":"InviteStatus","description":"An enumeration."},"JSONPatchAction":{"properties":{"op":{"type":"string","title":"Op","description":"patch action to perform"},"path":{"type":"string","title":"Path","description":"target location in modified json"},"value":{"title":"Value","description":"json document, the operand of the action"},"from":{"type":"string","title":"From","description":"source location in json"}},"type":"object","required":["op","path"],"title":"JSONPatchAction","description":"Abstract base class for JSON patch actions (RFC 6902)"},"JwksConfig":{"properties":{"ttl":{"type":"integer","title":"Ttl","description":"JWKS cache TTL (in seconds)","default":600},"url":{"type":"string","pattern":"^https://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(/\\S*)?$","title":"Url","description":"..."},"jwks":{"allOf":[{"$ref":"#/components/schemas/JwksObj"}],"title":"Jwks","description":"..."}},"additionalProperties":false,"type":"object","title":"JwksConfig"},"JwksObj":{"properties":{"keys":{"items":{"type":"object"},"type":"array","title":"Keys","description":"The keys to match against the request headers"}},"additionalProperties":false,"type":"object","required":["keys"],"title":"JwksObj"},"LimitedPaginatedResult_APIHistoryEventRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/APIHistoryEventRead"},"type":"array","title":"Data","description":"List of Api History Events"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0},"pagination_count":{"type":"integer","minimum":0.0,"title":"Pagination Count"}},"additionalProperties":false,"type":"object","required":["data","total_count","pagination_count"],"title":"LimitedPaginatedResult[APIHistoryEventRead]"},"LimitedPaginatedResult_ActivityLogEventRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ActivityLogEventRead"},"type":"array","title":"Data","description":"List of Activity Log Events"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0},"pagination_count":{"type":"integer","minimum":0.0,"title":"Pagination Count"}},"additionalProperties":false,"type":"object","required":["data","total_count","pagination_count"],"title":"LimitedPaginatedResult[ActivityLogEventRead]"},"LimitedPaginatedResult_AuditLogModel_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditLogModel"},"type":"array","title":"Data","description":"List of Audit Log Models"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0},"pagination_count":{"type":"integer","minimum":0.0,"title":"Pagination Count"}},"additionalProperties":false,"type":"object","required":["data","total_count","pagination_count"],"title":"LimitedPaginatedResult[AuditLogModel]"},"MailgunEmailConfigurationCreate":{"properties":{"from_address":{"type":"string","title":"From Address","description":"The from address the mails will be sent from"},"api_key":{"type":"string","title":"Api Key","description":"The api key of the mail provider"},"region":{"type":"string","title":"Region","description":"The region of the mail provider"},"domain":{"type":"string","maxLength":65536,"minLength":1,"format":"uri","title":"Domain","description":"The domain of the mail provider"},"email_provider_type":{"type":"string","enum":["mailgun"],"title":"Email Provider Type","description":"The type of the email provider","default":"mailgun"}},"additionalProperties":false,"type":"object","required":["from_address","api_key","region","domain"],"title":"MailgunEmailConfigurationCreate"},"MailgunEmailConfigurationRead":{"properties":{"from_address":{"type":"string","title":"From Address","description":"The from address the mails will be sent from"},"api_key":{"type":"string","title":"Api Key","description":"The api key of the mail provider"},"region":{"type":"string","title":"Region","description":"The region of the mail provider"},"domain":{"type":"string","maxLength":65536,"minLength":1,"format":"uri","title":"Domain","description":"The domain of the mail provider"},"email_provider_type":{"type":"string","enum":["mailgun"],"title":"Email Provider Type","description":"The type of the email provider","default":"mailgun"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the email_configuration"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the email_configuration belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the email_configuration belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the email_configuration belongs to."}},"additionalProperties":false,"type":"object","required":["from_address","api_key","region","domain","id","organization_id","project_id","environment_id"],"title":"MailgunEmailConfigurationRead"},"MappingRule":{"properties":{"url":{"type":"string","title":"Url","description":"The URL to match against the request URL"},"url_type":{"type":"string","enum":["regex"],"title":"Url Type","description":"The URL type to match against the request URL can be, 'regex' or none"},"http_method":{"allOf":[{"$ref":"#/components/schemas/Methods"}],"description":"The HTTP method to match against the request method"},"resource":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Resource","description":"The resource to match against the request resource"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"The headers to match against the request headers","default":{}},"action":{"type":"string","title":"Action","description":"The action to match against the request action"},"priority":{"type":"integer","title":"Priority","description":"The priority of the mapping rule. The higher the priority, the higher the precedence"}},"additionalProperties":false,"type":"object","required":["url","http_method","resource"],"title":"MappingRule"},"MappingRuleUpdate":{"properties":{"url":{"type":"string","title":"Url","description":"The URL to match against the request URL"},"url_type":{"type":"string","enum":["regex"],"title":"Url Type","description":"The URL type to match against the request URL can be, 'regex' or none"},"http_method":{"allOf":[{"$ref":"#/components/schemas/Methods"}],"description":"The HTTP method to match against the request method"},"resource":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Resource","description":"The resource to match against the request resource"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"The headers to match against the request headers","default":{}},"action":{"type":"string","title":"Action","description":"The action to match against the request action"},"priority":{"type":"integer","title":"Priority","description":"The priority of the mapping rule. The higher the priority, the higher the precedence"},"should_delete":{"type":"boolean","title":"Should Delete","description":"If true, this mapping rule will be deleted during update.","default":false}},"additionalProperties":false,"type":"object","required":["url","http_method","resource"],"title":"MappingRuleUpdate"},"MemberAccessLevel":{"type":"string","enum":["admin","write","read","no_access"],"title":"MemberAccessLevel","description":"An enumeration."},"MemberAccessObj":{"type":"string","enum":["org","project","env"],"title":"MemberAccessObj","description":"An enumeration."},"Methods":{"type":"string","enum":["get","post","put","patch","delete","head","options"],"title":"Methods","description":"An enumeration."},"MissingUserPolicy":{"type":"string","enum":["fail","ignore","create"],"title":"MissingUserPolicy","description":"An enumeration."},"MonthlyUsage":{"properties":{"mau":{"type":"integer","minimum":0.0,"title":"Mau","default":0},"tenants":{"type":"integer","minimum":0.0,"title":"Tenants","default":0},"monthly_tenants":{"items":{"type":"string","format":"uuid"},"type":"array","uniqueItems":true,"title":"Monthly Tenants","default":[]},"month":{"type":"integer","minimum":0.0,"title":"Month","default":0},"year":{"type":"integer","minimum":0.0,"title":"Year","default":0}},"additionalProperties":false,"type":"object","title":"MonthlyUsage"},"MultiInviteResult":{"properties":{"success":{"items":{"$ref":"#/components/schemas/InviteRead"},"type":"array","title":"Success"},"failed":{"items":{"$ref":"#/components/schemas/FailedInvite"},"type":"array","title":"Failed","description":"invites that were not even attempted, and the reason why","default":[]}},"additionalProperties":false,"type":"object","required":["success"],"title":"MultiInviteResult"},"OPAEngineDecisionLog":{"properties":{"engine":{"type":"string","enum":["OPA"],"title":"Engine","default":"OPA"},"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"labels":{"$ref":"#/components/schemas/OPALabels"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"path":{"type":"string","title":"Path"},"input":{"title":"Input"},"result":{"title":"Result"},"metrics":{"$ref":"#/components/schemas/OPAMetrics"}},"type":"object","required":["decision_id","labels","timestamp","path","metrics"],"title":"OPAEngineDecisionLog"},"OPALClient":{"properties":{"DATA_TOPICS":{"items":{"type":"string"},"type":"array","title":"Data Topics"},"CLIENT_TOKEN":{"type":"string","title":"Client Token"},"SERVER_URL":{"type":"string","title":"Server Url"},"SERVER_WS_URL":{"type":"string","title":"Server Ws Url"},"SERVER_PUBSUB_URL":{"type":"string","title":"Server Pubsub Url"},"DEFAULT_DATA_SOURCES_CONFIG_URL":{"type":"string","title":"Default Data Sources Config Url"},"SCOPE_ID":{"type":"string","title":"Scope Id"},"SHOULD_REPORT_ON_DATA_UPDATES":{"type":"boolean","title":"Should Report On Data Updates"},"DEFAULT_UPDATE_CALLBACKS":{"$ref":"#/components/schemas/OPALUpdateCallback"},"DEFAULT_UPDATE_CALLBACK_CONFIG":{"$ref":"#/components/schemas/OPALHttpFetcherConfig"}},"additionalProperties":false,"type":"object","required":["DATA_TOPICS","CLIENT_TOKEN","SERVER_URL","SERVER_WS_URL","SERVER_PUBSUB_URL","DEFAULT_DATA_SOURCES_CONFIG_URL"],"title":"OPALClient"},"OPALCommon":{"properties":{"FETCHING_CALLBACK_TIMEOUT":{"type":"integer","title":"Fetching Callback Timeout","default":60},"AUTH_PUBLIC_KEY":{"type":"string","title":"Auth Public Key"}},"additionalProperties":false,"type":"object","required":["AUTH_PUBLIC_KEY"],"title":"OPALCommon"},"OPALHttpFetcherConfig":{"properties":{"fetcher":{"type":"string","title":"Fetcher","description":"indicates to OPAL client that it should use a custom FetcherProvider to fetch the data"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"is_json":{"type":"boolean","title":"Is Json","default":true},"process_data":{"type":"boolean","title":"Process Data","default":true},"method":{"allOf":[{"$ref":"#/components/schemas/HttpMethods"}],"default":"get"},"data":{"title":"Data"}},"type":"object","title":"OPALHttpFetcherConfig","description":"Config for HttpFetchProvider's Adding HTTP headers."},"OPALUpdateCallback":{"properties":{"callbacks":{"items":{"anyOf":[{"type":"string"},{"items":[{"type":"string"},{"$ref":"#/components/schemas/OPALHttpFetcherConfig"}],"type":"array","maxItems":2,"minItems":2}]},"type":"array","title":"Callbacks"}},"type":"object","required":["callbacks"],"title":"OPALUpdateCallback"},"OPALabels":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"version":{"type":"string","title":"Version"}},"type":"object","required":["id","version"],"title":"OPALabels"},"OPAMetrics":{"properties":{"timer_rego_input_parse_ns":{"type":"integer","title":"Timer Rego Input Parse Ns"},"timer_rego_query_parse_ns":{"type":"integer","title":"Timer Rego Query Parse Ns"},"timer_rego_query_compile_ns":{"type":"integer","title":"Timer Rego Query Compile Ns"},"timer_rego_query_eval_ns":{"type":"integer","title":"Timer Rego Query Eval Ns"},"timer_rego_module_parse_ns":{"type":"integer","title":"Timer Rego Module Parse Ns"},"timer_rego_module_compile_ns":{"type":"integer","title":"Timer Rego Module Compile Ns"},"timer_server_handler_ns":{"type":"integer","title":"Timer Server Handler Ns"}},"type":"object","title":"OPAMetrics"},"OnboardingStep":{"type":"string","enum":["create_organization","create_project","create_resource","create_actions","assign_permissions","assign_user_roles","connect_sdk","done"],"title":"OnboardingStep","description":"An enumeration."},"OperationApprovalApproved":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"access_request_details":{"allOf":[{"$ref":"#/components/schemas/OperationApprovalDetails"}],"title":"Access Request Details","description":"details of the operation approval, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting operation approval"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the operation approval "},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the operation approval belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the operation approval belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the operation approval belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the operation approval was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the operation approval was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the approval"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the operation approval was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"operation_approval"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the operation approval"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the operation approval"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","requesting_user_id","status"],"title":"OperationApprovalApproved","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66"},"reason":"I need to create a new transfer for my client","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"approved","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"transfer for a new client","type":"operation_approval"}},"OperationApprovalCanceled":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"access_request_details":{"allOf":[{"$ref":"#/components/schemas/OperationApprovalDetails"}],"title":"Access Request Details","description":"details of the operation approval, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting operation approval"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the operation approval "},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the operation approval belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the operation approval belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the operation approval belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the operation approval was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the operation approval was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the approval"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the operation approval was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"operation_approval"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the operation approval"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the operation approval"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","requesting_user_id","status"],"title":"OperationApprovalCanceled","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66"},"reason":"I need to create a new transfer for my client","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"canceled","type":"operation_approval"}},"OperationApprovalCreateDetails":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"tenant id or key that the user is requesting operation approval for"},"resource":{"type":"string","title":"Resource","description":"resource id or key that the user is requesting operation approval for"},"resource_instance":{"type":"string","title":"Resource Instance","description":"resource instance id or key that the user is requesting operation approval for"}},"additionalProperties":false,"type":"object","required":["tenant","resource"],"title":"OperationApprovalCreateDetails"},"OperationApprovalDenied":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"access_request_details":{"allOf":[{"$ref":"#/components/schemas/OperationApprovalDetails"}],"title":"Access Request Details","description":"details of the operation approval, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting operation approval"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the operation approval "},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the operation approval belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the operation approval belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the operation approval belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the operation approval was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the operation approval was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the approval"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the operation approval was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"operation_approval"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the operation approval"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the operation approval"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","requesting_user_id","status"],"title":"OperationApprovalDenied","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66"},"reason":"I need to create a new transfer for my client","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"denied","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"need more info","type":"operation_approval"}},"OperationApprovalDetails":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"tenant id or key that the user is requesting operation approval for"},"resource":{"type":"string","title":"Resource","description":"resource id or key that the user is requesting operation approval for"},"resource_instance":{"type":"string","title":"Resource Instance","description":"resource instance id or key that the user is requesting operation approval for"},"element_config_id":{"type":"string","title":"Element Config Id","description":"element config id or key that the user is requesting operation approval from"}},"additionalProperties":false,"type":"object","required":["tenant","resource","resource_instance"],"title":"OperationApprovalDetails"},"OperationApprovalList":{"properties":{"access_request_details":{"allOf":[{"$ref":"#/components/schemas/OperationApprovalDetails"}],"title":"Access Request Details","description":"details of the operation approval, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting operation approval"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the operation approval "},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the operation approval belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the operation approval belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the operation approval belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the operation approval was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the operation approval was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the approval"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the operation approval was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"operation_approval"},"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the operation approval"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the operation approval"},"requesting_user_email":{"type":"string","title":"Requesting User Email","description":"email of the user that is requesting the approval"},"requesting_user_first_name":{"type":"string","title":"Requesting User First Name","description":"first name of the user that is requesting the approval"},"requesting_user_last_name":{"type":"string","title":"Requesting User Last Name","description":"last name of the user that is requesting the approval"},"resource_key":{"type":"string","title":"Resource Key","description":"key of the resource that the user is requesting operation approval for"},"resource_instance_key":{"type":"string","title":"Resource Instance Key","description":"key of the resource instance that the user is requesting operation approval for"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","requesting_user_id","status"],"title":"OperationApprovalList","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66"},"reason":"I need to create a new transfer for my client","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"approved","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"transfer for a new client","type":"operation_approval","requesting_user_email":"maya@permit.io","requesting_user_first_name":"Maya","requesting_user_last_name":"Barak","resource_key":"transfer","resource_instance_key":"38462985692"}},"OperationApprovalRead":{"properties":{"access_request_details":{"allOf":[{"$ref":"#/components/schemas/OperationApprovalDetails"}],"title":"Access Request Details","description":"details of the operation approval, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting operation approval"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the operation approval "},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the operation approval belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the operation approval belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the operation approval belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the operation approval was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the operation approval was last updated/modified (ISO_8601 format)."},"requesting_user_id":{"type":"string","format":"uuid","title":"Requesting User Id","description":"optional id of the user that is requesting the approval"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At","description":"when the operation approval was reviewed"},"type":{"allOf":[{"$ref":"#/components/schemas/RequestType"}],"default":"operation_approval"},"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"},"status":{"allOf":[{"$ref":"#/components/schemas/RequestStatus"}],"description":"current status of the operation approval"},"reviewer_user_id":{"type":"string","format":"uuid","title":"Reviewer User Id","description":"Optional id of the user who review the operation approval"}},"additionalProperties":false,"type":"object","required":["access_request_details","id","organization_id","project_id","environment_id","created_at","updated_at","requesting_user_id","status"],"title":"OperationApprovalRead","example":{"requesting_user_id":"1c1e4ada-f282-40e6-b3b7-20b3a51c93b5","access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66"},"reason":"I need to create a new transfer for my client","org_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","env_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","status":"approved","reviewer_user_id":"1b287364-14ff-4b72-8953-b40399093a6f","reviewed_at":"2019-08-24T14:15:22Z","reviewer_comment":"transfer for a new client","type":"operation_approval"}},"OperationApprovalReview":{"properties":{"reviewer_comment":{"type":"string","title":"Reviewer Comment","description":"comment provided by the reviewer_user_id"}},"additionalProperties":false,"type":"object","title":"OperationApprovalReview","example":{"reviewer_comment":"transfer for a new client"}},"OperationApprovalUserCreate":{"properties":{"access_request_details":{"allOf":[{"$ref":"#/components/schemas/OperationApprovalCreateDetails"}],"title":"Access Request Details","description":"details of the operation approval, including the resource and tenant"},"reason":{"type":"string","title":"Reason","description":"Optional business justification provided by the user requesting operation approval"}},"additionalProperties":false,"type":"object","required":["access_request_details"],"title":"OperationApprovalUserCreate","example":{"access_request_details":{"tenant":"34f5c98e-f430-457b-a812-92637d0c6fd0","resource":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","resource_instance":"2d98d9f8-e1b7-4f1d-baad-2edbf6fa6c66"},"reason":"I need to create a new transfer for my client"}},"OrgExportResult":{"properties":{"download_url":{"type":"string","title":"Download Url","description":"Short-lived presigned URL to download the export archive. Treat as a credential — it grants access to the archive, which contains plaintext API-key secrets."},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","description":"How long the download URL stays valid."},"filename":{"type":"string","title":"Filename"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"additionalProperties":false,"type":"object","required":["download_url","expires_in_seconds","filename","size_bytes"],"title":"OrgExportResult","description":"API result on a completed export poll — carries a freshly minted,\nshort-lived presigned download URL (never persisted)."},"OrgMemberCreate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the account member"},"email":{"type":"string","format":"email","title":"Email","description":"Email of the user controlling this account"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Permissions"}},"additionalProperties":false,"type":"object","required":["permissions"],"title":"OrgMemberCreate"},"OrgMemberRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the account member"},"email":{"type":"string","format":"email","title":"Email","description":"Email of the user controlling this account"},"email_verified":{"type":"boolean","title":"Email Verified","description":"Whether this email address is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email."},"name":{"type":"string","title":"Name","description":"Name of this user"},"given_name":{"type":"string","title":"Given Name","description":"First name of the user"},"family_name":{"type":"string","title":"Family Name","description":"Last name of the user"},"picture":{"type":"string","title":"Picture","description":"URL to picture, photo, or avatar of the user that controls this account."},"is_superuser":{"type":"boolean","title":"Is Superuser","description":"Whether or not this user has special access to permit.io organizations"},"is_onboarding":{"type":"boolean","title":"Is Onboarding","description":"Whether or not this user is currently onboarding, needs to be replaced by a user journey object"},"onboarding_step":{"allOf":[{"$ref":"#/components/schemas/OnboardingStep"}],"description":"the step the user is currently going through in onboarding"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the account member was created (ISO_8601 format)."},"last_login":{"type":"string","format":"date-time","title":"Last Login","description":"Last date and time this user logged in (ISO_8601 format)."},"last_ip":{"type":"string","title":"Last Ip","description":"Last IP address from which this user logged in.","default":"0.0.0.0"},"logins_count":{"type":"integer","title":"Logins Count","description":"Total number of logins this user has performed.","default":0},"identities":{"items":{"$ref":"#/components/schemas/IdentityRead"},"type":"array","title":"Identities"},"invite":{"$ref":"#/components/schemas/InviteRead"},"settings":{"type":"object","title":"Settings","description":"Custom permit.io dashboard settings, such as preferred theme, etc."}},"additionalProperties":false,"type":"object","required":["id","email","email_verified","is_superuser","is_onboarding","onboarding_step","created_at","identities","settings"],"title":"OrgMemberRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","email":"janedoe@permituser.com","email_verified":true,"given_name":"Jane","family_name":"Doe","name":"Jane Josephine Doe","picture":"http://permituser.com/janedoe/me.jpg","settings":{"option":"value","another-option":"another-value"},"is_superuser":false,"is_onboarding":true,"onboarding_step":"done","created_at":"2019-08-20T14:15:22Z","last_login":"2019-08-24T14:15:22Z","last_ip":"1.2.3.4","logins_count":2,"identities":[{"user_id":"google-oauth2|000000000000000000001","provider":"google-oauth2","sub":"000000000000000000001","email":"Jane@permituser.com","email_verified":true,"user_info":{"sub":"000000000000000000001","name":"Jane Josephine Doe","given_name":"Jane","family_name":"Doe","middle_name":"Josephine","nickname":"JJ","preferred_username":"j.doe","profile":"http://permituser.com/janedoe","picture":"http://permituser.com/janedoe/me.jpg","website":"http://permituser.com","email":"janedoe@permituser.com","email_verified":true,"gender":"female","birthdate":"1972-03-31","zoneinfo":"America/Los_Angeles","locale":"en-US","phone_number":"+1 (111) 222-3434","phone_number_verified":false,"address":{"country":"us"},"updated_at":"1556845729"}}],"invite":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","invite_code":"40ef0e48-a11f-4963-a229-e396c9eeefff","email":"Jane@permituser.com","role":"admin","created_at":"2019-08-24T14:15:22Z","status":"pending","failed_reason":""}}},"OrgMemberReadWithGrants":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the account member"},"email":{"type":"string","format":"email","title":"Email","description":"Email of the user controlling this account"},"email_verified":{"type":"boolean","title":"Email Verified","description":"Whether this email address is verified or not. For social providers like 'Login with Google' this is done automatically, otherwise we will send the user a verification link in email."},"name":{"type":"string","title":"Name","description":"Name of this user"},"given_name":{"type":"string","title":"Given Name","description":"First name of the user"},"family_name":{"type":"string","title":"Family Name","description":"Last name of the user"},"picture":{"type":"string","title":"Picture","description":"URL to picture, photo, or avatar of the user that controls this account."},"is_superuser":{"type":"boolean","title":"Is Superuser","description":"Whether or not this user has special access to permit.io organizations"},"is_onboarding":{"type":"boolean","title":"Is Onboarding","description":"Whether or not this user is currently onboarding, needs to be replaced by a user journey object"},"onboarding_step":{"allOf":[{"$ref":"#/components/schemas/OnboardingStep"}],"description":"the step the user is currently going through in onboarding"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the account member was created (ISO_8601 format)."},"last_login":{"type":"string","format":"date-time","title":"Last Login","description":"Last date and time this user logged in (ISO_8601 format)."},"last_ip":{"type":"string","title":"Last Ip","description":"Last IP address from which this user logged in.","default":"0.0.0.0"},"logins_count":{"type":"integer","title":"Logins Count","description":"Total number of logins this user has performed.","default":0},"identities":{"items":{"$ref":"#/components/schemas/IdentityRead"},"type":"array","title":"Identities"},"invite":{"$ref":"#/components/schemas/InviteRead"},"settings":{"type":"object","title":"Settings","description":"Custom permit.io dashboard settings, such as preferred theme, etc."},"grants":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Grants"}},"additionalProperties":false,"type":"object","required":["id","email","email_verified","is_superuser","is_onboarding","onboarding_step","created_at","identities","settings","grants"],"title":"OrgMemberReadWithGrants","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","email":"janedoe@permituser.com","email_verified":true,"given_name":"Jane","family_name":"Doe","name":"Jane Josephine Doe","picture":"http://permituser.com/janedoe/me.jpg","settings":{"option":"value","another-option":"another-value"},"is_superuser":false,"is_onboarding":true,"onboarding_step":"done","created_at":"2019-08-20T14:15:22Z","last_login":"2019-08-24T14:15:22Z","last_ip":"1.2.3.4","logins_count":2,"identities":[{"user_id":"google-oauth2|000000000000000000001","provider":"google-oauth2","sub":"000000000000000000001","email":"Jane@permituser.com","email_verified":true,"user_info":{"sub":"000000000000000000001","name":"Jane Josephine Doe","given_name":"Jane","family_name":"Doe","middle_name":"Josephine","nickname":"JJ","preferred_username":"j.doe","profile":"http://permituser.com/janedoe","picture":"http://permituser.com/janedoe/me.jpg","website":"http://permituser.com","email":"janedoe@permituser.com","email_verified":true,"gender":"female","birthdate":"1972-03-31","zoneinfo":"America/Los_Angeles","locale":"en-US","phone_number":"+1 (111) 222-3434","phone_number_verified":false,"address":{"country":"us"},"updated_at":"1556845729"}}],"invite":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","invite_code":"40ef0e48-a11f-4963-a229-e396c9eeefff","email":"Jane@permituser.com","role":"admin","created_at":"2019-08-24T14:15:22Z","status":"pending","failed_reason":""},"grants":[{"object_type":"org","access_level":"admin","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6"}]}},"OrgMemberRemovePermissions":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the account member"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Permissions"}},"additionalProperties":false,"type":"object","required":["id","permissions"],"title":"OrgMemberRemovePermissions"},"OrgMemberUpdate":{"properties":{"settings":{"type":"object","title":"Settings","description":"Custom permit.io dashboard settings, such as preferred theme, etc."},"onboarding_step":{"allOf":[{"$ref":"#/components/schemas/OnboardingStep"}],"description":"updates the onboarding step (optional)"}},"additionalProperties":false,"type":"object","title":"OrgMemberUpdate"},"OrganizationCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization."},"name":{"type":"string","pattern":"^[A-Za-z0-9\\.\\-\\_\\ ]+$","title":"Name","description":"The name of the organization, usually it's your company's name."},"settings":{"type":"object","title":"Settings","description":"the settings for this project"}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"OrganizationCreate"},"OrganizationObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"OrganizationObj"},"OrganizationRead":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the organization"},"is_enterprise":{"type":"boolean","title":"Is Enterprise","description":"Is this an enterprise account?"},"usage_limits":{"allOf":[{"$ref":"#/components/schemas/UsageLimits"}],"title":"Usage Limits","description":"Usage limits for this organization","default":{"mau":5000,"tenants":50,"billing_tier":"trial"}},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the organization was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the organization was last updated/modified (ISO_8601 format)."},"name":{"type":"string","title":"Name","description":"The name of the organization, usually it's your company's name."},"settings":{"type":"object","title":"Settings","description":"the settings for this project"}},"additionalProperties":false,"type":"object","required":["key","id","is_enterprise","created_at","updated_at","name"],"title":"OrganizationRead"},"OrganizationReadWithAPIKey":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the organization"},"is_enterprise":{"type":"boolean","title":"Is Enterprise","description":"Is this an enterprise account?"},"usage_limits":{"allOf":[{"$ref":"#/components/schemas/UsageLimits"}],"title":"Usage Limits","description":"Usage limits for this organization","default":{"mau":5000,"tenants":50,"billing_tier":"trial"}},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the organization was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the organization was last updated/modified (ISO_8601 format)."},"name":{"type":"string","title":"Name","description":"The name of the organization, usually it's your company's name."},"settings":{"type":"object","title":"Settings","description":"the settings for this project"},"api_key_id":{"type":"string","format":"uuid","title":"Api Key Id"},"api_key_secret":{"type":"string","title":"Api Key Secret"}},"additionalProperties":false,"type":"object","required":["key","id","is_enterprise","created_at","updated_at","name"],"title":"OrganizationReadWithAPIKey"},"OrganizationScheduleDeleteResponse":{"properties":{"status":{"type":"string","enum":["scheduled"],"title":"Status","default":"scheduled"},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At","description":"Timestamp when the deletion was scheduled"},"delete_after":{"type":"string","format":"date-time","title":"Delete After","description":"Timestamp when the org will be permanently deleted"}},"additionalProperties":false,"type":"object","required":["deleted_at","delete_after"],"title":"OrganizationScheduleDeleteResponse","example":{"status":"scheduled","deleted_at":"2026-04-30T12:00:00+00:00","delete_after":"2026-05-10T12:00:00+00:00"}},"OrganizationStatistics":{"properties":{"projects":{"type":"integer","minimum":0.0,"title":"Projects"},"environments":{"type":"integer","minimum":0.0,"title":"Environments"},"users":{"type":"integer","minimum":0.0,"title":"Users"}},"additionalProperties":false,"type":"object","required":["projects","environments","users"],"title":"OrganizationStatistics"},"OrganizationStats":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the organization"},"is_enterprise":{"type":"boolean","title":"Is Enterprise","description":"Is this an enterprise account?"},"usage_limits":{"allOf":[{"$ref":"#/components/schemas/UsageLimits"}],"title":"Usage Limits","description":"Usage limits for this organization","default":{"mau":5000,"tenants":50,"billing_tier":"trial"}},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the organization was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the organization was last updated/modified (ISO_8601 format)."},"name":{"type":"string","title":"Name","description":"The name of the organization, usually it's your company's name."},"settings":{"type":"object","title":"Settings","description":"the settings for this project"},"stats":{"$ref":"#/components/schemas/OrganizationStatistics"},"historical_usage":{"$ref":"#/components/schemas/HistoricalUsage"}},"additionalProperties":false,"type":"object","required":["key","id","is_enterprise","created_at","updated_at","name","stats","historical_usage"],"title":"OrganizationStats"},"OrganizationUpdate":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9\\.\\-\\_\\ ]+$","title":"Name","description":"The name of the organization, usually it's your company's name."},"settings":{"type":"object","title":"Settings","description":"the settings for this project"}},"additionalProperties":false,"type":"object","title":"OrganizationUpdate"},"PDPConfigRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the pdp_config belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the pdp_config belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the pdp_config belongs to."},"client_secret":{"type":"string","title":"Client Secret"},"opal_server_access_token":{"type":"string","title":"Opal Server Access Token","hidden_from_schema":true},"num_shards":{"type":"integer","exclusiveMinimum":1.0,"title":"Num Shards"},"debug_audit_logs":{"type":"boolean","title":"Debug Audit Logs","description":"Whether debug audit logs are enabled or not","default":true},"min_pdp_version":{"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$","title":"Min Pdp Version","description":"The minimum image version of PDP that can connect to this config"}},"additionalProperties":false,"type":"object","required":["id","organization_id","project_id","environment_id","client_secret"],"title":"PDPConfigRead"},"PDPContext":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"client_id":{"type":"string","title":"Client Id"},"backend_tier":{"type":"string","maxLength":65536,"minLength":1,"format":"uri","title":"Backend Tier"},"component":{"type":"string","title":"Component","default":"sidecar"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"env_id":{"type":"string","format":"uuid","title":"Env Id"}},"additionalProperties":false,"type":"object","required":["customer_id","client_id","backend_tier","org_id","project_id","env_id"],"title":"PDPContext"},"PDPDataRefreshRequest":{"properties":{"reason":{"type":"string","maxLength":512,"title":"Reason","description":"Optional human-readable reason for the refresh, propagated to the OPAL DataUpdate and visible in PDP/OPAL logs."},"shard_id":{"type":"integer","minimum":0.0,"title":"Shard Id","description":"For sharded PDPs, target only this shard. When omitted, the refresh targets the PDP's main topic (all shards)."}},"additionalProperties":false,"type":"object","title":"PDPDataRefreshRequest"},"PDPDataRefreshResponse":{"properties":{"update_id":{"type":"string","format":"uuid","title":"Update Id","description":"The id of the generated OPAL DataUpdate. It is injected as the X-Permit-Update-Id header and surfaced in PDP/OPAL logs for correlation. Because the refresh is a full-data reload (dst_path=\"\"), the PDP confirms it by advancing PDPInstance.current_data_date once the new bundle is fetched and saved (most_recent_data_fetch_id is only set for scoped/delta updates)."},"pdp_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Pdp Ids","description":"The ids of the PDP configurations that were targeted by this refresh."}},"additionalProperties":false,"type":"object","required":["update_id","pdp_ids"],"title":"PDPDataRefreshResponse"},"PDPShardMigration":{"properties":{"num_shards":{"type":"integer","exclusiveMinimum":1.0,"title":"Num Shards"}},"additionalProperties":false,"type":"object","required":["num_shards"],"title":"PDPShardMigration"},"PaginatedResult_APIHistoryEventRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/APIHistoryEventRead"},"type":"array","title":"Data","description":"List of Api History Events"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[APIHistoryEventRead]"},"PaginatedResult_APIKeyRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/APIKeyRead"},"type":"array","title":"Data","description":"List of Api Keys"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[APIKeyRead]"},"PaginatedResult_AccessRequestList_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AccessRequestList"},"type":"array","title":"Data","description":"List of Access Request Lists"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[AccessRequestList]"},"PaginatedResult_ActivityLogEventRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ActivityLogEventRead"},"type":"array","title":"Data","description":"List of Activity Log Events"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ActivityLogEventRead]"},"PaginatedResult_ConditionSetRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ConditionSetRead"},"type":"array","title":"Data","description":"List of Condition Sets"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ConditionSetRead]"},"PaginatedResult_ElementsConfigRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ElementsConfigRead"},"type":"array","title":"Data","description":"List of Elements Configs"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ElementsConfigRead]"},"PaginatedResult_ElementsUserInviteRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ElementsUserInviteRead"},"type":"array","title":"Data","description":"List of Elements User Invites"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ElementsUserInviteRead]"},"PaginatedResult_GroupReadSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GroupReadSchema"},"type":"array","title":"Data","description":"List of Group Read Schemas"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[GroupReadSchema]"},"PaginatedResult_GroupRoleReadSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GroupRoleReadSchema"},"type":"array","title":"Data","description":"List of Group Role Read Schemas"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[GroupRoleReadSchema]"},"PaginatedResult_GroupUserReadSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GroupUserReadSchema"},"type":"array","title":"Data","description":"List of Group User Read Schemas"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[GroupUserReadSchema]"},"PaginatedResult_OperationApprovalList_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OperationApprovalList"},"type":"array","title":"Data","description":"List of Operation Approval Lists"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[OperationApprovalList]"},"PaginatedResult_RelationRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RelationRead"},"type":"array","title":"Data","description":"List of Relations"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[RelationRead]"},"PaginatedResult_RelationshipTupleDetailedRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RelationshipTupleDetailedRead"},"type":"array","title":"Data","description":"List of Relationship Tuple Detaileds"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[RelationshipTupleDetailedRead]"},"PaginatedResult_RelationshipTupleRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RelationshipTupleRead"},"type":"array","title":"Data","description":"List of Relationship Tuples"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[RelationshipTupleRead]"},"PaginatedResult_ResourceInstanceDetailedRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ResourceInstanceDetailedRead"},"type":"array","title":"Data","description":"List of Resource Instance Detaileds"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ResourceInstanceDetailedRead]"},"PaginatedResult_ResourceInstanceRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ResourceInstanceRead"},"type":"array","title":"Data","description":"List of Resource Instances"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ResourceInstanceRead]"},"PaginatedResult_ResourceRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ResourceRead"},"type":"array","title":"Data","description":"List of Resources"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ResourceRead]"},"PaginatedResult_ResourceRoleRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ResourceRoleRead"},"type":"array","title":"Data","description":"List of Resource Roles"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[ResourceRoleRead]"},"PaginatedResult_RoleAssignmentDetailedRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RoleAssignmentDetailedRead"},"type":"array","title":"Data","description":"List of Role Assignment Detaileds"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[RoleAssignmentDetailedRead]"},"PaginatedResult_RoleAssignmentRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RoleAssignmentRead"},"type":"array","title":"Data","description":"List of Role Assignments"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[RoleAssignmentRead]"},"PaginatedResult_RoleRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RoleRead"},"type":"array","title":"Data","description":"List of Roles"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[RoleRead]"},"PaginatedResult_TenantRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TenantRead"},"type":"array","title":"Data","description":"List of Tenants"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[TenantRead]"},"PaginatedResult_UserRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserRead"},"type":"array","title":"Data","description":"List of Users"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count","default":0}},"additionalProperties":false,"type":"object","required":["data","total_count"],"title":"PaginatedResult[UserRead]"},"PdpConfigObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"PdpConfigObj"},"PdpValues":{"properties":{"BACKEND_SERVICE_URL":{"type":"string","title":"Backend Service Url"},"OPA_DECISION_LOG_ENABLED":{"type":"boolean","title":"Opa Decision Log Enabled"},"OPA_DECISION_LOG_INGRESS_ROUTE":{"type":"string","title":"Opa Decision Log Ingress Route"},"OPA_DECISION_LOG_INGRESS_BACKEND_TIER_URL":{"type":"string","title":"Opa Decision Log Ingress Backend Tier Url"},"CONTROL_PLANE_RELAY_JWT_TIER":{"type":"string","title":"Control Plane Relay Jwt Tier"},"CONTROL_PLANE_RELAY_API":{"type":"string","title":"Control Plane Relay Api"},"CONTROL_PLANE_PDP_DELTAS_API":{"type":"string","title":"Control Plane Pdp Deltas Api"},"FACTDB_ENABLED":{"type":"boolean","title":"Factdb Enabled"},"FACTDB_BACKUP_SERVER_URL":{"type":"string","title":"Factdb Backup Server Url"}},"additionalProperties":false,"type":"object","required":["BACKEND_SERVICE_URL","OPA_DECISION_LOG_ENABLED","OPA_DECISION_LOG_INGRESS_ROUTE","OPA_DECISION_LOG_INGRESS_BACKEND_TIER_URL","CONTROL_PLANE_RELAY_JWT_TIER","CONTROL_PLANE_RELAY_API","CONTROL_PLANE_PDP_DELTAS_API","FACTDB_BACKUP_SERVER_URL"],"title":"PdpValues"},"Permission":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id"},"object_type":{"$ref":"#/components/schemas/MemberAccessObj"},"access_level":{"$ref":"#/components/schemas/MemberAccessLevel"},"organization_key":{"type":"string","title":"Organization Key"},"project_key":{"type":"string","title":"Project Key"},"environment_key":{"type":"string","title":"Environment Key"},"organization_name":{"type":"string","title":"Organization Name"},"project_name":{"type":"string","title":"Project Name"},"environment_name":{"type":"string","title":"Environment Name"}},"additionalProperties":false,"type":"object","required":["organization_id","object_type","access_level"],"title":"Permission"},"PermissionLevelRoleRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the elements_config"},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the elements_config (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_config."},"name":{"type":"string","title":"Name"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the resource"}},"additionalProperties":false,"type":"object","required":["id","key","name","resource_id"],"title":"PermissionLevelRoleRead"},"PolicyGuardRuleCreate":{"properties":{"is_allowed":{"type":"boolean","title":"Is Allowed","description":"If True, the permission will be allowed for the role in the policy guard across all projectswithin the policy scope, and the permission will be locked from further editing."},"resource_key":{"type":"string","title":"Resource Key","description":"The key of the resource."},"role_key":{"type":"string","title":"Role Key","description":"The key of the role."},"action_key":{"type":"string","title":"Action Key","description":"The key of the action."},"resource_set":{"allOf":[{"$ref":"#/components/schemas/ConditionSet"}],"title":"Resource Set","description":"The resource set that the permission will be applied to."},"user_set":{"allOf":[{"$ref":"#/components/schemas/ConditionSet"}],"title":"User Set","description":"The user set that the permission will be applied to."}},"additionalProperties":false,"type":"object","required":["is_allowed","resource_key","action_key"],"title":"PolicyGuardRuleCreate","example":{"resource_key":"document","role_key":"admin","action_key":"read","is_allowed":true}},"PolicyGuardRuleItem":{"properties":{"resource_key":{"type":"string","title":"Resource Key","description":"The key of the resource."},"role_key":{"type":"string","title":"Role Key","description":"The key of the role."},"action_key":{"type":"string","title":"Action Key","description":"The key of the action."},"resource_set":{"allOf":[{"$ref":"#/components/schemas/ConditionSet"}],"title":"Resource Set","description":"The resource set that the permission will be applied to."},"user_set":{"allOf":[{"$ref":"#/components/schemas/ConditionSet"}],"title":"User Set","description":"The user set that the permission will be applied to."}},"additionalProperties":false,"type":"object","required":["resource_key","action_key"],"title":"PolicyGuardRuleItem","example":{"resource_key":"document","role_key":"admin","action_key":"read"}},"PolicyGuardRuleRead":{"properties":{"is_allowed":{"type":"boolean","title":"Is Allowed","description":"If True, the permission will be allowed for the role in the policy guard across all projectswithin the policy scope, and the permission will be locked from further editing."},"resource_key":{"type":"string","title":"Resource Key","description":"The key of the resource."},"role_key":{"type":"string","title":"Role Key","description":"The key of the role."},"action_key":{"type":"string","title":"Action Key","description":"The key of the action."},"resource_set":{"allOf":[{"$ref":"#/components/schemas/ConditionSet"}],"title":"Resource Set","description":"The resource set that the permission will be applied to."},"user_set":{"allOf":[{"$ref":"#/components/schemas/ConditionSet"}],"title":"User Set","description":"The user set that the permission will be applied to."},"scope_id":{"type":"string","format":"uuid","title":"Scope Id","description":"The unique identifier of the policy guard."},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the ScopeConfig belongs to."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the ScopeConfig"}},"additionalProperties":false,"type":"object","required":["is_allowed","resource_key","action_key","scope_id","organization_id","id"],"title":"PolicyGuardRuleRead","example":{"id":"c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f","scope_id":"c3b6f5d7-8b1e-4c6d-9e9f-hgk4f8e0c8f","resource_key":"document","role_key":"admin","action_key":"read","is_allowed":true,"org_id":"c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f","resource_set":{"key":"country_condition","attribute":"document_country","operator":"equals","value":"US"},"user_set":{"key":"city_condition","attribute":"city","operator":"equals","value":"New York"}}},"PolicyGuardScopeAssociate":{"properties":{"project_id":{"type":"string","title":"Project Id","description":"The unique identifier of the project of this policy scope."}},"additionalProperties":false,"type":"object","required":["project_id"],"title":"PolicyGuardScopeAssociate"},"PolicyGuardScopeCreate":{"properties":{"policy_guard_scope_details":{"items":{"$ref":"#/components/schemas/PolicyGuardScopeDetailCreate"},"type":"array","title":"Policy Guard Scope Details","description":"list of projects that this policy guard is assigned to.","default":[]},"key":{"type":"string","title":"Key","description":"The unique key of the policy guard scope."}},"additionalProperties":false,"type":"object","required":["key"],"title":"PolicyGuardScopeCreate","example":{"key":"policy_guard_acme","policy_guard_scope_details":[{"project_id":"c3b6f5d78b1e4c6d9e9f8c9d6f8e0c8f"}]}},"PolicyGuardScopeDetail":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the ScopeConfig belongs to."}},"additionalProperties":false,"type":"object","required":["project_id"],"title":"PolicyGuardScopeDetail"},"PolicyGuardScopeDetailCreate":{"properties":{"project_id":{"type":"string","title":"Project Id","description":"The unique identifier of the project of this policy scope."}},"additionalProperties":false,"type":"object","required":["project_id"],"title":"PolicyGuardScopeDetailCreate"},"PolicyGuardScopeRead":{"properties":{"key":{"type":"string","title":"Key","description":"The unique key of the policy guard scope."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the ScopeConfig"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the ScopeConfig belongs to."},"policy_guard_scope_details":{"items":{"$ref":"#/components/schemas/PolicyGuardScopeDetail"},"type":"array","title":"Policy Guard Scope Details","description":"list of projects that this policy guard is assigned to.","default":[]}},"additionalProperties":false,"type":"object","required":["key","id","organization_id"],"title":"PolicyGuardScopeRead","example":{"id":"c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f","key":"policy_guard_acme","org_id":"c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f","policy_guard_scope_details":[{"project_id":"c3b6f5d78b1e4c6d9e9f8c9d6f8e0c8f"}]}},"PolicyRepoCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the policy repo (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the policy repo."},"url":{"type":"string","title":"Url","description":"The SSH URL of the git repository (e.g. git@github.com:username/repository.git)"},"main_branch_name":{"type":"string","title":"Main Branch Name","default":"main"},"credentials":{"$ref":"#/components/schemas/SSHAuthData"},"activate_when_validated":{"type":"boolean","title":"Activate When Validated","description":"if you want to change your policy repository to this repo right after it is validated","default":false}},"additionalProperties":false,"type":"object","required":["key","url","credentials"],"title":"PolicyRepoCreate"},"PolicyRepoRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the policy repo"},"status":{"$ref":"#/components/schemas/PolicyRepoStatus"},"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the policy repo (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the policy repo."},"url":{"type":"string","title":"Url","description":"The SSH URL of the git repository (e.g. git@github.com:username/repository.git)"},"main_branch_name":{"type":"string","title":"Main Branch Name","default":"main"},"credentials":{"$ref":"#/components/schemas/SSHAuthDataRead"},"activate_when_validated":{"type":"boolean","title":"Activate When Validated","description":"if you want to change your policy repository to this repo right after it is validated","default":false}},"additionalProperties":false,"type":"object","required":["id","status","key","url","credentials"],"title":"PolicyRepoRead"},"PolicyRepoStatus":{"type":"string","enum":["invalid","pending","valid"],"title":"PolicyRepoStatus","description":"An enumeration."},"ProjectCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project."},"urn_namespace":{"type":"string","pattern":"[a-z0-9-]{2,}","title":"Urn Namespace","description":"Optional namespace for URNs. If empty, URNs will be generated from project key."},"name":{"type":"string","title":"Name","description":"The name of the project"},"description":{"type":"string","title":"Description","description":"a longer description outlining the project objectives"},"settings":{"type":"object","title":"Settings","description":"the settings for this project"},"active_policy_repo_id":{"type":"string","format":"uuid","title":"Active Policy Repo Id","description":"the id of the policy repo to use for this project"},"initial_environments":{"items":{"$ref":"#/components/schemas/EnvironmentCreate"},"type":"array","title":"Initial Environments","description":"The initial environments to create for this project. By default, 'Development' and 'Production' are created, specify [] (empty list) to skip that.","default":[{"key":"dev","name":"Development"},{"key":"production","name":"Production"}]}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ProjectCreate"},"ProjectObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"ProjectObj"},"ProjectRead":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project."},"urn_namespace":{"type":"string","pattern":"[a-z0-9-]{2,}","title":"Urn Namespace","description":"Optional namespace for URNs. If empty, URNs will be generated from project key."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the project"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the project belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the project was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the project was last updated/modified (ISO_8601 format)."},"name":{"type":"string","title":"Name","description":"The name of the project"},"description":{"type":"string","title":"Description","description":"a longer description outlining the project objectives"},"settings":{"type":"object","title":"Settings","description":"the settings for this project"},"active_policy_repo_id":{"type":"string","format":"uuid","title":"Active Policy Repo Id","description":"the id of the policy repo to use for this project"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","created_at","updated_at","name"],"title":"ProjectRead"},"ProjectUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the project"},"description":{"type":"string","title":"Description","description":"a longer description outlining the project objectives"},"settings":{"type":"object","title":"Settings","description":"the settings for this project"},"active_policy_repo_id":{"type":"string","format":"uuid","title":"Active Policy Repo Id","description":"the id of the policy repo to use for this project"}},"additionalProperties":false,"type":"object","title":"ProjectUpdate"},"ProxyConfigCreate":{"properties":{"secret":{"anyOf":[{"type":"HeadersAuth","title":"HeadersAuth","description":"HeadersAuth is a dictionary of headers to be sent with the request."},{"type":"BasicAuth","pattern":"^.+:.+$","title":"BasicAuth","description":"BasicAuth is a string of the form 'username:password'."},{"type":"BearerAuth","minLength":1,"title":"BearerAuth","description":"BearerAuth is a string of the token to be sent with the request."}],"title":"Secret","description":"Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service."},"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ."},"name":{"type":"string","title":"Name","description":"The name of the proxy config, for example: 'Stripe API'"},"mapping_rules":{"items":{"$ref":"#/components/schemas/MappingRule"},"type":"array","title":"Mapping Rules","description":"Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method.","default":[]},"auth_mechanism":{"allOf":[{"$ref":"#/components/schemas/AuthMechanism"}],"description":"Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request.\n\nBearer injects the secret into the Authorization header as a Bearer token,\n\nBasic injects the secret into the Authorization header as a Basic user:password,\n\nHeaders injects plain headers into the request.","default":"Bearer"}},"additionalProperties":false,"type":"object","required":["secret","key","name"],"title":"ProxyConfigCreate","example":{"name":"Stripe API","key":"stripe","mapping_rules":[{"url":"https://api.stripe.com/v1/customers","http_method":"post","resource":"customers","action":"create","headers":{"required_header":"strict"}}],"secret":"access_token_xxxxxx"}},"ProxyConfigRead":{"properties":{"key":{"type":"string","title":"Key","description":"Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the proxy config"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the proxy config belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the proxy config belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the proxy config belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the proxy config was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the proxy config was last updated/modified (ISO_8601 format)."},"secret":{"anyOf":[{"type":"HeadersAuth","title":"HeadersAuth","description":"HeadersAuth is a dictionary of headers to be sent with the request."},{"type":"BasicAuth","pattern":"^.+:.+$","title":"BasicAuth","description":"BasicAuth is a string of the form 'username:password'."},{"type":"BearerAuth","minLength":1,"title":"BearerAuth","description":"BearerAuth is a string of the token to be sent with the request."}],"title":"Secret","description":"Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service."},"name":{"type":"string","title":"Name","description":"The name of the proxy config, for example: 'Stripe API'"},"mapping_rules":{"items":{"$ref":"#/components/schemas/MappingRule"},"type":"array","title":"Mapping Rules","description":"Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method.","default":[]},"auth_mechanism":{"allOf":[{"$ref":"#/components/schemas/AuthMechanism"}],"description":"Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request.\n\nBearer injects the secret into the Authorization header as a Bearer token,\n\nBasic injects the secret into the Authorization header as a Basic user:password,\n\nHeaders injects plain headers into the request.","default":"Bearer"}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","secret","name"],"title":"ProxyConfigRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"stripe","name":"Stripe API","mapping_rules":[{"url":"https://api.stripe.com/v1/customers","http_method":"post","resource":"customers","action":"create","headers":{"required_header":"strict"}}]}},"ProxyConfigUpdate":{"properties":{"secret":{"anyOf":[{"type":"HeadersAuth","title":"HeadersAuth","description":"HeadersAuth is a dictionary of headers to be sent with the request."},{"type":"BasicAuth","pattern":"^.+:.+$","title":"BasicAuth","description":"BasicAuth is a string of the form 'username:password'."},{"type":"BearerAuth","minLength":1,"title":"BearerAuth","description":"BearerAuth is a string of the token to be sent with the request."}],"title":"Secret","description":"Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service."},"name":{"type":"string","title":"Name","description":"The name of the proxy config, for example: 'Stripe API'"},"mapping_rules":{"items":{"$ref":"#/components/schemas/MappingRuleUpdate"},"type":"array","title":"Mapping Rules","description":"Proxy config mapping rules, with optional should_delete flag to indicate deletion.","default":[]},"auth_mechanism":{"allOf":[{"$ref":"#/components/schemas/AuthMechanism"}],"description":"Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request.\n\nBearer injects the secret into the Authorization header as a Bearer token,\n\nBasic injects the secret into the Authorization header as a Basic user:password,\n\nHeaders injects plain headers into the request.","default":"Bearer"}},"additionalProperties":false,"type":"object","title":"ProxyConfigUpdate","example":{"mapping_rules":[{"url":"https://api.stripe.com/v1/customers","http_method":"post","resource":"customers","action":"create","headers":{"required_header":"strict"},"should_delete":true},{"url":"https://api.stripe.com/v1/invoices","http_method":"get","resource":"invoices","action":"read","headers":{"required_header":"strict"},"should_delete":false}]}},"RelationBlockRead":{"properties":{"description":{"type":"string","title":"Description","description":"An optional longer description of what this relation represents in your system"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the relation"},"relation_name":{"type":"string","title":"Relation Name","description":"a more descriptive name for the relation","hidden_from_schema":true},"resource":{"type":"string","title":"Resource","description":"The resource key"}},"additionalProperties":false,"type":"object","required":["resource_id","resource"],"title":"RelationBlockRead","example":{"resource_id":"49c2a7d3-9c2d-4400-be8c-b895e21c50a2","relation_name":"parent","resource":"parent-resource"}},"RelationCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation."},"name":{"type":"string","title":"Name","description":"The name of the relation"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this relation represents in your system"},"subject_resource":{"type":"string","title":"Subject Resource","description":"The subject resource ID or key"}},"additionalProperties":false,"type":"object","required":["key","name","subject_resource"],"title":"RelationCreate","example":{"key":"parent","name":"parent","subject_resource":"organization"}},"RelationRead":{"properties":{"description":{"type":"string","title":"Description","description":"An optional longer description of what this relation represents in your system"},"subject_resource":{"type":"string","title":"Subject Resource","description":"The subject resource ID or key"},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation."},"name":{"type":"string","title":"Name","description":"The name of the relation"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the relation"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the relation belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the relation belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the relation belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the relation was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the relation was last updated/modified (ISO_8601 format)."},"object_resource_id":{"type":"string","format":"uuid","title":"Object Resource Id","description":"The object resource id"},"object_resource":{"type":"string","title":"Object Resource","description":"The object resource key"},"subject_resource_id":{"type":"string","format":"uuid","title":"Subject Resource Id","description":"The subject resource id"}},"additionalProperties":false,"type":"object","required":["subject_resource","key","name","id","organization_id","project_id","environment_id","created_at","updated_at","object_resource_id","object_resource","subject_resource_id"],"title":"RelationRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"parent","name":"parent","description":"parent relation","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","object_resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","object_resource":"repo","subject_resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","subject_resource":"organization","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"RelationshipTupleBlockRead":{"properties":{"subject":{"type":"string","title":"Subject","description":"resource_key:resource_instance_key of the subject"},"relation":{"type":"string","title":"Relation","description":"key of the assigned relation"},"object":{"type":"string","title":"Object","description":"resource_key:resource_instance_key of the object"}},"additionalProperties":false,"type":"object","required":["subject","relation","object"],"title":"RelationshipTupleBlockRead"},"RelationshipTupleCreate":{"properties":{"subject":{"type":"string","title":"Subject","description":"the resource instance assigned the new relation (accepts either the resource instance id or resource_key:resource_instance_key)"},"relation":{"type":"string","title":"Relation","description":"the relation to assign between the subject and object"},"object":{"type":"string","title":"Object","description":"the resource instance on which the new relation is assigned (accepts either the resource instance id or resource_key:resource_instance_key)"},"tenant":{"type":"string","title":"Tenant","description":"The tenant the subject and object belong to. Required when neither resource instance exists yet - both are created in it. When exactly one exists, a tenant that disagrees with that instance's tenant is rejected; when both exist it is ignored, since each instance's tenant is taken from storage. Either way both instances must end up in the same tenant or the request is rejected. Accepts a tenant key, or a tenant id except on the bulk endpoint when neither instance exists yet (there a key is required)."}},"additionalProperties":false,"type":"object","required":["subject","relation","object"],"title":"RelationshipTupleCreate","example":{"subject":"organization:permitio","relation":"owner","object":"repo:opal","tenant":"public"}},"RelationshipTupleCreateBulkOperation":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/RelationshipTupleCreate"},"type":"array","maxItems":1000,"title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"RelationshipTupleCreateBulkOperation"},"RelationshipTupleCreateBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"RelationshipTupleCreateBulkOperationResult"},"RelationshipTupleDelete":{"properties":{"subject":{"type":"string","title":"Subject","description":"the resource instance assigned the new relation (accepts either the resource instance id or resource_key:resource_instance_key)"},"relation":{"type":"string","title":"Relation","description":"the relation to assign between the subject and object"},"object":{"type":"string","title":"Object","description":"the resource instance on which the new relation is assigned (accepts either the resource instance id or resource_key:resource_instance_key)"}},"additionalProperties":false,"type":"object","required":["subject","relation","object"],"title":"RelationshipTupleDelete","example":{"subject":"organization:permitio","relation":"owner","object":"repo:removed_repo"}},"RelationshipTupleDeleteBulkOperation":{"properties":{"idents":{"items":{"$ref":"#/components/schemas/RelationshipTupleDelete"},"type":"array","maxItems":1000,"title":"Idents","description":"List of relationship tuples objects to delete"}},"additionalProperties":false,"type":"object","required":["idents"],"title":"RelationshipTupleDeleteBulkOperation","example":{"idents":[{"subject":"organization:permitio","relation":"owner","object":"repo:removed_repo"},{"subject":"organization:permitio","relation":"parent","object":"repo:removed_repo"}]}},"RelationshipTupleDeleteBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"RelationshipTupleDeleteBulkOperationResult"},"RelationshipTupleDetailedRead":{"properties":{"subject":{"type":"string","title":"Subject","description":"resource_key:resource_instance_key of the subject"},"relation":{"type":"string","title":"Relation","description":"key of the assigned relation"},"object":{"type":"string","title":"Object","description":"resource_key:resource_instance_key of the object"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the relationship tuple"},"tenant":{"type":"string","title":"Tenant","description":"The tenant the relationship tuple is associated with"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id","description":"Unique id of the subject"},"relation_id":{"type":"string","format":"uuid","title":"Relation Id","description":"Unique id of the relation"},"object_id":{"type":"string","format":"uuid","title":"Object Id","description":"Unique id of the object (null = all resources of this type)"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"Unique id of the tenant"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the relationship tuple belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the relationship tuple belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the relationship tuple belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the relationship tuple was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the relationship tuple was created (ISO_8601 format)."},"subject_details":{"allOf":[{"$ref":"#/components/schemas/ResourceInstanceBlockRead"}],"title":"Subject Details","description":"The subject details of the relationship tuple"},"relation_details":{"allOf":[{"$ref":"#/components/schemas/StrippedRelationBlockRead"}],"title":"Relation Details","description":"The relation details of the relationship tuple"},"object_details":{"allOf":[{"$ref":"#/components/schemas/ResourceInstanceBlockRead"}],"title":"Object Details","description":"The object details of the relationship tuple"},"tenant_details":{"allOf":[{"$ref":"#/components/schemas/TenantBlockRead"}],"title":"Tenant Details","description":"The tenant details of the relationship tuple"}},"additionalProperties":false,"type":"object","required":["subject","relation","object","id","tenant","subject_id","relation_id","tenant_id","organization_id","project_id","environment_id","created_at","updated_at"],"title":"RelationshipTupleDetailedRead","examples":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","subject":"organization:permitio","relation":"owner","object":"repo:opal","tenant":"stripe-inc","subject_id":"7c60d51f-b44e-4682-87d6-449835ea4d11","relation_id":"405d8375-3514-403b-8c43-83ae74cfe022","object_id":"12f84e49-af17-4b0c-8cd7-01258769c2ba","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e733","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","subject_details":{"key":"permitio","resource":"organization","tenant":"default","attributes":{}},"relation_details":{"key":"owner","name":"owner","description":"owner relation"},"object_details":{"key":"opal","resource":"repo","tenant":"default","attributes":{"private":"false","owner":"permitio"}},"tenant_details":{"key":"github","name":"GitHub","description":"A code hosting platform for version control and collaboration","attributes":{"allowed_locations":["US","CA"]}}}]},"RelationshipTupleObj":{"properties":{"subject_str":{"type":"string","title":"Subject Str"},"relation_str":{"type":"string","title":"Relation Str"},"object_str":{"type":"string","title":"Object Str"}},"type":"object","required":["subject_str","relation_str","object_str"],"title":"RelationshipTupleObj"},"RelationshipTupleRead":{"properties":{"subject":{"type":"string","title":"Subject","description":"resource_key:resource_instance_key of the subject"},"relation":{"type":"string","title":"Relation","description":"key of the assigned relation"},"object":{"type":"string","title":"Object","description":"resource_key:resource_instance_key of the object"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the relationship tuple"},"tenant":{"type":"string","title":"Tenant","description":"The tenant the relationship tuple is associated with"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id","description":"Unique id of the subject"},"relation_id":{"type":"string","format":"uuid","title":"Relation Id","description":"Unique id of the relation"},"object_id":{"type":"string","format":"uuid","title":"Object Id","description":"Unique id of the object (null = all resources of this type)"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"Unique id of the tenant"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the relationship tuple belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the relationship tuple belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the relationship tuple belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the relationship tuple was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the relationship tuple was created (ISO_8601 format)."},"subject_details":{"allOf":[{"$ref":"#/components/schemas/ResourceInstanceBlockRead"}],"title":"Subject Details","description":"The subject details of the relationship tuple"},"relation_details":{"allOf":[{"$ref":"#/components/schemas/StrippedRelationBlockRead"}],"title":"Relation Details","description":"The relation details of the relationship tuple"},"object_details":{"allOf":[{"$ref":"#/components/schemas/ResourceInstanceBlockRead"}],"title":"Object Details","description":"The object details of the relationship tuple"},"tenant_details":{"allOf":[{"$ref":"#/components/schemas/TenantBlockRead"}],"title":"Tenant Details","description":"The tenant details of the relationship tuple"}},"additionalProperties":false,"type":"object","required":["subject","relation","object","id","tenant","subject_id","relation_id","tenant_id","organization_id","project_id","environment_id","created_at","updated_at"],"title":"RelationshipTupleRead","examples":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","subject":"organization:permitio","relation":"owner","object":"repo:opal","tenant":"stripe-inc","subject_id":"7c60d51f-b44e-4682-87d6-449835ea4d11","relation_id":"405d8375-3514-403b-8c43-83ae74cfe022","object_id":"12f84e49-af17-4b0c-8cd7-01258769c2ba","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e733","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"},{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","subject":"organization:permitio","relation":"owner","object":"repo:opal","tenant":"stripe-inc","subject_id":"7c60d51f-b44e-4682-87d6-449835ea4d11","relation_id":"405d8375-3514-403b-8c43-83ae74cfe022","object_id":"12f84e49-af17-4b0c-8cd7-01258769c2ba","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e733","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","subject_details":{"key":"permitio","resource":"organization","tenant":"default","attributes":{}},"relation_details":{"key":"owner","name":"owner","description":"owner relation"},"object_details":{"key":"opal","resource":"repo","tenant":"default","attributes":{"private":"false","owner":"permitio"}},"tenant_details":{"key":"github","name":"GitHub","description":"A code hosting platform for version control and collaboration","attributes":{"allowed_locations":["US","CA"]}}}]},"RemoteConfig":{"properties":{"opal_common":{"$ref":"#/components/schemas/OPALCommon"},"opal_client":{"$ref":"#/components/schemas/OPALClient"},"pdp":{"allOf":[{"$ref":"#/components/schemas/PdpValues"}],"title":"Pdp","default":{}},"context":{"$ref":"#/components/schemas/PDPContext"}},"additionalProperties":false,"type":"object","required":["opal_common","opal_client","context"],"title":"RemoteConfig"},"RemoveRolePermissions":{"properties":{"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"List of permissions to remove from the role. If a permission is not found it is skipped. Each permission can be either a resource action id, or `{resource_key}:{action_key}`,i.e: the \"permission name\"."}},"additionalProperties":false,"type":"object","required":["permissions"],"title":"RemoveRolePermissions","example":{"permissions":["document:share"]}},"RequestStatus":{"type":"string","enum":["pending","approved","denied","canceled"],"title":"RequestStatus","description":"An enumeration."},"RequestType":{"type":"string","enum":["access_request","operation_approval"],"title":"RequestType","description":"An enumeration."},"ResourceActionCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action."},"name":{"type":"string","title":"Name","description":"The name of the action"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this action respresents in your system"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix"},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_is_built_in":{"type":"boolean","title":"V1Compat Is Built In","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ResourceActionCreate","example":{"key":"read","name":"read","description":"read a document"}},"ResourceActionGroupCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group."},"name":{"type":"string","title":"Name","description":"The name of the action group"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this action group represents in your system"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions","default":[]}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ResourceActionGroupCreate","example":{"key":"writer","name":"Writer","actions":["read","update"],"description":"Writer Action Group"}},"ResourceActionGroupRead":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the action group"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this action group represents in your system"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions","default":[]},"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the action group"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the action group belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the action group belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the action group belongs to."},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the resource that the action group belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the action group was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the action group was last updated/modified (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["name","key","id","organization_id","project_id","environment_id","resource_id","created_at","updated_at"],"title":"ResourceActionGroupRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"writer","name":"Writer","actions":["read","update"],"description":"Writer Action Group","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"ResourceActionGroupUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the action group"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this action group represents in your system"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions","default":[]}},"additionalProperties":false,"type":"object","title":"ResourceActionGroupUpdate"},"ResourceActionRead":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the action"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this action respresents in your system"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix"},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_is_built_in":{"type":"boolean","title":"V1Compat Is Built In","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the action"},"permission_name":{"type":"string","title":"Permission Name","description":"The name of the action, prefixed by the resource the action is acting upon."},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the action belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the action belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the action belongs to."},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the resource that the action belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the action was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the action was last updated/modified (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["name","key","id","permission_name","organization_id","project_id","environment_id","resource_id","created_at","updated_at"],"title":"ResourceActionRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"read","name":"read","permission_name":"document:read","description":"read a document","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"ResourceActionUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the action"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this action respresents in your system"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix"},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_is_built_in":{"type":"boolean","title":"V1Compat Is Built In","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true}},"additionalProperties":false,"type":"object","title":"ResourceActionUpdate","example":{"description":"read a document"}},"ResourceAttributeCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute."},"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"type":"string","title":"Description","description":"An optional longer description of what this attribute respresents in your system"}},"additionalProperties":false,"type":"object","required":["key","type"],"title":"ResourceAttributeCreate","example":{"key":"private","type":"bool","description":"whether or not the github repository is private"}},"ResourceAttributeRead":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"type":"string","title":"Description","description":"An optional longer description of what this attribute respresents in your system"},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the attribute"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the resource that the attribute belongs to."},"resource_key":{"type":"string","title":"Resource Key","description":"A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource."},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the attribute belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the attribute belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the attribute belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the attribute was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the attribute was last updated/modified (ISO_8601 format)."},"built_in":{"type":"boolean","title":"Built In","description":"Whether the attribute is built-in, and managed by the Permit system."}},"additionalProperties":false,"type":"object","required":["type","key","id","resource_id","resource_key","organization_id","project_id","environment_id","created_at","updated_at","built_in"],"title":"ResourceAttributeRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"private","type":"bool","description":"whether or not the github repository is private","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","resource_key":"repository","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","built_in":false}},"ResourceAttributeUpdate":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/AttributeType"}],"description":"The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`."},"description":{"type":"string","title":"Description","description":"An optional longer description of what this attribute respresents in your system"}},"additionalProperties":false,"type":"object","title":"ResourceAttributeUpdate","example":{"description":"whether or not the github repository is private"}},"ResourceAttributes":{"properties":{"type":{"$ref":"#/components/schemas/AttributeType"},"key":{"type":"string","title":"Key"}},"type":"object","required":["type","key"],"title":"ResourceAttributes"},"ResourceCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource."},"name":{"type":"string","title":"Name","description":"The name of the resource"},"urn":{"type":"string","title":"Urn","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this resource respresents in your system"},"actions":{"additionalProperties":{"$ref":"#/components/schemas/ActionBlockEditable"},"type":"object","title":"Actions","description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n "},"type_attributes":{"type":"object","title":"Type Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix"},"attributes":{"additionalProperties":{"$ref":"#/components/schemas/AttributeBlockEditable"},"type":"object","title":"Attributes","description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"$ref":"#/components/schemas/RoleBlockEditable"}},"additionalProperties":{"$ref":"#/components/schemas/RoleBlockEditable"},"type":"object","title":"Roles","description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$"}},"additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$"},"type":"object","title":"Relations","description":"Relations to other resources. The key is the relation key, and the value is the related resource."},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_type":{"type":"string","title":"V1Compat Type","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true}},"additionalProperties":false,"type":"object","required":["key","name","actions"],"title":"ResourceCreate","example":{"key":"repository","name":"Repository","actions":{"clone":{},"read":{},"push":{}},"roles":{"contributor":{"name":"contributor","permissions":["read"],"description":"the contributor role can only read from the repo"},"maintainer":{"name":"maintainer","permissions":["push"]}},"relations":{"parent":"Organization"},"attributes":{"created":{"type":"time","description":"the time (timestamp) the repository was created"},"private":{"type":"bool","description":"whether the repo is private (if false, the repo is public)"}}}},"ResourceInstanceBlockRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly."},"tenant":{"type":"string","title":"Tenant","description":"the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps."},"resource":{"type":"string","title":"Resource","description":"the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary resource attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","required":["key","tenant","resource"],"title":"ResourceInstanceBlockRead","example":{"attributes":{"private":"false","owner":"facebook"},"key":"react","resource":"repository","tenant":"default"}},"ResourceInstanceCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly."},"tenant":{"type":"string","title":"Tenant","description":"the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps."},"resource":{"type":"string","title":"Resource","description":"the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary resource attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","required":["key","tenant","resource"],"title":"ResourceInstanceCreate","example":{"key":"react","resource":"repository","tenant":"default","attributes":{"private":"false","owner":"facebook"}}},"ResourceInstanceCreateBulkOperation":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/ResourceInstanceCreate"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"ResourceInstanceCreateBulkOperation","example":{"operations":[{"key":"react","resource":"repository","tenant":"default","attributes":{"private":"false","owner":"facebook"}},{"key":"deployment","resource":"repository","tenant":"default","attributes":{"private":"true","owner":"facebook"}}]}},"ResourceInstanceCreateBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"ResourceInstanceCreateBulkOperationResult"},"ResourceInstanceDeleteBulkOperation":{"properties":{"idents":{"items":{"type":"string"},"type":"array","title":"Idents","description":"List of resource instance idents to delete. Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file)"}},"additionalProperties":false,"type":"object","required":["idents"],"title":"ResourceInstanceDeleteBulkOperation","example":{"idents":["repository:react","repository:deployment"]}},"ResourceInstanceDeleteBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"ResourceInstanceDeleteBulkOperationResult"},"ResourceInstanceDetailedRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly."},"tenant":{"type":"string","title":"Tenant","description":"the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps."},"resource":{"type":"string","title":"Resource","description":"the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the resource instance"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the resource instance belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the resource instance belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the resource instance belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the resource instance was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the resource instance was created (ISO_8601 format)."},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the resource"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"Unique id of the tenant"},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary resource attributes that will be used to enforce attribute-based access control policies.","default":{}},"relationships":{"items":{"$ref":"#/components/schemas/RelationshipTupleBlockRead"},"type":"array","title":"Relationships","description":"The relationships of the resource instance."}},"additionalProperties":false,"type":"object","required":["key","tenant","resource","id","organization_id","project_id","environment_id","created_at","updated_at","resource_id","tenant_id","relationships","project_id"],"title":"ResourceInstanceDetailedRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c5","relationships":[],"tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c3","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"react","resource":"repository","tenant":"default","attributes":{"private":"false","owner":"facebook"}}},"ResourceInstanceRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it's unique on your end. The resource instance key must be url-friendly."},"tenant":{"type":"string","title":"Tenant","description":"the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps."},"resource":{"type":"string","title":"Resource","description":"the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the resource instance"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the resource instance belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the resource instance belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the resource instance belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the resource instance was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the resource instance was last updated/modified (ISO_8601 format)."},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"the id of the resource (type) of this resource instance."},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"the id of the tenant of this resource instance."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary resource attributes that will be used to enforce attribute-based access control policies.","default":{}},"relationships":{"items":{"$ref":"#/components/schemas/RelationshipTupleBlockRead"},"type":"array","title":"Relationships","description":"The relationships of the resource instance."}},"additionalProperties":false,"type":"object","required":["key","tenant","resource","id","organization_id","project_id","environment_id","created_at","updated_at","resource_id","tenant_id"],"title":"ResourceInstanceRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c5","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c3","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"react","resource":"repository","tenant":"default","attributes":{"private":"false","owner":"facebook"}}},"ResourceInstanceUpdate":{"properties":{"attributes":{"type":"object","title":"Attributes","description":"Arbitrary resource attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","title":"ResourceInstanceUpdate","example":{"attributes":{"private":"false","owner":"facebook"}}},"ResourceRead":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the resource"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the resource belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the resource belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the resource belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the resource was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the resource was last updated/modified (ISO_8601 format)."},"name":{"type":"string","title":"Name","description":"The name of the resource"},"urn":{"type":"string","title":"Urn","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this resource respresents in your system"},"actions":{"additionalProperties":{"$ref":"#/components/schemas/ActionBlockRead"},"type":"object","title":"Actions","description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n ","default":{}},"type_attributes":{"type":"object","title":"Type Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix"},"attributes":{"additionalProperties":{"$ref":"#/components/schemas/AttributeBlockRead"},"type":"object","title":"Attributes","description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"$ref":"#/components/schemas/ResourceRoleRead"}},"additionalProperties":{"$ref":"#/components/schemas/ResourceRoleRead"},"type":"object","title":"Roles","description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, etc."},"relations":{"additionalProperties":{"$ref":"#/components/schemas/RelationBlockRead"},"type":"object","title":"Relations","description":"\n A relations definition block, typically contained within a resource type definition block.\n The relations represents the ways you can interact with a protected resource.\n ","default":{}},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_type":{"type":"string","title":"V1Compat Type","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true},"action_groups":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Action Groups","default":{}}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","name"],"title":"ResourceRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","key":"repository","name":"Repository","urn":"prn:github:scm:repository","description":"a git repository stored on github","actions":{"clone":{"id":"90e21d70-2b1b-42f0-b492-8fd69c1d79d1"},"read":{"id":"2bc27751-6115-43c0-b68c-928cb46e34bc"},"push":{"id":"e06da336-6e03-41d6-a495-40b0d7537b2a"}},"roles":{"maintainer":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"maintainer","name":"Maintainer","description":"the maintainer role can read from the repo and push changes","permissions":["push"],"extends":["contributor"],"resource":"repo","granted_to":{"id":"6acf18ef-aec4-4c49-993d-4a234f3259f5","users_with_role":[{"role":"Admin","on_resource":"organization","linked_by_relation":"owner","role_id":"f4026ebd-2b89-4438-aaee-f2c6f1f5d3c8","resource_id":"3b9ad025-8fcc-4332-bad7-ce8f71a88e29","relation_id":"c10bafe4-5304-4ee8-9eb9-c081a5b16149"}]},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"relations":{"parent":{"resource_id":"49c2a7d3-9c2d-4400-be8c-b895e21c50a2","relation_name":"parent","resource":"parent-resource"}},"attributes":{"created":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f11","type":"time","description":"the time (timestamp) the repository was created"},"private":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f22","type":"bool","description":"whether the repo is private (if false, the repo is public)"}}}},"ResourceReplace":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the resource"},"urn":{"type":"string","title":"Urn","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this resource respresents in your system"},"actions":{"additionalProperties":{"$ref":"#/components/schemas/ActionBlockEditable"},"type":"object","title":"Actions","description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n "},"type_attributes":{"type":"object","title":"Type Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix"},"attributes":{"additionalProperties":{"$ref":"#/components/schemas/AttributeBlockEditable"},"type":"object","title":"Attributes","description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"$ref":"#/components/schemas/RoleBlockEditable"}},"additionalProperties":{"$ref":"#/components/schemas/RoleBlockEditable"},"type":"object","title":"Roles","description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$"}},"additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$"},"type":"object","title":"Relations","description":"Relations to other resources. The key is the relation key, and the value is the related resource."},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_type":{"type":"string","title":"V1Compat Type","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true}},"additionalProperties":false,"type":"object","required":["name","actions"],"title":"ResourceReplace"},"ResourceRoleCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockEdit"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"},"v1compat_settings":{"type":"object","title":"V1Compat Settings","hidden_from_schema":true},"v1compat_attributes":{"type":"object","title":"V1Compat Attributes","hidden_from_schema":true}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ResourceRoleCreate","example":{"key":"maintainer","name":"Maintainer","description":"the maintainer role can read from the repo and push changes","permissions":["push"],"extends":["contributor"],"granted_to":{"users_with_role":[{"role":"Admin","on_resource":"organization","linked_by_relation":"owner"}]}}},"ResourceRoleList":{"properties":{"roles":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResourceRoleRead"},"type":"array"},{"$ref":"#/components/schemas/PaginatedResult_ResourceRoleRead_"}],"title":"Roles"}},"additionalProperties":false,"type":"object","required":["roles"],"title":"ResourceRoleList"},"ResourceRoleRead":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.","default":[]},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockRead"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the role"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the role belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the role belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the role belongs to."},"resource_id":{"type":"string","format":"uuid","title":"Resource Id","description":"Unique id of the resource that the role belongs to."},"resource":{"type":"string","title":"Resource","description":"The unique resource key that the role belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the role was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the role was last updated/modified (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["name","key","id","organization_id","project_id","environment_id","resource_id","resource","created_at","updated_at"],"title":"ResourceRoleRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"maintainer","name":"Maintainer","description":"the maintainer role can read from the repo and push changes","permissions":["push"],"extends":["contributor"],"resource":"repo","granted_to":{"id":"6acf18ef-aec4-4c49-993d-4a234f3259f5","users_with_role":[{"role":"Admin","on_resource":"organization","linked_by_relation":"owner","role_id":"f4026ebd-2b89-4438-aaee-f2c6f1f5d3c8","resource_id":"3b9ad025-8fcc-4332-bad7-ce8f71a88e29","relation_id":"c10bafe4-5304-4ee8-9eb9-c081a5b16149"}]},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","resource_id":"40ef0e48-a11f-4963-a229-e396c9f7e7dd","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"ResourceRoleUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.","default":[]},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockEdit"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"}},"additionalProperties":false,"type":"object","title":"ResourceRoleUpdate","example":{"description":"the maintainer role can read from the repo and push changes","permissions":["push"]}},"ResourceTypeObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"attributes":{"items":{"$ref":"#/components/schemas/ResourceAttributes"},"type":"array","title":"Attributes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"ResourceTypeObj"},"ResourceUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the resource"},"urn":{"type":"string","title":"Urn","description":"The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this resource respresents in your system"},"actions":{"additionalProperties":{"$ref":"#/components/schemas/ActionBlockEditable"},"type":"object","title":"Actions","description":"\n A actions definition block, typically contained within a resource type definition block.\n The actions represents the ways you can interact with a protected resource.\n "},"type_attributes":{"type":"object","title":"Type Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix"},"attributes":{"additionalProperties":{"$ref":"#/components/schemas/AttributeBlockEditable"},"type":"object","title":"Attributes","description":"Attributes that each resource of this type defines, and can be used in your ABAC policies."},"roles":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"$ref":"#/components/schemas/RoleBlockEditable"}},"additionalProperties":{"$ref":"#/components/schemas/RoleBlockEditable"},"type":"object","title":"Roles","description":"Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc."},"relations":{"patternProperties":{"^[A-Za-z0-9\\-_]+$":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$"}},"additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$"},"type":"object","title":"Relations","description":"Relations to other resources. The key is the relation key, and the value is the related resource."},"v1compat_path":{"type":"string","title":"V1Compat Path","hidden_from_schema":true},"v1compat_type":{"type":"string","title":"V1Compat Type","hidden_from_schema":true},"v1compat_name":{"type":"string","title":"V1Compat Name","hidden_from_schema":true}},"additionalProperties":false,"type":"object","title":"ResourceUpdate"},"RoleAssignmentCreate":{"properties":{"role":{"type":"string","title":"Role","description":"the role that will be assigned (accepts either the role id or the role key)"},"tenant":{"type":"string","title":"Tenant","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"},"resource_instance":{"type":"string","title":"Resource Instance","description":"the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)The resource instance will be implicitly created if the tenant parameter is specified and the resource instance does not exist."},"user":{"type":"string","title":"User","description":"the user the role will be assigned to (accepts either the user id or the user key)"}},"additionalProperties":false,"type":"object","required":["role","user"],"title":"RoleAssignmentCreate","example":{"user":"jane@coolcompany.com","role":"admin","tenant":"stripe-inc"}},"RoleAssignmentDetailedRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the role assignment"},"role":{"allOf":[{"$ref":"#/components/schemas/RoleAssignmentRole"}],"title":"Role","description":"the role that is assigned"},"user":{"allOf":[{"$ref":"#/components/schemas/RoleAssignmentUser"}],"title":"User","description":"the user the role is assigned to"},"tenant":{"allOf":[{"$ref":"#/components/schemas/RoleAssignmentTenant"}],"title":"Tenant","description":"the tenant the role is associated with"},"resource_instance":{"$ref":"#/components/schemas/RoleAssignmentResourceInstance"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the role assignment belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the role assignment belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the role assignment belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the role assignment was created (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["id","role","user","tenant","organization_id","project_id","environment_id","created_at"],"title":"RoleAssignmentDetailedRead"},"RoleAssignmentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the role assignment"},"user":{"type":"string","title":"User","description":"the user the role is assigned to"},"role":{"type":"string","title":"Role","description":"the role that is assigned"},"tenant":{"type":"string","title":"Tenant","description":"the tenant the role is associated with"},"resource_instance":{"type":"string","title":"Resource Instance","description":"the resource instance the role is associated with"},"resource_instance_id":{"type":"string","format":"uuid","title":"Resource Instance Id","description":"Unique id of the resource instance"},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"Unique id of the user"},"role_id":{"type":"string","format":"uuid","title":"Role Id","description":"Unique id of the role"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"Unique id of the tenant"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the role assignment belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the role assignment belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the role assignment belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the role assignment was created (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["id","user","role","user_id","role_id","tenant_id","organization_id","project_id","environment_id","created_at"],"title":"RoleAssignmentRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","user":"jane@coolcompany.com","role":"admin","tenant":"stripe-inc","user_id":"7c60d51f-b44e-4682-87d6-449835ea4d11","role_id":"405d8375-3514-403b-8c43-83ae74cfe022","tenant_id":"40ef0e48-a11f-4963-a229-e396c9f7e733","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z"}},"RoleAssignmentRemove":{"properties":{"role":{"type":"string","title":"Role","description":"the role that will be unassigned (accepts either the role id or the role key)"},"tenant":{"type":"string","title":"Tenant","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"},"resource_instance":{"type":"string","title":"Resource Instance","description":"the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)"},"user":{"type":"string","title":"User","description":"the user the role will be unassigned from (accepts either the user id or the user key)"}},"additionalProperties":false,"type":"object","required":["role","tenant","user"],"title":"RoleAssignmentRemove","example":{"user":"jane@coolcompany.com","role":"editor","tenant":"google-inc"}},"RoleAssignmentResourceInstance":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"resource":{"type":"string","title":"Resource"},"attributes":{"type":"object","title":"Attributes","default":{}}},"additionalProperties":false,"type":"object","required":["id","key","resource"],"title":"RoleAssignmentResourceInstance"},"RoleAssignmentRole":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"}},"additionalProperties":false,"type":"object","required":["id","key","name"],"title":"RoleAssignmentRole"},"RoleAssignmentTenant":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"attributes":{"type":"object","title":"Attributes","default":{}}},"additionalProperties":false,"type":"object","required":["id","key","name"],"title":"RoleAssignmentTenant"},"RoleAssignmentUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"attributes":{"type":"object","title":"Attributes","default":{}}},"additionalProperties":false,"type":"object","required":["id","key"],"title":"RoleAssignmentUser"},"RoleBlockEditable":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockEdit"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"},"v1compat_settings":{"type":"object","title":"V1Compat Settings","hidden_from_schema":true},"v1compat_attributes":{"type":"object","title":"V1Compat Attributes","hidden_from_schema":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"RoleBlockEditable"},"RoleCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockEdit"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"},"v1compat_settings":{"type":"object","title":"V1Compat Settings","hidden_from_schema":true},"v1compat_attributes":{"type":"object","title":"V1Compat Attributes","hidden_from_schema":true},"v1compat_is_built_in":{"type":"boolean","title":"V1Compat Is Built In","hidden_from_schema":true}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"RoleCreate","example":{"key":"editor","name":"Editor","description":"the editor role can read and write to documents","permissions":["document:write"],"extends":["viewer"]}},"RoleCreateBulk":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockEdit"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"},"v1compat_settings":{"type":"object","title":"V1Compat Settings","hidden_from_schema":true},"v1compat_attributes":{"type":"object","title":"V1Compat Attributes","hidden_from_schema":true},"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A URL-friendly name of the Role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the Role."},"resource":{"type":"string","title":"Resource","description":"The resource key for the role. Optional; for tenant roles, leave empty."}},"additionalProperties":false,"type":"object","required":["name","key"],"title":"RoleCreateBulk"},"RoleCreateBulkOperation":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/RoleCreateBulk"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"RoleCreateBulkOperation"},"RoleCreateBulkOperationResult":{"properties":{"created":{"items":{"type":"string"},"type":"array","title":"Created"},"updated":{"items":{"type":"string"},"type":"array","title":"Updated"}},"additionalProperties":false,"type":"object","required":["created","updated"],"title":"RoleCreateBulkOperationResult"},"RoleList":{"properties":{"roles":{"anyOf":[{"items":{"$ref":"#/components/schemas/RoleRead"},"type":"array"},{"$ref":"#/components/schemas/PaginatedResult_RoleRead_"}],"title":"Roles"}},"additionalProperties":false,"type":"object","required":["roles"],"title":"RoleList"},"RoleRead":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockRead"}],"title":"Granted To","description":"\n A derived role defintion block, typically contained whithin a role definition.\n The derived role is a role that is derived from the role definition.\n ","default":{}},"v1compat_settings":{"type":"object","title":"V1Compat Settings","hidden_from_schema":true},"v1compat_attributes":{"type":"object","title":"V1Compat Attributes","hidden_from_schema":true},"key":{"type":"string","title":"Key","description":"A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the role"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the role belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the role belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the role belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the role was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the role was last updated/modified (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["name","key","id","organization_id","project_id","environment_id","created_at","updated_at"],"title":"RoleRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","key":"editor","name":"Editor","description":"the editor role can read and write to documents","permissions":["document:write"],"extends":["viewer"],"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z"}},"RoleUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the role"},"description":{"type":"string","title":"Description","description":"optional description string explaining what this role represents, or what permissions are granted to it."},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"list of action keys that define what actions this resource role is permitted to do"},"attributes":{"type":"object","title":"Attributes","description":"optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only 'equals' operator"},"extends":{"items":{"type":"string"},"type":"array","title":"Extends","description":"list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list."},"granted_to":{"allOf":[{"$ref":"#/components/schemas/DerivedRoleBlockEdit"}],"title":"Granted To","description":"Derived role that inherit will be applied on this role"},"v1compat_settings":{"type":"object","title":"V1Compat Settings","hidden_from_schema":true},"v1compat_attributes":{"type":"object","title":"V1Compat Attributes","hidden_from_schema":true}},"additionalProperties":false,"type":"object","title":"RoleUpdate","example":{"description":"the editor role can read and write to documents","permissions":["document:write"]}},"SMTPEmailConfigurationCreate":{"properties":{"host":{"type":"string","title":"Host","description":"The host of the SMTP provider"},"from_address":{"type":"string","format":"email","title":"From Address","description":"The from address the mails will be sent from"},"port":{"type":"integer","title":"Port","description":"The port of the SMTP provider"},"username":{"type":"string","title":"Username","description":"The username of the SMTP provider"},"password":{"type":"string","title":"Password","description":"The password of the SMTP provider"},"email_provider_type":{"type":"string","enum":["smtp"],"title":"Email Provider Type","description":"The type of the email provider","default":"smtp"}},"additionalProperties":false,"type":"object","required":["host","from_address","port","username","password"],"title":"SMTPEmailConfigurationCreate"},"SMTPEmailConfigurationRead":{"properties":{"host":{"type":"string","title":"Host","description":"The host of the SMTP provider"},"from_address":{"type":"string","format":"email","title":"From Address","description":"The from address the mails will be sent from"},"port":{"type":"integer","title":"Port","description":"The port of the SMTP provider"},"username":{"type":"string","title":"Username","description":"The username of the SMTP provider"},"password":{"type":"string","title":"Password","description":"The password of the SMTP provider"},"email_provider_type":{"type":"string","enum":["smtp"],"title":"Email Provider Type","description":"The type of the email provider","default":"smtp"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the email_configuration"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the email_configuration belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the email_configuration belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the email_configuration belongs to."}},"additionalProperties":false,"type":"object","required":["host","from_address","port","username","password","id","organization_id","project_id","environment_id"],"title":"SMTPEmailConfigurationRead"},"SSHAuthData":{"properties":{"auth_type":{"type":"string","enum":["ssh"],"title":"Auth Type","default":"ssh"},"username":{"type":"string","title":"Username","description":"SSH username"},"public_key":{"type":"string","title":"Public Key","description":"SSH public key"},"private_key":{"type":"string","title":"Private Key","description":"SSH private key"}},"type":"object","required":["username","private_key"],"title":"SSHAuthData"},"SSHAuthDataRead":{"properties":{"auth_type":{"type":"string","enum":["ssh"],"title":"Auth Type","default":"ssh"},"username":{"type":"string","title":"Username","description":"SSH username"},"public_key":{"type":"string","title":"Public Key","description":"SSH public key"},"private_key":{"type":"string","title":"Private Key","description":"SSH private key"}},"type":"object","required":["username","private_key"],"title":"SSHAuthDataRead"},"ScopeConfigRead":{"properties":{"data":{"$ref":"#/components/schemas/DataSourceConfig"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the ScopeConfig"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the ScopeConfig belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the ScopeConfig belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the ScopeConfig belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the ScopeConfig was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the ScopeConfig was last updated/modified (ISO_8601 format)."}},"additionalProperties":false,"type":"object","required":["id","organization_id","project_id","environment_id","created_at","updated_at"],"title":"ScopeConfigRead"},"ScopeConfigSet":{"properties":{"data":{"$ref":"#/components/schemas/DataSourceConfig"}},"additionalProperties":false,"type":"object","title":"ScopeConfigSet"},"SearchOperator":{"type":"string","enum":["startswith","endswith","contains"],"title":"SearchOperator","description":"An enumeration."},"StrippedRelationBlockRead":{"properties":{"key":{"type":"string","title":"Key","description":"A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation."},"name":{"type":"string","title":"Name","description":"The name of the relation"},"description":{"type":"string","title":"Description","description":"An optional longer description of what this relation represents in your system"}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"StrippedRelationBlockRead","example":{"description":"parent relation","key":"parent","name":"parent"}},"TaskResult_EnvironmentRead_":{"properties":{"task_id":{"type":"string","title":"Task Id","description":"The unique id of the task."},"status":{"allOf":[{"$ref":"#/components/schemas/TaskStatus"}],"description":"The status of the task."},"result":{"allOf":[{"$ref":"#/components/schemas/EnvironmentRead"}],"title":"Result","description":"The result of the task when the task finished."},"error":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"}],"title":"Error","description":"The error details when the task failed."}},"additionalProperties":false,"type":"object","required":["task_id","status"],"title":"TaskResult[EnvironmentRead]"},"TaskResult_OrgExportResult_":{"properties":{"task_id":{"type":"string","title":"Task Id","description":"The unique id of the task."},"status":{"allOf":[{"$ref":"#/components/schemas/TaskStatus"}],"description":"The status of the task."},"result":{"allOf":[{"$ref":"#/components/schemas/OrgExportResult"}],"title":"Result","description":"The result of the task when the task finished."},"error":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"}],"title":"Error","description":"The error details when the task failed."}},"additionalProperties":false,"type":"object","required":["task_id","status"],"title":"TaskResult[OrgExportResult]"},"TaskResult_PolicyGuardScopeRead_":{"properties":{"task_id":{"type":"string","title":"Task Id","description":"The unique id of the task."},"status":{"allOf":[{"$ref":"#/components/schemas/TaskStatus"}],"description":"The status of the task."},"result":{"allOf":[{"$ref":"#/components/schemas/PolicyGuardScopeRead"}],"title":"Result","description":"The result of the task when the task finished."},"error":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"}],"title":"Error","description":"The error details when the task failed."}},"additionalProperties":false,"type":"object","required":["task_id","status"],"title":"TaskResult[PolicyGuardScopeRead]"},"TaskStatus":{"type":"string","enum":["processing","success","failure","cancelled"],"title":"TaskStatus","description":"An enumeration."},"TenantBlockRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified)."},"name":{"type":"string","title":"Name","description":"A descriptive name for the tenant"},"description":{"type":"string","title":"Description","description":"an optional longer description of the tenant"},"attributes":{"type":"object","title":"Attributes","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"TenantBlockRead","example":{"name":"Stripe Inc","description":"A payment processing company","attributes":{"allowed_locations":["US","CA"]},"key":"stripeinc"}},"TenantCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9\\-_]+$","title":"Key","description":"A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified)."},"name":{"type":"string","title":"Name","description":"A descriptive name for the tenant"},"description":{"type":"string","title":"Description","description":"an optional longer description of the tenant"},"attributes":{"type":"object","title":"Attributes","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"TenantCreate","example":{"key":"stripeinc","name":"Stripe Inc","attributes":{"allowed_locations":["US","CA"]}}},"TenantCreateBulkOperation":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/TenantCreate"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"TenantCreateBulkOperation"},"TenantCreateBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"TenantCreateBulkOperationResult"},"TenantDeleteBulkOperation":{"properties":{"idents":{"items":{"type":"string"},"type":"array","title":"Idents","description":"List of tenant idents to delete. Either the unique id or the key of the tenants."}},"additionalProperties":false,"type":"object","required":["idents"],"title":"TenantDeleteBulkOperation","example":{"idents":["default","dev"]}},"TenantDeleteBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"TenantDeleteBulkOperationResult"},"TenantObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"attributes":{"type":"object","title":"Attributes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"TenantObj"},"TenantRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified)."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the tenant"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the tenant belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the tenant belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the tenant belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the tenant was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the tenant was last updated/modified (ISO_8601 format)."},"last_action_at":{"type":"string","format":"date-time","title":"Last Action At","description":"Date and time when the tenant was last active (ISO_8601 format). In other words, this is the last time a permission check was done on a resource belonging to this tenant."},"name":{"type":"string","title":"Name","description":"A descriptive name for the tenant"},"description":{"type":"string","title":"Description","description":"an optional longer description of the tenant"},"attributes":{"type":"object","title":"Attributes","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at","last_action_at","name"],"title":"TenantRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","last_action_at":"2019-08-24T14:15:22Z","key":"stripeinc","name":"Stripe Inc","attributes":{"allowed_locations":["US","CA"]}}},"TenantUpdate":{"properties":{"name":{"type":"string","title":"Name","description":"A descriptive name for the tenant"},"description":{"type":"string","title":"Description","description":"an optional longer description of the tenant"},"attributes":{"type":"object","title":"Attributes","description":"Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","title":"TenantUpdate","example":{"name":"Stripe Inc","description":"A payment processing company","attributes":{"allowed_locations":["US","CA"]}}},"UsageLimits":{"properties":{"mau":{"type":"integer","title":"Mau","description":"Monthly active users limit. Default for trial is 5000.","default":5000},"tenants":{"type":"integer","title":"Tenants","description":"Number of tenants limit. Default for trial is 50.","default":50},"billing_tier":{"allOf":[{"$ref":"#/components/schemas/BillingTierType"}],"description":"Billing tier. Default is trial.","default":"trial"}},"additionalProperties":false,"type":"object","title":"UsageLimits"},"UserCreate":{"properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9|@+\\-\\._]+$","title":"Key","description":"A unique id by which Permit will identify the user for permission checks."},"email":{"type":"string","format":"email","title":"Email","description":"The email of the user. If synced, will be unique inside the environment."},"first_name":{"type":"string","title":"First Name","description":"First name of the user."},"last_name":{"type":"string","title":"Last Name","description":"Last name of the user."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary user attributes that will be used to enforce attribute-based access control policies.","default":{}},"role_assignments":{"items":{"$ref":"#/components/schemas/UserRoleCreate"},"type":"array","title":"Role Assignments","description":"List of roles to assign to the user in the environment."}},"additionalProperties":false,"type":"object","required":["key"],"title":"UserCreate","example":{"key":"user|892179821739812389327","email":"jane@coolcompany.com","first_name":"Jane","last_name":"Doe","attributes":{"department":"marketing","age":30,"subscription":{"tier":"pro","expired":false}},"role_assignments":[{"role":"admin","tenant":"stripe-inc"},{"role":"viewer","tenant":"othercompany.com"}]}},"UserCreateBulkOperation":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/UserCreate"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"UserCreateBulkOperation"},"UserCreateBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"UserCreateBulkOperationResult"},"UserDeleteBulkOperation":{"properties":{"idents":{"items":{"type":"string"},"type":"array","title":"Idents","description":"List of user idents to delete. Either the unique id or the key of the users."}},"additionalProperties":false,"type":"object","required":["idents"],"title":"UserDeleteBulkOperation","example":{"idents":["jane_doe","john_doe"]}},"UserDeleteBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"UserDeleteBulkOperationResult"},"UserInTenant":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"The tenant key which the user is associated with"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"List of roles assigned to the user in that tenant"},"status":{"allOf":[{"$ref":"#/components/schemas/UserStatus"}],"description":"Whether the user has signed in or not"},"resource_instance_roles":{"items":{"$ref":"#/components/schemas/UserResourceInstanceRole"},"type":"array","title":"Resource Instance Roles","default":[]}},"additionalProperties":false,"type":"object","required":["tenant","roles","status"],"title":"UserInTenant"},"UserInviteStatus":{"type":"string","enum":["pending","approved"],"title":"UserInviteStatus","description":"An enumeration."},"UserObj":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"attributes":{"type":"object","title":"Attributes"},"roles":{"items":{"$ref":"#/components/schemas/RelationshipTupleObj"},"type":"array","title":"Roles","hidden_from_schema":true},"assigned_roles":{"items":{"type":"string"},"type":"array","title":"Assigned Roles"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","created_at","updated_at"],"title":"UserObj"},"UserRead":{"properties":{"key":{"type":"string","title":"Key","description":"A unique id by which Permit will identify the user for permission checks."},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the user"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the user belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the user belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the user belongs to."},"associated_tenants":{"items":{"$ref":"#/components/schemas/UserInTenant"},"type":"array","title":"Associated Tenants","default":[]},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":"array","title":"Roles","default":[],"deprecated":true},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the user was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the user was last updated/modified (ISO_8601 format)."},"email":{"type":"string","format":"email","title":"Email","description":"The email of the user. If synced, will be unique inside the environment."},"first_name":{"type":"string","title":"First Name","description":"First name of the user."},"last_name":{"type":"string","title":"Last Name","description":"Last name of the user."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary user attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","required":["key","id","organization_id","project_id","environment_id","created_at","updated_at"],"title":"UserRead","example":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","project_id":"405d8375-3514-403b-8c43-83ae74cfe0e9","environment_id":"40ef0e48-a11f-4963-a229-e396c9f7e7c4","key":"user|892179821739812389327","email":"jane@coolcompany.com","created_at":"2019-08-24T14:15:22Z","updated_at":"2019-08-24T14:15:22Z","first_name":"Jane","last_name":"Doe","attributes":{"department":"marketing","age":30,"subscription":{"tier":"pro","expired":false}},"associated_tenants":[{"tenant":"stripe-inc","roles":["admin"],"status":"active"},{"tenant":"othercompany.com","roles":["viewer"],"status":"pending"}],"roles":[{"role":"admin","tenant":"stripe-inc"},{"role":"viewer","tenant":"othercompany.com"}]}},"UserReplaceBulkOperation":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/UserCreate"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"UserReplaceBulkOperation"},"UserReplaceBulkOperationResult":{"properties":{},"additionalProperties":false,"type":"object","title":"UserReplaceBulkOperationResult"},"UserResourceInstanceRole":{"properties":{"resource_instance":{"type":"string","title":"Resource Instance","description":"The resource instance key which the role is associated with"},"resource":{"type":"string","title":"Resource","description":"The resource type which the role is associated with"},"role":{"type":"string","title":"Role","description":"The role key of this resource role"}},"additionalProperties":false,"type":"object","required":["resource_instance","resource","role"],"title":"UserResourceInstanceRole"},"UserRole":{"properties":{"role":{"type":"string","title":"Role","description":"the role that is assigned"},"tenant":{"type":"string","title":"Tenant","description":"the tenant the role is associated with"}},"additionalProperties":false,"type":"object","required":["role","tenant"],"title":"UserRole"},"UserRoleCreate":{"properties":{"role":{"type":"string","title":"Role","description":"the role that will be assigned (accepts either the role id or the role key)"},"tenant":{"type":"string","title":"Tenant","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"},"resource_instance":{"type":"string","title":"Resource Instance","description":"the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)The resource instance will be implicitly created if the tenant parameter is specified and the resource instance does not exist."}},"additionalProperties":false,"type":"object","required":["role"],"title":"UserRoleCreate","example":{"role":"admin","tenant":"stripe-inc"}},"UserRoleRemove":{"properties":{"role":{"type":"string","title":"Role","description":"the role that will be unassigned (accepts either the role id or the role key)"},"tenant":{"type":"string","title":"Tenant","description":"the tenant the role is associated with (accepts either the tenant id or the tenant key)"},"resource_instance":{"type":"string","title":"Resource Instance","description":"the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)"}},"additionalProperties":false,"type":"object","required":["role","tenant"],"title":"UserRoleRemove","example":{"role":"editor","tenant":"google-inc"}},"UserStatus":{"type":"string","enum":["active","pending"],"title":"UserStatus","description":"An enumeration."},"UserUpdate":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"The email of the user. If synced, will be unique inside the environment."},"first_name":{"type":"string","title":"First Name","description":"First name of the user."},"last_name":{"type":"string","title":"Last Name","description":"Last name of the user."},"attributes":{"type":"object","title":"Attributes","description":"Arbitrary user attributes that will be used to enforce attribute-based access control policies.","default":{}}},"additionalProperties":false,"type":"object","title":"UserUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookCreateWithElements":{"properties":{"type":{"type":"string","enum":["elements"],"title":"Type","default":"elements"},"url":{"type":"string","title":"Url","description":"The url to POST the webhook to"},"bearer_token":{"type":"string","title":"Bearer Token","description":"An optional bearer token to use to authenticate the request"}},"additionalProperties":false,"type":"object","required":["url"],"title":"WebhookCreateWithElements"},"WebhookRead":{"properties":{"type":{"$ref":"#/components/schemas/WebhookType"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique id of the webhook"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Unique id of the organization that the webhook belongs to."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Unique id of the project that the webhook belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Unique id of the environment that the webhook belongs to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Date and time when the webhook was created (ISO_8601 format)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Date and time when the webhook was last updated/modified (ISO_8601 format)."},"url":{"type":"string","title":"Url","description":"The url to POST the webhook to"}},"additionalProperties":false,"type":"object","required":["type","id","organization_id","project_id","environment_id","created_at","updated_at","url"],"title":"WebhookRead"},"WebhookType":{"type":"string","enum":["elements","pdp_sync_error"],"title":"WebhookType","description":"An enumeration."},"WebhookUpdate":{"properties":{"url":{"type":"string","title":"Url","description":"The url to POST the webhook to"},"bearer_token":{"type":"string","title":"Bearer Token","description":"An optional bearer token to use to authenticate the request"}},"additionalProperties":false,"type":"object","title":"WebhookUpdate"},"data_generator_lib__schemas__schema_opal_data__ConditionSetData":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"The type of the condition set."},"key":{"type":"string","title":"Key","description":"The key of the condition set."}},"type":"object","required":["type","key"],"title":"ConditionSetData","description":"This is the data of a specific condition set in the system"},"data_generator_lib__schemas__schema_opal_data__DerivationSettings":{"properties":{"superseded_by_direct_role":{"type":"boolean","title":"Superseded By Direct Role","description":"If True, the derived role is superseded by a direct role.meaning role derivation is not considered if the user has a direct role.","default":false}},"type":"object","title":"DerivationSettings","description":"Settings for the derived role"},"data_generator_lib__schemas__schema_opal_data__DerivedRole":{"properties":{"conditions":{"type":"string","title":"Conditions"},"settings":{"allOf":[{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__DerivationSettings"}],"title":"Settings","description":"Settings for the derived role."},"rules":{"items":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__DerivedRoleRule"},"type":"array","title":"Rules","description":"List of rules for the derived role."}},"type":"object","required":["settings","rules"],"title":"DerivedRole","description":"This is the data of a specific derived role in the system"},"data_generator_lib__schemas__schema_opal_data__DerivedRoleRule":{"properties":{"relation":{"type":"string","title":"Relation","description":"The relation between the resource and the related resource."},"related_resource":{"type":"string","title":"Related Resource","description":"The related resource type key."},"related_role":{"type":"string","title":"Related Role","description":"The related role key."},"settings":{"allOf":[{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__DerivationSettings"}],"title":"Settings","description":"Settings for the derived role rule."}},"type":"object","required":["relation","related_resource","related_role","settings"],"title":"DerivedRoleRule","description":"This is the data of a specific derived role rule in the system"},"data_generator_lib__schemas__schema_opal_data__FullData":{"properties":{"use_debugger":{"type":"boolean","title":"Use Debugger","default":true},"users":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__UserData"},"type":"object","title":"Users","description":"Key-Value mapping of the users in the system.\nThe key is the user key and the value contains some details about the user."},"tenants":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__TenantData"},"type":"object","title":"Tenants","description":"Key-Value mapping of the tenants in the system.\nThe key is the tenant key and the value contains some details about the tenant."},"roles":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__RoleData"},"type":"object","title":"Roles","description":"Key-Value mapping of the roles in the system.\nThe key is the role key and the value contains some details about the role.","deprecated":true},"condition_set_rules":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Condition Set Rules","description":"Key-Value mapping of the permissions for each condition set.\nThe key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set"},"condition_set_rules_expand":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Condition Set Rules Expand","description":"Sanitized Key-Value mapping of the permissions for each condition set.\n(Equal to condition_set_rules but user_set_key and resource_set_key are sanitized)The key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set","default":{}},"relationships":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Relationships","description":"Key-Value mapping of the relationships between resources.\nThe key is the resource instance key and the value is Key-Value mapping of relation key to a Key-Value mapping of resource ( type ) to list of instances keys."},"resource_types":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__ResourceTypeData"},"type":"object","title":"Resource Types","description":"Key-Value mapping of the resource types in the system.\nThe key is the resource type key and the value contains some details about the resource type."},"condition_sets":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__ConditionSetData"},"type":"object","title":"Condition Sets","description":"Key-Value mapping of the condition sets in the system.\nThe key is the formatted condition set key and the value contains some details about the condition set."},"role_assignments":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object","title":"Role Assignments","description":"Key-Value mapping of the role assignments for the users.\nThe key is the user key and the value is Key-Value mapping of resource instance key or tenant key to list of role keys assigned to the user in that resource instance."},"role_permissions":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__RoleData"},"type":"object"},"type":"object","title":"Role Permissions","description":"Key-Value mapping of the permissions for each role.\nThe key is the resource key and the value is Key-Value mapping of role key to details on the role permissions."},"mapping_rules":{"additionalProperties":{"items":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object"},"type":"array"},"type":"object","title":"Mapping Rules","description":"Key-Value mapping of groups of mapping rules in the system.\nThe key is the mapping rule group and the value is a list of mapping rules objects.We currently have only one group named 'all' which contains all the mapping rules.A mapping rule object contains, action, http_method, resource and url - all strings.","default":{}},"resource_instances":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__ResourceInstanceAttributeData"},"type":"object","title":"Resource Instances","description":"Key-Value mapping of the resource instances in the system.\nThe key is the resource instance key and the value contains some details about the resource instance.","default":{}}},"type":"object","required":["users","tenants","roles","condition_set_rules","relationships","resource_types","condition_sets","role_assignments","role_permissions"],"title":"FullData","description":"This is the data structure that is used by the PDP in a manged Permit environment.\nThe code Permit generates uses this data structure to enforce the policy and make decisions.","example":{"use_debugger":true,"mapping_rules":{"all":[{"action":"read","http_method":"get","resource":"document","url":"https://example.com/{var}/resources/{var2}"}]},"users":{"user1":{"roleAssignments":{"default":["viewer"]},"attributes":{"email":"user1@permit.io","key":"user1"}}},"tenants":{"default":{"attributes":{"attr1":"value1"}}},"role_permissions":{"community":{"admin":{"grants":{}},"viewer":{"grants":{}}},"document":{"editor":{"grants":{"document":["update","read"]}},"viewer":{"grants":{"document":["read"]}}}},"roles":{"viewer":{"grants":{"document":["read"]}}},"condition_sets":{"resourceset_big_5ffiles":{"type":"resourceset","key":"big_files"},"userset_permit_57users":{"type":"userset","key":"permit_users"}},"condition_set_rules":{"permit_users":{"big_files":{"document":["read","update"]}}},"resource_instances":{"community:community-0":{"attributes":{}},"document:document-0":{"attributes":{}},"document:document-1":{"attributes":{}}},"relationships":{"document:document-0":{"relation:community":{"community":["community-0"]}},"document:document-1":{"relation:community":{"community":["community-0"]}}},"resource_types":{"__tenant":{"actions":[],"derived_roles":{}},"__user":{"actions":[],"derived_roles":{}},"community":{"actions":[],"derived_roles":{}},"document":{"actions":["read","update"],"derived_roles":{"editor":{"rules":[{"related_resource":"community","related_role":"admin","relation":"community","settings":{"superseded_by_direct_role":false}}],"settings":{"superseded_by_direct_role":false}},"viewer":{"rules":[{"related_resource":"community","related_role":"admin","relation":"community","settings":{"superseded_by_direct_role":false}},{"related_resource":"community","related_role":"viewer","relation":"community","settings":{"superseded_by_direct_role":false}}],"settings":{"superseded_by_direct_role":false}}}}},"role_assignments":{"user:user1":{"__tenant:default":["viewer"],"document:document-1":["editor"]}}}},"data_generator_lib__schemas__schema_opal_data__ResourceInstanceAttributeData":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"The tenant key that this resource instance belongs to."},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the resource instance.\nThe key is the attribute key and the value is the attribute value.","default":{}}},"type":"object","title":"ResourceInstanceAttributeData","description":"This is the data of a specific resource instance in the system"},"data_generator_lib__schemas__schema_opal_data__ResourceTypeData":{"properties":{"actions":{"items":{"type":"string"},"type":"array","title":"Actions","description":"List of actions that can be performed on the resource."},"derived_roles":{"additionalProperties":{"$ref":"#/components/schemas/data_generator_lib__schemas__schema_opal_data__DerivedRole"},"type":"object","title":"Derived Roles","description":"Key-Value mapping of the derived roles for the resource type.\nThe key is the derived role key and the value is the details and conditions for the role derivation."}},"type":"object","required":["actions","derived_roles"],"title":"ResourceTypeData","description":"This is the data of a specific resource type in the system"},"data_generator_lib__schemas__schema_opal_data__RoleData":{"properties":{"grants":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Grants","description":"Key-Value mapping of the resources and actions that the role can perform.\nThe key is the resource key and the value is a list of actions that the role can perform on that resource."},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the role.\nThe key is the attribute key and the value is the attribute value.","default":{}}},"type":"object","required":["grants"],"title":"RoleData","description":"This is the data of a specific role in the system"},"data_generator_lib__schemas__schema_opal_data__TenantData":{"properties":{"roleAssignments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Roleassignments","deprecated":true},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the tenant.\nThe key is the attribute key and the value is the attribute value."}},"type":"object","required":["attributes"],"title":"TenantData","description":"This is the data of a specific tenant in the system"},"data_generator_lib__schemas__schema_opal_data__UserData":{"properties":{"roleAssignments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Roleassignments","description":"Key-Value mapping of the roles assigned to the user.\nThe key is the tenant key and the value is a list of role keys assigned to the user in that tenant.","deprecated":true},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the user.\nThe key is the attribute key and the value is the attribute value."}},"type":"object","required":["roleAssignments","attributes"],"title":"UserData","description":"This is the data of a specific user in the system"},"permit_backend__schemas__schema_derived_role_rule__DerivationSettings":{"properties":{"no_direct_roles_on_object":{"type":"boolean","title":"No Direct Roles On Object","description":"If true, the derived role or the specific rule will not apply if the resource has any direct role","default":false}},"additionalProperties":false,"type":"object","title":"DerivationSettings","description":"Settings for a derived role or a derived role rule"},"permit_backend__schemas__schema_opal_data__ConditionSetData":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ConditionSetType"}],"description":"The type of the condition set."},"key":{"type":"string","title":"Key","description":"The key of the condition set."}},"type":"object","required":["type","key"],"title":"ConditionSetData","description":"This is the data of a specific condition set in the system"},"permit_backend__schemas__schema_opal_data__DerivationSettings":{"properties":{"superseded_by_direct_role":{"type":"boolean","title":"Superseded By Direct Role","description":"If True, the derived role is superseded by a direct role.meaning role derivation is not considered if the user has a direct role.","default":false}},"type":"object","title":"DerivationSettings","description":"Settings for the derived role"},"permit_backend__schemas__schema_opal_data__DerivedRole":{"properties":{"conditions":{"type":"string","title":"Conditions"},"settings":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__DerivationSettings"}],"title":"Settings","description":"Settings for the derived role."},"rules":{"items":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__DerivedRoleRule"},"type":"array","title":"Rules","description":"List of rules for the derived role."}},"type":"object","required":["settings","rules"],"title":"DerivedRole","description":"This is the data of a specific derived role in the system"},"permit_backend__schemas__schema_opal_data__DerivedRoleRule":{"properties":{"relation":{"type":"string","title":"Relation","description":"The relation between the resource and the related resource."},"related_resource":{"type":"string","title":"Related Resource","description":"The related resource type key."},"related_role":{"type":"string","title":"Related Role","description":"The related role key."},"settings":{"allOf":[{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__DerivationSettings"}],"title":"Settings","description":"Settings for the derived role rule."}},"type":"object","required":["relation","related_resource","related_role","settings"],"title":"DerivedRoleRule","description":"This is the data of a specific derived role rule in the system"},"permit_backend__schemas__schema_opal_data__FullData":{"properties":{"use_debugger":{"type":"boolean","title":"Use Debugger","default":true},"users":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__UserData"},"type":"object","title":"Users","description":"Key-Value mapping of the users in the system.\nThe key is the user key and the value contains some details about the user."},"tenants":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__TenantData"},"type":"object","title":"Tenants","description":"Key-Value mapping of the tenants in the system.\nThe key is the tenant key and the value contains some details about the tenant."},"roles":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__RoleData"},"type":"object","title":"Roles","description":"Key-Value mapping of the roles in the system.\nThe key is the role key and the value contains some details about the role.","deprecated":true},"condition_set_rules":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Condition Set Rules","description":"Key-Value mapping of the permissions for each condition set.\nThe key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set"},"condition_set_rules_expand":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Condition Set Rules Expand","description":"Sanitized Key-Value mapping of the permissions for each condition set.\n(Equal to condition_set_rules but user_set_key and resource_set_key are sanitized)The key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set","default":{}},"relationships":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object"},"type":"object","title":"Relationships","description":"Key-Value mapping of the relationships between resources.\nThe key is the resource instance key and the value is Key-Value mapping of relation key to a Key-Value mapping of resource ( type ) to list of instances keys."},"resource_types":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__ResourceTypeData"},"type":"object","title":"Resource Types","description":"Key-Value mapping of the resource types in the system.\nThe key is the resource type key and the value contains some details about the resource type."},"condition_sets":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__ConditionSetData"},"type":"object","title":"Condition Sets","description":"Key-Value mapping of the condition sets in the system.\nThe key is the formatted condition set key and the value contains some details about the condition set."},"role_assignments":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object","title":"Role Assignments","description":"Key-Value mapping of the role assignments for the users.\nThe key is the user key and the value is Key-Value mapping of resource instance key or tenant key to list of role keys assigned to the user in that resource instance."},"role_permissions":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__RoleData"},"type":"object"},"type":"object","title":"Role Permissions","description":"Key-Value mapping of the permissions for each role.\nThe key is the resource key and the value is Key-Value mapping of role key to details on the role permissions."},"mapping_rules":{"additionalProperties":{"items":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object"},"type":"array"},"type":"object","title":"Mapping Rules","description":"Key-Value mapping of groups of mapping rules in the system.\nThe key is the mapping rule group and the value is a list of mapping rules objects.We currently have only one group named 'all' which contains all the mapping rules.A mapping rule object contains, action, http_method, resource and url - all strings.","default":{}},"resource_instances":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__ResourceInstanceAttributeData"},"type":"object","title":"Resource Instances","description":"Key-Value mapping of the resource instances in the system.\nThe key is the resource instance key and the value contains some details about the resource instance.","default":{}}},"type":"object","required":["users","tenants","roles","condition_set_rules","relationships","resource_types","condition_sets","role_assignments","role_permissions"],"title":"FullData","description":"This is the data structure that is used by the PDP in a manged Permit environment.\nThe code Permit generates uses this data structure to enforce the policy and make decisions.","example":{"use_debugger":true,"mapping_rules":{"all":[{"action":"read","http_method":"get","resource":"document","url":"https://example.com/{var}/resources/{var2}"}]},"users":{"user1":{"roleAssignments":{"default":["viewer"]},"attributes":{"email":"user1@permit.io","key":"user1"}}},"tenants":{"default":{"attributes":{"attr1":"value1"}}},"role_permissions":{"community":{"admin":{"grants":{}},"viewer":{"grants":{}}},"document":{"editor":{"grants":{"document":["update","read"]}},"viewer":{"grants":{"document":["read"]}}}},"roles":{"viewer":{"grants":{"document":["read"]}}},"condition_sets":{"resourceset_big_5ffiles":{"type":"resourceset","key":"big_files"},"userset_permit_57users":{"type":"userset","key":"permit_users"}},"condition_set_rules":{"permit_users":{"big_files":{"document":["read","update"]}}},"resource_instances":{"community:community-0":{"attributes":{}},"document:document-0":{"attributes":{}},"document:document-1":{"attributes":{}}},"relationships":{"document:document-0":{"relation:community":{"community":["community-0"]}},"document:document-1":{"relation:community":{"community":["community-0"]}}},"resource_types":{"__tenant":{"actions":[],"derived_roles":{}},"__user":{"actions":[],"derived_roles":{}},"community":{"actions":[],"derived_roles":{}},"document":{"actions":["read","update"],"derived_roles":{"editor":{"rules":[{"related_resource":"community","related_role":"admin","relation":"community","settings":{"superseded_by_direct_role":false}}],"settings":{"superseded_by_direct_role":false}},"viewer":{"rules":[{"related_resource":"community","related_role":"admin","relation":"community","settings":{"superseded_by_direct_role":false}},{"related_resource":"community","related_role":"viewer","relation":"community","settings":{"superseded_by_direct_role":false}}],"settings":{"superseded_by_direct_role":false}}}}},"role_assignments":{"user:user1":{"__tenant:default":["viewer"],"document:document-1":["editor"]}}}},"permit_backend__schemas__schema_opal_data__ResourceInstanceAttributeData":{"properties":{"tenant":{"type":"string","title":"Tenant","description":"The tenant key that this resource instance belongs to."},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the resource instance.\nThe key is the attribute key and the value is the attribute value.","default":{}}},"type":"object","title":"ResourceInstanceAttributeData","description":"This is the data of a specific resource instance in the system"},"permit_backend__schemas__schema_opal_data__ResourceTypeData":{"properties":{"actions":{"items":{"type":"string"},"type":"array","title":"Actions","description":"List of actions that can be performed on the resource."},"derived_roles":{"additionalProperties":{"$ref":"#/components/schemas/permit_backend__schemas__schema_opal_data__DerivedRole"},"type":"object","title":"Derived Roles","description":"Key-Value mapping of the derived roles for the resource type.\nThe key is the derived role key and the value is the details and conditions for the role derivation."}},"type":"object","required":["actions","derived_roles"],"title":"ResourceTypeData","description":"This is the data of a specific resource type in the system"},"permit_backend__schemas__schema_opal_data__RoleData":{"properties":{"grants":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Grants","description":"Key-Value mapping of the resources and actions that the role can perform.\nThe key is the resource key and the value is a list of actions that the role can perform on that resource."},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the role.\nThe key is the attribute key and the value is the attribute value.","default":{}}},"type":"object","required":["grants"],"title":"RoleData","description":"This is the data of a specific role in the system"},"permit_backend__schemas__schema_opal_data__TenantData":{"properties":{"roleAssignments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Roleassignments","deprecated":true},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the tenant.\nThe key is the attribute key and the value is the attribute value."}},"type":"object","required":["attributes"],"title":"TenantData","description":"This is the data of a specific tenant in the system"},"permit_backend__schemas__schema_opal_data__UserData":{"properties":{"roleAssignments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Roleassignments","description":"Key-Value mapping of the roles assigned to the user.\nThe key is the tenant key and the value is a list of role keys assigned to the user in that tenant.","deprecated":true},"attributes":{"type":"object","title":"Attributes","description":"Key-Value mapping of the attributes of the user.\nThe key is the attribute key and the value is the attribute value."}},"type":"object","required":["roleAssignments","attributes"],"title":"UserData","description":"This is the data of a specific user in the system"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Authorization header, we support the bearer authentication scheme (see: RFC 6750)","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"Organizations","description":"\nThe Organizations API gives you access to control and manage your Permit organizations.\n\nAn organization represents a **single billable account** (i.e: a company using Permit).\nYou may invite your team members to your Permit account, and thus multiple team members\nmay control an organization simultaniously (each member has access according to his role).\n"},{"name":"Data Export","description":"\nCustomer self-service organization data export (PER-14389).\n\nAsync job: `POST /v2/data-export` starts a background export of the caller's own\norganization; `GET /v2/data-export/{task_id}` polls it and, once ready, returns\na short-lived presigned download URL for the tar.gz (one CSV per table +\nmanifest). The org is derived from the API key (never a path/query parameter),\nso a key can only ever export its own org.\n\nAuth: admin authority over the organization. The archive contains every\nplaintext API-key secret in the org, so the gate matches the one that guards\nsecret disclosure everywhere else — the dogfooded `grant APIKey` check, which\nrequires an ADMIN grant (a write/read-only key is rejected, exactly as it is on\n`GET /v2/api-key/{id}`).\n"},{"name":"Projects","description":"\nProjects let you manage permissions for different business objectives from a single Permit account.\n\nFor example, you can create one project called \"Billing App\" and another project called \"Web App\".\nEvery project is a separate silo, and has its own unique set of environments and policies.\n"},{"name":"Environments","description":"\nEnvironments are silos contained within projects that enables you to safely iterate on changes.\n\nEnvironments allow you to manage your policy throughout your entire development lifecycle,\nfrom dev to production. Typical environments within a project could be `production`, `staging`,\nor individual environments.\n\nEach project must contain at least one environment.\nYou may clone an environment from a base environment, similar to git branches.\nYou can later safely merge the changes, after you tested them.\n"},{"name":"Bulk Operations","description":"None"},{"name":"Condition Sets","description":"\nCondition sets are sets of objects that are dynamically defined based on conditions on the objects' attributes.\nConditions sets allows you the flexibility of ABAC with the simplicity of RBAC.\n\nThere are currently two types of condition sets at the moment:\n1) user set = the set of users that match all the specified conditions.\n2) resource set = the set of resources that match all the specified conditions.\n\nExamples:\n\n- `us_based_employees` = {U1, ..., Un} = {all **users** who are *located in the US* and are *assigned the employee role*}\n- `private_repos` = {R1, ..., Rn} = {all **resources** *of type repository* that *are private*}\n\nWe can then picture a **matrix** of assignment between *user sets* and *resource sets*.\n\nExample:\nIf we check the checkbox where `us_based_employees` and `private_repos->clone` action intersect, we are setting a rule:\n*all US based employees can clone private repos*.\n"},{"name":"Resource Action Groups","description":"\nResource Action Groups are groups of actions that are assigned\nto a role as one action.\n"},{"name":"Resource Actions","description":"\nActions are the various ways you can interact with a resource or affect the resource.\nEach (resource, action) pair defines a unique permission level.\n"},{"name":"Resource Attributes","description":"\nResource attributes allow you to specify an arbitrary schema attributes that are part\nof the definition of resource and must be included in any of its instances.\n\nAttributes are used to enforce attribute-based access control policies.\n\nFor example, if we are building the github's permissions system, we might want to know\non the `Repository` resource whether the repo is private or now. In such case we will\ndefine a boolean `private` attributes that we can now use in our policies.\n"},{"name":"Resource Roles","description":"\nRoles allow you to associate permissions indirectly via a job function.\n\nResource roles allow you to grant roles that are scoped to a resource, thus\nexpressing ownership or arbitrary relationships between an actor (i.e: user) and\na specific object.\n\nThis API allows you to manipulate roles: assign or unassign permissions to a role,\ndefine hierarchy (inheritance) between two roles or define relationships between two roles.\n"},{"name":"Resources","description":"\nResources are *types* of objects or feature names that you wish to protect (or gate) with permissions.\n\nFor example, if you build a document-sharing app like google docs, you might want to define a \"document\" resource.\n\nA resource definition block typically contains **actions**.\nActions are the various ways you can interact with the object / feature. Each (resource, action) pair defines a unique permission level.\n\nA resource may also contain:\n- roles (if you wish to define resource-bound roles or if your permissions model is relational)\n- relations to other resources (if your permissions model is relational, i.e: you work with a ReBAC model)\n- attributes (attributes that are typically defined on the resource, typically used in ABAC models)\n"},{"name":"Roles","description":"\nRoles allow you to associate permissions indirectly via a job function.\n\nThe Roles API allows you to manipulate roles: assign or unassign permissions to a role,\ndefine hierarchy between roles or define relationships between resource roles.\n\nRoles manipulated by this API are **tenant roles**, meaning when they are assigned, they are\nassigned on a tenant.\n"},{"name":"User Attributes","description":"\nUser attributes allow you to specify an arbitrary schema attributes that are part\nof the definition of the User resource.\n\nAttributes are used to enforce attribute-based access control policies.\n\n*NOTE: A User is a Resource by itself, so basically a user's attribute is an attribute that assigned to the resource called \"user\".*\n\nFor example, if we are building the github's permissions system, we might want to know\nwhether the user is an owner of the organization or not. In such case we will\ndefine a string `owner` attribute that we can now use in our policies.\n"},{"name":"Users","description":"\nUsers represent human end-users of your applications that you'd like to enforce permissions on.\n\nYou must create a user object in Permit.io prior to trying to enforce permissions for that user.\nA user is identified by its key, and you can only create one user with the same key inside a Permit environment.\nYou can place users within tenants via role assignments in order to enforce multi-tenancy in your app.\n\nYou may create users via the API (shown below), with one of the SDKs, or via the Permit cloud console.\n"},{"name":"Tenants","description":"\nA tenant is a group of users that share a common organizational identity.\n\nEach tenant is a silo that can enforce strict boundaries between your customers.\nYou can associate your protected objects with a specific tenant, and only users\nbelonging to that tenant may access these resources (pending on adequate permissions).\n\nUsually, each tenant will represent one of the end-customer companies in your product\n(i.e. the company that you sell to). Through the tenant feature we enable you to have\nmulti-tenancy straight out of the box.\n"},{"name":"Role Assignments","description":"\nRole Assignments are RBAC-constructs that state that a actor (i.e: user) is assigned a role within a tenant.\n\nWith role assignments you can assign or unassign roles to a user.\nRole assignment define the relationship between users and tenants.\n"},{"name":"Condition Set Rules","description":"\nRepresents a \"mini\" ABAC rule comprised of (UserSet, Action, ResourceSet).\n\nIf such tuple exists, it means all users matching the UserSet\ncan perform the Action on the resources matching ResourceSet.\n\nExample:\n(`us_based_employees`, `repository:clone`, `private_repos`) where:\n- `us_based_employees` is a user set\n- `repository:clone` is an action\n- `private_repos` is a resource set\n"},{"name":"Resource Instances","description":"\nResource instances are instances of resource types.\n\nAn instance represents **a single object** in your system on which you'd want to enforce authorization.\nYou can use this API to store tenancy data (tenant) and arbitraty data (attributes).\n"},{"name":"Proxy Config","description":"\nProxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.\n"},{"name":"Bulk Operations","description":"None"},{"name":"Email Configurations","description":"None"},{"name":"Email Templates","description":"None"},{"name":"Access Requests (EAP)","description":"None"}]} \ No newline at end of file diff --git a/openapi/provenance.json b/openapi/provenance.json new file mode 100644 index 00000000..d19979b5 --- /dev/null +++ b/openapi/provenance.json @@ -0,0 +1,18 @@ +{ + "source": "https://api.permit.io/v2/openapi.json", + "capturedAt": "2026-09-30", + "sha256": "1a29f1c75002d214b442a678a2b9f178db83a28f5fd1032322aa26d1eb835655", + "counts": { + "paths": 164, + "operations": 263, + "schemas": 333 + }, + "generator": "7.25.0", + "generatorSha256": "41ce4f6b07f196676439d710759fa1ced7a08066d06ff1bf314681470289efae", + "javaMajor": 17, + "elementsLogin": { + "capturedAt": "2026-09-30", + "source": "Existing Elements login route and schemas verified against backend OpenAPI", + "sha256": "597a200e78d5e971ab97bcb0780090bd9e9063baf36d6013ed10140bd5c2d380" + } +} diff --git a/openapi/templates/model.mustache b/openapi/templates/model.mustache new file mode 100644 index 00000000..f19264c2 --- /dev/null +++ b/openapi/templates/model.mustache @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ +{{>licenseInfo}} + +{{#withSeparateModelsAndApi}}{{#hasAllOf}}{{#allOf}} +// May contain unused imports in some cases +// @ts-ignore +import type { {{class}} } from './{{filename}}{{importFileExtension}}';{{/allOf}}{{/hasAllOf}}{{#hasOneOf}}{{#oneOf}} +// May contain unused imports in some cases +// @ts-ignore +import type { {{class}} } from './{{filename}}{{importFileExtension}}';{{/oneOf}}{{/hasOneOf}}{{^hasAllOf}}{{^hasOneOf}}{{#imports}} +// May contain unused imports in some cases +// @ts-ignore +import type { {{class}} } from './{{filename}}{{importFileExtension}}';{{/imports}}{{/hasOneOf}}{{/hasAllOf}}{{/withSeparateModelsAndApi}} +{{#models}}{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{#allOf}}{{#-first}}{{>modelAllOf}}{{/-first}}{{/allOf}}{{^isEnum}}{{^oneOf}}{{^anyOf}}{{^allOf}}{{>modelGeneric}}{{/allOf}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}}{{/models}} diff --git a/openapi/templates/modelAnyOf.mustache b/openapi/templates/modelAnyOf.mustache new file mode 100644 index 00000000..eaab544f --- /dev/null +++ b/openapi/templates/modelAnyOf.mustache @@ -0,0 +1 @@ +export type {{classname}} = {{#anyOf}}{{{.}}}{{^-last}} | {{/-last}}{{/anyOf}}; diff --git a/openapitools.json b/openapitools.json index 8dd0d745..8a5fb4d6 100644 --- a/openapitools.json +++ b/openapitools.json @@ -1,6 +1,4 @@ { - "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, "generator-cli": { "version": "7.25.0" } diff --git a/package.json b/package.json index 3645d35e..e564298d 100644 --- a/package.json +++ b/package.json @@ -1,141 +1,100 @@ { "name": "permitio", - "version": "2.7.5", + "version": "3.0.0", "description": "Node.js client library for the Permit.io full-stack permissions platform", - "type": "commonjs", - "main": "build/index.js", - "typings": "build/index.d.ts", - "module": "build/index.mjs", - "exports": { - ".": { - "types": "./build/index.d.ts", - "import": "./build/index.mjs", - "require": "./build/index.js" - } - }, + "keywords": [], + "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/permitio/permit-node.git" }, - "license": "MIT", - "keywords": [], - "scripts": { - "build": "run-s build:js build:types", - "build:js": "tsup", - "build:types": "tsc --emitDeclarationOnly --outDir build", - "lint": "run-s lint:*", - "lint:eslint": "eslint src --ext .ts", - "lint:prettier": "prettier --config .prettierrc \"src/**/*.{ts,css,less,scss,js}\" --check", - "fix": "run-s fix:*", - "fix:prettier": "prettier --config .prettierrc \"src/**/*.{ts,css,less,scss,js}\" --write", - "fix:lint": "eslint src --ext .ts --fix", - "test": "run-s test:*", - "test:unit": "run-s build && ava --verbose 'build/tests/unit/**/*.spec.js'", - "test:integration": "run-s build && ava --verbose build/tests/endpoints/**/*.spec.js", - "test:module-imports": "run-s build && ava --verbose build/tests/module-imports/**/*.spec.js", - "test:e2e:rbac": "run-s build && ava --verbose build/tests/e2e/rbac.e2e.spec.js", - "test:e2e:rebac": "run-s build && ava --verbose build/tests/e2e/rebac.e2e.spec.js", - "test:e2e:local_facts": "run-s build && ava --verbose build/tests/e2e/local_facts.e2e.spec.js", - "check-cli": "run-s test diff-integration-tests check-integration-tests", - "check-integration-tests": "run-s check-integration-test:*", - "diff-integration-tests": "mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'", - "watch:build": "tsc -p tsconfig.json -w", - "watch:test": "nyc --silent ava --watch --verbose", - "cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html", - "cov:html": "nyc report --reporter=html", - "cov:lcov": "nyc report --reporter=lcov", - "cov:send": "run-s cov:lcov && codecov", - "cov:check": "nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100", - "docs": "typedoc", - "docs:watch": "typedoc --watch", - "version": "standard-version", - "reset-hard": "git clean -dfx && git reset --hard && yarn", - "prepare": "npm run build && husky install", - "prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish", - "generate-openapi-client": "openapi-generator-cli generate -i https://api.permit.io/v2/openapi.json -g typescript-axios -o src/openapi/ --additional-properties=useSingleRequestParameter=true,withSeparateModelsAndApi=true,apiPackage=api,modelPackage=types --skip-validate-spec && yarn fix:prettier", - "check:codegen": "node scripts/check-codegen.mjs", - "test:codegen": "ava --verbose scripts/check-codegen.spec.mjs", - "lint:codegen": "eslint scripts --ext .mjs && prettier --check \"scripts/*.mjs\"" - }, - "engines": { - "node": ">=10" - }, - "dependencies": { - "@bitauth/libauth": "^1.17.1", - "axios": "^1.7.4", - "axios-retry": "^4.5.0", - "lodash": "^4.17.21", - "path-to-regexp": "^6.2.1", - "pino": "8.11.0", - "pino-pretty": "10.2.0", - "require-in-the-middle": "^5.1.0", - "url-parse": "^1.5.10" - }, - "devDependencies": { - "@ava/typescript": "^1.1.1", - "@babel/traverse": "^7.24.8", - "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@openapitools/openapi-generator-cli": "^2.5.2", - "@types/express": "^4.17.9", - "@types/lodash": "^4.14.166", - "@types/node": "^14.14.14", - "@types/url-parse": "^1.4.11", - "@typescript-eslint/eslint-plugin": "^4.0.1", - "@typescript-eslint/parser": "^4.0.1", - "ava": "^3.12.1", - "codecov": "^3.5.0", - "cspell": "^4.1.0", - "cz-conventional-changelog": "^3.3.0", - "eslint": "^7.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-functional": "^3.0.2", - "eslint-plugin-import": "^2.22.0", - "gh-pages": "^6.1.1", - "husky": "^7.0.0", - "lint-staged": "^12.1.2", - "npm-run-all": "^4.1.5", - "nyc": "^15.1.0", - "open-cli": "^8.0.0", - "prettier": "^2.5.1", - "standard-version": "^9.0.0", - "ts-node": "^9.0.0", - "tsup": "^8.5.0", - "typedoc": "^0.24.7", - "typescript": "^4.6.4" - }, "files": [ "build/**/*.d.ts", + "build/index.d.mts", "build/index.js", "build/index.mjs", "!build/tests/**", "CHANGELOG.md", "LICENSE", - "README.md" + "MIGRATION.md", + "README.md", + "skills/permit-node-3-migration/SKILL.md", + "skills/permit-node-3-migration/references/**", + "skills/permit-node-3-migration/scripts/**", + "skills/permit-node-3-migration/package.json", + "skills/permit-node-3-migration/compiler-lock.yaml", + "skills/permit-node-3-migration/pnpm-workspace.yaml" ], - "ava": { - "failFast": true, - "failWithoutAssertions": false, - "timeout": "60s", - "files": [ - "!src/tests/fixtures.ts" - ] + "type": "commonjs", + "main": "build/index.js", + "module": "build/index.mjs", + "typings": "build/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./build/index.d.mts", + "default": "./build/index.mjs" + }, + "require": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + } + } }, - "lint-staged": { - "*.{ts,css,less,scss,js,html}": [ - "prettier --config .prettierrc --write" - ] + "scripts": { + "build": "pnpm run build:js && pnpm run build:types", + "build:js": "node scripts/build.mjs", + "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --outDir build && node scripts/declarations.mjs", + "lint": "pnpm run lint:oxlint && pnpm run lint:format && pnpm run lint:types", + "lint:types": "tsc -p tsconfig.test.json", + "fix": "oxlint --fix . && oxfmt --write .", + "test": "pnpm run build && node scripts/run-tests.mjs offline", + "test:unit": "node scripts/run-tests.mjs unit", + "test:module-imports": "pnpm run build && node scripts/run-tests.mjs module-imports", + "test:integration": "node scripts/run-tests.mjs integration", + "test:e2e": "node scripts/run-tests.mjs e2e", + "watch": "vitest --project unit", + "coverage": "node scripts/run-tests.mjs coverage", + "docs": "node tools/compiler/docs.mjs", + "docs:watch": "node tools/compiler/docs.mjs --watch", + "check:docs": "node scripts/check-public-reference.mjs", + "generate-openapi-client": "node scripts/generate-openapi.mjs", + "check:openapi": "node scripts/generate-openapi.mjs --check", + "check:codegen": "node scripts/check-codegen.mjs", + "test:codegen": "pnpm run build && node scripts/run-tests.mjs codegen", + "lint:oxlint": "oxlint --deny-warnings .", + "lint:format": "oxfmt --check .", + "verify": "pnpm exec prek run --config .pre-commit-config.yaml --all-files && pnpm run build && node scripts/run-tests.mjs verify && pnpm run check:api-contracts", + "hooks:install": "node scripts/hooks.mjs", + "normalize:openapi": "node scripts/normalize-openapi.mjs && oxfmt --write src/openapi", + "audit:dependencies": "node scripts/audit-dependencies.mjs", + "check:api-contracts": "node scripts/check-api-contracts.mjs", + "check:api-drift": "node scripts/check-api-contracts.mjs --live", + "check:release-evidence": "node scripts/check-release-evidence.mjs", + "check:packed-consumers": "node scripts/check-packed-consumers.mjs" }, - "config": { - "commitizen": { - "path": "cz-conventional-changelog" - } + "dependencies": { + "axios": "1.20.0", + "lodash": "4.18.1", + "pino": "8.21.0", + "pino-pretty": "10.3.1" + }, + "devDependencies": { + "@j178/prek": "0.5.4", + "@permitio/compiler-tools": "workspace:*", + "@types/lodash": "4.17.25", + "@types/node": "22.20.4", + "@vitest/coverage-v8": "5.0.2", + "esbuild": "0.28.2", + "oxfmt": "0.71.0", + "oxlint": "1.86.0", + "semver": "7.8.5", + "typescript": "7.0.2", + "vite": "8.3.1", + "vitest": "5.0.2" }, - "nyc": { - "extends": "@istanbuljs/nyc-config-typescript", - "exclude": [ - "**/*.spec.js" - ] + "engines": { + "node": ">=22.13.0" }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "packageManager": "pnpm@12.8.1" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..b140cfb6 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2672 @@ +--- +lockfileVersion: '9.0' + +importers: + + .: + configDependencies: {} + packageManagerDependencies: + pnpm: + specifier: 12.8.1 + version: 12.8.1 + +packages: + + '@pnpm/exe.android-arm64@12.8.1': + resolution: {integrity: sha512-siDxcidfz5eM6L2tJfik+i2bbUEw8UC7MZ3Yl2HYdRmqbdhHGAOQACtOOu6QVW4Jul4/w5wVKm+wM8ACtgh1Pg==} + cpu: [arm64] + os: [android] + + '@pnpm/exe.android-x64@12.8.1': + resolution: {integrity: sha512-0F/uqPRc3aN4vLHsa0f+6fTtmsigFQ9/yxEU43fionF//pNHEd5e97b3w/nKIgqYMCUQCJphmBRMA9Q8/wlo9Q==} + cpu: [x64] + os: [android] + + '@pnpm/exe.darwin-arm64@12.8.1': + resolution: {integrity: sha512-/rwavvMQJsl2RIxOHBnDF+4Gk+fhQFAY4M3PQZoKskJOEnaJcygG9p1xby6wcQcbS4d9dIubv09CQhufTgfmpw==} + cpu: [arm64] + os: [darwin] + + '@pnpm/exe.darwin-x64@12.8.1': + resolution: {integrity: sha512-htYt2gN7zqJKLhC99Ft6EUiO7myjZAZXfmGCTJUL1v+o7vE9hZdE1+fAkk4Oj1ZHNRti6b2woOxEkRkAusi8OQ==} + cpu: [x64] + os: [darwin] + + '@pnpm/exe.freebsd-x64@12.8.1': + resolution: {integrity: sha512-PB5BULNgytxvExoOXUUeseS/DcpPENs+cg3iA6xHHeaLT4ctEGKSGXEbuj7USeqvo8JBpAx039hivnbzGqDwnA==} + cpu: [x64] + os: [freebsd] + + '@pnpm/exe.linux-arm64-musl@12.8.1': + resolution: {integrity: sha512-kKeyC/ArjrgdciQRBrOL0j9HtOI4gDRgoyP+eJ1CQKyadpKlf/DhDDyspXe07R3B9KagTVLUF2nlt6Dr5quFIg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-arm64@12.8.1': + resolution: {integrity: sha512-q4s9a9X2O3N9aeUFooW24orNrxvu20+jyVUFR5RanPCqOKKPBrgs2iywMkBBx1aXkkzdWT54/mfz8Be8sJlWEw==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-ppc64@12.8.1': + resolution: {integrity: sha512-F7XSjKJthwCh/L6abZiMpAfo2Cm61SZIT3e4dfgiIjESndlWaXCnfLKngSgZ/SEMsdmHT6dud3+kWIB3tw0/xQ==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-riscv64@12.8.1': + resolution: {integrity: sha512-z1ecpIK/ZY08Unk69KWWE9867oaKUytGUjrHnBoGFAAhsK+q+0cfvBH+f5fWobJ7FX97leMlLO+gkJolddM45Q==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-s390x@12.8.1': + resolution: {integrity: sha512-KU6tnrBfu4uKXTq6N5qJwSm8FSrs9Wc8b5AUEsHK9bRXwNdsZ1/lRxG1++X29SKRW9OSNuDSjxASv5mAvGo1gA==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-x64-musl@12.8.1': + resolution: {integrity: sha512-eUE8BWJkDr2tJb/yrk0yVnszlmNqFarVxUlqiZ9BAkct28Nq/5g2H0tvMDmPA7fAQW3STNj+omJPPRVT+4s5sQ==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-x64@12.8.1': + resolution: {integrity: sha512-8bDZ0lZlCdi2rvnFul7EYgcC7zKeWSe76y8JV2oXobaS8p9i9d6PSf6LgLtTM0fI7R9Oh4eLCbveXyNDMmvZ+g==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.win32-arm64@12.8.1': + resolution: {integrity: sha512-MsT0dlrRxnCRCHCaosNbhWpEiAFnFuMEu3KuDJDU41BXgTwiINxU8goloUSUDejWZUqKaUqNC/qUTihl9nFtqg==} + cpu: [arm64] + os: [win32] + + '@pnpm/exe.win32-x64@12.8.1': + resolution: {integrity: sha512-SWtPe0PsbTTk//gJND10tMdOfCYjrkq5+qV49hzVhY7xz2iJ339Rc+xwASlcvbwTfrvH39YNqpKYibD+CRGLwA==} + cpu: [x64] + os: [win32] + + pnpm@12.8.1: + resolution: {integrity: sha512-9kupB1B/XOr+BsjTjmBS0BeURFgOwSed3Vv8EctIqoomRLZlmOB+dh2oSHKp/FfV+QK4f6SdAkGY1VhhKqu+RQ==} + engines: {node: '>=18.*'} + hasBin: true + +snapshots: + + '@pnpm/exe.android-arm64@12.8.1': + optional: true + + '@pnpm/exe.android-x64@12.8.1': + optional: true + + '@pnpm/exe.darwin-arm64@12.8.1': + optional: true + + '@pnpm/exe.darwin-x64@12.8.1': + optional: true + + '@pnpm/exe.freebsd-x64@12.8.1': + optional: true + + '@pnpm/exe.linux-arm64-musl@12.8.1': + optional: true + + '@pnpm/exe.linux-arm64@12.8.1': + optional: true + + '@pnpm/exe.linux-ppc64@12.8.1': + optional: true + + '@pnpm/exe.linux-riscv64@12.8.1': + optional: true + + '@pnpm/exe.linux-s390x@12.8.1': + optional: true + + '@pnpm/exe.linux-x64-musl@12.8.1': + optional: true + + '@pnpm/exe.linux-x64@12.8.1': + optional: true + + '@pnpm/exe.win32-arm64@12.8.1': + optional: true + + '@pnpm/exe.win32-x64@12.8.1': + optional: true + + pnpm@12.8.1: + optionalDependencies: + '@pnpm/exe.android-arm64': 12.8.1 + '@pnpm/exe.android-x64': 12.8.1 + '@pnpm/exe.darwin-arm64': 12.8.1 + '@pnpm/exe.darwin-x64': 12.8.1 + '@pnpm/exe.freebsd-x64': 12.8.1 + '@pnpm/exe.linux-arm64': 12.8.1 + '@pnpm/exe.linux-arm64-musl': 12.8.1 + '@pnpm/exe.linux-ppc64': 12.8.1 + '@pnpm/exe.linux-riscv64': 12.8.1 + '@pnpm/exe.linux-s390x': 12.8.1 + '@pnpm/exe.linux-x64': 12.8.1 + '@pnpm/exe.linux-x64-musl': 12.8.1 + '@pnpm/exe.win32-arm64': 12.8.1 + '@pnpm/exe.win32-x64': 12.8.1 + +--- +lockfileVersion: '9.0' + +settings: + autoInstallPeers: false + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + axios: + specifier: 1.20.0 + version: 1.20.0(debug@4.4.1(supports-color@9.4.0))(supports-color@9.4.0) + lodash: + specifier: 4.18.1 + version: 4.18.1 + pino: + specifier: 8.21.0 + version: 8.21.0 + pino-pretty: + specifier: 10.3.1 + version: 10.3.1 + devDependencies: + '@j178/prek': + specifier: 0.5.4 + version: 0.5.4 + '@permitio/compiler-tools': + specifier: workspace:* + version: link:tools/compiler + '@types/lodash': + specifier: 4.17.25 + version: 4.17.25 + '@types/node': + specifier: 22.20.4 + version: 22.20.4 + '@vitest/coverage-v8': + specifier: 5.0.2 + version: 5.0.2(vitest@5.0.2) + esbuild: + specifier: 0.28.2 + version: 0.28.2 + oxfmt: + specifier: 0.71.0 + version: 0.71.0 + oxlint: + specifier: 1.86.0 + version: 1.86.0 + semver: + specifier: 7.8.5 + version: 7.8.5 + typescript: + specifier: 7.0.2 + version: 7.0.2 + vite: + specifier: 8.3.1 + version: 8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1) + vitest: + specifier: 5.0.2 + version: 5.0.2(@types/node@22.20.4)(@vitest/coverage-v8@5.0.2)(vite@8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1)) + + tools/compiler: + dependencies: + typedoc: + specifier: 0.28.20 + version: 0.28.20(typescript@6.0.3) + typescript: + specifier: 6.0.3 + version: 6.0.3 + +packages: + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} + engines: {node: '>=18'} + + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@gerrit0/mini-shiki@3.23.0': + resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} + + '@j178/prek-android-arm64@0.5.4': + resolution: {integrity: sha512-K2kVaCpRmuQjr0sntQEMdTrAP2qTweWWYybyZyDwdIw0AC96Woo4zG7Tho0sJlSJcfcMVFWE34rgfhHB2NaRgA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@j178/prek-darwin-arm64@0.5.4': + resolution: {integrity: sha512-/dzoIpm/Zno+ZNRo4X6crvH5xmTZBieU+8yjXPkBFsiGSqZeN3HfoERQFAZ41C2k0OJnHdzOpnHKlBgAvHD5pg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@j178/prek-darwin-x64@0.5.4': + resolution: {integrity: sha512-k1j1CSXxG9MJtPW1IvJONoyLVlv2EKCVnJk73tvqnkKd3mkDq+x1cAiSbbEoGAtwMqhd7T9bnj5pGQENAaR/5A==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@j178/prek-linux-arm64-gnu@0.5.4': + resolution: {integrity: sha512-fgB19MdxpBeVzRya/dBj0zpDhCtvjiCm/BDMPhpu7FhSFbOJ18bTu9jUgKAclfRik1dkXLLeLA/2e+kGrmfBfw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-arm64-musl@0.5.4': + resolution: {integrity: sha512-IhaFnZPXlOYqBayCv/75sn7THBDamvi/b+o0IiceQEb9qvcDwmfVwZufC6kDpRWoL2ESXJPjYXoQsl+Lr55ZEw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@j178/prek-linux-x64-gnu@0.5.4': + resolution: {integrity: sha512-srSCqoDuq/dTs6sg+B193PmRqPsbT4ibY66KE/pkaAWOzWc6dSpECtsJQkymH172ewI4Gs9G5ZR8m7KCtqFiZA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-x64-musl@0.5.4': + resolution: {integrity: sha512-nbJod1QxtJls9O+FLpwItrXm0aL8LGJlz0itdDgwvCem0IhSHnOikuyy16R1x/WA5AOVMA0EMbHcbivym+a7Mg==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@j178/prek-win32-arm64-msvc@0.5.4': + resolution: {integrity: sha512-BqBWp6iBhxcPX+o5+v31xh1l6LYMqq/YomNd/LYvyX+QCL1Xptd2FgG5K0Zq2FG0C7y6isANFMifVdnoA3oKsg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@j178/prek-win32-x64-msvc@0.5.4': + resolution: {integrity: sha512-p/1rouJZGcLq+MMHQ9PbfEvXT9r2iav2yB6anlH0FofbSbO5gzJUEsxVsuSF0yHvk5a6jnHiuS0IK5TDXdNKGA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@j178/prek@0.5.4': + resolution: {integrity: sha512-QalDi4SSAJ78p8kJvHi3/hwG63WfuE8oHpj6+SlRWgs3eVpgTOMjawe3bq0C2vPVFvxfwI8YVRx8PCWBfrcc5A==} + engines: {node: '>=18'} + hasBin: true + + '@jridgewell/resolve-uri@3.1.1': + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@oxc-project/types@0.151.0': + resolution: {integrity: sha512-J1yXrIlNDZVzE3ada310xeAw7nH8yCAyLPuUIsjKatFPmfn5bS1oW+cM+QsGOtVWd5nhSpbwZWx/rue+r5Z+PA==} + + '@oxfmt/binding-android-arm-eabi@0.71.0': + resolution: {integrity: sha512-l31EyBfB4egJeFua11aQFEUE9nnDtfpWCadqQovm0WL30t/yUHtdFl/5HyFXvd5xT8Ewh3U4TI9f30GowrQ1fw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.71.0': + resolution: {integrity: sha512-E8q39SUZzSXQ08oZoFoTkxRADkdBNgL6De4qgZYr2O4JCunwqrZwAyCebxIF3yVHBafHM30WUkhTkDi+jNYZOw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.71.0': + resolution: {integrity: sha512-pTteTrN88DicrmJ3DocBmpNDa6Umfh0iveEG8rnAlDFQpclmtDS7hnIvZbIEV9mDO0Ot1U0sjtoJQ1itd/ZMhQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.71.0': + resolution: {integrity: sha512-G5melRC3IiNEgXlNKJhSExJYQGAQIppHFp2cl/wFrqQcEwmc4k4TkrHaFTR29SDudjoW5AZq5cXPGJDqtlH/Yg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.71.0': + resolution: {integrity: sha512-Hb1P5yKb9aiH2VSbm3Ml37mKjzqpunYet9krw/YK7V5JsAUJDQlju3Yk/dEqQvJD/usBvpi01Vbk9ZDNo0a8Cw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.71.0': + resolution: {integrity: sha512-r7n4JEO+rkp0kaP3ia+0hv6FzK3PQIHqaF0jxGuhjJ4JHVX9ZVRbgpDVDW+OloyuJsRWpWFDKIHe8gfl1p/4mQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.71.0': + resolution: {integrity: sha512-EEynTF4nakgqDhVCmd3cHQCmTcw0BM8ea6eHigTdtZ3yxdsBNv+dYkt+OpDDZx1n/jzjI7J+Ht7IgkqFWuJUxQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.71.0': + resolution: {integrity: sha512-7VgJIrywCwR/G6YMv+HqsccUt8Z4q4mbM2xR+Ry/6AeMk4pCmZ9aO4Srd3mmrvVu8PsCZGP7oHEHSXWTmyloaQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.71.0': + resolution: {integrity: sha512-AOCaminv/+fhinUXKvtPZT4POhNYmN9GfvaJdgJa1AbvuzClWGwDIXfJg8eu3sYaVL2B68jNvmS7LZGAYa0z3A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.71.0': + resolution: {integrity: sha512-0SHxuaa4QRLM7jfsd8wc6L7KdLg+FR6/ah9k1eAvcrK/Sni7oxchMvsjwUsyakVAta+wBVDkjJTr7/RFU0uUGA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.71.0': + resolution: {integrity: sha512-UNKj1+rPorTK6uSlQzpN96vDNbHbL/63zcpznweo0ImQdkDdtQCS7G3puxX++2cESPKT2B56Y6DICUmFTJde5A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.71.0': + resolution: {integrity: sha512-5cVXKj7a0mWu7GU6/bZgNyv+KtLgM5S9cnT26Os2/abj8pK/bklHsbdYEHGLLniGjNYkyzwem8mZciPCaDtilw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.71.0': + resolution: {integrity: sha512-lNpcMuZvyU1V/CY5h19hac03m4E4PLSYRckcxZOynSPojI4Mwt6nEu9wT/gVf0bclH3xGEWjwqApnSTgjkd2oA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.71.0': + resolution: {integrity: sha512-5/Z6pUewQpknXqC4/ykK6Zc6RiteAnPem1Ci7K1RZLVF6w6MMjwHjR4vsjijW4Czidgv7HKeVglGjElADliT9w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.71.0': + resolution: {integrity: sha512-uVdG2N/4GEbOeljpQ+xv+NeEwJWJGj0WaxSiSYnoiqIYy3RWrWd3rGUmxWXP1A8+ferNvvwFoDAtvgsDUvBuSw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.71.0': + resolution: {integrity: sha512-1LwEZmSDRFKeBaGd/Hgj2xI3SmgGFpF4YtgkSx0sTYdTiZfHWbcFvRIBjL1YiDNdQd9Khda3Ij8CoqBULjskDg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.71.0': + resolution: {integrity: sha512-5tplmkeMXmza3PUptJQy25wCPJbIAg5g5r7zs+DI+7eEYOqbY+7roMdSH2zbDvv1Pb4oTDJ6NWYx9IRxBxXwhQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.71.0': + resolution: {integrity: sha512-T2LWgh3Vx4PYDjtcqRRGDyCsVxeF/VE5xTpUQiCm65bNLwMpRnJYj6Hlkf6qRM3+jxCIOqHD1kVHNQCCiAVMNQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.71.0': + resolution: {integrity: sha512-L06SVp7Hu1EQTkh3+PHnKK26dxVbEpOG2InMwCooTE4MA437b5FgfTleCCiGn4ykISHnHU6UHaIg7SiMO7rBHA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxlint/binding-android-arm-eabi@1.86.0': + resolution: {integrity: sha512-63Ozq6yQn79B2UxjSZ9huJmI+3/ZPI7hxAe6TyFh9oQL447KnIMoffOdtog+h4KILbQr61ZRvFPW5gYbAUgpgQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.86.0': + resolution: {integrity: sha512-JdLGp44phbf/0Du236Dt06yfK6Qw8xhTFeDvHJdjk167r59OfP5+BL31mgMYVnswS8e+j6tFuccSY0QDC/lgCw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.86.0': + resolution: {integrity: sha512-h+vkOr4ik6KLFCXdtNVEj9xfnXfNUpPoF95QjORdhiSpLqQePzcN81kGHjAgsw1/G7WBWK5KsFKbI2UK8EyzMA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxlint/binding-darwin-x64@1.86.0': + resolution: {integrity: sha512-wbglRuH5eKsp68keTOOeKDHU1astWSRYFsh2bwKQTAPb44rD6kVgzYI1ZrAJRTc6/7PH55ZXFCQx0rQXrj0UdA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxlint/binding-freebsd-x64@1.86.0': + resolution: {integrity: sha512-yTQ7QSOlNfQsrfbeVweTiegQJLKPjUKgXp/JpGiFzza6Hp29S9LAoH77TM3L0RjK39iQRZB5lk5iq2t241Mfag==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.86.0': + resolution: {integrity: sha512-QYJGy0E2Tv8GAayyBIeHFTwQb8u+zrvrOYrifuDGZDr9ad5XsDhiMScpZymhS9fwWjqrgG2ZUwT4vpY0ISqp4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.86.0': + resolution: {integrity: sha512-oQo83CafLT8p3qh0AGkN0tSUIh5Hm63mfDsoqUmBQUBnSZLNBAbyRaAftfGY5a0cKZ34dG6jAtMYgcY5kZqt5g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.86.0': + resolution: {integrity: sha512-EM6wy5c2UM12qPb7iDJDBAZvHyfEJGH6iosFgaFiaRZpirz99//EHcUyD2KAskz07x1TULuiAtsojf4nvWWksw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-arm64-musl@1.86.0': + resolution: {integrity: sha512-vCiUQb9ZNzZalxYRU4mlZwUqT5f+c7Sk9DwUOplWHtik3Dl4r3DVnUB5tBeRuTAUe6MUVCTylNW7TkkN8J1oTw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-ppc64-gnu@1.86.0': + resolution: {integrity: sha512-T0AzE89yjTYmOhB/hb6i+rWTpe2mYt+xiguBhs9DEPIJTZ1H8OYqsE4VxJHHw2Wlq8Mztwvp2P8NV87ZOuhPRw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-gnu@1.86.0': + resolution: {integrity: sha512-s49r0K2f5Oc7fJoMUO1WkdhYK5Ob79uYRwWQ/XNoGysaOq3RUGmGUbHSuXiyydTTA+P9xEdDEnnlZVXiaSJhlw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-musl@1.86.0': + resolution: {integrity: sha512-JIa2tYR8ayb3nvcMSZzn4O/xTy13S7MHllu7cBD+B5qDQXXSRy/Vwk1aNpiTjZmBJGwKCHOy/NvnY5Xcwg27uQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-s390x-gnu@1.86.0': + resolution: {integrity: sha512-XwXMyBsAuWZkhZU74UNcfQKr1CJJAKnS80dZzOnjl6A4fKcf91IjFgidegQugMHA5SN8ulwDXEDV1yPntjXgQQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-gnu@1.86.0': + resolution: {integrity: sha512-C1WjukSyMnr66b+w1/tV8RFVv6d9v0MzDf4p9IxVXknqgmTHBgZh1pccN1eHzFr0b9Tbb3OXoPsAAdAuHAQfeA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-musl@1.86.0': + resolution: {integrity: sha512-ap6KLmvC38c6MdYzsIh25cXQupqYvjd37tMNftzrX1DCtkX1Gcf2B+S2B17dD4lKa5c5gJog7DQJyDo82PBKyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/binding-openharmony-arm64@1.86.0': + resolution: {integrity: sha512-996Q9w/2GLwNyy5Djs39Jt09aFlr4b7TPhoj7dvo5FHmcyiF68nPz73HNc5UAYKIYeK+M9JzPQ4Wg1r1dXvP6A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.86.0': + resolution: {integrity: sha512-9uTCHYTknNkug5+46ViSoUMuOuGWK61D87QnblU6CXaWKJC630Z7dbls61vdHxya/cR2ycQZ6Mm6ckgF6Cag5g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxlint/binding-win32-ia32-msvc@1.86.0': + resolution: {integrity: sha512-a47ga7EKVfMU8rO0i1m3mGwfNRj3FhQyt1d/ukO/E9u1HHF3KpR3tyb3VhuJBGEVPF8uR4exSyHUyx7xbE+uxw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.86.0': + resolution: {integrity: sha512-az4dzifCRzES1crwu6pDFXzJTIanrdxXFL9TbiJWrx9LKcuacbR83aPvxDA1LKLNswi/RoqitC7Afcflhu3zBQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/binding-android-arm-eabi@1.2.11': + resolution: {integrity: sha512-A5kXfGKvKWWZE0TtPrfsvT+q4Y5d1QG8gGUzpYjGydM+fARM9MuX90PrXYXe0XbsDVgyxxNzHo6giCj90bsFNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.2.11': + resolution: {integrity: sha512-z6cTycz+iJ4PVkuL4HHW4DfTfoeU/2nqYYuSOrTmH7yHK5Y0LCOnA03V4ZNxavyVaU1oOqUgIg2klN/s+USGOA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.11': + resolution: {integrity: sha512-jShvqNtP6vDC6/A5JOAzbVV+DkgHqhl/ScVCJEbt+TUY6QYz7YnXcrg3sLtFBniro0f/Ld50ZwCWA6f7KYD1nQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.11': + resolution: {integrity: sha512-f2i2xiNWq1Z1l2++q2fuhZRdLAT3aqxD6vRNm1RAxpUoBcdqNB3C0s1Bt+K+PbEx2F5F4gQp6hqKkphCY/xF9w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.11': + resolution: {integrity: sha512-4Ir5FSOKIAMr4r0kExpt1s3bMgzJU3rA45AYOHtQpls0oNeqcYBKrWMlckrYH4KCfGLfkfn1tN1dmZPMVsdXow==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.11': + resolution: {integrity: sha512-/gnRDM+39BROzAN/k1OZjDPnDMcZxB/0EUxKjONO5yVkNEvlsoMDrxGNKgZi/ttFriS2gwlDNzB65pvNbFOXIQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.11': + resolution: {integrity: sha512-PFaK8HwvAHbaKbBcDNQihjMKYvFnA5hiENx/l5tphTDz1E0WFp32l0A7aq7lyUwGsRw/xSrNIy/gIK4thrSCrw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.11': + resolution: {integrity: sha512-AskzJUIKRLPxkruR1wLKewGbOw+EYfU/9lOrBFj4AFrEA8hPpKFnODWNu2WLaNs0QNkEb9QIJufmVZZIL/bJlg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.11': + resolution: {integrity: sha512-qlUGAheh2yh8afH7QBgx0PrRHN85hKnNd78x8MeMhXivuevgd8vgf6/CstOzmNKY/lLTHvNTrPy98cLnAugzJw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.11': + resolution: {integrity: sha512-secpEad+0vCbSfn8upFySkDskv+bGPk3THSDS9Y89yc4rb4kzqHp8Dmyd9BkQW4SnhNXBZCl/6CrO//hZahNJQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.11': + resolution: {integrity: sha512-mOVBT3dPpkWm8XBWPmU4bf+U6dYDLeMo/9ojUmis4N0L5uu10qra5vOyngZ7/PSdoE4G9KvRt4bloRxNjLas7A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.11': + resolution: {integrity: sha512-Is78i9A8Ui4SqcxUwFJ9uMmjDn58IbVTjFWYdQestFEgeuEmHMLGNriXnVJKkwG2YiZjw8cP0zCTyDMdDGtOOg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.11': + resolution: {integrity: sha512-dUCXneZ87INUMyQ0D+C0HrEBNUPNXHaPmU5GTjyKTJEiussw9Kaj5Ln8UztPe4epV/ffvgNBEadksdYhmW6xJA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.11': + resolution: {integrity: sha512-jByxb6qfd+bH1xUd0qnfFnb17i9sWBPY2tOavJ0l3tdr3OTu+Kvtm8cd/JV5nFt657b1VqGltxg9olOEfofXWw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.11': + resolution: {integrity: sha512-/PzKqzAJ03i19oy2ItPvyvaVjOjBCNnfaJs8yvUdGBKmiESgnrJSQ2awd81QzFbbnAmu7YO9ZnJrDCb9VSJPRA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@shikijs/engine-oniguruma@3.23.0': + resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} + + '@shikijs/langs@3.23.0': + resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} + + '@shikijs/themes@3.23.0': + resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} + + '@shikijs/types@3.23.0': + resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/hast@3.0.5': + resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} + + '@types/lodash@4.17.25': + resolution: {integrity: sha512-+K1NIO8I+F9/wNulfVvu23QYd0Pe9/OCqRrim4NoYIf1VoEDL90Ve4ClzpyqBLc7NpGGWRvYNCKZ1BE/Jpf8dQ==} + + '@types/node@22.20.4': + resolution: {integrity: sha512-zJRE40jpHtKqE/C4fgHrAKQLJuSpzEnP9ff9Y7YtoR3Wd2pwqzlekDeEuUQXjRd+QCYnVnNwuJYmhdk9XV8gvA==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + '@vitest/coverage-v8@5.0.2': + resolution: {integrity: sha512-3ffHBEi8DOOBLwIGBhOBZbRfYFYWjMUuxZicONdhuFEFEG5AVsMOSrVeuROskqnqpbOmEJwxM2eTVZ9N3a1t+A==} + peerDependencies: + '@vitest/browser': 5.0.2 + vitest: 5.0.2 + peerDependenciesMeta: + '@vitest/browser': + optional: true + + '@vitest/istanbul-lib-coverage@1.0.2': + resolution: {integrity: sha512-9J/JMwOf9AoJhAywhrn7ScKTL38hsWQP/qPG60OtaAFcQ5OXPwKsxZFlbnuCKmZ61m8/lGgHYnFpdyQZUvG/iA==} + engines: {node: '>=22'} + + '@vitest/istanbul-lib-report@1.0.2': + resolution: {integrity: sha512-gUsfXZJbzPamoIY5TvHFiMMoXESBrUMo+xqaj+rYrWI69+EnvRlYBlP96ZnHPY4vX8kyUpgAnFUCg5wZG/HkDQ==} + engines: {node: '>=22'} + + '@vitest/mocker@5.0.2': + resolution: {integrity: sha512-Z5FS00Q1SJHkB35xATsmWGdQ5WA1/0MV3CDjqyv7GavHv1OfOj145MNfHOlHk7QLes21dKFDHr8EO2zvL+9WGA==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.2': + resolution: {integrity: sha512-Ijc7T1nT9efNb5LxvjaBrEqw3f/QwUv5EE0nKqZxgqsaV/FxAAZ8baGylA8X/Z2oS4Lp+K74Jr6dTJsDKxJDeg==} + + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + ast-v8-to-istanbul@1.0.7: + resolution: {integrity: sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + + axios@1.20.0: + resolution: {integrity: sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} + + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} + engines: {node: '>=18'} + hasBin: true + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fast-copy@3.1.0: + resolution: {integrity: sha512-IuCOCDFM1F/s4LtG7Bjr3yUUwPHybyhqN74xk2cMYoP51vVeErMy8+6HGFchi/+45lW8uzhs6lBeEqks2GWt6A==} + + fast-redact@3.3.0: + resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} + engines: {node: '>=6'} + + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + follow-redirects@1.16.0: + resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + help-me@5.0.0: + resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + + js-tokens@10.0.0: + resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + linkify-it@5.0.2: + resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==} + + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + + magic-string@1.4.2: + resolution: {integrity: sha512-vG+rjFRj1PqdIBozIxAGMjPlOhaVe+GXpbttY/iSK7rGcJRMlwNJO7dcUwmUqkymsFLJiNGI06t4D7Fr7yRC9g==} + + magicast@0.5.5: + resolution: {integrity: sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==} + + markdown-it@14.3.2: + resolution: {integrity: sha512-sHHjZ5fJKlgrG4qns2YwVcdNep35h5fERrfkD2YNsb9UFk0UIHarbiTaHKVMlPuWAoiilyK8Fv/jAm11slsY7Q==} + hasBin: true + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + mdurl@2.1.0: + resolution: {integrity: sha512-1+HBaOx0zi/dQWht8rNv9MYf9qqpqL/kxI0hXImU6Y547zM6Sni8BQibt7ifgMcYtQg41ao3Ivd6cnSM86inpg==} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + minimist@1.2.7: + resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.19: + resolution: {integrity: sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + obug@2.2.1: + resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + engines: {node: '>=12.20.0'} + + on-exit-leak-free@2.1.0: + resolution: {integrity: sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + oxfmt@0.71.0: + resolution: {integrity: sha512-lUPUl0d/+Io5pDrsPXWs6rB4N/bpB78oj9CTDpnbulfDz+0r3XXcHPlQ7kRPJ2GjIT4nX+/mcqunOeP9BvsEtg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + svelte: + optional: true + vite-plus: + optional: true + + oxlint@1.86.0: + resolution: {integrity: sha512-og0lhgvZfgGF//gOOmZXvtr+GmBbAGEnbEhv/QUg7UW2Wi4wHMnJbnMD+zuHgPdJxdklfgpPupdlAaAySyxrZg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=7.0.2003' + vite-plus: '*' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + vite-plus: + optional: true + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + pino-abstract-transport@1.0.0: + resolution: {integrity: sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==} + + pino-abstract-transport@1.2.0: + resolution: {integrity: sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==} + + pino-pretty@10.3.1: + resolution: {integrity: sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==} + hasBin: true + + pino-std-serializers@6.2.2: + resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} + + pino@8.21.0: + resolution: {integrity: sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==} + hasBin: true + + postcss@8.5.28: + resolution: {integrity: sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==} + engines: {node: ^10 || ^12 || >=14} + + process-warning@3.0.0: + resolution: {integrity: sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==} + + process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + + proxy-from-env@2.1.0: + resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} + engines: {node: '>=10'} + + pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + + quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + + readable-stream@4.4.2: + resolution: {integrity: sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} + engines: {node: '>= 12.13.0'} + + rolldown@1.2.11: + resolution: {integrity: sha512-qpSwIyz0jHQq5qXBTNxFmE6664rJ7O+4TvPFOiOaBSrz8IOHc1koKKSqTM2H6u1UG1+TveuC6vaDHKXFOvb1Kw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-stable-stringify@2.4.3: + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + engines: {node: '>=10'} + + secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + sonic-boom@3.3.0: + resolution: {integrity: sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g==} + + sonic-boom@3.8.1: + resolution: {integrity: sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==} + + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + std-env@4.2.0: + resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@9.4.0: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + + thread-stream@2.7.0: + resolution: {integrity: sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==} + + tinybench@6.2.0: + resolution: {integrity: sha512-78U2TlB2CnVenajOFzf3BKSm0J6oz5L0NV7g32LCPccvYc0lbWvys4d3uUUCS2B1N8PAf2+aekR8i1KbC3HO7Q==} + engines: {node: '>=20.0.0'} + + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinypool@2.2.0: + resolution: {integrity: sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ==} + engines: {node: ^20.0.0 || >=22.0.0} + + tinyrainbow@3.1.1: + resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==} + engines: {node: '>=14.0.0'} + + typedoc@0.28.20: + resolution: {integrity: sha512-uSKqkh8Cr48vllnEy+jdaAgOeR6Y+QCBW7usgUsKj7gJEfR7stw9U/fE49LBnj2tPRKPY0c0EBJSWe9Appmplg==} + engines: {node: '>= 18', pnpm: '>= 10'} + hasBin: true + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + vite@8.3.1: + resolution: {integrity: sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@5.0.2: + resolution: {integrity: sha512-7MQrx9pDv5aHiUcovIb/70Ys3tgtkUVgCtledvKdCmEO+/1Dicq5ZqoSxOW034m03oqC+oHOKui2dM6qtMLoJg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.2 + '@vitest/browser-preview': 5.0.2 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.2 + '@vitest/coverage-v8': 5.0.2 + '@vitest/ui': 5.0.2 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + why-is-node-running@3.2.2: + resolution: {integrity: sha512-NKUzAelcoCXhXL4dJzKIwXeR8iEVqsA0Lq6Vnd0UXvgaKbzVo4ZTHROF2Jidrv+SgxOQ03fMinnNhzZATxOD3A==} + engines: {node: '>=20.11'} + hasBin: true + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + yaml@2.9.1: + resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} + engines: {node: '>= 14.6'} + hasBin: true + +snapshots: + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@bcoe/v8-coverage@1.0.2': {} + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true + + '@esbuild/android-arm@0.28.2': + optional: true + + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.28.2': + optional: true + + '@esbuild/darwin-x64@0.28.2': + optional: true + + '@esbuild/freebsd-arm64@0.28.2': + optional: true + + '@esbuild/freebsd-x64@0.28.2': + optional: true + + '@esbuild/linux-arm64@0.28.2': + optional: true + + '@esbuild/linux-arm@0.28.2': + optional: true + + '@esbuild/linux-ia32@0.28.2': + optional: true + + '@esbuild/linux-loong64@0.28.2': + optional: true + + '@esbuild/linux-mips64el@0.28.2': + optional: true + + '@esbuild/linux-ppc64@0.28.2': + optional: true + + '@esbuild/linux-riscv64@0.28.2': + optional: true + + '@esbuild/linux-s390x@0.28.2': + optional: true + + '@esbuild/linux-x64@0.28.2': + optional: true + + '@esbuild/netbsd-arm64@0.28.2': + optional: true + + '@esbuild/netbsd-x64@0.28.2': + optional: true + + '@esbuild/openbsd-arm64@0.28.2': + optional: true + + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + + '@esbuild/sunos-x64@0.28.2': + optional: true + + '@esbuild/win32-arm64@0.28.2': + optional: true + + '@esbuild/win32-ia32@0.28.2': + optional: true + + '@esbuild/win32-x64@0.28.2': + optional: true + + '@gerrit0/mini-shiki@3.23.0': + dependencies: + '@shikijs/engine-oniguruma': 3.23.0 + '@shikijs/langs': 3.23.0 + '@shikijs/themes': 3.23.0 + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@j178/prek-android-arm64@0.5.4': + optional: true + + '@j178/prek-darwin-arm64@0.5.4': + optional: true + + '@j178/prek-darwin-x64@0.5.4': + optional: true + + '@j178/prek-linux-arm64-gnu@0.5.4': + optional: true + + '@j178/prek-linux-arm64-musl@0.5.4': + optional: true + + '@j178/prek-linux-x64-gnu@0.5.4': + optional: true + + '@j178/prek-linux-x64-musl@0.5.4': + optional: true + + '@j178/prek-win32-arm64-msvc@0.5.4': + optional: true + + '@j178/prek-win32-x64-msvc@0.5.4': + optional: true + + '@j178/prek@0.5.4': + optionalDependencies: + '@j178/prek-android-arm64': 0.5.4 + '@j178/prek-darwin-arm64': 0.5.4 + '@j178/prek-darwin-x64': 0.5.4 + '@j178/prek-linux-arm64-gnu': 0.5.4 + '@j178/prek-linux-arm64-musl': 0.5.4 + '@j178/prek-linux-x64-gnu': 0.5.4 + '@j178/prek-linux-x64-musl': 0.5.4 + '@j178/prek-win32-arm64-msvc': 0.5.4 + '@j178/prek-win32-x64-msvc': 0.5.4 + + '@jridgewell/resolve-uri@3.1.1': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@oxc-project/types@0.151.0': {} + + '@oxfmt/binding-android-arm-eabi@0.71.0': + optional: true + + '@oxfmt/binding-android-arm64@0.71.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.71.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.71.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.71.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.71.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.71.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.71.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.71.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.71.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.71.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.71.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.71.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.71.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.71.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.71.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.71.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.71.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.71.0': + optional: true + + '@oxlint/binding-android-arm-eabi@1.86.0': + optional: true + + '@oxlint/binding-android-arm64@1.86.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.86.0': + optional: true + + '@oxlint/binding-darwin-x64@1.86.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.86.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.86.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.86.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.86.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.86.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.86.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.86.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.86.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.86.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.86.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.86.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.86.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.86.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.86.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.86.0': + optional: true + + '@rolldown/binding-android-arm-eabi@1.2.11': + optional: true + + '@rolldown/binding-android-arm64@1.2.11': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.11': + optional: true + + '@rolldown/binding-darwin-x64@1.2.11': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.11': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.11': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.11': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.11': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.11': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.11': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.11': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.11': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.11': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.11': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.11': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@shikijs/engine-oniguruma@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + + '@shikijs/themes@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + + '@shikijs/types@3.23.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.5 + + '@shikijs/vscode-textmate@10.0.2': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.9': {} + + '@types/hast@3.0.5': + dependencies: + '@types/unist': 3.0.3 + + '@types/lodash@4.17.25': {} + + '@types/node@22.20.4': + dependencies: + undici-types: 6.21.0 + + '@types/unist@3.0.3': {} + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + '@vitest/coverage-v8@5.0.2(vitest@5.0.2)': + dependencies: + '@bcoe/v8-coverage': 1.0.2 + '@vitest/istanbul-lib-coverage': 1.0.2 + '@vitest/istanbul-lib-report': 1.0.2 + ast-v8-to-istanbul: 1.0.7 + magicast: 0.5.5 + obug: 2.2.1 + std-env: 4.2.0 + tinyrainbow: 3.1.1 + vitest: 5.0.2(@types/node@22.20.4)(@vitest/coverage-v8@5.0.2)(vite@8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1)) + + '@vitest/istanbul-lib-coverage@1.0.2': {} + + '@vitest/istanbul-lib-report@1.0.2': + dependencies: + '@vitest/istanbul-lib-coverage': 1.0.2 + + '@vitest/mocker@5.0.2(vite@8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.2 + estree-walker: 3.0.3 + magic-string: 1.4.2 + optionalDependencies: + vite: 8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1) + + '@vitest/spy@5.0.2': {} + + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + + agent-base@6.0.2(supports-color@9.4.0): + dependencies: + debug: 4.4.1(supports-color@9.4.0) + transitivePeerDependencies: + - supports-color + + argparse@2.0.1: {} + + assertion-error@2.0.1: {} + + ast-v8-to-istanbul@1.0.7: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + estree-walker: 3.0.3 + js-tokens: 10.0.0 + + asynckit@0.4.0: {} + + atomic-sleep@1.0.0: {} + + axios@1.20.0(debug@4.4.1(supports-color@9.4.0))(supports-color@9.4.0): + dependencies: + follow-redirects: 1.16.0(debug@4.4.1(supports-color@9.4.0)) + form-data: 4.0.6 + https-proxy-agent: 5.0.1(supports-color@9.4.0) + proxy-from-env: 2.1.0 + transitivePeerDependencies: + - debug + - supports-color + + balanced-match@4.0.4: {} + + base64-js@1.5.1: {} + + brace-expansion@5.0.12: + dependencies: + balanced-match: 4.0.4 + + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + chai@6.2.2: {} + + colorette@2.0.20: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + dateformat@4.6.3: {} + + debug@4.4.1(supports-color@9.4.0): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 9.4.0 + + delayed-stream@1.0.0: {} + + detect-libc@2.1.2: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + end-of-stream@1.4.4: + dependencies: + once: 1.4.0 + + entities@4.5.0: {} + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@2.3.2: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + event-target-shim@5.0.1: {} + + events@3.3.0: {} + + expect-type@1.4.0: {} + + fast-copy@3.1.0: {} + + fast-redact@3.3.0: {} + + fast-safe-stringify@2.1.1: {} + + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + + follow-redirects@1.16.0(debug@4.4.1(supports-color@9.4.0)): + optionalDependencies: + debug: 4.4.1(supports-color@9.4.0) + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + gopd@1.2.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + help-me@5.0.0: {} + + https-proxy-agent@5.0.1(supports-color@9.4.0): + dependencies: + agent-base: 6.0.2(supports-color@9.4.0) + debug: 4.4.1(supports-color@9.4.0) + transitivePeerDependencies: + - supports-color + + ieee754@1.2.1: {} + + joycon@3.1.1: {} + + js-tokens@10.0.0: {} + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + linkify-it@5.0.2: + dependencies: + uc.micro: 2.1.0 + + lodash@4.18.1: {} + + lunr@2.3.9: {} + + magic-string@1.4.2: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + magicast@0.5.5: + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + source-map-js: 1.2.2 + + markdown-it@14.3.2: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.2 + mdurl: 2.1.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + math-intrinsics@1.1.0: {} + + mdurl@2.1.0: {} + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.12 + + minimist@1.2.7: {} + + ms@2.1.3: {} + + nanoid@3.3.19: {} + + obug@2.2.1: {} + + on-exit-leak-free@2.1.0: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + oxfmt@0.71.0: + dependencies: + tinypool: 2.2.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.71.0 + '@oxfmt/binding-android-arm64': 0.71.0 + '@oxfmt/binding-darwin-arm64': 0.71.0 + '@oxfmt/binding-darwin-x64': 0.71.0 + '@oxfmt/binding-freebsd-x64': 0.71.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.71.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.71.0 + '@oxfmt/binding-linux-arm64-gnu': 0.71.0 + '@oxfmt/binding-linux-arm64-musl': 0.71.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.71.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.71.0 + '@oxfmt/binding-linux-riscv64-musl': 0.71.0 + '@oxfmt/binding-linux-s390x-gnu': 0.71.0 + '@oxfmt/binding-linux-x64-gnu': 0.71.0 + '@oxfmt/binding-linux-x64-musl': 0.71.0 + '@oxfmt/binding-openharmony-arm64': 0.71.0 + '@oxfmt/binding-win32-arm64-msvc': 0.71.0 + '@oxfmt/binding-win32-ia32-msvc': 0.71.0 + '@oxfmt/binding-win32-x64-msvc': 0.71.0 + + oxlint@1.86.0: + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.86.0 + '@oxlint/binding-android-arm64': 1.86.0 + '@oxlint/binding-darwin-arm64': 1.86.0 + '@oxlint/binding-darwin-x64': 1.86.0 + '@oxlint/binding-freebsd-x64': 1.86.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.86.0 + '@oxlint/binding-linux-arm-musleabihf': 1.86.0 + '@oxlint/binding-linux-arm64-gnu': 1.86.0 + '@oxlint/binding-linux-arm64-musl': 1.86.0 + '@oxlint/binding-linux-ppc64-gnu': 1.86.0 + '@oxlint/binding-linux-riscv64-gnu': 1.86.0 + '@oxlint/binding-linux-riscv64-musl': 1.86.0 + '@oxlint/binding-linux-s390x-gnu': 1.86.0 + '@oxlint/binding-linux-x64-gnu': 1.86.0 + '@oxlint/binding-linux-x64-musl': 1.86.0 + '@oxlint/binding-openharmony-arm64': 1.86.0 + '@oxlint/binding-win32-arm64-msvc': 1.86.0 + '@oxlint/binding-win32-ia32-msvc': 1.86.0 + '@oxlint/binding-win32-x64-msvc': 1.86.0 + + picocolors@1.1.1: {} + + picomatch@4.0.4: {} + + picomatch@4.0.7: {} + + pino-abstract-transport@1.0.0: + dependencies: + readable-stream: 4.4.2 + split2: 4.2.0 + + pino-abstract-transport@1.2.0: + dependencies: + readable-stream: 4.4.2 + split2: 4.2.0 + + pino-pretty@10.3.1: + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 3.1.0 + fast-safe-stringify: 2.1.1 + help-me: 5.0.0 + joycon: 3.1.1 + minimist: 1.2.7 + on-exit-leak-free: 2.1.0 + pino-abstract-transport: 1.0.0 + pump: 3.0.0 + readable-stream: 4.4.2 + secure-json-parse: 2.7.0 + sonic-boom: 3.3.0 + strip-json-comments: 3.1.1 + + pino-std-serializers@6.2.2: {} + + pino@8.21.0: + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.3.0 + on-exit-leak-free: 2.1.0 + pino-abstract-transport: 1.2.0 + pino-std-serializers: 6.2.2 + process-warning: 3.0.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 3.8.1 + thread-stream: 2.7.0 + + postcss@8.5.28: + dependencies: + nanoid: 3.3.19 + picocolors: 1.1.1 + source-map-js: 1.2.2 + + process-warning@3.0.0: {} + + process@0.11.10: {} + + proxy-from-env@2.1.0: {} + + pump@3.0.0: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + + punycode.js@2.3.1: {} + + quick-format-unescaped@4.0.4: {} + + readable-stream@4.4.2: + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + + real-require@0.2.0: {} + + rolldown@1.2.11: + dependencies: + '@oxc-project/types': 0.151.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.11 + '@rolldown/binding-android-arm64': 1.2.11 + '@rolldown/binding-darwin-arm64': 1.2.11 + '@rolldown/binding-darwin-x64': 1.2.11 + '@rolldown/binding-freebsd-x64': 1.2.11 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.11 + '@rolldown/binding-linux-arm64-gnu': 1.2.11 + '@rolldown/binding-linux-arm64-musl': 1.2.11 + '@rolldown/binding-linux-ppc64-gnu': 1.2.11 + '@rolldown/binding-linux-s390x-gnu': 1.2.11 + '@rolldown/binding-linux-x64-gnu': 1.2.11 + '@rolldown/binding-linux-x64-musl': 1.2.11 + '@rolldown/binding-openharmony-arm64': 1.2.11 + '@rolldown/binding-win32-arm64-msvc': 1.2.11 + '@rolldown/binding-win32-x64-msvc': 1.2.11 + + safe-buffer@5.2.1: {} + + safe-stable-stringify@2.4.3: {} + + secure-json-parse@2.7.0: {} + + semver@7.8.5: {} + + sonic-boom@3.3.0: + dependencies: + atomic-sleep: 1.0.0 + + sonic-boom@3.8.1: + dependencies: + atomic-sleep: 1.0.0 + + source-map-js@1.2.2: {} + + split2@4.2.0: {} + + std-env@4.2.0: {} + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-json-comments@3.1.1: {} + + supports-color@9.4.0: + optional: true + + thread-stream@2.7.0: + dependencies: + real-require: 0.2.0 + + tinybench@6.2.0: {} + + tinyexec@1.3.1: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + + tinypool@2.2.0: {} + + tinyrainbow@3.1.1: {} + + typedoc@0.28.20(typescript@6.0.3): + dependencies: + '@gerrit0/mini-shiki': 3.23.0 + lunr: 2.3.9 + markdown-it: 14.3.2 + minimatch: 10.2.6 + typescript: 6.0.3 + yaml: 2.9.1 + + typescript@6.0.3: {} + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + uc.micro@2.1.0: {} + + undici-types@6.21.0: {} + + vite@8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.28 + rolldown: 1.2.11 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 22.20.4 + esbuild: 0.28.2 + fsevents: 2.3.3 + yaml: 2.9.1 + + vitest@5.0.2(@types/node@22.20.4)(@vitest/coverage-v8@5.0.2)(vite@8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.2(vite@8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1)) + chai: 6.2.2 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.2 + obug: 2.2.1 + picomatch: 4.0.7 + std-env: 4.2.0 + tinybench: 6.2.0 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.3.1(@types/node@22.20.4)(esbuild@0.28.2)(yaml@2.9.1) + why-is-node-running: 3.2.2 + optionalDependencies: + '@types/node': 22.20.4 + '@vitest/coverage-v8': 5.0.2(vitest@5.0.2) + transitivePeerDependencies: + - msw + + why-is-node-running@3.2.2: {} + + wrappy@1.0.2: {} + + yaml@2.9.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 00000000..4c1072bd --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,8 @@ +packages: + - tools/compiler +engineStrict: true +ignoreScripts: true +minimumReleaseAge: 1440 +pmOnFail: error +savePrefix: '' +autoInstallPeers: false diff --git a/scripts/.eslintrc.json b/scripts/.eslintrc.json deleted file mode 100644 index e256052d..00000000 --- a/scripts/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "root": true, - "env": { "node": true, "es2021": true }, - "parserOptions": { "ecmaVersion": 2021, "sourceType": "module" }, - "extends": ["eslint:recommended"] -} diff --git a/scripts/api-contract-report.mjs b/scripts/api-contract-report.mjs new file mode 100644 index 00000000..846fe1e2 --- /dev/null +++ b/scripts/api-contract-report.mjs @@ -0,0 +1,596 @@ +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; + +import { canonical, compareStrings, digest } from '#scripts/api-contracts.mjs'; + +const verbs = new Set(['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']); +const annotations = new Set([ + 'title', + 'description', + 'summary', + 'example', + 'examples', + 'externalDocs', +]); +const dictionaries = new Set([ + 'properties', + 'patternProperties', + '$defs', + 'definitions', + 'dependentSchemas', + 'dependentRequired', + 'schemas', + 'securitySchemes', + 'parameters', + 'requestBodies', + 'responses', + 'headers', + 'content', + 'encoding', + 'links', + 'callbacks', + 'pathItems', + 'paths', + 'webhooks', + 'mapping', + 'scopes', + 'variables', +]); +const literalValues = new Set(['default', 'const', 'enum', 'security']); +const isMap = (value) => value !== null && typeof value === 'object' && !Array.isArray(value); +const nonempty = (value) => typeof value === 'string' && value.trim().length > 0; +export const routeKey = (operation) => `${operation.method} ${operation.path}`; + +/** Removes documentation annotations while preserving property names and literal defaults. */ +export function contractShape(value, names = false) { + if (Array.isArray(value)) return value.map((item) => contractShape(item)); + if (!value || typeof value !== 'object') return value; + return canonical( + Object.fromEntries( + Object.entries(value) + .filter(([key]) => names || !annotations.has(key)) + .map(([key, entry]) => [ + key, + !names && (literalValues.has(key) || key.startsWith('x-')) + ? entry + : contractShape(entry, !names && dictionaries.has(key)), + ]), + ), + ); +} + +function validateServers(servers, context) { + if (servers === undefined) return; + if (!Array.isArray(servers) || servers.some((server) => !isMap(server) || !nonempty(server.url))) + throw new Error(`${context}: servers must be an array of objects with nonempty URLs.`); +} + +/** Enumerates supported OpenAPI structures; empty or unsupported route inputs cannot pass. */ +export function specInventory(spec, source) { + if ( + !isMap(spec) || + typeof spec.openapi !== 'string' || + !/^3\.\d+\.\d+$/.test(spec.openapi) || + !isMap(spec.paths) || + !isMap(spec.components?.schemas) + ) + throw new Error(`${source}: expected an OpenAPI 3 document with paths and schemas.`); + validateServers(spec.servers, source); + const operations = []; + const ids = new Set(); + for (const [path, item] of Object.entries(spec.paths)) { + if (!isMap(item)) throw new Error(`${source}: path ${path} is not an object.`); + if (Object.hasOwn(item, '$ref')) + throw new Error( + `${source}: referenced Path Item ${path} is unsupported; review and resolve its routes before adoption.`, + ); + validateServers(item.servers, `${source}: path ${path}`); + if (item.parameters !== undefined && !Array.isArray(item.parameters)) + throw new Error(`${source}: path ${path} parameters must be an array.`); + if (!path.startsWith('/')) throw new Error(`${source}: invalid API path ${path}.`); + for (const [method, operation] of Object.entries(item)) { + if (!verbs.has(method)) continue; + if ( + !isMap(operation) || + !nonempty(operation.operationId) || + ids.has(operation.operationId) || + !isMap(operation.responses) || + !Object.keys(operation.responses).length + ) + throw new Error(`${source}: operation ${method} ${path} has no unique ID/responses.`); + validateServers(operation.servers, `${source}: ${method} ${path}`); + if (operation.requestBody !== undefined && !isMap(operation.requestBody)) + throw new Error(`${source}: ${method} ${path} requestBody must be an object.`); + if (operation.deprecated !== undefined && typeof operation.deprecated !== 'boolean') + throw new Error(`${source}: ${method} ${path} deprecated must be boolean.`); + for (const [status, response] of Object.entries(operation.responses)) { + if (!isMap(response) || (status !== 'default' && !/^[1-5][0-9X]{2}$/.test(status))) + throw new Error(`${source}: invalid response map for ${method} ${path}.`); + for (const field of ['headers', 'content']) { + if (response[field] !== undefined && !isMap(response[field])) + throw new Error(`${source}: invalid response ${field} for ${method} ${path}.`); + } + } + if (operation.parameters !== undefined && !Array.isArray(operation.parameters)) + throw new Error(`${source}: ${method} ${path} parameters must be an array.`); + if ( + operation.tags !== undefined && + (!Array.isArray(operation.tags) || operation.tags.some((tag) => typeof tag !== 'string')) + ) + throw new Error(`${source}: ${method} ${path} tags must be string arrays.`); + for (const parameter of [...(item.parameters ?? []), ...(operation.parameters ?? [])]) { + if (!isMap(parameter)) + throw new Error(`${source}: invalid parameter object for ${method} ${path}.`); + } + ids.add(operation.operationId); + const tags = operation.tags ?? []; + const lifecycle = operation.deprecated + ? 'deprecated' + : /\bEAP\b/.test([...tags, operation.summary ?? ''].join(' ')) + ? 'EAP' + : 'GA'; + operations.push({ + source, + method: method.toUpperCase(), + path, + id: operation.operationId, + tags, + lifecycle, + contract: contractShape({ + parameters: [...(item.parameters ?? []), ...(operation.parameters ?? [])], + requestBody: operation.requestBody ?? null, + responses: operation.responses, + security: operation.security ?? spec.security ?? [], + serverRouting: { + path: item.servers ?? null, + operation: operation.servers ?? null, + effective: operation.servers ?? item.servers ?? spec.servers ?? [], + }, + }), + }); + } + } + if (!operations.length || !Object.keys(spec.components.schemas).length) + throw new Error(`${source}: operation or schema inventory is empty.`); + function validateRefs(value, names = false) { + if (!value || typeof value !== 'object') return; + if (Array.isArray(value)) { + value.forEach((item) => validateRefs(item)); + return; + } + if (!names && Object.hasOwn(value, '$ref')) { + if (typeof value.$ref !== 'string' || !value.$ref.startsWith('#/')) + throw new Error(`${source}: unsupported external reference.`); + const target = value.$ref + .slice(2) + .split('/') + .reduce((parent, key) => { + const name = key.replace(/~1/g, '/').replace(/~0/g, '~'); + return parent && typeof parent === 'object' && Object.hasOwn(parent, name) + ? parent[name] + : undefined; + }, spec); + if (target === undefined) throw new Error(`${source}: unresolved ${value.$ref}.`); + } + for (const [key, child] of Object.entries(value)) { + if (names || (!annotations.has(key) && !literalValues.has(key) && !key.startsWith('x-'))) + validateRefs(child, !names && dictionaries.has(key)); + } + } + validateRefs(spec); + return { + operations: operations.sort((a, b) => compareStrings(routeKey(a), routeKey(b))), + schemas: contractShape(spec.components.schemas, true), + document: contractShape({ + openapi: spec.openapi, + securitySchemes: spec.components.securitySchemes ?? {}, + reusable: Object.fromEntries( + Object.entries(spec.components).filter( + ([key]) => key !== 'schemas' && key !== 'securitySchemes', + ), + ), + jsonSchemaDialect: spec.jsonSchemaDialect ?? null, + servers: spec.servers ?? [], + }), + counts: { + paths: Object.keys(spec.paths).length, + operations: operations.length, + schemas: Object.keys(spec.components.schemas).length, + }, + }; +} + +/** Loads immutable reviewed source documents, checking hashes and every denominator. */ +export function loadContractSources(root) { + const provenance = JSON.parse(readFileSync(join(root, 'api-coverage/sources.json'), 'utf8')); + const sources = {}; + for (const record of provenance.sources) { + if (sources[record.name]) throw new Error(`Duplicate source ${record.name}.`); + const bytes = readFileSync(join(root, record.file)); + if (createHash('sha256').update(bytes).digest('hex') !== record.sha256) + throw new Error( + `${record.name}: snapshot hash changed without a reviewed provenance update.`, + ); + const inventory = specInventory(JSON.parse(bytes), record.name); + if (digest(inventory.counts) !== digest(record.counts)) + throw new Error(`${record.name}: reviewed denominator differs from the source document.`); + sources[record.name] = inventory; + } + if (Object.keys(sources).sort().join(',') !== 'control-plane,pdp-cloud,pdp-container') + throw new Error('Control-plane, container PDP and cloud PDP source inventories are required.'); + return { provenance, sources }; +} + +/** Captures route, signature and model semantics without unstable source line numbers. */ +export function sdkSnapshot(sdk) { + const route = (value) => + Object.fromEntries(Object.entries(value).filter(([key]) => key !== 'source')); + return canonical({ + generated: Object.fromEntries( + sdk.generated.map((entry) => [entry.generatedMethod, route(entry)]), + ), + methods: Object.fromEntries( + [...sdk.methods, ...sdk.helpers].map((entry) => [ + entry.name, + { + deprecated: entry.deprecated, + factsProxy: entry.factsProxy, + signature: entry.signature, + publicSignatures: entry.publicSignatures, + routes: entry.routes + .map((call) => + call.generatedMethod + ? { + generatedMethod: call.generatedMethod, + method: call.method, + path: call.path, + supporting: call.supporting ?? false, + } + : route(call), + ) + .sort((a, b) => compareStrings(routeKey(a), routeKey(b))), + }, + ]), + ), + modelShapes: sdk.modelShapes, + authoredShapes: sdk.authoredShapes, + generatedRequestShapes: sdk.generatedRequestShapes, + functionShapes: sdk.functionShapes, + initializationShapes: sdk.initializationShapes, + implementationShapes: sdk.implementationShapes, + authoredClassShapes: sdk.authoredClassShapes, + generatedSupportShapes: sdk.generatedSupportShapes, + transports: sdk.transports, + }); +} + +/** Reports semantic changes with JSON pointers, preserving array and literal semantics. */ +export function compareShapes(expected, actual, path = '', differences = []) { + if (Object.is(expected, actual)) return differences; + if (expected === undefined || actual === undefined) { + differences.push({ + kind: expected === undefined ? 'added' : 'removed', + path, + expected, + actual, + }); + return differences; + } + if (digest(expected) === digest(actual)) return differences; + if ( + expected && + actual && + !Array.isArray(expected) && + !Array.isArray(actual) && + typeof expected === 'object' && + typeof actual === 'object' + ) { + for (const key of new Set([...Object.keys(expected), ...Object.keys(actual)])) { + const pointer = `${path}/${key.replace(/~/g, '~0').replace(/\//g, '~1')}`; + if (!Object.hasOwn(actual, key)) + differences.push({ kind: 'removed', path: pointer, expected: expected[key] }); + else if (!Object.hasOwn(expected, key)) + differences.push({ kind: 'added', path: pointer, actual: actual[key] }); + else compareShapes(expected[key], actual[key], pointer, differences); + } + } else differences.push({ kind: 'changed', path, expected, actual }); + return differences; +} + +export function sourceSnapshot(inventory) { + return canonical({ + operations: inventory.operations.map((operation) => `${operation.id} ${routeKey(operation)}`), + contracts: Object.fromEntries( + inventory.operations.map((operation) => [routeKey(operation), operation.contract]), + ), + schemas: inventory.schemas, + document: inventory.document, + counts: inventory.counts, + }); +} + +function operationDecision(decisions, source, operation) { + return decisions.operations[`${source} ${routeKey(operation)}`]; +} + +/** Builds operation evidence without turning source/type checks into backend execution claims. */ +export function coverageReport({ sdk, sources, provenance, decisions, baseline }) { + if ( + !sdk.methods.length || + !sdk.generated.length || + !Object.keys(sdk.modelShapes).length || + !Object.keys(baseline.sdk?.methods ?? {}).length || + !Object.keys(baseline.sdk?.generated ?? {}).length || + !Object.keys(baseline.sdk?.modelShapes ?? {}).length + ) + throw new Error( + 'SDK extraction and reviewed baseline must contain methods, routes and models.', + ); + const failures = []; + const sourceDrift = []; + const rows = []; + const usedDecisions = new Set(); + const snapshot = sdkSnapshot(sdk); + for (const difference of compareShapes(baseline.sdk, snapshot, '/sdk')) + failures.push({ + ...difference, + reason: 'SDK route or declared shape changed; review its contract baseline.', + }); + const generated = new Set(sdk.generated.map(routeKey)); + const aliases = provenance.containerFactsAlias; + const allMethods = [...sdk.methods, ...sdk.helpers]; + const runtime = { status: 'NOT_MEASURED', reason: 'This command performs no backend requests.' }; + for (const [source, inventory] of Object.entries(sources)) { + for (const operation of inventory.operations) { + const key = `${source} ${routeKey(operation)}`; + const decision = operationDecision(decisions, source, operation); + usedDecisions.add(key); + if ( + !decision || + !['add', 'defer', 'exclude', 'undecided', 'retain'].includes(decision.action) || + !nonempty(decision.reason) || + !nonempty(decision.owner) || + !nonempty(decision.source) + ) + failures.push({ + kind: 'undecided-operation', + path: key, + reason: 'No reviewed operation decision with an owner and reason.', + }); + else if (decision.lifecycle !== operation.lifecycle) + failures.push({ + kind: 'stale-decision', + path: key, + reason: 'Operation lifecycle changed; review the decision.', + }); + const methods = []; + const supporting = []; + for (const method of sdk.methods) { + for (const call of method.routes) { + let matches = false; + let mode = 'control-plane'; + if (source === 'control-plane' && !call.target) + matches = routeKey(call) === routeKey(operation); + else if (source.startsWith('pdp-') && call.target === 'pdp') { + matches = routeKey(call) === routeKey(operation); + mode = source; + } else if ( + source === 'pdp-container' && + method.factsProxy && + !call.supporting && + !call.target && + call.path.startsWith(aliases.from + '/') + ) { + const path = aliases.to + call.path.slice(aliases.from.length); + matches = call.method === operation.method && path === operation.path; + mode = 'container-facts-compatibility-alias'; + } + if (matches) + (call.supporting ? supporting : methods).push({ + name: method.name, + deprecated: method.deprecated, + mode, + source: method.source, + }); + } + } + const exposed = methods.length > 0; + if (exposed && decision?.action === 'exclude') + failures.push({ + kind: 'stale-exclusion', + path: key, + reason: 'The excluded operation now has a public SDK method.', + }); + const coverage = exposed + ? methods.every((method) => method.deprecated) + ? 'deprecated-only' + : 'exposed' + : supporting.length + ? 'supporting-only' + : source === 'control-plane' && generated.has(routeKey(operation)) + ? 'generated-only' + : 'missing'; + rows.push({ + ...operation, + contract: undefined, + coverage, + decision: decision ?? null, + methods, + supporting, + runtime, + }); + } + const expected = baseline.sources[source]; + const countChanges = compareShapes( + expected?.counts, + inventory.counts, + `/sources/${source}/counts`, + ); + sourceDrift.push(...countChanges); + failures.push( + ...countChanges.map((change) => ({ + ...change, + reason: 'Published path, operation or schema denominator changed; review source drift.', + })), + ); + const documentChanges = compareShapes( + expected?.document, + inventory.document, + `/sources/${source}/document`, + ); + sourceDrift.push(...documentChanges); + failures.push( + ...documentChanges.map((change) => ({ + ...change, + reason: 'OpenAPI version or authentication scheme changed; review source drift.', + })), + ); + const changes = compareShapes( + expected?.contracts, + sourceSnapshot(inventory).contracts, + `/sources/${source}/contracts`, + ); + sourceDrift.push(...changes); + failures.push( + ...changes.map((change) => ({ + ...change, + reason: 'Published request, response, or model shape changed; review source drift.', + })), + ); + const schemaChanges = compareShapes( + expected?.schemas, + inventory.schemas, + `/sources/${source}/schemas`, + ); + sourceDrift.push(...schemaChanges); + failures.push( + ...schemaChanges.map((change) => ({ + ...change, + reason: 'Published schema changed; review source drift.', + })), + ); + const expectedRoutes = expected?.operations ?? []; + const actualRoutes = inventory.operations.map( + (operation) => `${operation.id} ${routeKey(operation)}`, + ); + if (digest(expectedRoutes) !== digest(actualRoutes)) + failures.push({ + kind: 'denominator-drift', + path: source, + expected: expectedRoutes, + actual: actualRoutes, + reason: 'Published operation inventory changed; review additions and removals explicitly.', + }); + } + for (const key of Object.keys(decisions.operations)) { + if (!usedDecisions.has(key)) + failures.push({ + kind: 'stale-decision', + path: key, + reason: 'The decision refers to an operation absent from the source inventory.', + }); + } + for (const method of sdk.helpers) { + if (!nonempty(decisions.helpers[method.name])) + failures.push({ + kind: 'unresolved-public-method', + path: method.name, + reason: 'No extracted HTTP route and no reviewed local-helper reason.', + }); + } + for (const name of Object.keys(decisions.helpers)) { + if (!sdk.helpers.some((method) => method.name === name)) + failures.push({ + kind: 'stale-helper', + path: name, + reason: 'The reviewed helper is no longer a route-free public method.', + }); + } + const sdkOnly = []; + for (const method of allMethods) { + for (const call of method.routes) { + if (call.supporting) continue; + const source = call.target === 'pdp' ? 'pdp-container' : 'control-plane'; + if ( + call.target === 'opa' || + !sources[source].operations.some((entry) => routeKey(entry) === routeKey(call)) + ) + sdkOnly.push({ name: method.name, ...call, runtime }); + if ( + method.factsProxy && + !call.target && + call.path.startsWith(aliases.from + '/') && + !rows.some( + (row) => + row.methods.some( + (entry) => + entry.name === method.name && entry.mode === 'container-facts-compatibility-alias', + ) && + row.method === call.method && + row.path === aliases.to + call.path.slice(aliases.from.length), + ) + ) + sdkOnly.push({ name: method.name, ...call, target: 'pdp-forwarding', runtime }); + } + } + const usedSdkOnly = new Set(); + for (const entry of sdkOnly) { + const key = `${entry.target ?? 'control-plane'} ${routeKey(entry)}`; + usedSdkOnly.add(key); + const decision = decisions.sdkOnly[key]; + if (!nonempty(decision?.reason) || !nonempty(decision?.owner) || !nonempty(decision?.source)) + failures.push({ + kind: 'unresolved-sdk-route', + path: key, + reason: 'SDK-only route lacks reviewed provenance and an owner.', + }); + entry.decision = decision ?? null; + } + for (const key of Object.keys(decisions.sdkOnly)) { + if (!usedSdkOnly.has(key)) + failures.push({ + kind: 'stale-sdk-route', + path: key, + reason: 'SDK-only route decision no longer matches an extracted route.', + }); + } + for (const route of sdk.generated) { + if ( + !sources['control-plane'].operations.some((op) => routeKey(op) === routeKey(route)) && + !decisions.sdkOnly[`control-plane ${routeKey(route)}`] + ) + failures.push({ + kind: 'unresolved-generated-route', + path: routeKey(route), + reason: 'Generated route is absent from the reviewed public source and supplements.', + }); + } + return { + integrity: failures.length ? 'FAIL' : 'PASS', + sharedTarget: provenance.unmeasuredCapabilities.sharedTarget, + capabilityLimits: provenance.unmeasuredCapabilities, + coverage: rows.some( + (row) => + !row.decision || + row.decision.action === 'undecided' || + (['add', 'retain'].includes(row.decision?.action) && row.coverage !== 'exposed'), + ) + ? 'GAPS' + : 'DECISIONS_ACCOUNTED_FOR', + shapeEvidence: + 'Reviewed declaration and source-contract drift only; not complete wire or backend validation.', + realBackend: runtime, + counts: { + publicHttpMethods: sdk.methods.length, + localHelpers: sdk.helpers.length, + generatedMethods: sdk.generated.length, + generatedModels: Object.keys(sdk.modelShapes).length, + authoredShapes: Object.keys(sdk.authoredShapes).length, + }, + operations: rows, + sdkOnly, + sourceDrift, + failures, + }; +} diff --git a/scripts/api-contracts.mjs b/scripts/api-contracts.mjs new file mode 100644 index 00000000..c0cc06fc --- /dev/null +++ b/scripts/api-contracts.mjs @@ -0,0 +1,615 @@ +import { createHash } from 'node:crypto'; +import { relative, resolve, sep } from 'node:path'; + +import ts from '@permitio/compiler-tools'; + +const verbs = new Set(['get', 'post', 'put', 'patch', 'delete', 'head', 'options']); +const printer = ts.createPrinter({ removeComments: true }); +const print = (node) => printer.printNode(ts.EmitHint.Unspecified, node, node.getSourceFile()); +export const compareStrings = (left, right) => (left < right ? -1 : left > right ? 1 : 0); +const privateMember = (node) => + node.modifiers?.some((modifier) => + [ts.SyntaxKind.PrivateKeyword, ts.SyntaxKind.ProtectedKeyword].includes(modifier.kind), + ); + +function visit(node, callback) { + callback(node); + ts.forEachChild(node, (child) => visit(child, callback)); +} + +function propertyName(node) { + if (ts.isIdentifier(node) || ts.isStringLiteral(node) || ts.isNumericLiteral(node)) + return node.text; + throw new Error(`Unsupported computed property at ${node.getSourceFile().fileName}.`); +} + +/** Sorts object keys without changing array order or literal values. */ +export function canonical(value) { + if (Array.isArray(value)) return value.map(canonical); + if (value && typeof value === 'object') + return Object.fromEntries( + Object.entries(value) + .sort(([a], [b]) => compareStrings(a, b)) + .map(([key, entry]) => [key, canonical(entry)]), + ); + return value; +} + +export const digest = (value) => + createHash('sha256') + .update(JSON.stringify(canonical(value))) + .digest('hex'); + +function signature(node, checker) { + return { + parameters: node.parameters.map((parameter) => ({ + name: print(parameter.name), + optional: Boolean(parameter.questionToken || parameter.initializer), + initializer: parameter.initializer ? print(parameter.initializer) : null, + type: parameter.type ? print(parameter.type) : '(inferred)', + })), + returns: node.type + ? print(node.type) + : checker.typeToString( + checker.getReturnTypeOfSignature(checker.getSignatureFromDeclaration(node)), + undefined, + ts.TypeFormatFlags.NoTruncation, + ), + generics: node.typeParameters?.map(print) ?? [], + }; +} + +function staticPath(expression) { + if (ts.isStringLiteralLike(expression)) return expression.text; + if ( + ts.isCallExpression(expression) && + ts.isPropertyAccessExpression(expression.expression) && + expression.expression.name.text === 'replace' + ) + return staticPath(expression.expression.expression); + throw new Error(`Generated route is no longer static: ${print(expression)}.`); +} + +/** Extracts routes and public call chains from TypeScript syntax and resolved symbols. */ +export function extractSdk(root) { + const configPath = resolve(root, 'tsconfig.build.json'); + const config = ts.readConfigFile(configPath, ts.sys.readFile); + if (config.error) throw new Error('Cannot read SDK compiler configuration.'); + const parsed = ts.parseJsonConfigFileContent(config.config, ts.sys, root); + if (parsed.errors.length) throw new Error('SDK compiler configuration is invalid.'); + const program = ts.createProgram(parsed.fileNames, parsed.options); + if (program.getSyntacticDiagnostics().length) + throw new Error('SDK source contains syntax errors.'); + const checker = program.getTypeChecker(); + const sourcePrefix = resolve(root, 'src') + sep; + const files = program.getSourceFiles().filter((file) => file.fileName.startsWith(sourcePrefix)); + const location = (node) => ({ + file: relative(root, node.getSourceFile().fileName).split(sep).join('/'), + line: node.getSourceFile().getLineAndCharacterOfPosition(node.getStart()).line + 1, + }); + const classes = []; + const generated = new Map(); + const leaves = new Map(); + const modelShapes = {}; + const authoredShapes = {}; + const generatedRequestShapes = {}; + const functionShapes = {}; + const initializationShapes = {}; + const implementationShapes = {}; + const authoredClassShapes = {}; + const generatedSupportShapes = {}; + for (const file of files) { + if ( + file.fileName.includes(`${sep}openapi${sep}`) && + !file.fileName.includes(`${sep}openapi${sep}types${sep}`) && + !file.fileName.includes(`${sep}openapi${sep}api${sep}`) + ) + generatedSupportShapes[location(file).file] = digest(print(file)); + for (const statement of file.statements) { + if (ts.isClassDeclaration(statement) && statement.name) { + classes.push(statement); + if (!file.fileName.includes(`${sep}openapi${sep}`)) { + authoredClassShapes[`${location(statement).file}:${statement.name.text}`] = digest( + print(statement), + ); + for (const member of statement.members) { + if ( + ts.isConstructorDeclaration(member) || + (ts.isPropertyDeclaration(member) && member.initializer) + ) { + const name = ts.isConstructorDeclaration(member) ? 'constructor' : print(member.name); + const isStatic = member.modifiers?.some( + (m) => m.kind === ts.SyntaxKind.StaticKeyword, + ); + const key = `${location(member).file}:${statement.name.text}.${isStatic ? 'static:' : ''}${name}`; + initializationShapes[key] = digest(print(member)); + } + } + } + } + const generatedModel = file.fileName.includes(`${sep}openapi${sep}types${sep}`); + const generatedRequest = file.fileName.includes(`${sep}openapi${sep}api${sep}`); + const shapes = generatedModel + ? modelShapes + : generatedRequest + ? generatedRequestShapes + : authoredShapes; + const prefix = + generatedModel || generatedRequest + ? '' + : relative(root, file.fileName).split(sep).join('/') + ':'; + if (generatedModel || generatedRequest || !file.fileName.includes(`${sep}openapi${sep}`)) { + if (ts.isFunctionDeclaration(statement) && statement.body && statement.name) { + functionShapes[prefix + statement.name.text] = { + signature: signature(statement, checker), + implementationSha256: digest(print(statement.body)), + }; + } + if (ts.isEnumDeclaration(statement)) { + shapes[prefix + statement.name.text] = { + kind: 'enum', + members: statement.members.map(print), + }; + } else if (ts.isInterfaceDeclaration(statement)) { + shapes[prefix + statement.name.text] = { + kind: 'interface', + extends: statement.heritageClauses?.map(print) ?? [], + members: statement.members.map(print).sort(), + }; + } else if (ts.isTypeAliasDeclaration(statement)) { + shapes[prefix + statement.name.text] = { kind: 'type', type: print(statement.type) }; + } else if (generatedModel && ts.isVariableStatement(statement)) { + for (const declaration of statement.declarationList.declarations) { + if (declaration.initializer) + shapes[`value:${propertyName(declaration.name)}`] = print(declaration.initializer); + } + } + } + if (!ts.isVariableStatement(statement)) continue; + if (!file.fileName.includes(`${sep}openapi${sep}`)) { + for (const declaration of statement.declarationList.declarations) { + const key = `${location(declaration).file}:${print(declaration.name)}`; + initializationShapes[key] = digest(print(declaration)); + } + } + for (const declaration of statement.declarationList.declarations) { + if ( + !ts.isIdentifier(declaration.name) || + !declaration.name.text.endsWith('AxiosParamCreator') || + !declaration.initializer + ) + continue; + const className = declaration.name.text.slice(0, -'AxiosParamCreator'.length); + const returned = declaration.initializer.body?.statements?.find(ts.isReturnStatement); + if (!returned?.expression || !ts.isObjectLiteralExpression(returned.expression)) + throw new Error(`Cannot extract parameter creator ${className}.`); + for (const property of returned.expression.properties) { + if (!ts.isPropertyAssignment(property) || !ts.isArrowFunction(property.initializer)) + throw new Error(`Unsupported generated operation in ${className}.`); + let path; + let method; + let body; + visit(property.initializer.body, (node) => { + if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) { + if (node.name.text === 'localVarPath') path = staticPath(node.initializer); + if (node.name.text === 'localVarRequestOptions') { + const field = node.initializer?.properties?.find( + (entry) => entry.name && propertyName(entry.name) === 'method', + ); + if (field?.initializer && ts.isStringLiteralLike(field.initializer)) + method = field.initializer.text; + } + } + if ( + ts.isCallExpression(node) && + ts.isIdentifier(node.expression) && + node.expression.text === 'serializeDataIfNeeded' + ) + body = print(node.arguments[0]); + }); + if (!path?.startsWith('/') || !verbs.has(method?.toLowerCase())) + throw new Error(`Missing generated HTTP route for ${className}.${property.name.text}.`); + const key = `${className}.${propertyName(property.name)}`; + if (generated.has(key)) throw new Error(`Duplicate generated method ${key}.`); + const route = { + method, + path, + body: body ?? null, + implementationSha256: digest(print(property.initializer.body)), + input: signature(property.initializer, checker), + source: location(property), + generatedMethod: key, + }; + generated.set(key, route); + leaves.set(property.initializer, route); + } + } + } + } + if (!generated.size || !Object.keys(modelShapes).length) + throw new Error('Generated operation or model inventory is empty.'); + const authored = classes.filter( + (clazz) => !clazz.getSourceFile().fileName.includes(`${sep}openapi${sep}`), + ); + const symbolDeclaration = (expression) => { + let symbol = checker.getSymbolAtLocation(expression); + if (symbol?.flags & ts.SymbolFlags.Alias) symbol = checker.getAliasedSymbol(symbol); + return symbol?.valueDeclaration ?? symbol?.declarations?.[0]; + }; + const instances = new Map(); + const controlPlaneClients = new Set(); + const controlPlaneRoutes = new WeakSet(); + const transports = {}; + const httpClients = new Map(); + for (const clazz of authored) { + visit(clazz, (node) => { + if ( + ts.isBinaryExpression(node) && + node.operatorToken.kind === ts.SyntaxKind.EqualsToken && + ts.isPropertyAccessExpression(node.left) && + node.left.expression.kind === ts.SyntaxKind.ThisKeyword && + ts.isNewExpression(node.right) + ) { + const target = symbolDeclaration(node.right.expression); + if (target && ts.isClassDeclaration(target)) { + const clientKey = `${clazz.name.text}.${node.left.name.text}`; + instances.set(clientKey, target); + const configuration = node.right.arguments?.[0]; + const configurationClass = + configuration && ts.isNewExpression(configuration) + ? symbolDeclaration(configuration.expression) + : undefined; + const options = configuration?.arguments?.[0]; + const base = + options && ts.isObjectLiteralExpression(options) + ? options.properties.find( + (property) => + ts.isPropertyAssignment(property) && propertyName(property.name) === 'basePath', + )?.initializer + : undefined; + if ( + location(target).file.startsWith('src/openapi/api/') && + configurationClass && + ts.isClassDeclaration(configurationClass) && + location(configurationClass).file === 'src/openapi/configuration.ts' && + base && + ts.isPropertyAccessExpression(base) && + base.name.text === 'apiUrl' && + ts.isPropertyAccessExpression(base.expression) && + base.expression.name.text === 'config' && + base.expression.expression.kind === ts.SyntaxKind.ThisKeyword + ) + controlPlaneClients.add(clientKey); + } + } + }); + } + for (const clazz of authored) { + visit(clazz, (node) => { + if (ts.isNewExpression(node) && node.expression.getText() === 'Configuration') { + const base = node.arguments?.[0]?.properties?.find( + (property) => property.name && propertyName(property.name) === 'basePath', + ); + if (base?.initializer) transports[`${clazz.name.text}.basePath`] = print(base.initializer); + } + if ( + ts.isBinaryExpression(node) && + ts.isPropertyAccessExpression(node.left) && + node.left.expression.kind === ts.SyntaxKind.ThisKeyword && + ts.isCallExpression(node.right) + ) { + const factory = symbolDeclaration(node.right.expression); + const ownedTransport = + factory && + ts.isFunctionDeclaration(factory) && + factory.name?.text === 'createOwnedTransport' && + location(factory).file === 'src/utils/http-transport.ts'; + if (!ownedTransport && node.right.expression.getText() !== 'axios.create') return; + let options = node.right.arguments[0]; + if (ownedTransport) { + if (!options || !ts.isObjectLiteralExpression(options)) + throw new Error('SDK transport options must be a checked object literal.'); + options = options.properties.find( + (property) => property.name && propertyName(property.name) === 'defaults', + )?.initializer; + if (!options || !ts.isObjectLiteralExpression(options)) + throw new Error('SDK transport routing defaults must be a checked object literal.'); + } + const base = options?.properties?.find( + (property) => property.name && propertyName(property.name) === 'baseURL', + ); + if (!base?.initializer) throw new Error('Axios client has no declared base URL.'); + const key = `${clazz.name.text}.${node.left.name.text}`; + let expression = base.initializer; + if (ts.isIdentifier(expression)) expression = symbolDeclaration(expression)?.initializer; + if (!expression) throw new Error(`Unresolved client base URL ${key}.`); + const baseText = print(expression); + let target; + if (ts.isTemplateExpression(expression) && baseText.includes('this.config.pdp')) + target = 'pdp'; + if ( + ts.isCallExpression(expression) && + expression.expression.getText() === 'buildOpaBaseUrl' + ) { + target = 'opa'; + transports.opaBaseUrl = print(symbolDeclaration(expression.expression).body); + } + if (!target) throw new Error(`Unclassified HTTP transport ${key}: ${baseText}.`); + httpClients.set(key, target); + transports[key] = baseText; + } + }); + } + function implementation(clazz, name) { + const method = checker.getTypeAtLocation(clazz).getProperty(name); + return method?.declarations?.find((node) => ts.isMethodDeclaration(node) && node.body); + } + function concreteCall(call, owner) { + if ( + ts.isPropertyAccessExpression(call.expression) && + ts.isPropertyAccessExpression(call.expression.expression) && + call.expression.expression.expression.kind === ts.SyntaxKind.ThisKeyword + ) { + const target = + owner && instances.get(`${owner.name.text}.${call.expression.expression.name.text}`); + if (target) return implementation(target, call.expression.name.text); + } + const symbol = checker.getSymbolAtLocation(call.expression); + return ( + symbol?.declarations?.find((node) => ts.isMethodDeclaration(node) && node.body) ?? + checker.getResolvedSignature(call)?.declaration + ); + } + function alternatives(expression, receiver = false) { + if (ts.isStringLiteralLike(expression)) return [{ value: expression.text, conditions: {} }]; + if ( + receiver && + ts.isPropertyAccessExpression(expression) && + expression.expression.kind === ts.SyntaxKind.ThisKeyword + ) + return [{ value: expression.name.text, conditions: {} }]; + if (ts.isConditionalExpression(expression)) { + return [true, false].flatMap((condition) => + alternatives(condition ? expression.whenTrue : expression.whenFalse, receiver).map( + (entry) => ({ + ...entry, + conditions: { ...entry.conditions, [print(expression.condition)]: condition }, + }), + ), + ); + } + if (ts.isIdentifier(expression)) { + const declaration = symbolDeclaration(expression); + if (declaration?.initializer) return alternatives(declaration.initializer, receiver); + } + throw new Error(`Unresolved HTTP ${receiver ? 'receiver' : 'route'}: ${print(expression)}.`); + } + function nativeJsonInput(expression) { + if ( + ts.isCallExpression(expression) && + expression.arguments.length === 1 && + ts.isPropertyAccessExpression(expression.expression) && + expression.expression.name.text === 'stringify' && + ts.isIdentifier(expression.expression.expression) && + expression.expression.expression.text === 'JSON' && + checker + .getSymbolAtLocation(expression.expression.expression) + ?.declarations?.some((declaration) => + program.isSourceFileDefaultLibrary(declaration.getSourceFile()), + ) + ) + return expression.arguments[0]; + return undefined; + } + function requestBody(expression) { + const nativeInput = nativeJsonInput(expression); + if (nativeInput) return print(nativeInput); + if (ts.isCallExpression(expression)) { + const serializer = checker.getResolvedSignature(expression)?.declaration; + if ( + serializer && + ts.isMethodDeclaration(serializer) && + serializer.name.getText() === 'serializeInput' && + serializer.parent.name?.text === 'Enforcer' && + location(serializer).file === 'src/enforcement/enforcer.ts' + ) { + const inputs = []; + visit(serializer.body, (node) => { + const input = nativeJsonInput(node); + if (input) inputs.push(input); + }); + if (inputs.length !== 1 || !ts.isIdentifier(inputs[0])) + throw new Error('Enforcer serializer must stringify exactly one checked input.'); + const index = serializer.parameters.findIndex( + (parameter) => + checker.getSymbolAtLocation(parameter.name) === checker.getSymbolAtLocation(inputs[0]), + ); + if (index < 0 || !expression.arguments[index]) + throw new Error('Enforcer serializer must stringify its structural input argument.'); + return print(expression.arguments[index]); + } + } + return print(expression); + } + function getRequestOptions(expression) { + if (!expression) return { body: null, query: null }; + if (!ts.isObjectLiteralExpression(expression)) + throw new Error(`Unresolved HTTP GET configuration: ${print(expression)}.`); + const property = (name) => + expression.properties.find( + (entry) => + (ts.isPropertyAssignment(entry) || ts.isShorthandPropertyAssignment(entry)) && + propertyName(entry.name) === name, + ); + const input = (entry) => + ts.isShorthandPropertyAssignment(entry) ? entry.name : entry.initializer; + const data = property('data'); + const params = property('params'); + return { + body: data ? requestBody(input(data)) : null, + query: params ? print(input(params)) : null, + }; + } + function routesFor(method, seen = new Set()) { + if (seen.has(method)) return []; + seen.add(method); + if (leaves.has(method)) return [leaves.get(method)]; + if (ts.isPropertyAssignment(method)) return routesFor(method.initializer, seen); + if (!method?.body || !method.getSourceFile().fileName.startsWith(sourcePrefix)) return []; + if ( + !ts.isMethodDeclaration(method) && + !ts.isArrowFunction(method) && + !ts.isFunctionDeclaration(method) + ) + return []; + let owner = method.parent; + while (owner && !ts.isClassDeclaration(owner)) owner = owner.parent; + if (!method.getSourceFile().fileName.includes(`${sep}openapi${sep}`)) { + const name = method.name ? propertyName(method.name) : '(arrow)'; + const key = `${location(method).file}:${owner?.name?.text ?? ''}.${name}`; + implementationShapes[key] = digest(print(method)); + } + const routes = []; + visit(method.body, (node) => { + if (!ts.isCallExpression(node)) return; + const call = node.expression; + const axiosCall = + (ts.isPropertyAccessExpression(call) || ts.isElementAccessExpression(call)) && + checker.getTypeAtLocation(call.expression).getSymbol()?.getName() === 'AxiosInstance'; + // Generated parameter creators supply the route to the shared request dispatcher. + if (axiosCall && location(node).file === 'src/openapi/common.ts') return; + if (axiosCall && (!ts.isPropertyAccessExpression(call) || !verbs.has(call.name.text))) + throw new Error(`Unsupported Axios dispatch: ${print(node)}.`); + if (axiosCall) { + for (const path of alternatives(node.arguments[0])) { + for (const receiver of alternatives(call.expression, true)) { + if ( + Object.entries(path.conditions).some( + ([key, value]) => key in receiver.conditions && receiver.conditions[key] !== value, + ) + ) + continue; + const target = httpClients.get(`${owner.name.text}.${receiver.value}`); + if (!target) throw new Error(`Unknown HTTP client ${receiver.value}.`); + routes.push({ + method: call.name.text.toUpperCase(), + path: `/${path.value.replace(/^\//, '')}`, + target, + conditions: { ...path.conditions, ...receiver.conditions }, + ...(call.name.text === 'get' + ? getRequestOptions(node.arguments[1]) + : { body: node.arguments[1] ? requestBody(node.arguments[1]) : null }), + response: node.typeArguments?.map(print) ?? [], + source: location(node), + }); + } + } + } else { + const declaration = concreteCall(node, owner); + if (declaration) { + const resolved = routesFor(declaration, seen); + const explicitControlPlane = + owner && + ts.isPropertyAccessExpression(call) && + ts.isPropertyAccessExpression(call.expression) && + call.expression.expression.kind === ts.SyntaxKind.ThisKeyword && + controlPlaneClients.has(`${owner.name.text}.${call.expression.name.text}`); + routes.push( + ...resolved.map((route) => { + if (!explicitControlPlane) return route; + const direct = { ...route }; + controlPlaneRoutes.add(direct); + return direct; + }), + ); + } + } + }); + if (owner?.name?.text === 'BasePermitApi' && method.name?.text === 'setContextFromApiKey') + return routes.map((route) => ({ ...route, supporting: true })); + return routes; + } + const generatedMethods = []; + for (const clazz of classes) { + if (!clazz.getSourceFile().fileName.includes(`${sep}openapi${sep}api${sep}`)) continue; + for (const member of clazz.members.filter(ts.isMethodDeclaration)) { + const key = `${clazz.name.text}.${propertyName(member.name)}`; + const routes = routesFor(member); + if (routes.length !== 1) + throw new Error(`Generated dispatch ${key} must resolve one route, got ${routes.length}.`); + generatedMethods.push({ + ...routes[0], + generatedMethod: key, + dispatchSha256: digest(print(member.body)), + output: signature(member, checker), + }); + } + } + function factsProxy(clazz) { + if (clazz.name.text === 'BaseFactsPermitAPI') return true; + const parent = clazz.heritageClauses?.find( + (clause) => clause.token === ts.SyntaxKind.ExtendsKeyword, + ); + const declaration = parent && symbolDeclaration(parent.types[0].expression); + return declaration && ts.isClassDeclaration(declaration) ? factsProxy(declaration) : false; + } + const methods = []; + const helpers = []; + function expose(clazz, exposedType, prefix, seen = new Set()) { + if (seen.has(clazz)) throw new Error(`Recursive SDK exposure at ${prefix}.`); + const nested = new Set([...seen, clazz]); + for (const symbol of exposedType.getProperties()) { + const name = symbol.getName(); + const declaration = symbol.valueDeclaration ?? symbol.declarations?.[0]; + if (!declaration || privateMember(declaration)) continue; + const type = checker.getTypeOfSymbolAtLocation(symbol, declaration); + if (!type.getCallSignatures().length) { + const instance = instances.get(`${clazz.name.text}.${name}`); + if (instance) expose(instance, type, `${prefix}.${name}`, nested); + continue; + } + const method = implementation(clazz, name); + if (!method) throw new Error(`Public method ${prefix}.${name} has no implementation.`); + const routes = routesFor(method); + const unique = new Map(); + for (const route of routes) + unique.set(`${route.target ?? 'api'} ${route.method} ${route.path}`, route); + const dispatches = routes.filter((route) => !route.supporting); + const entry = { + name: `${prefix}.${name}`, + deprecated: ts.getJSDocDeprecatedTag(method) !== undefined, + signature: signature(method, checker), + publicSignatures: type + .getCallSignatures() + .map((entry) => + checker.signatureToString(entry, undefined, ts.TypeFormatFlags.NoTruncation), + ), + factsProxy: + factsProxy(clazz) && + (dispatches.length === 0 || dispatches.some((route) => !controlPlaneRoutes.has(route))), + source: location(method), + routes: [...unique.values()], + }; + if (entry.routes.length) methods.push(entry); + else helpers.push(entry); + } + } + const permit = authored.find((clazz) => clazz.name.text === 'Permit'); + if (!permit) throw new Error('Public Permit entry point is missing.'); + expose(permit, checker.getTypeAtLocation(permit), 'permit'); + if (!methods.length) throw new Error('Public HTTP method inventory is empty.'); + return canonical({ + generated: generatedMethods, + methods: methods.sort((a, b) => compareStrings(a.name, b.name)), + helpers: helpers.sort((a, b) => compareStrings(a.name, b.name)), + modelShapes, + authoredShapes, + generatedRequestShapes, + functionShapes, + initializationShapes, + implementationShapes, + authoredClassShapes, + generatedSupportShapes, + transports, + }); +} diff --git a/scripts/api-contracts.test.mjs b/scripts/api-contracts.test.mjs new file mode 100644 index 00000000..83a82f75 --- /dev/null +++ b/scripts/api-contracts.test.mjs @@ -0,0 +1,1143 @@ +import { cpSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; + +import { beforeAll, expect, onTestFinished, test } from 'vitest'; + +import { extractSdk } from '#scripts/api-contracts.mjs'; +import { + compareShapes, + contractShape, + coverageReport, + loadContractSources, + sdkSnapshot, + sourceSnapshot, + specInventory, +} from '#scripts/api-contract-report.mjs'; +import { fetchInventory, inspectContracts, main } from '#scripts/check-api-contracts.mjs'; + +const root = resolve(import.meta.dirname, '..'); +const readJson = (path) => JSON.parse(readFileSync(path, 'utf8')); +const baseline = readJson(join(root, 'api-coverage/baseline.json')); +const decisions = readJson(join(root, 'api-coverage/decisions.json')); +const { sources, provenance } = loadContractSources(root); +baseline.sources = Object.fromEntries( + Object.entries(sources).map(([name, inventory]) => [name, sourceSnapshot(inventory)]), +); +let sdk; +beforeAll(() => { + sdk = extractSdk(root); +}, 20_000); +const evidence = () => structuredClone({ sdk, sources, provenance, decisions, baseline }); + +function temporaryRoot() { + const path = mkdtempSync(join(tmpdir(), 'permit-contracts-')); + onTestFinished(() => rmSync(path, { recursive: true, force: true })); + return path; +} + +function sourceCopy() { + const path = temporaryRoot(); + for (const name of ['src', 'tsconfig.build.json', 'package.json']) + cpSync(join(root, name), join(path, name), { recursive: true }); + symlinkSync(join(root, 'node_modules'), join(path, 'node_modules'), 'dir'); + return path; +} + +function replace(path, before, after) { + const original = readFileSync(path, 'utf8'); + expect(original.includes(before), `Fixture ${path} must contain the mutation target`).toBe(true); + writeFileSync(path, original.replace(before, after)); +} + +test('accounts for complete source denominators while leaving parity and backend gaps visible', () => { + const report = coverageReport(evidence()); + expect(report.integrity).toBe('PASS'); + expect(report.coverage).toBe('GAPS'); + expect(report.sharedTarget.status).toBe('UNAVAILABLE'); + expect(report.realBackend.status).toBe('NOT_MEASURED'); + expect(report.operations).toHaveLength(307); + expect(report.counts.publicHttpMethods).toBe(175); + expect(report.operations.filter((op) => op.source === 'control-plane')).toHaveLength(263); + expect(report.operations.filter((op) => op.source === 'pdp-container')).toHaveLength(34); + expect(report.operations.filter((op) => op.source === 'pdp-cloud')).toHaveLength(10); + const scope = report.operations.find((op) => op.id === 'get_api_key_scope'); + expect(scope.coverage).toBe('exposed'); + expect(scope.methods.map((method) => method.name)).toEqual(['permit.api.apiKeys.getScope']); + expect(scope.supporting.some((method) => method.name === 'permit.api.users.list')).toBe(true); + expect(report.sdkOnly.every((entry) => entry.decision?.reason)).toBe(true); + expect(report.sdkOnly.some((entry) => entry.target === 'pdp-forwarding')).toBe(true); + expect( + sdk.methods + .find((method) => method.name === 'permit.check') + .routes.map((r) => r.target) + .sort(), + ).toEqual(['opa', 'pdp']); +}); + +test('exposes both audit reads directly with supporting scope discovery and finite filters', () => { + const report = coverageReport(evidence()); + const methods = sdk.methods.filter((method) => method.name.startsWith('permit.api.auditLogs.')); + expect(methods.map((method) => method.name)).toEqual([ + 'permit.api.auditLogs.get', + 'permit.api.auditLogs.list', + ]); + for (const method of methods) { + expect(method.factsProxy).toBe(false); + const operation = report.operations.find((entry) => + entry.methods.some((candidate) => candidate.name === method.name), + ); + expect(operation.source).toBe('control-plane'); + expect(operation.coverage).toBe('exposed'); + expect(operation.decision.owner).toBe('PER-16950'); + expect(operation.decision.action).toBe('add'); + expect( + method.routes.some((route) => route.supporting && route.path === '/v2/api-key/scope'), + ).toBe(true); + } +}); + +test('exposes six API-key contracts directly while preserving supporting scope discovery', () => { + const report = coverageReport(evidence()); + const methods = sdk.methods.filter((method) => method.name.startsWith('permit.api.apiKeys.')); + expect(methods.map((method) => method.name)).toEqual( + ['create', 'delete', 'get', 'getScope', 'list', 'rotate'].map( + (method) => `permit.api.apiKeys.${method}`, + ), + ); + expect(methods.every((method) => !method.factsProxy && !method.deprecated)).toBe(true); + for (const method of methods) { + const primary = method.routes.filter((route) => !route.supporting); + expect(primary).toHaveLength(1); + expect(primary[0].generatedMethod).toMatch(/^APIKeysApi\./); + const operation = report.operations.find( + (entry) => entry.method === primary[0].method && entry.path === primary[0].path, + ); + expect(operation.coverage).toBe('exposed'); + expect(operation.decision).toMatchObject({ action: 'add', owner: 'PER-16949' }); + } + expect(report.operations).toHaveLength(307); + expect(report.counts.generatedMethods).toBe(266); + expect(report.counts.generatedModels).toBe(408); +}); + +test('exposes six direct invite operations without changing the source denominator', () => { + const report = coverageReport(evidence()); + const names = ['approve', 'create', 'delete', 'get', 'list', 'update']; + const methods = sdk.methods.filter((method) => method.name.startsWith('permit.api.userInvites.')); + expect(methods.map((method) => method.name)).toEqual( + names.map((name) => `permit.api.userInvites.${name}`), + ); + expect(methods.every((method) => !method.factsProxy && !method.deprecated)).toBe(true); + const operations = report.operations.filter( + (operation) => operation.source === 'control-plane' && operation.path.includes('/user_invites'), + ); + expect(operations).toHaveLength(6); + for (const operation of operations) { + expect(operation.coverage).toBe('exposed'); + expect(operation.methods).toHaveLength(1); + expect(operation.decision).toMatchObject({ action: 'add', owner: 'PER-12882' }); + } + expect(report.operations).toHaveLength(307); + expect(report.counts.generatedMethods).toBe(266); + expect(report.counts.generatedModels).toBe(408); +}); + +test('exposes five dedicated user attribute schema operations with explicit ownership', () => { + const report = coverageReport(evidence()); + const names = ['create', 'delete', 'get', 'list', 'update']; + const methods = sdk.methods.filter((method) => + method.name.startsWith('permit.api.userAttributes.'), + ); + expect(methods.map((method) => method.name)).toEqual( + names.map((name) => `permit.api.userAttributes.${name}`), + ); + expect(methods.every((method) => !method.factsProxy && !method.deprecated)).toBe(true); + const operations = report.operations.filter( + (operation) => + operation.source === 'control-plane' && operation.path.includes('/users/attributes'), + ); + expect(operations).toHaveLength(5); + for (const operation of operations) { + expect(operation.coverage).toBe('exposed'); + expect(operation.methods).toHaveLength(1); + expect(operation.methods[0].name).toContain('permit.api.userAttributes.'); + expect(operation.decision).toMatchObject({ action: 'add', owner: 'PER-16942' }); + } + expect(report.operations).toHaveLength(307); + expect(report.counts.generatedMethods).toBe(266); + expect(report.counts.generatedModels).toBe(408); +}); + +test('exposes the existing typed bulk role operation without inventing result counts', () => { + const report = coverageReport(evidence()); + const operation = report.operations.find( + (entry) => entry.source === 'control-plane' && entry.path.endsWith('/bulk/roles'), + ); + expect(operation.coverage).toBe('exposed'); + expect(operation.methods.map((method) => method.name)).toEqual([ + 'permit.api.roles.bulkCreateOrReplace', + ]); + expect(operation.decision).toMatchObject({ action: 'add', owner: 'PER-16948' }); + const method = sdk.methods.find((entry) => entry.name === 'permit.api.roles.bulkCreateOrReplace'); + expect(method.factsProxy).toBe(false); + expect(method.signature.parameters).toEqual([ + { name: 'roles', type: 'RoleCreateBulk[]', optional: false, initializer: null }, + ]); + expect(method.signature.returns).toBe('Promise'); + expect(method.publicSignatures).toEqual([ + '(roles: RoleCreateBulk[]): Promise', + ]); + expect(method.routes.filter((route) => !route.supporting)).toEqual([ + expect.objectContaining({ + generatedMethod: 'BulkOperationsApi.bulkCreateOrReplaceRoles', + method: 'PUT', + path: '/v2/schema/{proj_id}/{env_id}/bulk/roles', + }), + ]); + expect(report.operations).toHaveLength(307); + expect(report.counts.generatedMethods).toBe(266); + expect(report.counts.generatedModels).toBe(408); +}); + +test('exposes reviewed PDP discovery and filter composition without changing source denominators', () => { + const report = coverageReport(evidence()); + for (const source of ['pdp-container', 'pdp-cloud']) { + const authorized = report.operations.find( + (entry) => entry.source === source && entry.path === '/authorized_users', + ); + expect(authorized.coverage).toBe('exposed'); + expect(authorized.methods.map((method) => method.name)).toEqual(['permit.getAuthorizedUsers']); + const permissions = report.operations.find( + (entry) => entry.source === source && entry.path === '/user-permissions', + ); + expect(permissions.decision.reason).toContain('request context'); + } + const tenants = report.operations.filter((entry) => entry.path === '/user-tenants'); + expect(tenants).toHaveLength(1); + expect(tenants[0].source).toBe('pdp-container'); + expect(tenants[0].methods.map((method) => method.name)).toEqual(['permit.getUserTenants']); + expect(sdk.methods.find((method) => method.name === 'permit.filterObjects').routes).toMatchObject( + [{ method: 'POST', path: '/allowed/bulk', target: 'pdp', body: 'inputs' }], + ); + expect(report.operations).toHaveLength(307); + expect(report.counts.generatedMethods).toBe(266); + expect(report.counts.generatedModels).toBe(408); +}); + +test('exposes the adopted URL check only on its published container operation', () => { + const report = coverageReport(evidence()); + const operations = report.operations.filter((entry) => entry.path === '/allowed_url'); + expect(operations).toHaveLength(1); + expect(operations[0]).toMatchObject({ + source: 'pdp-container', + method: 'POST', + coverage: 'exposed', + decision: { action: 'add', owner: 'PER-16945' }, + }); + expect(operations[0].methods.map((method) => method.name)).toEqual(['permit.checkUrl']); + expect(sdk.methods.find((method) => method.name === 'permit.checkUrl').routes).toMatchObject([ + { method: 'POST', path: '/allowed_url', target: 'pdp', body: 'input' }, + ]); + expect(report.operations).toHaveLength(307); +}); + +test('extracts structural enforcement bodies through the compiler-verified JSON serializer', () => { + for (const name of [ + 'check', + 'checkUrl', + 'getUserPermissions', + 'getAuthorizedUsers', + 'getUserTenants', + 'checkAllTenants', + ]) { + expect( + sdk.methods + .find((method) => method.name === `permit.${name}`) + .routes.every((route) => route.body === 'input'), + ).toBe(true); + } + const copy = sourceCopy(); + replace(join(copy, 'src/enforcement/enforcer.ts'), 'JSON.stringify(input)', 'String(input)'); + expect(() => extractSdk(copy)).toThrow('must stringify exactly one checked input'); +}, 20_000); + +test('a local JSON lookalike cannot hide a changed enforcement serializer', () => { + const copy = sourceCopy(); + replace( + join(copy, 'src/enforcement/enforcer.ts'), + 'const body = JSON.stringify(input);', + 'const JSON = { stringify: (value: unknown) => String(value) }; ' + + 'const body = JSON.stringify(input);', + ); + expect(() => extractSdk(copy)).toThrow('must stringify exactly one checked input'); +}, 20_000); + +test('exposes dedicated local role pages through GET query options without a request body', () => { + const report = coverageReport(evidence()); + const operation = report.operations.find( + (entry) => + entry.source === 'pdp-container' && + entry.method === 'GET' && + entry.path === '/local/role_assignments', + ); + expect(operation.coverage).toBe('exposed'); + expect(operation.decision).toMatchObject({ action: 'add', owner: 'PER-16946' }); + expect(operation.methods.map((method) => method.name)).toEqual([ + 'permit.getLocalRoleAssignments', + ]); + const method = sdk.methods.find((entry) => entry.name === 'permit.getLocalRoleAssignments'); + expect(method.publicSignatures).toEqual([ + '(query?: ILocalRoleAssignmentsQuery | undefined, config?: CheckConfig | undefined): Promise', + ]); + expect(method.routes).toMatchObject([ + { + method: 'GET', + path: '/local/role_assignments', + target: 'pdp', + body: null, + query: 'params', + response: ['unknown'], + }, + ]); + expect(sdk.authoredShapes['src/enforcement/interfaces.ts:ILocalRoleAssignment'].members).toEqual( + expect.arrayContaining([ + 'user: string;', + 'role: string;', + 'tenant: string;', + 'resource_instance?: string | null;', + '[id: string]: unknown;', + ]), + ); + expect(report.operations).toHaveLength(307); +}); + +test('bypassing enforcement serialization remains a measured implementation change', () => { + const copy = sourceCopy(); + replace( + join(copy, 'src/enforcement/enforcer.ts'), + "this.serializeInput(input, 'check')", + 'input', + ); + const changed = evidence(); + changed.baseline.sdk = sdkSnapshot(sdk); + changed.sdk = extractSdk(copy); + const report = coverageReport(changed); + expect(report.integrity).toBe('FAIL'); + expect(report.failures.some((failure) => failure.path.includes('checkWithExceptions'))).toBe( + true, + ); +}, 20_000); + +test('exposes eight GA core Groups operations while preserving deferred and deprecated rows', () => { + const report = coverageReport(evidence()); + const groups = report.operations.filter( + (operation) => operation.source === 'control-plane' && operation.tags.includes('Groups'), + ); + expect(groups).toHaveLength(16); + const exposed = groups.filter((operation) => operation.coverage === 'exposed'); + expect(exposed).toHaveLength(8); + expect(exposed.every((operation) => operation.lifecycle === 'GA')).toBe(true); + expect( + exposed.flatMap((operation) => operation.methods.map((method) => method.name)).sort(), + ).toEqual([ + 'permit.api.groups.assignRole', + 'permit.api.groups.assignUser', + 'permit.api.groups.create', + 'permit.api.groups.delete', + 'permit.api.groups.get', + 'permit.api.groups.list', + 'permit.api.groups.removeRole', + 'permit.api.groups.removeUser', + ]); + const groupMembership = groups.filter((operation) => operation.path.endsWith('/assign_group')); + expect(groupMembership).toHaveLength(2); + for (const operation of groupMembership) { + expect(operation.decision.action).toBe('defer'); + expect(operation.methods).toEqual([]); + } + expect(groups.filter((operation) => operation.lifecycle === 'EAP')).toHaveLength(4); + expect(groups.filter((operation) => operation.lifecycle === 'deprecated')).toHaveLength(2); + expect(groups.filter((operation) => operation.coverage !== 'exposed')).toHaveLength(8); +}); + +test('exposes five P1 operations and defers individual PDP refresh', () => { + const report = coverageReport(evidence()); + const planned = report.operations.filter( + (operation) => operation.decision?.owner === 'PER-16567', + ); + expect(planned).toHaveLength(5); + expect( + planned.every((operation) => operation.lifecycle === 'GA' && operation.coverage === 'exposed'), + ).toBe(true); + expect( + planned.flatMap((operation) => operation.methods.map((method) => method.name)).sort(), + ).toEqual([ + 'permit.api.pdps.refresh', + 'permit.api.relationshipTuples.listDetailed', + 'permit.api.resourceInstances.listDetailed', + 'permit.api.roleAssignments.listDetailed', + 'permit.api.tenants.addUser', + ]); + const individual = report.operations.find( + (operation) => operation.path === '/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/refresh', + ); + expect(individual.lifecycle).toBe('GA'); + expect(individual.decision.action).toBe('defer'); + expect(individual.decision.reason).toContain('P2'); + expect(individual.methods).toEqual([]); +}); + +test('extracts explicit control-plane calls while preserving older facts proxy routes', () => { + const membership = sdk.methods.find((method) => method.name === 'permit.api.tenants.addUser'); + expect(membership.factsProxy).toBe(false); + for (const name of ['relationshipTuples', 'resourceInstances', 'roleAssignments']) { + expect( + sdk.methods.find((method) => method.name === `permit.api.${name}.listDetailed`).factsProxy, + ).toBe(false); + expect(sdk.methods.find((method) => method.name === `permit.api.${name}.list`).factsProxy).toBe( + true, + ); + } + + for (const name of ['create', 'update', 'delete', 'deleteTenantUser']) { + expect( + sdk.methods.find((method) => method.name === `permit.api.tenants.${name}`).factsProxy, + ).toBe(true); + } + const report = coverageReport(evidence()); + expect( + report.sdkOnly.some( + (entry) => entry.name === membership.name && entry.target === 'pdp-forwarding', + ), + ).toBe(false); + const copy = sourceCopy(); + replace( + join(copy, 'src/api/tenants.ts'), + 'basePath: this.config.apiUrl', + 'basePath: this.config.pdp', + ); + const changed = extractSdk(copy); + expect(changed.methods.find((method) => method.name === membership.name).factsProxy).toBe(true); +}, 20_000); + +for (const [name, mutate, kind] of [ + [ + 'new operation', + (e) => + e.sources['pdp-cloud'].operations.push({ + source: 'pdp-cloud', + id: 'unreviewed', + method: 'POST', + path: '/new', + lifecycle: 'GA', + tags: [], + contract: {}, + }), + 'undecided-operation', + ], + ['removed operation', (e) => e.sources['pdp-cloud'].operations.pop(), 'denominator-drift'], + [ + 'zero source inventory', + (e) => { + e.sources['pdp-cloud'].operations = []; + }, + 'denominator-drift', + ], + [ + 'exposed exclusion', + (e) => { + e.decisions.operations['pdp-cloud POST /allowed'].action = 'exclude'; + }, + 'stale-exclusion', + ], + [ + 'removed lifecycle flag', + (e) => { + e.sources['pdp-cloud'].operations[0].lifecycle = 'deprecated'; + }, + 'stale-decision', + ], + [ + 'orphaned decision', + (e) => { + e.decisions.operations['pdp-cloud POST /gone'] = { reason: 'old' }; + }, + 'stale-decision', + ], + [ + 'missing SDK-only decision', + (e) => { + delete e.decisions.sdkOnly['opa POST /root']; + }, + 'unresolved-sdk-route', + ], + [ + 'orphaned SDK-only decision', + (e) => { + e.decisions.sdkOnly['opa GET /gone'] = {}; + }, + 'stale-sdk-route', + ], + [ + 'lost helper classification', + (e) => { + delete e.decisions.helpers[sdk.helpers[0].name]; + }, + 'unresolved-public-method', + ], + [ + 'orphaned helper', + (e) => { + e.decisions.helpers['permit.gone'] = 'local'; + }, + 'stale-helper', + ], +]) { + test(`rejects ${name}`, () => { + const changed = evidence(); + mutate(changed); + const report = coverageReport(changed); + expect(report.integrity).toBe('FAIL'); + expect(report.failures.some((failure) => failure.kind === kind)).toBe(true); + }); +} + +for (const [name, mutate, pointer] of [ + [ + 'path count without a new operation', + (e) => { + e.sources['pdp-cloud'].counts.paths += 1; + }, + '/counts/paths', + ], + [ + 'request field type', + (e) => { + e.sources['pdp-cloud'].schemas.AllowedQuery.properties.action.type = 'number'; + }, + '/schemas/AllowedQuery/properties/action/type', + ], + [ + 'response envelope', + (e) => { + e.sources['pdp-cloud'].schemas.AllowedResult.type = 'array'; + }, + '/schemas/AllowedResult/type', + ], + [ + 'additive server field', + (e) => { + e.sources['pdp-cloud'].schemas.AllowedResult.properties.future = { type: 'string' }; + }, + '/schemas/AllowedResult/properties/future', + ], + [ + 'authentication type', + (e) => { + e.sources['pdp-cloud'].document.securitySchemes = { changed: { type: 'apiKey' } }; + }, + '/document/securitySchemes', + ], + [ + 'operation response', + (e) => { + e.sources['pdp-cloud'].operations[0].contract.responses = {}; + }, + '/contracts/', + ], +]) { + test(`reports ${name} as source drift requiring review`, () => { + const changed = evidence(); + mutate(changed); + const report = coverageReport(changed); + expect(report.integrity).toBe('FAIL'); + expect(report.sourceDrift.some((difference) => difference.path.includes(pointer))).toBe(true); + }); +} + +for (const [name, file, before, after, pathPart] of [ + [ + 'constructor helper default destination', + 'src/config.ts', + "'https://api.permit.io'", + "'https://changed.invalid'", + '/functionShapes/src~1config.ts:defaultSettings', + ], + [ + 'shared generated request destination', + 'src/openapi/common.ts', + '(configuration?.basePath || basePath) + axiosArgs.url', + "(configuration?.basePath || basePath) + '/wrong' + axiosArgs.url", + '/generatedSupportShapes/src~1openapi~1common.ts', + ], + [ + 'missing public facade', + 'src/api/api-client.ts', + ' users: IUsersApi;', + '', + '/methods/permit.api.users.', + ], + [ + 'changed generated route', + 'src/openapi/api/users-api.ts', + '`/v2/facts/{proj_id}/{env_id}/users`', + '`/v2/facts/{proj_id}/{env_id}/missing`', + '/generated/UsersApi.', + ], + [ + 'authored alias field', + 'src/enforcement/interfaces.ts', + ' key: string;', + ' key: number;', + '/authoredShapes/', + ], + [ + 'wrapper body mapping', + 'src/api/users.ts', + ' ...params,', + ' ...params, page: 999,', + '/implementationShapes/', + ], + [ + 'ordinary internal parameter default', + 'src/enforcement/enforcer.ts', + 'config: CheckConfig = {},', + 'config: CheckConfig = { throwOnError: false },', + '/implementationShapes/', + ], + [ + 'supporting constant value', + 'src/enforcement/enforcer.ts', + "const RESOURCE_DELIMITER = ':';", + "const RESOURCE_DELIMITER = '|';", + '/initializationShapes/', + ], + [ + 'authored enum value', + 'src/api/context.ts', + "ENVIRONMENT_LEVEL_API_KEY = 'ENVIRONMENT_LEVEL_API_KEY',", + "ENVIRONMENT_LEVEL_API_KEY = 'changed',", + '/authoredShapes/', + ], + [ + 'public overload hides optional context and config', + 'src/index.ts', + ' public async check(', + ' public check(user: IUser | string, action: string, resource: IResource | string): Promise;\n public async check(', + '/methods/permit.check/publicSignatures', + ], + [ + 'inferred generated return type', + 'src/openapi/api/users-api.ts', + '=> AxiosPromise', + '=> AxiosPromise', + '/generated/UsersApi.listUsers/output/returns', + ], + [ + 'generated request field', + 'src/openapi/api/users-api.ts', + 'readonly userCreate: UserCreate;', + 'readonly userCreate: UserUpdate;', + '/generatedRequestShapes/', + ], + [ + 'callback parser implementation', + 'src/enforcement/responses.ts', + ' return decision;', + ' return !decision;', + '/functionShapes/', + ], + [ + 'generated response type', + 'src/openapi/types/user-read.ts', + 'email?: string', + 'email?: number', + '/modelShapes/UserRead', + ], +]) { + test(`actual AST detects ${name}`, () => { + const copy = sourceCopy(); + replace(join(copy, file), before, after); + const changed = evidence(); + changed.baseline.sdk = sdkSnapshot(sdk); + changed.sdk = extractSdk(copy); + const report = coverageReport(changed); + expect(report.integrity).toBe('FAIL'); + expect(report.failures.some((failure) => failure.path.includes(pathPart))).toBe(true); + }, 20_000); +} + +test('unsupported authored Axios dispatch cannot silently disappear into a helper', () => { + const copy = sourceCopy(); + replace(join(copy, 'src/enforcement/enforcer.ts'), '.post<', '.request<'); + expect(() => extractSdk(copy)).toThrow(/Unsupported Axios dispatch/); +}, 20_000); + +test('removing all generated models rejects extraction', () => { + const copy = sourceCopy(); + rmSync(join(copy, 'src/openapi/types'), { recursive: true }); + expect(() => extractSdk(copy)).toThrow(/model inventory is empty/); +}, 20_000); + +for (const name of ['containerFactsAlias', 'unmeasuredCapabilities']) { + test(`rejects unexplained ${name} provenance changes`, async () => { + const copy = temporaryRoot(); + for (const folder of ['api-coverage', 'openapi']) + cpSync(join(root, folder), join(copy, folder), { recursive: true }); + const changed = readJson(join(copy, 'api-coverage/sources.json')); + changed[name] = {}; + writeFileSync(join(copy, 'api-coverage/sources.json'), JSON.stringify(changed)); + await expect(inspectContracts({ root: copy })).rejects.toThrow(/provenance changed/); + }); +} + +const sample = () => ({ + openapi: '3.1.0', + paths: { + '/sample': { post: { operationId: 'sample', responses: { 200: { description: 'OK' } } } }, + }, + components: { + schemas: { Item: { type: 'object', properties: { description: { type: 'string' } } } }, + }, +}); +for (const [name, mutate, pattern] of [ + [ + 'empty paths', + (s) => { + s.paths = {}; + }, + /inventory is empty/, + ], + [ + 'empty schemas', + (s) => { + s.components.schemas = {}; + }, + /inventory is empty/, + ], + [ + 'missing response', + (s) => { + s.paths['/sample'].post.responses = {}; + }, + /ID\/responses/, + ], + [ + 'duplicate ID', + (s) => { + s.paths['/other'] = s.paths['/sample']; + }, + /unique ID/, + ], + [ + 'external reference', + (s) => { + s.components.schemas.Item.$ref = 'https://example.invalid'; + }, + /external reference/, + ], + [ + 'unresolved reference', + (s) => { + s.components.schemas.Item.$ref = '#/components/schemas/Gone'; + }, + /unresolved/, + ], +]) { + test(`source parser rejects ${name}`, () => { + const document = sample(); + mutate(document); + expect(() => specInventory(document, 'fixture')).toThrow(pattern); + }); +} + +test('retains named properties and default data while ignoring prose and examples', () => { + const schema = { + title: 'Documentation', + properties: { description: { type: 'string' } }, + default: { title: 'value', $ref: 'data' }, + }; + expect(contractShape(schema)).toEqual({ + properties: { description: { type: 'string' } }, + default: schema.default, + }); + const document = sample(); + document.components.schemas.Item.example = { $ref: 'not-a-schema-reference' }; + expect(specInventory(document, 'fixture').counts.operations).toBe(1); +}); + +for (const [name, fetcher, pattern] of [ + ['HTTP error', async () => new Response('', { status: 503 }), /HTTP 503/], + ['malformed JSON', async () => new Response(''), /cannot inspect/], + [ + 'zero operations', + async () => new Response(JSON.stringify({ ...sample(), paths: {} })), + /inventory is empty/, + ], + [ + 'network error', + async () => { + throw new Error('offline'); + }, + /offline/, + ], + ['oversized body', async () => new Response('x'.repeat(10 * 1024 * 1024 + 1)), /response limit/], +]) { + test(`does not report clean drift for ${name}`, async () => { + await expect(fetchInventory(provenance.sources[0], fetcher)).rejects.toThrow(pattern); + }); +} + +test('fetches only allowlisted public documentation and supplies a deadline', async () => { + await expect(fetchInventory({ name: 'bad', url: 'http://localhost/secret' })).rejects.toThrow( + /Unapproved/, + ); + const inventory = await fetchInventory(provenance.sources[0], async (url, options) => { + expect(url).toBe('https://api.permit.io/v2/openapi.json'); + expect(options.signal).toBeInstanceOf(AbortSignal); + expect(options.redirect).toBe('error'); + expect(options.headers).toEqual({ Accept: 'application/json' }); + return new Response(JSON.stringify(sample())); + }); + expect(inventory.counts.operations).toBe(1); +}); + +test('invalid command input emits a report and exit code 2', async () => { + const output = temporaryRoot(); + expect(await main(['--output', output, '--unsupported'], root)).toBe(2); + expect(readJson(join(output, 'report.json')).integrity).toBe('INVALID'); +}); + +test('committed semantic snapshot omits unstable line numbers', () => { + const changed = structuredClone(sdk); + changed.methods[0].source.line += 100; + changed.generated[0].source.line += 100; + expect(sdkSnapshot(changed)).toEqual(baseline.sdk); +}); + +test('an empty rebaseline cannot legitimize a zero SDK inventory', () => { + const changed = evidence(); + changed.sdk.generated = []; + changed.baseline.sdk.generated = {}; + expect(() => coverageReport(changed)).toThrow(/must contain methods, routes and models/); +}); + +test('cannot save evidence into an existing file and returns INVALID exit2', async () => { + const output = join(temporaryRoot(), 'file'); + writeFileSync(output, 'preserved'); + expect(await main(['--output', output, '--unsupported'], root)).toBe(2); + expect(readFileSync(output, 'utf8')).toBe('preserved'); +}); + +test('the command returns 0 for local consistency without claiming parity', async () => { + const output = temporaryRoot(); + expect(await main(['--output', output], root)).toBe(0); + const report = readJson(join(output, 'report.json')); + expect(report.integrity).toBe('PASS'); + expect(report.sharedTarget.status).toBe('UNAVAILABLE'); + expect(report.realBackend.status).toBe('NOT_MEASURED'); +}, 20_000); + +test('the command returns 1 and retained evidence for a changed declared shape', async () => { + const copy = sourceCopy(); + for (const folder of ['api-coverage', 'openapi']) + cpSync(join(root, folder), join(copy, folder), { recursive: true }); + replace(join(copy, 'src/enforcement/interfaces.ts'), ' key: string;', ' key: number;'); + const output = temporaryRoot(); + expect(await main(['--output', output], copy)).toBe(1); + const report = readJson(join(output, 'report.json')); + expect(report.integrity).toBe('FAIL'); + expect(report.failures.some((entry) => entry.path.includes('/authoredShapes/'))).toBe(true); +}, 20_000); + +for (const section of ['parameters', 'requestBodies', 'responses', 'headers']) { + test(`retains contract-bearing reusable ${section}`, () => { + const original = sample(); + original.components[section] = { + description: { schema: { type: 'string', default: 'before' } }, + }; + const changed = structuredClone(original); + changed.components[section].description.schema.default = 'after'; + const before = sourceSnapshot(specInventory(original, 'fixture')); + const after = sourceSnapshot(specInventory(changed, 'fixture')); + expect(after).not.toEqual(before); + expect(after.document.reusable[section].description.schema.default).toBe('after'); + }); +} + +for (const section of ['properties', 'patternProperties', '$defs', 'dependentSchemas']) { + test(`does not hide a reference under ${section}.description`, () => { + const document = sample(); + document.components.schemas.Item[section] = { + description: { $ref: '#/components/schemas/Missing' }, + }; + expect(() => specInventory(document, 'fixture')).toThrow(/unresolved/); + }); +} + +test('keeps schema names, auth-scheme names and discriminator mapping names', () => { + const document = sample(); + document.components.schemas.description = { $ref: '#/components/schemas/Item' }; + document.components.securitySchemes = { description: { type: 'http', scheme: 'bearer' } }; + document.components.schemas.Item.discriminator = { + propertyName: 'kind', + mapping: { description: '#/components/schemas/Item' }, + }; + const before = specInventory(document, 'fixture'); + document.components.securitySchemes.description.scheme = 'basic'; + const after = specInventory(document, 'fixture'); + expect(after.document.securitySchemes.description.scheme).toBe('basic'); + expect(after.document).not.toEqual(before.document); + expect(after.schemas.description.$ref).toBe('#/components/schemas/Item'); + expect(after.schemas.Item.discriminator.mapping.description).toBe('#/components/schemas/Item'); +}); + +for (const [name, mutate] of [ + [ + 'response string', + (s) => { + s.paths['/sample'].post.responses = 'not a responses map'; + }, + ], + [ + 'response array', + (s) => { + s.paths['/sample'].post.responses = []; + }, + ], + [ + 'response entry string', + (s) => { + s.paths['/sample'].post.responses[200] = 'not an object'; + }, + ], + [ + 'invalid response status', + (s) => { + s.paths['/sample'].post.responses = { bad: {} }; + }, + ], + [ + 'path scalar', + (s) => { + s.paths['/sample'] = true; + }, + ], + [ + 'operation scalar', + (s) => { + s.paths['/sample'].post = 'invalid'; + }, + ], + [ + 'parameter string', + (s) => { + s.paths['/sample'].post.parameters = 'invalid'; + }, + ], +]) { + test(`rejects malformed ${name} as INVALID input`, () => { + const document = sample(); + mutate(document); + expect(() => specInventory(document, 'fixture')).toThrow(); + }); +} + +for (const field of ['__proto__', 'constructor', 'toString']) { + for (const direction of ['added', 'removed']) { + test(`reports ${direction} schema property named ${field}`, () => { + const document = sample(); + document.paths['/sample'].post.responses[200].content = { + 'application/json': { schema: { $ref: '#/components/schemas/Item' } }, + }; + document.components.schemas.Item = { + type: 'object', + additionalProperties: false, + properties: Object.fromEntries([[field, {}]]), + }; + const without = structuredClone(document); + delete without.components.schemas.Item.properties[field]; + const withField = sourceSnapshot(specInventory(document, 'fixture')); + const withoutField = sourceSnapshot(specInventory(without, 'fixture')); + const [before, after] = + direction === 'removed' ? [withField, withoutField] : [withoutField, withField]; + expect(compareShapes(before, after)).toEqual([ + { + kind: direction, + path: `/schemas/Item/properties/${field}`, + [direction === 'removed' ? 'expected' : 'actual']: {}, + }, + ]); + }); + } +} + +for (const level of ['document', 'path', 'operation']) { + test(`tracks ${level} server destination and annotation-named variable defaults`, () => { + const document = sample(); + const target = + level === 'document' + ? document + : level === 'path' + ? document.paths['/sample'] + : document.paths['/sample'].post; + target.servers = [ + { + url: 'https://{description}.example.invalid', + variables: { description: { default: 'before', enum: ['before', 'after'] } }, + }, + ]; + const before = sourceSnapshot(specInventory(document, 'fixture')); + target.servers[0].variables.description.default = 'after'; + const changedVariable = sourceSnapshot(specInventory(document, 'fixture')); + expect( + compareShapes(before, changedVariable).some((entry) => + entry.path.endsWith('/serverRouting/effective'), + ), + ).toBe(true); + expect(changedVariable.contracts['POST /sample'].serverRouting.effective[0].variables).toEqual({ + description: { default: 'after', enum: ['before', 'after'] }, + }); + target.servers[0].url = 'https://changed.invalid'; + const changedUrl = sourceSnapshot(specInventory(document, 'fixture')); + expect( + compareShapes(changedVariable, changedUrl).some((entry) => + entry.path.endsWith('/serverRouting/effective'), + ), + ).toBe(true); + }); +} + +test('retains declared server overrides while calculating operation precedence', () => { + const document = sample(); + document.servers = [{ url: 'https://document.invalid' }]; + document.paths['/sample'].servers = [{ url: 'https://path.invalid' }]; + document.paths['/sample'].post.servers = [{ url: 'https://operation.invalid' }]; + const before = sourceSnapshot(specInventory(document, 'fixture')); + expect(before.contracts['POST /sample'].serverRouting).toEqual({ + path: [{ url: 'https://path.invalid' }], + operation: [{ url: 'https://operation.invalid' }], + effective: [{ url: 'https://operation.invalid' }], + }); + document.paths['/sample'].servers[0].url = 'https://changed-path.invalid'; + const after = sourceSnapshot(specInventory(document, 'fixture')); + expect( + compareShapes(before, after).some((entry) => entry.path.endsWith('/serverRouting/path')), + ).toBe(true); + delete document.paths['/sample'].post.servers; + expect(specInventory(document, 'fixture').operations[0].contract.serverRouting.effective).toEqual( + [{ url: 'https://changed-path.invalid' }], + ); + delete document.paths['/sample'].servers; + expect(specInventory(document, 'fixture').operations[0].contract.serverRouting.effective).toEqual( + [{ url: 'https://document.invalid' }], + ); +}); + +test('rejects a referenced Path Item even when its local target exists', async () => { + const document = sample(); + document.components.pathItems = { + Other: { get: { operationId: 'other', responses: { 200: { description: 'OK' } } } }, + }; + specInventory(document, 'fixture'); + document.paths['/other'] = { $ref: '#/components/pathItems/Other' }; + expect(() => specInventory(document, 'fixture')).toThrow( + /referenced Path Item \/other is unsupported/, + ); + await expect( + fetchInventory( + { name: 'fixture', url: 'https://api.permit.io/v2/openapi.json' }, + async () => new Response(JSON.stringify(document)), + ), + ).rejects.toThrow(/referenced Path Item \/other is unsupported/); +}); + +test('records a path-only denominator addition', () => { + const document = sample(); + const before = sourceSnapshot(specInventory(document, 'fixture')); + document.paths['/empty'] = {}; + const after = sourceSnapshot(specInventory(document, 'fixture')); + expect(compareShapes(before, after)).toEqual([ + { kind: 'changed', path: '/counts/paths', expected: 1, actual: 2 }, + ]); +}); + +for (const level of ['document', 'path', 'operation']) { + for (const value of ['not an array', [null], [{ url: 7 }]]) { + test(`rejects malformed ${level} servers ${JSON.stringify(value)}`, () => { + const document = sample(); + const target = + level === 'document' + ? document + : level === 'path' + ? document.paths['/sample'] + : document.paths['/sample'].post; + target.servers = value; + expect(() => specInventory(document, 'fixture')).toThrow(/servers must be an array/); + }); + } +} + +test('unreviewed transport factories cannot inherit a known facade classification by name', () => { + const copy = sourceCopy(); + writeFileSync( + join(copy, 'src/utils/unreviewed-transport.ts'), + "import axios from 'axios'; export function createOwnedTransport() { return axios.create(); }\n", + ); + replace( + join(copy, 'src/enforcement/enforcer.ts'), + "'#src/utils/http-transport'", + "'#src/utils/unreviewed-transport'", + ); + expect(() => extractSdk(copy)).toThrow(/Unknown HTTP client/); +}, 20_000); + +test('dynamic facade routing defaults cannot silently receive static route evidence', () => { + const copy = sourceCopy(); + replace( + join(copy, 'src/enforcement/enforcer.ts'), + 'defaults: { baseURL: `${this.config.pdp}/`, headers }', + 'defaults: Object.assign({}, { baseURL: `${this.config.pdp}/`, headers })', + ); + expect(() => extractSdk(copy)).toThrow(/routing defaults must be a checked object literal/); +}, 20_000); + +test('changed facade destinations require an intentional contract review', () => { + const copy = sourceCopy(); + replace( + join(copy, 'src/enforcement/enforcer.ts'), + 'baseURL: `${this.config.pdp}/`', + 'baseURL: `${this.config.pdp}/changed/`', + ); + const changed = evidence(); + changed.baseline.sdk = sdkSnapshot(sdk); + changed.sdk = extractSdk(copy); + const report = coverageReport(changed); + expect(report.integrity).toBe('FAIL'); + expect(report.failures.some((entry) => entry.path === '/sdk/transports/Enforcer.client')).toBe( + true, + ); +}, 20_000); + +test('exposes the two async copy operations directly with explicit source paths', () => { + const report = coverageReport(evidence()); + for (const [name, generatedMethod, verb] of [ + ['copyAsync', 'copyEnvironmentAsync', 'POST'], + ['getCopyResult', 'getCopyEnvironmentAsyncResult', 'GET'], + ]) { + const method = sdk.methods.find((entry) => entry.name === `permit.api.environments.${name}`); + expect(method.factsProxy).toBe(false); + expect( + method.routes + .filter((route) => !route.supporting) + .map((route) => [route.generatedMethod, route.method]), + ).toEqual([[`EnvironmentsApi.${generatedMethod}`, verb]]); + const operation = report.operations.find((entry) => + entry.methods.some((candidate) => candidate.name === method.name), + ); + expect(operation.coverage).toBe('exposed'); + expect(operation.decision.owner).toBe('PER-16951'); + expect(operation.decision.action).toBe('add'); + } +}); diff --git a/scripts/audit-dependencies.mjs b/scripts/audit-dependencies.mjs new file mode 100644 index 00000000..d3e09257 --- /dev/null +++ b/scripts/audit-dependencies.mjs @@ -0,0 +1,531 @@ +import { spawnSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; +import { + appendFileSync, + copyFileSync, + mkdirSync, + mkdtempSync, + readFileSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { isDeepStrictEqual, parseArgs } from 'node:util'; + +export const TRIVY_VERSION = '0.74.0'; +const severities = ['info', 'low', 'moderate', 'high', 'critical', 'unknown']; +const blocked = (finding) => ['high', 'critical'].includes(finding.severity) && finding.fixable; +const nonempty = (value) => typeof value === 'string' && value.trim().length > 0; +const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value); + +function requireValid(condition, message) { + if (!condition) throw new Error(message); +} + +/** Validates scanner process and JSON evidence before interpreting its findings. */ +export function parsePnpmAudit(result) { + requireValid(!result.error && [0, 1].includes(result.status), 'pnpm audit did not complete.'); + const data = JSON.parse(result.stdout); + requireValid(!data.error && object(data.advisories), 'pnpm audit returned no advisory report.'); + const count = data.metadata?.totalDependencies; + requireValid(Number.isSafeInteger(count) && count > 0, 'pnpm audit scanned no packages.'); + const counts = data.metadata?.vulnerabilities; + requireValid(object(counts), 'pnpm audit omitted severity counts.'); + for (const severity of severities.slice(0, 5)) { + requireValid( + Number.isSafeInteger(counts[severity]) && counts[severity] >= 0, + `pnpm audit has an invalid ${severity} count.`, + ); + } + const findings = Object.values(data.advisories).map((advisory) => { + requireValid( + nonempty(advisory.module_name) && + nonempty(advisory.url) && + nonempty(advisory.patched_versions) && + severities.includes(advisory.severity) && + Array.isArray(advisory.findings) && + advisory.findings.length > 0, + 'pnpm audit returned an incomplete advisory.', + ); + for (const occurrence of advisory.findings) { + requireValid( + nonempty(occurrence.version) && + Array.isArray(occurrence.paths) && + occurrence.paths.length > 0 && + occurrence.paths.every(nonempty), + 'pnpm audit returned an advisory without affected versions or paths.', + ); + } + return { + id: advisory.github_advisory_id ?? String(advisory.id), + package: advisory.module_name, + versions: [...new Set(advisory.findings.map((finding) => finding.version))], + severity: advisory.severity, + fixedVersions: advisory.patched_versions, + fixable: advisory.patched_versions !== '<0.0.0', + paths: advisory.findings.flatMap((finding) => finding.paths), + url: advisory.url, + }; + }); + for (const severity of severities.slice(0, 5)) { + const described = findings.filter((finding) => finding.severity === severity).length; + const hasReported = counts[severity] > 0; + const hasDescribed = described > 0; + requireValid( + counts[severity] >= described && + (!['high', 'critical'].includes(severity) || hasReported === hasDescribed), + `pnpm audit ${severity} findings/counts disagree.`, + ); + } + const reported = severities.slice(0, 5).reduce((sum, severity) => sum + counts[severity], 0); + const hasFindings = findings.length > 0; + requireValid(reported > 0 === hasFindings, 'pnpm audit findings/counts disagree.'); + requireValid(result.status === (reported > 0 ? 1 : 0), 'pnpm audit exit status/report disagree.'); + return { packageCount: count, findings, severityCounts: counts }; +} + +/** Projects an explicit scanner graph from runtime roots; missing inventory is invalid. */ +export function parseTrivy(result, roots, expectedPackages) { + requireValid(!result.error && result.status === 0, 'Trivy did not complete.'); + const data = JSON.parse(result.stdout); + requireValid(data.SchemaVersion === 2 && Array.isArray(data.Results), 'Trivy omitted results.'); + const reports = data.Results.filter((entry) => entry.Type === 'pnpm'); + requireValid(reports.length === 1, 'Trivy must scan exactly one pnpm lockfile.'); + const report = reports[0]; + requireValid( + Array.isArray(report.Packages) && report.Packages.length > 0, + 'Trivy scanned no packages.', + ); + const inventory = new Map(); + for (const pkg of report.Packages) { + requireValid( + nonempty(pkg.ID) && nonempty(pkg.Name) && nonempty(pkg.Version) && !inventory.has(pkg.ID), + 'Trivy returned incomplete or duplicate inventory.', + ); + inventory.set(pkg.ID, pkg); + } + for (const pkg of inventory.values()) { + requireValid( + pkg.DependsOn === undefined || Array.isArray(pkg.DependsOn), + 'Trivy returned invalid dependency edges.', + ); + for (const dependency of pkg.DependsOn ?? []) { + requireValid(inventory.has(dependency), `Trivy omitted dependency ${dependency}.`); + } + } + const reachable = new Set(); + const pending = []; + if (roots) { + for (const [name, version] of Object.entries(roots)) { + const matches = [...inventory.values()].filter( + (pkg) => pkg.Name === name && pkg.Version === version, + ); + requireValid(matches.length > 0, `Trivy omitted runtime root ${name}@${version}.`); + pending.push(...matches.map((pkg) => pkg.ID)); + } + requireValid(pending.length > 0, 'Runtime dependencies are empty.'); + } else pending.push(...inventory.keys()); + while (pending.length) { + const id = pending.pop(); + if (reachable.has(id)) continue; + reachable.add(id); + pending.push(...(inventory.get(id).DependsOn ?? [])); + } + requireValid( + Array.isArray(expectedPackages) && expectedPackages.length > 0, + 'Independent lock inventory is empty.', + ); + const observed = [ + ...new Set( + [...reachable].map((id) => { + const pkg = inventory.get(id); + return `${pkg.Name}@${pkg.Version}`; + }), + ), + ].sort(); + requireValid( + isDeepStrictEqual(observed, [...expectedPackages].sort()), + 'Trivy graph differs from the independent pnpm lock inventory.', + ); + requireValid( + report.Vulnerabilities === undefined || Array.isArray(report.Vulnerabilities), + 'Trivy returned invalid vulnerabilities.', + ); + const findings = []; + for (const advisory of report.Vulnerabilities ?? []) { + const pkg = inventory.get(advisory.PkgID); + requireValid( + pkg && + pkg.Name === advisory.PkgName && + pkg.Version === advisory.InstalledVersion && + (advisory.FixedVersion === undefined || typeof advisory.FixedVersion === 'string') && + nonempty(advisory.VulnerabilityID) && + nonempty(advisory.PrimaryURL) && + nonempty(advisory.InstalledVersion) && + ['UNKNOWN', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'].includes(advisory.Severity), + 'Trivy advisory has no inventory entry or required evidence.', + ); + if (!reachable.has(advisory.PkgID)) continue; + const severity = advisory.Severity === 'MEDIUM' ? 'moderate' : advisory.Severity.toLowerCase(); + findings.push({ + id: advisory.VulnerabilityID, + package: advisory.PkgName, + versions: [advisory.InstalledVersion], + severity, + fixedVersions: advisory.FixedVersion ?? '', + fixable: nonempty(advisory.FixedVersion), + paths: [advisory.PkgID], + url: advisory.PrimaryURL, + }); + } + return { packageCount: reachable.size, findings }; +} + +/** Classifies all lanes without allowing an incomplete scanner to report a clean gate. */ +export function summarize(lanes) { + const invalid = + lanes.length === 0 || + lanes.some( + (lane) => + lane.status === 'INVALID' || + lane.scans.length !== 2 || + lane.scans.some( + (scan) => !Number.isSafeInteger(scan.packageCount) || scan.packageCount < 1, + ), + ); + const fail = lanes.some((lane) => lane.scans.some((scan) => scan.findings.some(blocked))); + return invalid ? 'INVALID' : fail ? 'FAIL' : 'PASS'; +} + +function command(binary, args, cwd) { + // Caller-level scanner filters must not turn missing findings into a clean report. + const env = Object.fromEntries( + Object.entries(process.env).filter(([key]) => !key.startsWith('TRIVY_')), + ); + return spawnSync(binary, args, { + cwd, + env, + encoding: 'utf8', + timeout: 300_000, + maxBuffer: 32 * 1024 * 1024, + }); +} + +function checked(binary, args, cwd) { + const result = command(binary, args, cwd); + const detail = result.error?.message ?? result.stderr ?? result.stdout; + requireValid( + !result.error && result.status === 0, + `${binary} ${args[0]} did not complete: ${detail}`, + ); + return result.stdout; +} + +function exactDependencies(manifest) { + const dependencies = { ...manifest.dependencies, ...manifest.optionalDependencies }; + requireValid(Object.keys(dependencies).length > 0, 'Published runtime dependencies are empty.'); + for (const [name, version] of Object.entries(dependencies)) { + requireValid( + typeof version === 'string' && /^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(version), + `${name} needs an exact runtime pin; add supported-range lanes before widening it.`, + ); + } + requireValid( + !manifest.peerDependencies || Object.keys(manifest.peerDependencies).length === 0, + 'Peer dependencies need explicit consumer audit lanes.', + ); + return dependencies; +} + +/** Reads registry package identities from pnpm's lockfile-only dependency walk. */ +export function parseInventory(result) { + requireValid(!result.error && result.status === 0, 'pnpm lock inventory did not complete.'); + const projects = JSON.parse(result.stdout); + requireValid(Array.isArray(projects) && projects.length > 0, 'pnpm lock inventory is empty.'); + const packages = new Set(); + function visit(node) { + for (const field of ['dependencies', 'optionalDependencies', 'devDependencies']) { + if (node[field] === undefined) continue; + requireValid(object(node[field]), `Invalid ${field} in pnpm lock inventory.`); + for (const [name, pkg] of Object.entries(node[field])) { + requireValid( + object(pkg) && nonempty(pkg.version), + 'Lock inventory package has no version.', + ); + if (!/^(?:link:|file:|workspace:)/.test(pkg.version)) { + requireValid( + /^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(pkg.version), + `Unsupported lock inventory version ${name}@${pkg.version}.`, + ); + packages.add(`${name}@${pkg.version}`); + } + visit(pkg); + } + } + } + projects.forEach(visit); + requireValid(packages.size > 0, 'pnpm lock inventory scanned no registry packages.'); + return [...packages].sort(); +} + +function scanLane({ name, cwd, roots, prod, filter, out, scratch }) { + const lane = { name, status: 'PASS', scans: [], errors: [], expectedPackages: [] }; + const list = command( + 'pnpm', + [ + ...(filter ? ['--filter', filter] : ['-r']), + 'list', + '--lockfile-only', + '--depth', + 'Infinity', + '--json', + ...(prod ? ['--prod'] : []), + ], + cwd, + ); + try { + lane.expectedPackages = parseInventory(list); + } catch (error) { + lane.errors.push(error.message); + } + writeFileSync( + join(out, `${name}-inventory.json`), + JSON.stringify(lane.expectedPackages, null, 2), + ); + const args = [ + ...(filter ? ['--filter', filter] : []), + 'audit', + '--json', + '--audit-level', + 'info', + ...(prod ? ['--prod'] : []), + ]; + const trivyDir = join(scratch, name); + mkdirSync(trivyDir, { recursive: true }); + copyFileSync(join(cwd, 'pnpm-lock.yaml'), join(trivyDir, 'pnpm-lock.yaml')); + writeFileSync(join(trivyDir, 'empty-ignore'), ''); + writeFileSync(join(trivyDir, 'empty-config.yaml'), '{}\n'); + const scanners = [ + ['pnpm', args, () => cwd, parsePnpmAudit], + [ + 'trivy', + [ + 'fs', + '--scanners', + 'vuln', + '--pkg-types', + 'library', + '--list-all-pkgs', + '--include-dev-deps', + '--format', + 'json', + '--exit-code', + '0', + '--ignorefile', + join(trivyDir, 'empty-ignore'), + '--config', + join(trivyDir, 'empty-config.yaml'), + '--ignore-unfixed=false', + '--severity', + 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL', + trivyDir, + ], + () => trivyDir, + (result) => parseTrivy(result, roots, lane.expectedPackages), + ], + ]; + for (const [scanner, options, directory, parse] of scanners) { + const result = command(scanner, options, directory()); + writeFileSync(join(out, `${name}-${scanner}.json`), result.stdout ?? ''); + writeFileSync(join(out, `${name}-${scanner}.log`), result.stderr ?? ''); + try { + const scan = { scanner, ...parse(result) }; + requireValid( + scan.packageCount >= lane.expectedPackages.length, + `${scanner} package count is below the independent inventory count.`, + ); + lane.scans.push(scan); + if (scan.findings.some(blocked)) lane.status = 'FAIL'; + } catch (error) { + lane.errors.push(`${scanner}: ${error.message}`); + } + } + if (lane.errors.length) lane.status = 'INVALID'; + return lane; +} + +function markdown(report) { + const lines = [ + `# Dependency security: ${report.status}`, + '', + 'FAIL blocks fixable HIGH/CRITICAL findings. INVALID means the scan did not complete.', + '', + `Node ${report.node}; pnpm ${report.pnpm}; Trivy ${TRIVY_VERSION}.`, + '', + 'Minimum/newest refer to exact declared direct pins, not the lowest transitive versions.', + 'Each fresh consumer resolves independently, without development dependencies.', + '', + ]; + if (report.artifact) lines.push(`Artifact SHA256: ${report.artifact.sha256}`, ''); + for (const lane of report.lanes) { + lines.push(`## ${lane.name}: ${lane.status}`, ''); + for (const error of lane.errors) lines.push(`- INVALID: ${error}`); + for (const scan of lane.scans) { + lines.push( + `- ${scan.scanner}: ${scan.packageCount} packages, ${scan.findings.length} findings.`, + ); + if (scan.severityCounts) + lines.push( + ` - Registry totals (including meta-vulnerabilities): ` + + JSON.stringify(scan.severityCounts), + ); + for (const finding of scan.findings) { + lines.push( + ` - ${finding.severity.toUpperCase()} ${finding.package}@` + + `${finding.versions.join(', ')}: ` + + `${finding.id}; fix: ${finding.fixedVersions || 'not available'}; ${finding.url}`, + ); + } + } + lines.push(''); + } + return lines.join('\n'); +} + +/** Runs audits before dependency installation, retaining each scanner's raw evidence. */ +export function runSecurityGate({ root = process.cwd(), out, artifact, lockedOnly = false }) { + out = resolve(out); + mkdirSync(out, { recursive: true }); + const scratch = mkdtempSync(join(tmpdir(), 'permit-security-')); + const report = { status: 'INVALID', node: process.version, pnpm: '', lanes: [], artifact: null }; + try { + const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + const roots = exactDependencies(manifest); + report.pnpm = checked('pnpm', ['--version'], root).trim(); + requireValid( + manifest.packageManager === `pnpm@${report.pnpm}`, + 'pnpm version differs from packageManager.', + ); + const trivy = JSON.parse(checked('trivy', ['version', '--format', 'json'], root)); + requireValid( + trivy.Version === TRIVY_VERSION, + `Install Trivy ${TRIVY_VERSION} before scanning.`, + ); + for (const [name, prod] of [ + ['locked-runtime', true], + ['development-tooling', false], + ]) { + report.lanes.push( + scanLane({ + name, + cwd: root, + roots: prod ? roots : undefined, + filter: prod ? manifest.name : undefined, + prod, + out, + scratch, + }), + ); + } + if (!lockedOnly) { + requireValid(nonempty(artifact), 'Pass --artifact with the exact built npm tarball.'); + artifact = resolve(artifact); + const bytes = readFileSync(artifact); + report.artifact = { + name: artifact.split(/[\\/]/).pop(), + sha256: createHash('sha256').update(bytes).digest('hex'), + }; + const packed = JSON.parse(checked('tar', ['-xOf', artifact, 'package/package.json'], root)); + const packedRoots = exactDependencies(packed); + requireValid( + packed.name === manifest.name && + packed.version === manifest.version && + isDeepStrictEqual(packedRoots, roots), + 'Packed artifact does not match the current package version/runtime dependencies.', + ); + for (const [name, resolution] of [ + ['minimum-runtime', 'lowest-direct'], + ['newest-runtime', 'highest'], + ]) { + const cwd = join(scratch, `${name}-consumer`); + mkdirSync(cwd); + writeFileSync( + join(cwd, 'package.json'), + JSON.stringify({ + private: true, + name: `permit-security-${name}`, + version: '1.0.0', + packageManager: manifest.packageManager, + dependencies: { [packed.name]: `file:${artifact}` }, + }), + ); + writeFileSync( + join(cwd, 'pnpm-workspace.yaml'), + 'packages: []\nignoreScripts: true\nminimumReleaseAge: 1440\n' + + `autoInstallPeers: false\nresolutionMode: ${resolution}\n`, + ); + try { + // Resolve a lockfile without installing packages or running lifecycle scripts. + checked( + 'pnpm', + ['install', '--lockfile-only', '--ignore-scripts', '--prod', '--no-frozen-lockfile'], + cwd, + ); + copyFileSync(join(cwd, 'pnpm-lock.yaml'), join(out, `${name}-pnpm-lock.yaml`)); + const lane = scanLane({ + name, + cwd, + roots: { [packed.name]: packed.version }, + prod: true, + out, + scratch, + }); + report.lanes.push(lane); + if (lane.status === 'PASS') + checked('pnpm', ['install', '--frozen-lockfile', '--ignore-scripts', '--prod'], cwd); + } catch (error) { + const lane = report.lanes.find((entry) => entry.name === name); + if (lane) { + lane.status = 'INVALID'; + lane.errors.push(error.message); + } else report.lanes.push({ name, status: 'INVALID', scans: [], errors: [error.message] }); + } + } + } + requireValid(report.lanes.length === (lockedOnly ? 2 : 4), 'Not every required lane ran.'); + report.status = summarize(report.lanes); + } catch (error) { + report.lanes.push({ name: 'setup', status: 'INVALID', scans: [], errors: [error.message] }); + } + writeFileSync(join(out, 'report.json'), JSON.stringify(report, null, 2) + '\n'); + const summary = markdown(report); + writeFileSync(join(out, 'report.md'), summary); + if (process.env['GITHUB_STEP_SUMMARY']) + appendFileSync(process.env['GITHUB_STEP_SUMMARY'], summary); + console.log(summary); + rmSync(scratch, { recursive: true, force: true }); + return report; +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + try { + const { values } = parseArgs({ + options: { + out: { type: 'string', default: 'security-report' }, + artifact: { type: 'string' }, + 'locked-only': { type: 'boolean', default: false }, + }, + }); + const report = runSecurityGate({ + out: values.out, + artifact: values.artifact, + lockedOnly: values['locked-only'], + }); + process.exitCode = { PASS: 0, FAIL: 1, INVALID: 2 }[report.status]; + } catch (error) { + console.error(`Dependency security INVALID: ${error.message}`); + process.exitCode = 2; + } +} diff --git a/scripts/audit-dependencies.test.mjs b/scripts/audit-dependencies.test.mjs new file mode 100644 index 00000000..d899946f --- /dev/null +++ b/scripts/audit-dependencies.test.mjs @@ -0,0 +1,459 @@ +import { spawnSync } from 'node:child_process'; +import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { delimiter, join } from 'node:path'; + +import { expect, onTestFinished, test } from 'vitest'; + +import { parsePnpmAudit, parseTrivy, summarize } from '#scripts/audit-dependencies.mjs'; + +const roots = { fixture: '1.0.0' }; +const inventory = ['child@1.0.0', 'fixture@1.0.0']; +const cleanPnpm = () => ({ + advisories: {}, + metadata: { + totalDependencies: 3, + vulnerabilities: { info: 0, low: 0, moderate: 0, high: 0, critical: 0 }, + }, +}); +const cleanTrivy = () => ({ + SchemaVersion: 2, + Results: [ + { + Type: 'pnpm', + Packages: [ + { ID: 'fixture@1.0.0', Name: 'fixture', Version: '1.0.0', DependsOn: ['child@1.0.0'] }, + { ID: 'child@1.0.0', Name: 'child', Version: '1.0.0' }, + ], + Vulnerabilities: [], + }, + ], +}); +const response = (data, status = 0) => ({ stdout: JSON.stringify(data), status }); + +function advisory(severity = 'high', fixed = '>=1.0.1') { + return { + id: 123, + module_name: 'child', + severity, + patched_versions: fixed, + github_advisory_id: 'GHSA-fixture', + url: 'https://example.test/advisory', + findings: [{ version: '1.0.0', paths: ['.>fixture>child'] }], + }; +} + +function trivyAdvisory(severity = 'HIGH', fixed = '1.0.1') { + return { + PkgID: 'child@1.0.0', + PkgName: 'child', + InstalledVersion: '1.0.0', + VulnerabilityID: 'CVE-fixture', + PrimaryURL: 'https://example.test/advisory', + Severity: severity, + FixedVersion: fixed, + }; +} + +function lane(scans) { + return { status: 'PASS', scans }; +} + +test('nonempty clean reports prove both scanners ran', () => { + const scans = [ + parsePnpmAudit(response(cleanPnpm())), + parseTrivy(response(cleanTrivy()), roots, inventory), + ]; + expect(scans.map((scan) => scan.packageCount)).toEqual([3, 2]); + expect(summarize([lane(scans)])).toBe('PASS'); +}); + +for (const [severity, fix, expected] of [ + ['high', '>=1.0.1', 'FAIL'], + ['critical', '>=1.0.1', 'FAIL'], + ['moderate', '>=1.0.1', 'PASS'], + ['low', '>=1.0.1', 'PASS'], + ['high', '<0.0.0', 'PASS'], +]) { + test(`pnpm ${severity} with fix ${fix} is ${expected} and remains in the report`, () => { + const data = cleanPnpm(); + data.advisories['123'] = advisory(severity, fix); + data.metadata.vulnerabilities[severity] = 1; + const parsed = parsePnpmAudit(response(data, 1)); + expect(parsed.findings).toHaveLength(1); + expect(parsed.findings[0].paths).toEqual(['.>fixture>child']); + expect(summarize([lane([parsed, parseTrivy(response(cleanTrivy()), roots, inventory)])])).toBe( + expected, + ); + }); +} + +for (const [severity, fix, expected] of [ + ['HIGH', '1.0.1', 'FAIL'], + ['CRITICAL', '1.0.1', 'FAIL'], + ['MEDIUM', '1.0.1', 'PASS'], + ['HIGH', '', 'PASS'], + ['UNKNOWN', '', 'PASS'], +]) { + test(`Trivy ${severity} with fix ${JSON.stringify(fix)} is ${expected} and visible`, () => { + const data = cleanTrivy(); + data.Results[0].Vulnerabilities.push(trivyAdvisory(severity, fix)); + const parsed = parseTrivy(response(data), roots, inventory); + expect(parsed.findings).toHaveLength(1); + expect(summarize([lane([parsePnpmAudit(response(cleanPnpm())), parsed])])).toBe(expected); + }); +} + +for (const bad of [ + { stdout: '', status: 0 }, + { stdout: '{invalid', status: 0 }, + { stdout: '{}', status: 0 }, + { stdout: '{"error":"offline"}', status: 1 }, + response(cleanPnpm(), 1), + response(cleanPnpm(), 2), + { ...response(cleanPnpm()), error: new Error('spawn failed') }, + response({ ...cleanPnpm(), metadata: { ...cleanPnpm().metadata, totalDependencies: 0 } }), +]) { + test(`rejects invalid pnpm evidence ${JSON.stringify(bad)}`, () => { + expect(() => parsePnpmAudit(bad)).toThrow(); + }); +} + +test('pnpm advisory/count disagreement cannot erase a finding', () => { + const data = cleanPnpm(); + data.advisories['123'] = advisory(); + expect(() => parsePnpmAudit(response(data))).toThrow(/disagree/); +}); + +for (const [name, mutate] of [ + [ + 'empty results', + (data) => { + data.Results = []; + }, + ], + [ + 'null results', + (data) => { + data.Results = null; + }, + ], + [ + 'empty inventory', + (data) => { + data.Results[0].Packages = []; + }, + ], + [ + 'missing root', + (data) => { + data.Results[0].Packages.shift(); + }, + ], + [ + 'missing edge', + (data) => { + data.Results[0].Packages.pop(); + }, + ], + [ + 'duplicate package', + (data) => { + data.Results[0].Packages.push(data.Results[0].Packages[0]); + }, + ], + [ + 'orphan advisory', + (data) => { + data.Results[0].Vulnerabilities.push({ ...trivyAdvisory(), PkgID: 'absent' }); + }, + ], + [ + 'invalid severity', + (data) => { + data.Results[0].Vulnerabilities.push(trivyAdvisory('NONE')); + }, + ], +]) { + test(`Trivy ${name} is invalid`, () => { + const data = cleanTrivy(); + mutate(data); + expect(() => parseTrivy(response(data), roots, inventory)).toThrow(); + }); +} + +for (const edges of [undefined, []]) { + test(`Trivy omitted runtime edges ${JSON.stringify(edges)} cannot hide a package`, () => { + const data = cleanTrivy(); + data.Results[0].Packages[0].DependsOn = edges; + expect(() => parseTrivy(response(data), roots, inventory)).toThrow(/independent pnpm lock/); + }); +} + +for (const fixed of [[], {}, null]) { + test(`Trivy malformed fix ${JSON.stringify(fixed)} cannot turn HIGH into unfixable`, () => { + const data = cleanTrivy(); + data.Results[0].Vulnerabilities.push(trivyAdvisory('HIGH', fixed)); + expect(() => parseTrivy(response(data), roots, inventory)).toThrow(/required evidence/); + }); +} + +for (const mismatch of [{ PkgName: 'other' }, { InstalledVersion: '2.0.0' }]) { + test(`Trivy advisory identity mismatch ${JSON.stringify(mismatch)} is invalid`, () => { + const data = cleanTrivy(); + data.Results[0].Vulnerabilities.push({ ...trivyAdvisory(), ...mismatch }); + expect(() => parseTrivy(response(data), roots, inventory)).toThrow(/required evidence/); + }); +} + +for (const expected of [[], ['fixture@1.0.0'], [...inventory, 'extra@1.0.0']]) { + test(`Trivy requires matching independent inventory ${JSON.stringify(expected)}`, () => { + expect(() => parseTrivy(response(cleanTrivy()), roots, expected)).toThrow(/inventory/); + }); +} + +test('Trivy process failure cannot become clean from valid stdout', () => { + expect(() => parseTrivy(response(cleanTrivy(), 1), roots, inventory)).toThrow(/did not complete/); +}); + +test('runtime excludes disconnected tooling; the tooling lane retains its findings', () => { + const data = cleanTrivy(); + data.Results[0].Packages.push({ ID: 'tool@1.0.0', Name: 'tool', Version: '1.0.0' }); + data.Results[0].Vulnerabilities.push({ + ...trivyAdvisory(), + PkgID: 'tool@1.0.0', + PkgName: 'tool', + }); + expect(parseTrivy(response(data), roots, inventory)).toMatchObject({ + packageCount: 2, + findings: [], + }); + expect(parseTrivy(response(data), undefined, [...inventory, 'tool@1.0.0'])).toMatchObject({ + packageCount: 3, + findings: [expect.anything()], + }); +}); + +test('missing lanes/scanners and invalid evidence never summarize as clean', () => { + expect(summarize([])).toBe('INVALID'); + expect(summarize([lane([])])).toBe('INVALID'); + expect(summarize([{ status: 'INVALID', scans: [] }])).toBe('INVALID'); +}); + +function fixture({ + pnpm = cleanPnpm(), + trivy = cleanTrivy(), + pnpmStatus = 0, + trivyStatus = 0, +} = {}) { + const cwd = mkdtempSync(join(tmpdir(), 'permit audit ')); + onTestFinished(() => rmSync(cwd, { recursive: true, force: true })); + const bin = join(cwd, 'bin'); + mkdirSync(bin); + writeFileSync( + join(cwd, 'package.json'), + JSON.stringify({ + name: 'fixture-sdk', + version: '1.0.0', + packageManager: 'pnpm@12.8.1', + dependencies: roots, + }), + ); + writeFileSync(join(cwd, 'artifact.tgz'), 'packed bytes'); + writeFileSync(join(cwd, 'artifact-manifest.json'), readFileSync(join(cwd, 'package.json'))); + writeFileSync(join(cwd, 'pnpm-lock.yaml'), 'fixture lock: process boundary is stubbed\n'); + const writeTool = (name, body) => + writeFileSync(join(bin, name), `#!${process.execPath}\n${body}`, { mode: 0o755 }); + writeTool( + 'pnpm', + `const fs=require('node:fs'); const args=process.argv.slice(2); +if(args.includes('--version')) console.log('12.8.1'); +else if(args.includes('list')) { +const deps={fixture:{version:'1.0.0',dependencies:{child:{version:'1.0.0'}}}}; +const local=JSON.parse(fs.readFileSync('package.json','utf8')); +const dependencies = local.dependencies['fixture-sdk'] + ? {'fixture-sdk':{version:'1.0.0',dependencies:deps}} : deps; +console.log(JSON.stringify([{dependencies}])); +} +else if(args.includes('audit')) { + console.log(${JSON.stringify(JSON.stringify(pnpm))}); + process.exitCode=${pnpmStatus}; +} +else { +fs.appendFileSync(${JSON.stringify(join(cwd, 'calls'))}, JSON.stringify(args)+'\\n'); +if(args.includes('--lockfile-only')) { + fs.writeFileSync('pnpm-lock.yaml','fixture'); + process.exitCode=Number(process.env.RESOLVE_STATUS ?? 0); +} +else { + fs.appendFileSync(${JSON.stringify(join(cwd, 'installed'))},JSON.stringify(args)+'\\n'); + process.exitCode=Number(process.env.INSTALL_STATUS ?? 0); +} +}`, + ); + writeTool( + 'trivy', + `if(process.argv.includes('version')) console.log('{"Version":"0.74.0"}'); +else { const data=${JSON.stringify(trivy)}; +if(/(?:minimum|newest)-runtime$/.test(process.cwd()) && data.Results?.[0]?.Packages) { + data.Results[0].Packages.push({ID:'fixture-sdk@1.0.0',Name:'fixture-sdk', + Version:'1.0.0',DependsOn:['fixture@1.0.0']}); +} +console.log(JSON.stringify(data)); process.exitCode=${trivyStatus}; }`, + ); + writeTool( + 'tar', + `const manifest=${JSON.stringify(join(cwd, 'artifact-manifest.json'))}; +console.log(require('node:fs').readFileSync(manifest, 'utf8'));`, + ); + return { + cwd, + run(args = [], env = {}) { + const result = spawnSync( + process.execPath, + [ + join(process.cwd(), 'scripts/audit-dependencies.mjs'), + ...(args.includes('--artifact') ? [] : ['--locked-only']), + '--out', + 'report', + ...args, + ], + { + cwd, + encoding: 'utf8', + env: { ...process.env, ...env, PATH: bin + delimiter + process.env['PATH'] }, + }, + ); + return { + ...result, + report: JSON.parse(readFileSync(join(cwd, 'report/report.json'), 'utf8')), + }; + }, + }; +} + +for (const [name, input, expected] of [ + ['clean', {}, 0], + ['scanner error', { trivyStatus: 17 }, 2], + ['empty scan', { trivy: { SchemaVersion: 2, Results: [] } }, 2], + [ + 'omitted runtime dependency edges', + (() => { + const trivy = cleanTrivy(); + delete trivy.Results[0].Packages[0].DependsOn; + return { trivy }; + })(), + 2, + ], + [ + 'fixable vulnerability', + (() => { + const pnpm = cleanPnpm(); + pnpm.advisories['123'] = advisory(); + pnpm.metadata.vulnerabilities.high = 1; + return { pnpm, pnpmStatus: 1 }; + })(), + 1, + ], +]) { + test(`CLI ${name} exits ${expected} with persistent evidence`, () => { + const f = fixture(input); + const result = f.run(); + expect(result.status, result.stderr + result.stdout).toBe(expected); + expect(result.report.lanes).toHaveLength(2); + expect(result.report.status).toBe(['PASS', 'FAIL', 'INVALID'][expected]); + expect(readFileSync(join(f.cwd, 'report/report.md'), 'utf8')).toContain(result.report.status); + }); +} + +test('pnpm HIGH counts cannot be hidden behind a LOW advisory', () => { + const data = cleanPnpm(); + data.metadata.vulnerabilities.high = 1; + data.advisories['123'] = advisory('low'); + expect(() => parsePnpmAudit(response(data, 1))).toThrow(/findings\/counts disagree/); +}); + +test('pnpm retains legitimate extra LOW meta-vulnerability counts', () => { + const data = cleanPnpm(); + data.metadata.vulnerabilities.high = 1; + data.metadata.vulnerabilities.low = 2; + data.advisories['123'] = advisory('high'); + const parsed = parsePnpmAudit(response(data, 1)); + expect(parsed.severityCounts.low).toBe(2); + expect(summarize([lane([parsed, parseTrivy(response(cleanTrivy()), roots, inventory)])])).toBe( + 'FAIL', + ); +}); + +test('full gate audits both independent consumers before frozen script-free installation', () => { + const f = fixture(); + const result = f.run(['--artifact', 'artifact.tgz']); + expect(result.status, result.stderr + result.stdout).toBe(0); + expect(result.report.lanes.map((entry) => entry.name)).toEqual([ + 'locked-runtime', + 'development-tooling', + 'minimum-runtime', + 'newest-runtime', + ]); + expect(result.report.artifact.sha256).toMatch(/^[a-f0-9]{64}$/); + const installs = readFileSync(join(f.cwd, 'installed'), 'utf8') + .trim() + .split('\n') + .map(JSON.parse); + expect(installs).toHaveLength(2); + for (const args of installs) + expect(args).toEqual(['install', '--frozen-lockfile', '--ignore-scripts', '--prod']); + const all = readFileSync(join(f.cwd, 'calls'), 'utf8').trim().split('\n').map(JSON.parse); + expect(all).toHaveLength(4); + for (const args of all) expect(args).toContain('--ignore-scripts'); +}); + +for (const status of ['1', '2']) { + test(`failed or invalid scans (${status}) never install consumer packages`, () => { + const pnpm = cleanPnpm(); + pnpm.advisories['123'] = advisory(); + pnpm.metadata.vulnerabilities.high = 1; + const f = status === '1' ? fixture({ pnpm, pnpmStatus: 1 }) : fixture({ trivyStatus: 17 }); + const result = f.run(['--artifact', 'artifact.tgz']); + expect(result.status, result.stdout + result.stderr).toBe(Number(status)); + expect(result.report.lanes).toHaveLength(4); + expect(existsSync(join(f.cwd, 'installed'))).toBe(false); + }); +} + +for (const variable of ['RESOLVE_STATUS', 'INSTALL_STATUS']) { + test(`${variable} failure is INVALID and retained in the report`, () => { + const f = fixture(); + const result = f.run(['--artifact', 'artifact.tgz'], { [variable]: '42' }); + expect(result.status, result.stdout + result.stderr).toBe(2); + expect(result.report.lanes.filter((entry) => entry.status === 'INVALID')).toHaveLength(2); + }); +} + +test('missing artifact is INVALID and cannot reach consumer installation', () => { + const f = fixture(); + const result = f.run(['--artifact', 'missing.tgz']); + expect(result.status).toBe(2); + expect(existsSync(join(f.cwd, 'installed'))).toBe(false); +}); + +test('a tarball with mismatched version or dependencies is INVALID', () => { + const f = fixture(); + const packed = JSON.parse(readFileSync(join(f.cwd, 'artifact-manifest.json'), 'utf8')); + packed.version = '2.0.0'; + writeFileSync(join(f.cwd, 'artifact-manifest.json'), JSON.stringify(packed)); + const result = f.run(['--artifact', 'artifact.tgz']); + expect(result.status, result.stdout + result.stderr).toBe(2); + expect(result.report.lanes.at(-1).errors.join(' ')).toMatch(/does not match/); + expect(existsSync(join(f.cwd, 'installed'))).toBe(false); +}); + +test('widened direct ranges require supported-range lanes instead of silently using newest', () => { + const f = fixture(); + const manifest = JSON.parse(readFileSync(join(f.cwd, 'package.json'), 'utf8')); + manifest.dependencies.fixture = '^1.0.0'; + writeFileSync(join(f.cwd, 'package.json'), JSON.stringify(manifest)); + const result = f.run(); + expect(result.status).toBe(2); + expect(result.report.lanes.at(-1).errors.join(' ')).toMatch(/exact runtime pin/); +}); diff --git a/scripts/build.mjs b/scripts/build.mjs new file mode 100644 index 00000000..451703e1 --- /dev/null +++ b/scripts/build.mjs @@ -0,0 +1,17 @@ +import { rm } from 'node:fs/promises'; + +import { build } from 'esbuild'; + +await rm('build', { recursive: true, force: true }); +for (const format of ['cjs', 'esm']) { + await build({ + entryPoints: ['src/index.ts'], + tsconfig: 'tsconfig.build.json', + bundle: true, + packages: 'external', + platform: 'node', + target: 'node22', + format, + outfile: format === 'cjs' ? 'build/index.js' : 'build/index.mjs', + }); +} diff --git a/scripts/bulk-fixture.test.mjs b/scripts/bulk-fixture.test.mjs new file mode 100644 index 00000000..450ea520 --- /dev/null +++ b/scripts/bulk-fixture.test.mjs @@ -0,0 +1,288 @@ +import { spawn } from 'node:child_process'; +import { mkdtempSync, readFileSync, rmdirSync, unlinkSync } from 'node:fs'; +import { createServer } from 'node:http'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { expect, onTestFinished, test } from 'vitest'; + +const root = dirname(dirname(fileURLToPath(import.meta.url))); +const resourcesPath = '/v2/schema/proj/env/resources'; +const usersPath = '/v2/facts/proj/env/users'; +const bulkUsersPath = '/v2/facts/proj/env/bulk/users'; +const tuplesPath = '/v2/facts/proj/env/relationship_tuples'; + +async function bulkFixture(fault) { + const resources = new Map(); + const users = new Map(); + const instances = new Set(); + const tuples = []; + const requests = []; + const failures = []; + const server = createServer((request, response) => { + let text = ''; + request.setEncoding('utf8'); + request.on('data', (chunk) => { + text += chunk; + }); + request.on('end', () => { + try { + const url = new URL(request.url, 'http://127.0.0.1'); + const path = url.pathname; + const body = text ? JSON.parse(text) : undefined; + const captured = { method: request.method, path, body, query: [...url.searchParams] }; + requests.push(captured); + expect(request.headers.authorization).toBe('Bearer fixture-key'); + expect(request.headers['x-permit-sdk-version']).toMatch(/^node:/); + if (body) expect(request.headers['content-type']).toContain('application/json'); + function reply(status, value) { + captured.status = status; + response.writeHead(status, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify(value)); + } + if (path === '/v2/api-key/scope' && request.method === 'GET') { + return reply(200, { + organization_id: 'org', + project_id: 'proj', + environment_id: 'env', + }); + } + if (path === resourcesPath && request.method === 'POST') { + expect(body.key).toMatch(/^bulk_(folders|docs)_/); + expect(body.actions).toStrictEqual({ read: {} }); + resources.set(body.key, body); + return reply(201, { ...body, id: body.key }); + } + if (path.startsWith(`${resourcesPath}/`)) { + const [, key, child] = path.slice(resourcesPath.length).split('/'); + if (child === 'relations' && request.method === 'POST') { + expect(resources.has(key)).toBe(true); + expect(body.key).toBe('parent'); + expect(resources.has(body.subject_resource)).toBe(true); + return reply(201, { ...body, id: 'relation', object_resource: key }); + } + if (!child && request.method === 'DELETE') { + resources.delete(key); + for (const instance of instances) { + if (instance.startsWith(`${key}:`)) instances.delete(instance); + } + for (let index = tuples.length - 1; index >= 0; index--) { + if ( + [tuples[index].subject, tuples[index].object].some((id) => id.startsWith(`${key}:`)) + ) { + tuples.splice(index, 1); + } + } + return reply(204, undefined); + } + if (!child && request.method === 'GET') { + return reply( + resources.has(key) ? 200 : 404, + resources.get(key) ?? { message: 'absent' }, + ); + } + } + if (path === '/v2/facts/proj/env/resource_instances' && request.method === 'POST') { + expect(resources.has(body.resource)).toBe(true); + expect(body.tenant).toBe('default'); + instances.add(`${body.resource}:${body.key}`); + return reply(201, { ...body, id: `${body.resource}:${body.key}` }); + } + if (path === `${tuplesPath}/bulk` && request.method === 'POST') { + expect(Object.keys(body)).toStrictEqual(['operations']); + expect(body.operations).toHaveLength(2); + for (const [index, tuple] of body.operations.entries()) { + expect(instances.has(tuple.subject)).toBe(true); + expect(instances.has(tuple.object)).toBe(true); + expect(tuple.relation).toBe('parent'); + expect(tuple.tenant).toBe('default'); + if (fault !== 'missing tuples') tuples.push({ ...tuple, id: `tuple-${index}` }); + } + return reply(200, {}); + } + if (path === tuplesPath && request.method === 'GET') { + expect([...url.searchParams.keys()].sort()).toStrictEqual([ + 'object', + 'relation', + 'subject', + 'tenant', + ]); + const values = tuples.filter((tuple) => + [...url.searchParams].every(([key, value]) => tuple[key] === value), + ); + return reply( + 200, + fault === 'tuple fields' ? values.map((tuple) => ({ ...tuple, id: null })) : values, + ); + } + if (path === bulkUsersPath) { + if (request.method === 'POST' || request.method === 'PUT') { + expect(Object.keys(body)).toStrictEqual(['operations']); + expect(body.operations).toHaveLength(2); + for (const user of body.operations) { + expect(user.key).toMatch(/^bulk_user_maya_/); + if (request.method === 'PUT') expect(['1', '2']).toContain(user.first_name); + if (fault === 'missing users' && request.method === 'POST') continue; + if (fault === 'unchanged replacement' && request.method === 'PUT') continue; + users.set(user.key, { ...user, id: user.key }); + } + return reply(200, {}); + } + if (request.method === 'DELETE') { + expect(Object.keys(body)).toStrictEqual(['idents']); + expect(body.idents).toHaveLength(2); + for (const key of body.idents) { + expect(users.has(key)).toBe(true); + users.delete(key); + } + return reply(200, {}); + } + } + if (path === usersPath && request.method === 'GET') { + expect([...url.searchParams.keys()]).toStrictEqual(['search']); + const search = url.searchParams.get('search'); + expect(search).toMatch(/^bulk_user_maya_/); + const data = [...users.values()].filter((user) => user.key.includes(search)); + return reply(200, { data, total_count: data.length }); + } + if (path.startsWith(`${usersPath}/`)) { + const key = path.slice(usersPath.length + 1); + expect(key).toMatch(/^bulk_user_maya_/); + if (request.method === 'DELETE') { + const deleted = users.delete(key); + return reply(deleted ? 204 : 404, deleted ? undefined : { message: 'absent' }); + } + if (request.method === 'GET') { + return reply(users.has(key) ? 200 : 404, users.get(key) ?? { message: 'absent' }); + } + } + throw new Error(`Unqueued bulk fixture request: ${request.method} ${path}`); + } catch (error) { + failures.push(error); + response.writeHead(500).end('{"message":"bulk fixture failed"}'); + } + }); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished(async () => { + await new Promise((resolve) => server.close(resolve)); + expect(failures).toStrictEqual([]); + }); + return { + url: `http://127.0.0.1:${server.address().port}`, + requests, + resources, + users, + instances, + tuples, + }; +} + +async function runBulk(fixture) { + const directory = mkdtempSync(join(tmpdir(), 'permit-bulk-fixture-')); + const output = join(directory, 'report.json'); + onTestFinished(() => { + unlinkSync(output); + rmdirSync(directory); + }); + const child = spawn( + process.execPath, + [ + join(root, 'node_modules/vitest/vitest.mjs'), + 'run', + '--project', + 'e2e', + 'src/tests/e2e/bulk.e2e.spec.ts', + '--testTimeout=2000', + '--hookTimeout=5000', + '--maxWorkers=1', + '--reporter=json', + `--outputFile=${output}`, + ], + { + cwd: root, + env: { + ...process.env, + PDP_API_KEY: 'fixture-key', + PDP_CONTROL_PLANE: fixture.url, + PDP_URL: fixture.url, + NO_PROXY: '127.0.0.1', + }, + stdio: ['ignore', 'pipe', 'pipe'], + }, + ); + let diagnostics = ''; + child.stdout.on('data', (chunk) => { + diagnostics += chunk; + }); + child.stderr.on('data', (chunk) => { + diagnostics += chunk; + }); + const timer = setTimeout(() => child.kill(), 15_000); + const code = await new Promise((resolve, reject) => { + child.once('error', reject); + child.once('exit', resolve); + }).finally(() => clearTimeout(timer)); + return { code, diagnostics, report: JSON.parse(readFileSync(output, 'utf8')) }; +} + +function expectClean(fixture) { + expect(fixture.resources.size).toBe(0); + expect(fixture.users.size).toBe(0); + expect(fixture.instances.size).toBe(0); + expect(fixture.tuples).toStrictEqual([]); + for (const request of fixture.requests.filter( + (entry) => entry.method === 'DELETE' && entry.path !== bulkUsersPath, + )) { + expect( + fixture.requests + .slice(fixture.requests.indexOf(request) + 1) + .some((read) => read.method === 'GET' && read.path === request.path && read.status === 404), + ).toBe(true); + } +} + +test('the actual bulk suite proves persisted tuples, create, replace, delete and cleanup', async () => { + const fixture = await bulkFixture(); + const run = await runBulk(fixture); + expect(run.code, run.diagnostics).toBe(0); + expect(run.report).toMatchObject({ success: true, numPassedTests: 4, numPendingTests: 0 }); + expect(fixture.requests).toHaveLength(33); + expect(fixture.requests.filter((request) => request.path === '/v2/api-key/scope')).toHaveLength( + 1, + ); + expect( + fixture.requests.filter((request) => request.method === 'GET' && request.path === tuplesPath), + ).toHaveLength(2); + expect( + fixture.requests.filter((request) => request.method === 'GET' && request.path === usersPath), + ).toHaveLength(6); + expectClean(fixture); +}, 20_000); + +test.each([ + ['missing tuples', 'Bulk relationship tuples test'], + ['missing users', 'Bulk users test'], + ['unchanged replacement', 'Bulk users replace test'], + ['tuple fields', 'Bulk relationship tuples test'], +])( + 'an accepted bulk write with %s fails the actual suite and still cleans up', + async (fault, failedTest) => { + const fixture = await bulkFixture(fault); + const run = await runBulk(fixture); + expect(run.code, run.diagnostics).toBe(1); + expect(run.report).toMatchObject({ success: false, numFailedTests: 1 }); + const failures = run.report.testResults + .flatMap((file) => file.assertionResults) + .filter((entry) => entry.status === 'failed'); + expect(failures.map((entry) => entry.fullName)).toStrictEqual([failedTest]); + const messages = failures.flatMap((entry) => entry.failureMessages).join('\n'); + expect(messages).toMatch(fault === 'tuple fields' ? /string|String/ : /timed out/); + expectClean(fixture); + }, + 20_000, +); diff --git a/scripts/check-api-contracts.mjs b/scripts/check-api-contracts.mjs new file mode 100644 index 00000000..2ad22481 --- /dev/null +++ b/scripts/check-api-contracts.mjs @@ -0,0 +1,150 @@ +#!/usr/bin/env node +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; + +import { digest, extractSdk } from '#scripts/api-contracts.mjs'; +import { + coverageReport, + loadContractSources, + sourceSnapshot, + specInventory, +} from '#scripts/api-contract-report.mjs'; + +const publicSources = new Set([ + 'https://api.permit.io/v2/openapi.json', + 'https://cloudpdp.api.permit.io/openapi.json', +]); + +/** Fetches only public schema documentation, with bounded time and response size. */ +export async function fetchInventory(record, fetcher = fetch) { + if (!publicSources.has(record.url)) throw new Error(`Unapproved source URL for ${record.name}.`); + try { + const response = await fetcher(record.url, { + signal: AbortSignal.timeout(30_000), + redirect: 'error', + headers: { Accept: 'application/json' }, + }); + if (!response.ok) throw new Error(`HTTP ${response.status}`); + const maximum = 10 * 1024 * 1024; + const chunks = []; + let size = 0; + for await (const chunk of response.body) { + size += chunk.byteLength; + if (size > maximum) throw new Error('schema exceeds the 10 MiB response limit'); + chunks.push(chunk); + } + return specInventory(JSON.parse(Buffer.concat(chunks).toString('utf8')), record.name); + } catch (error) { + throw new Error(`${record.name}: cannot inspect published schema: ${error.message}`, { + cause: error, + }); + } +} + +/** Produces local evidence; live mode compares public documentation with pinned snapshots. */ +export async function inspectContracts({ root, live = false, fetcher = fetch }) { + const { sources: reviewed, provenance } = loadContractSources(root); + const baseline = JSON.parse(readFileSync(join(root, 'api-coverage/baseline.json'), 'utf8')); + if (digest(provenance) !== digest(baseline.provenance)) + throw new Error('Source provenance changed without a reviewed contract baseline update.'); + baseline.sources = Object.fromEntries( + Object.entries(reviewed).map(([name, inventory]) => [name, sourceSnapshot(inventory)]), + ); + const sources = { ...reviewed }; + if (live) { + for (const record of provenance.sources) { + if (record.url) sources[record.name] = await fetchInventory(record, fetcher); + } + } + const report = coverageReport({ + sdk: extractSdk(root), + sources, + provenance, + baseline, + decisions: JSON.parse(readFileSync(join(root, 'api-coverage/decisions.json'), 'utf8')), + }); + return { + ...report, + mode: live ? 'public-source-drift' : 'reviewed-local-inventory', + sourceProvenance: provenance.sources, + }; +} + +/** Renders evidence status and per-operation results without an overall parity percentage. */ +export function markdownReport(report) { + if (report.integrity === 'INVALID') + return `# API contract evidence\n\nIntegrity: INVALID\n\n${report.error}\n`; + const lines = [ + '# API contract evidence', + '', + `Local integrity: **${report.integrity}**. Coverage: **${report.coverage}**.`, + `Shared target: **${report.sharedTarget.status}** (${report.sharedTarget.owner}).`, + `Real backend: **${report.realBackend.status}** — ${report.realBackend.reason}`, + '', + report.shapeEvidence, + '', + '| Source | Published operations | Primary exposed | Generated only | Supporting only | Missing |', + '| --- | ---: | ---: | ---: | ---: | ---: |', + ]; + for (const source of report.sourceProvenance) { + const rows = report.operations.filter((operation) => operation.source === source.name); + const count = (status) => rows.filter((operation) => operation.coverage === status).length; + lines.push( + `| ${source.name} | ${rows.length} | ${count('exposed')} | ${count('generated-only')} | ${count('supporting-only')} | ${count('missing') + count('deprecated-only')} |`, + ); + } + lines.push('', '## Failures', ''); + if (!report.failures.length) + lines.push('No local inventory or reviewed-contract drift detected.'); + for (const failure of report.failures) + lines.push(`- ${failure.kind}: ${failure.path} — ${failure.reason}`); + lines.push( + '', + '## Operations', + '', + '| Source and operation | Evidence | Decision / owner |', + '| --- | --- | --- |', + ); + for (const operation of report.operations) + lines.push( + `| ${operation.source}: ${operation.method} ${operation.path} | ${operation.lifecycle}; ${operation.coverage}; backend NOT_MEASURED | ${operation.decision?.action ?? 'UNDECIDED'} / ${operation.decision?.owner ?? 'unassigned'} |`, + ); + return lines.join('\n') + '\n'; +} + +/** Returns 0 for consistent local evidence, 1 for drift, and 2 for invalid/incomplete input. */ +export async function main( + args = process.argv.slice(2), + root = resolve(import.meta.dirname, '..'), +) { + let report; + let output = resolve(root, 'coverage/api-contracts'); + try { + let live = false; + for (let index = 0; index < args.length; index++) { + const arg = args[index]; + if (arg === '--live') live = true; + else if (arg === '--output' && args[index + 1]) output = resolve(args[++index]); + else + throw new Error(`Unknown or incomplete option ${arg}. Use --live or --output DIRECTORY.`); + } + report = await inspectContracts({ root, live }); + } catch (error) { + report = { integrity: 'INVALID', error: error.message }; + } + try { + mkdirSync(output, { recursive: true }); + writeFileSync(join(output, 'report.json'), JSON.stringify(report, null, 2) + '\n'); + writeFileSync(join(output, 'report.md'), markdownReport(report)); + } catch (error) { + console.error(`Cannot save API evidence in ${output}: ${error.message}`); + return 2; + } + console.log(`API contract evidence: ${report.integrity}; report: ${join(output, 'report.md')}`); + if (report.integrity === 'INVALID') console.error(report.error); + return report.integrity === 'PASS' ? 0 : report.integrity === 'FAIL' ? 1 : 2; +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) + process.exitCode = await main(); diff --git a/scripts/check-codegen.mjs b/scripts/check-codegen.mjs index c4a69ecb..7401c99f 100644 --- a/scripts/check-codegen.mjs +++ b/scripts/check-codegen.mjs @@ -1,250 +1,37 @@ #!/usr/bin/env node -/* - * Regenerate the pinned OpenAPI 3.1 fixture using the repository's generator and - * package-script options. Check completion, named properties, unexpected `any`, - * and representative 3.1 null unions. This requires Java; the AVA regression tests - * mock only the generator process and run without Java. See the fixture README. - */ -import { execFileSync } from 'node:child_process'; -import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync } from 'node:fs'; -import { createRequire } from 'node:module'; -import { dirname, join, relative } from 'node:path'; +import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; -const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..'); -const FIXTURE = 'src/tests/codegen/fixtures/openapi-3.1.0.json'; -const WRAPPER = join(ROOT, 'node_modules/@openapitools/openapi-generator-cli/main.js'); +import { generateOpenApi, generatorOptions } from '#scripts/openapi-generator.mjs'; +import { assertModelShapes } from '#scripts/openapi-shapes.mjs'; +import { prepareOpenApi } from '#scripts/openapi-source.mjs'; -// These individual properties are intentionally unconstrained in the pinned API spec. -// No entire model is exempt from the checks below. -const FREE_FORM = new Set([ - 'audit-log-model.ts:input', - 'audit-log-model.ts:result', - 'audit-log-model.ts:context', - 'detailed-audit-log-model.ts:input', - 'detailed-audit-log-model.ts:result', - 'detailed-audit-log-model.ts:context', - 'error-details.ts:additional_info', - 'generic-engine-decision-log.ts:input', - 'generic-engine-decision-log.ts:result', - 'generic-engine-decision-log.ts:context', - 'jsonpatch-action.ts:value', - 'opaengine-decision-log.ts:input', - 'opaengine-decision-log.ts:result', - 'opalhttp-fetcher-config.ts:data', - 'raw-data.ts:input', - 'raw-data.ts:result', - 'raw-data.ts:context', - 'raw-data1.ts:input', - 'raw-data1.ts:result', - 'raw-data1.ts:context', -]); -const EXPECTED = { - 'role-create.ts:key': 'string', - 'role-create.ts:extends': 'Array', - 'resource-role-create.ts:extends': 'Array', - 'group-assign-user.ts:tenant': 'string', - 'tenant-obj.ts:id': 'string', - 'user-obj.ts:id': 'string', - 'action-obj.ts:id': 'string', - 'codegen-probe.ts:nullable_string': 'string|null', - 'codegen-probe.ts:nullable_any_of': 'string|null', - 'codegen-probe.ts:nullable_ref': 'CodegenProbeInner|null', - 'codegen-probe.ts:nullable_array': 'Array|null', -}; - -function readJson(path) { - try { - return JSON.parse(readFileSync(path, 'utf8')); - } catch (err) { - throw new Error(`Cannot read JSON at ${path}: ${err.message}. Restore or repair this file.`); - } -} - -function generateOptions() { - const script = readJson(join(ROOT, 'package.json')).scripts?.['generate-openapi-client']; - const tokens = typeof script === 'string' ? script.split('&&')[0].trim().split(/\s+/) : []; - if (tokens.shift() !== 'openapi-generator-cli' || tokens.shift() !== 'generate') { - throw new Error( - 'Expected generate-openapi-client to start with openapi-generator-cli generate.', - ); - } - const values = new Map(); - let skipValidation = false; - while (tokens.length) { - const flag = tokens.shift(); - if (['-i', '-g', '-o'].includes(flag)) { - values.set(flag, tokens.shift()); - } else if (flag.startsWith('--additional-properties=')) { - values.set('additional', flag.slice('--additional-properties='.length)); - } else if (flag === '--skip-validate-spec') { - skipValidation = true; - } else { - throw new Error( - `Unsupported generate-openapi-client option ${flag}; update the guard parser.`, - ); - } - } - const additional = values.get('additional'); - if (values.get('-g') !== 'typescript-axios' || !additional) { - throw new Error( - 'generate-openapi-client must specify -g typescript-axios and --additional-properties.', - ); - } - // The wrapper joins its arguments in a shell. Accept only unquoted option tokens. - if (!/^[\w=,.-]+$/.test(additional)) { - throw new Error('Unsupported additional-properties syntax; update the guard parser.'); - } - const modelPackage = additional.split(',').find((option) => option.startsWith('modelPackage=')); - const modelDir = modelPackage?.slice('modelPackage='.length); - if (!modelDir || !/^[\w-]+$/.test(modelDir)) { - throw new Error('generate-openapi-client must set modelPackage to a single directory name.'); - } - return { - modelDir, - args: [ - '-g', - values.get('-g'), - `--additional-properties=${additional}`, - ...(skipValidation ? ['--skip-validate-spec'] : []), - ], - }; -} - -function assertComplete(out, pin, modelDir) { - const metadata = join(out, '.openapi-generator'); - for (const name of ['VERSION', 'FILES']) { - if (!existsSync(join(metadata, name))) { - throw new Error(`Missing completion metadata ${name}; inspect the generator log and rerun.`); - } - } - const version = readFileSync(join(metadata, 'VERSION'), 'utf8').trim(); - if (version !== pin) { - throw new Error( - `Generator ran ${version}, but openapitools.json pins ${pin}. Check the wrapper.`, - ); - } - const manifest = readFileSync(join(metadata, 'FILES'), 'utf8') - .split(/\r?\n/) - .filter((file) => file.startsWith(`${modelDir}/`) && file.endsWith('.ts')) - .map((file) => file.slice(modelDir.length + 1)); - if (!manifest.length) { - throw new Error( - 'Completion manifest FILES lists no models; inspect the generator log and rerun.', - ); - } - const typesDir = join(out, modelDir); - const files = existsSync(typesDir) ? readdirSync(typesDir).filter((f) => f.endsWith('.ts')) : []; - for (const file of manifest) { - if (!files.includes(file)) { - throw new Error( - `Incomplete generation: manifest model ${file} is missing; rerun the generator.`, - ); - } - } - if (files.length !== new Set(manifest).size) { - throw new Error( - 'Generated models differ from the completion manifest FILES; rerun the generator.', - ); - } - return { typesDir, files }; -} - -function assertTypes(typesDir, files) { - const ts = createRequire(import.meta.url)('typescript'); - function containsAny(node) { - if (!node) return false; - if (node.kind === ts.SyntaxKind.AnyKeyword) return true; - // A nested dictionary is legitimate free-form data, not a collapsed model. - if (ts.isIndexSignatureDeclaration(node)) return false; - return Boolean(ts.forEachChild(node, containsAny)); - } - - const properties = new Map(); - const problems = []; - for (const file of files) { - const source = ts.createSourceFile( - file, - readFileSync(join(typesDir, file), 'utf8'), - ts.ScriptTarget.Latest, - true, - ); - if (source.parseDiagnostics.length) { - throw new Error(`Invalid generated TypeScript in ${file}; inspect the generator output.`); - } - for (const declaration of source.statements) { - if (ts.isTypeAliasDeclaration(declaration) && containsAny(declaration.type)) { - problems.push(`${file}: unexpected any in type alias ${declaration.name.text}`); - } - if (!ts.isInterfaceDeclaration(declaration)) continue; - for (const member of declaration.members) { - if (ts.isIndexSignatureDeclaration(member) && containsAny(member.type)) { - problems.push(`${file}: unexpected top-level any index signature`); - } - if (!ts.isPropertySignature(member)) continue; - const key = `${file}:${member.name.text}`; - properties.set(key, member.type?.getText(source).replace(/\s+/g, '')); - if ((!member.type || containsAny(member.type)) && !FREE_FORM.has(key)) { - problems.push(`${key}: unexpected any (named type lost)`); - } - } - } - } - for (const [key, expected] of Object.entries(EXPECTED)) { - if (properties.get(key) !== expected) { - problems.push(`${key}: expected ${expected}, got ${properties.get(key) ?? 'missing'}`); - } - } - if (problems.length) { - throw new Error( - `${problems.length} type-shape regression(s):\n ${problems.slice(0, 12).join('\n ')}\n` + - 'Inspect the fixture and models before changing the generator pin or expectations.', - ); - } -} - -let out; -let generator = ''; +const root = join(dirname(fileURLToPath(import.meta.url)), '..'); +const fixture = join(root, 'src/tests/codegen/fixtures/openapi-3.1.0.json'); +let output; +let pin = ''; try { - if (!existsSync(join(ROOT, FIXTURE))) { - throw new Error(`Fixture spec not found: ${FIXTURE}; restore the committed fixture.`); - } - if (readJson(join(ROOT, FIXTURE)).openapi !== '3.1.0') { - throw new Error('The codegen fixture must declare OpenAPI 3.1.0; do not downgrade its header.'); - } - if (!existsSync(WRAPPER)) { - throw new Error(`openapi-generator-cli not found at ${WRAPPER}; run yarn install first.`); - } - const pin = readJson(join(ROOT, 'openapitools.json'))['generator-cli']?.version; - if (typeof pin !== 'string' || !/^\d+\.\d+\.\d+$/.test(pin)) { - throw new Error('openapitools.json must pin an explicit stable generator version.'); - } - generator = ` (generator ${pin})`; - const { args, modelDir } = generateOptions(); - // Relative paths survive the wrapper's shell join even when ROOT or TMPDIR has spaces. - out = mkdtempSync(join(ROOT, 'node_modules/.codegen-')); - try { - execFileSync( - process.execPath, - [WRAPPER, 'generate', '-i', FIXTURE, '-o', relative(ROOT, out), ...args], - { cwd: ROOT, env: { ...process.env, PWD: ROOT, INIT_CWD: ROOT }, stdio: 'inherit' }, - ); - } catch (err) { - const reason = err.signal ? `signal ${err.signal}` : `exit ${err.status ?? err.code}`; - throw new Error( - `openapi-generator-cli ${pin} aborted (${reason}). ` + - 'Check Java 11+ on PATH, access to Maven Central, and the generator output above.', - ); - } - const { typesDir, files } = assertComplete(out, pin, modelDir); - assertTypes(typesDir, files); + if (!existsSync(join(root, 'node_modules'))) + throw new Error('Node dependencies unavailable; run pnpm install first.'); + if (!existsSync(fixture)) + throw new Error('Fixture spec not found; restore the committed fixture.'); + pin = JSON.parse(readFileSync(join(root, 'openapitools.json'), 'utf8'))['generator-cli']?.version; + output = mkdtempSync(join(root, 'node_modules/.codegen-')); + const input = join(output, 'input.json'); + writeFileSync(input, JSON.stringify(prepareOpenApi(JSON.parse(readFileSync(fixture, 'utf8'))))); + const generated = join(output, 'generated'); + await generateOpenApi({ root, input, output: generated }); + const types = join(generated, generatorOptions(root).additionalProperties.modelPackage); + const files = readdirSync(types).filter((file) => file.endsWith('.ts')); + await assertModelShapes(types, files, { fixture: true }); console.log( `codegen guard OK - generator ${pin}; ${files.length} models checked for unexpected any; ` + - `${Object.keys(EXPECTED).length} property shapes verified`, + '32 property shapes and 20 field requiredness checks verified', ); -} catch (err) { - console.error(`codegen guard FAILED${generator}:\n${err.message}`); +} catch (error) { + console.error(`codegen guard FAILED (generator ${pin}):\n${error.message}`); process.exitCode = 1; } finally { - if (out) rmSync(out, { recursive: true, force: true }); + if (output) rmSync(output, { recursive: true, force: true }); } diff --git a/scripts/check-codegen.spec.mjs b/scripts/check-codegen.spec.mjs index fd154bc3..03af5c41 100644 --- a/scripts/check-codegen.spec.mjs +++ b/scripts/check-codegen.spec.mjs @@ -1,7 +1,8 @@ -import test from 'ava'; +import { createHash } from 'node:crypto'; import { spawnSync } from 'node:child_process'; import { copyFileSync, + existsSync, mkdirSync, mkdtempSync, readFileSync, @@ -15,15 +16,88 @@ import { tmpdir } from 'node:os'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; +import { expect, onTestFinished, test } from 'vitest'; + const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); -const packageJson = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); +const generatorConfig = JSON.parse(readFileSync(join(root, 'openapi/generator.json'), 'utf8')); +const groupDescription = + 'Either the unique id of the resource instance that the group belongs to, or the ' + + 'URL-friendly key of the (i.e: file:my_file)'; +const correctedComments = Object.fromEntries( + [ + [ + 'data-generator-lib-schemas-schema-opal-data-derivation-settings', + 'superseded_by_direct_role', + 'boolean', + 'If True, the derived role is superseded by a direct role. Meaning role derivation is ' + + 'not considered if the user has a direct role.', + ], + ...['group-assignment', 'group-create', 'group-read-schema'].map((file) => [ + file, + 'group_instance_key', + 'string', + groupDescription, + ]), + [ + 'tenant-block-read', + 'attributes', + 'object', + 'Arbitrary tenant attributes that will be used to enforce attribute-based ' + + 'access control policies.', + ], + ].map(([file, property, type, description]) => [ + file + '.ts', + `export interface Model { + /** + * ${description} + */ + '${property}'?: ${type}; +}`, + ]), +); const cleanTypes = { + 'task-result-environment-read.ts': `export interface TaskResultEnvironmentRead { + task_id: string; + status: TaskStatus; + result?: EnvironmentRead | null; + error?: ErrorDetails | null; + }`, + 'apikey-read.ts': `export interface APIKeyRead { + organization_id: string; + owner_type: APIKeyOwnerType; + id: string; + created_at: string; + project_id?: string | null; + environment_id?: string | null; + object_type?: MemberAccessObj | null; + access_level?: MemberAccessLevel | null; + name?: string | null; + secret?: string | null; + created_by_member?: OrgMemberRead | null; + last_used_at?: string | null; + env?: EnvironmentRead | null; + project?: ProjectRead | null; + }`, + 'paginated-result-apikey-read.ts': `export interface PaginatedResultAPIKeyRead { + data: Array; + total_count: number; + page_count?: number | null; + }`, + + 'apikey-scope-read.ts': `export interface APIKeyScopeRead { + organization_id: string; + project_id?: string | null; + environment_id?: string | null; + }`, + ...correctedComments, + 'callbacks-inner.ts': 'export type CallbacksInner = Array | string;', 'role-create.ts': "export interface RoleCreate { 'key': string; 'extends'?: Array; }", 'resource-role-create.ts': "export interface ResourceRoleCreate { 'extends'?: Array; }", 'group-assign-user.ts': "export interface GroupAssignUser { 'tenant': string; }", 'tenant-obj.ts': "export interface TenantObj { 'id': string; }", 'user-obj.ts': "export interface UserObj { 'id': string; }", 'action-obj.ts': "export interface ActionObj { 'id': string; }", + 'monthly-usage.ts': "export interface MonthlyUsage { 'monthly_tenants'?: Array; }", 'codegen-probe.ts': `export interface CodegenProbe { 'nullable_string'?: string | null; 'nullable_any_of'?: string | null; @@ -33,12 +107,14 @@ const cleanTypes = { }; // Only the external generator is mocked; the CLI, filesystem and type checks are real. -const wrapper = `#!/usr/bin/env node +const javaFixture = `#!${process.execPath} const fs = require('fs'); const path = require('path'); const config = JSON.parse(fs.readFileSync('mock-generator.json')); fs.writeFileSync('invocation.json', JSON.stringify({args: process.argv.slice(2), cwd: process.cwd(), pwd: process.env.PWD, initCwd: process.env.INIT_CWD})); +if (config.warning) console.warn(config.warning); +if (config.stderr) console.error(config.stderr); if (config.exit) process.exit(config.exit); if (config.signal) process.kill(process.pid, config.signal); const out = process.argv[process.argv.indexOf('-o') + 1]; @@ -49,33 +125,59 @@ for (const [name, source] of Object.entries(config.types)) { fs.writeFileSync(path.join(types, name), source); } for (let i = Object.keys(config.types).length; i < 344; i++) { - fs.writeFileSync(path.join(types, 'filler-' + i + '.ts'), 'export interface Filler {}'); + fs.writeFileSync(path.join(types, 'filler-' + i + '.ts'), 'export interface Filler { value: string; }'); } +fs.writeFileSync(path.join(out, 'common.ts'), "export const createRequestFunction = () => { return (axios, basePath): Promise => { const url = (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url; return axios.request(axiosRequestArgs) as Promise; }; };"); const meta = path.join(out, '.openapi-generator'); fs.mkdirSync(meta, {recursive: true}); if (!config.noVersion) fs.writeFileSync(path.join(meta, 'VERSION'), config.version || '7.25.0'); if (!config.noManifest) { - const entries = fs.readdirSync(types).map(f => modelPackage + '/' + f); + const entries = ['common.ts', ...fs.readdirSync(types).map(f => modelPackage + '/' + f)]; if (config.missingFile) entries.push(modelPackage + '/missing.ts'); fs.writeFileSync(path.join(meta, 'FILES'), config.emptyManifest ? '' : entries.join('\\n')); } `; -function setup(t, changes = {}) { +function setup(changes = {}) { const dir = realpathSync(mkdtempSync(join(tmpdir(), 'codegen test '))); - t.teardown(() => rmSync(dir, { recursive: true, force: true })); - for (const name of ['scripts', 'src/tests/codegen/fixtures', 'node_modules/.bin']) { + onTestFinished(() => rmSync(dir, { recursive: true, force: true })); + for (const name of ['scripts', 'openapi', 'src/tests/codegen/fixtures', 'mock-java/bin']) { mkdirSync(join(dir, name), { recursive: true }); } - copyFileSync(join(root, 'scripts/check-codegen.mjs'), join(dir, 'scripts/check-codegen.mjs')); - symlinkSync(join(root, 'node_modules/typescript'), join(dir, 'node_modules/typescript'), 'dir'); - const wrapperDir = join(dir, 'node_modules/@openapitools/openapi-generator-cli'); - mkdirSync(wrapperDir, { recursive: true }); - writeFileSync(join(wrapperDir, 'main.js'), wrapper, { mode: 0o755 }); - symlinkSync(join(wrapperDir, 'main.js'), join(dir, 'node_modules/.bin/openapi-generator-cli')); - writeFileSync(join(dir, 'package.json'), JSON.stringify(packageJson)); + for (const file of [ + 'check-codegen.mjs', + 'openapi-generator.mjs', + 'openapi-shapes.mjs', + 'openapi-source.mjs', + 'package.json', + ]) { + copyFileSync(join(root, 'scripts', file), join(dir, 'scripts', file)); + } + writeFileSync(join(dir, 'openapi/generator.json'), JSON.stringify(generatorConfig)); + mkdirSync(join(dir, 'node_modules/@permitio'), { recursive: true }); + symlinkSync( + join(root, 'tools/compiler'), + join(dir, 'node_modules/@permitio/compiler-tools'), + 'dir', + ); + const cache = join(dir, 'node_modules/.cache/openapi-generator'); + mkdirSync(cache, { recursive: true }); + const jar = 'reviewed fixture JAR'; + writeFileSync(join(cache, '7.25.0.jar'), jar); + writeFileSync( + join(dir, 'openapi/provenance.json'), + JSON.stringify({ + generator: '7.25.0', + generatorSha256: createHash('sha256').update(jar).digest('hex'), + }), + ); + writeFileSync(join(dir, 'mock-java/bin/java'), javaFixture, { mode: 0o755 }); + writeFileSync(join(dir, 'package.json'), '{"type":"commonjs"}'); writeFileSync(join(dir, 'openapitools.json'), '{"generator-cli":{"version":"7.25.0"}}'); - writeFileSync(join(dir, 'src/tests/codegen/fixtures/openapi-3.1.0.json'), '{"openapi":"3.1.0"}'); + copyFileSync( + join(root, 'src/tests/codegen/fixtures/openapi-3.1.0.json'), + join(dir, 'src/tests/codegen/fixtures/openapi-3.1.0.json'), + ); const config = { types: { ...cleanTypes }, ...changes }; writeFileSync(join(dir, 'mock-generator.json'), JSON.stringify(config)); return dir; @@ -84,56 +186,90 @@ function setup(t, changes = {}) { function run(dir, env = {}) { const result = spawnSync(process.execPath, [join(dir, 'scripts/check-codegen.mjs')], { cwd: tmpdir(), - env: { ...process.env, PWD: tmpdir(), INIT_CWD: tmpdir(), ...env }, + env: { + ...process.env, + PWD: tmpdir(), + INIT_CWD: tmpdir(), + JAVA_HOME: join(dir, 'mock-java'), + ...env, + }, encoding: 'utf8', }); return { ...result, output: result.stdout + result.stderr }; } -function fails(t, dir, pattern) { +function fails(dir, pattern) { const result = run(dir); - t.is(result.status, 1, result.output); - t.regex(result.output, pattern); - t.false(result.output.includes('codegen guard OK')); - t.deepEqual( + expect(result.status, result.output).toBe(1); + expect(result.output).toMatch(pattern); + expect(result.output.includes('codegen guard OK')).toBe(false); + expect( readdirSync(join(dir, 'node_modules')).filter((f) => f.startsWith('.codegen-')), - [], - ); + ).toStrictEqual([]); } -test('uses the repository pin from another directory and relative paths with spaces', (t) => { - const dir = setup(t); +test('uses the repository pin from another directory and relative paths with spaces', () => { + const dir = setup(); const result = run(dir, { TMPDIR: dir }); - t.is(result.status, 0, result.output); - t.regex(result.output, /7\.25\.0/); + expect(result.status, result.output).toBe(0); + expect(result.output).toMatch(/7\.25\.0/); const invocation = JSON.parse(readFileSync(join(dir, 'invocation.json'), 'utf8')); - t.is(invocation.pwd, dir); - t.is(invocation.initCwd, dir); + expect(invocation.pwd).toBe(dir); + expect(invocation.initCwd).toBe(dir); + expect(invocation.args.slice(0, 3)).toEqual([ + '-jar', + 'node_modules/.cache/openapi-generator/7.25.0.jar', + 'generate', + ]); for (const flag of ['-i', '-o']) { - t.false(invocation.args[invocation.args.indexOf(flag) + 1].includes(' ')); + expect(invocation.args[invocation.args.indexOf(flag) + 1].includes(' ')).toBe(false); } - t.deepEqual( + expect( readdirSync(join(dir, 'node_modules')).filter((f) => f.startsWith('.codegen-')), - [], - ); + ).toStrictEqual([]); +}); + +test('uses Java from PATH when JAVA_HOME is unset', () => { + const dir = setup(); + const result = run(dir, { + JAVA_HOME: '', + PATH: join(dir, 'mock-java/bin') + ':' + process.env.PATH, + }); + expect(result.status, result.output).toBe(0); + expect(existsSync(join(dir, 'invocation.json'))).toBe(true); +}); + +test('reports a missing Java executable with an actionable fix', () => { + const dir = setup(); + rmSync(join(dir, 'mock-java/bin/java')); + fails(dir, /Cannot execute Java.*ENOENT.*install Java 17.*JAVA_HOME or PATH/); + expect(existsSync(join(dir, 'invocation.json'))).toBe(false); }); -test('invokes the Node entry point without requiring a platform-specific bin shim', (t) => { - const dir = setup(t); - rmSync(join(dir, 'node_modules/.bin/openapi-generator-cli')); - t.is(run(dir).status, 0); +test('a failed Java invocation retains its exit status and diagnostic', () => { + const dir = setup({ exit: 17, stderr: 'fixture Java failure' }); + fails(dir, /exit 17/); + expect(run(dir).output).toMatch(/fixture Java failure/); +}); + +test('changed artifact provenance prevents Java execution', () => { + const dir = setup(); + const file = join(dir, 'openapi/provenance.json'); + const provenance = JSON.parse(readFileSync(file, 'utf8')); + writeFileSync(file, JSON.stringify({ ...provenance, generator: '7.26.0' })); + fails(dir, /pin and reviewed artifact provenance disagree/); + expect(existsSync(join(dir, 'invocation.json'))).toBe(false); }); for (const [label, file, pattern] of [ ['fixture', 'src/tests/codegen/fixtures/openapi-3.1.0.json', /fixture.*not found/i], - ['wrapper', 'node_modules/@openapitools/openapi-generator-cli/main.js', /yarn install/], ['pin', 'openapitools.json', /openapitools.json/], ]) { - test(`reports a missing ${label} without blaming generator compatibility`, (t) => { - const dir = setup(t); + test(`reports a missing ${label} without blaming generator compatibility`, () => { + const dir = setup(); rmSync(join(dir, file)); - fails(t, dir, pattern); - t.notRegex(run(dir).output, /must pin a 3.1-native/); + fails(dir, pattern); + expect(run(dir).output).not.toMatch(/must pin a 3.1-native/); }); } @@ -146,7 +282,7 @@ for (const [label, changes, pattern] of [ ['missing generated file', { missingFile: true }, /missing\.ts/], ['wrong generator version', { version: '6.2.1' }, /6\.2\.1.*7\.25\.0/], ]) { - test(`rejects ${label}`, (t) => fails(t, setup(t, changes), pattern)); + test(`rejects ${label}`, () => fails(setup(changes), pattern)); } for (const [label, source] of [ @@ -155,22 +291,22 @@ for (const [label, source] of [ ['array of any', "export interface ProjectObj { 'id': Array; }"], ['whole-model collapse', 'export interface ProjectObj {\n [key: string]: any;\n}'], ]) { - test(`rejects ${label} outside the original canaries`, (t) => { + test(`rejects ${label} outside the original canaries`, () => { const types = { ...cleanTypes, 'project-obj.ts': source }; - fails(t, setup(t, { types }), /project-obj\.ts/); + fails(setup({ types }), /project-obj\.ts/); }); } -test('names the pinned generator when type shapes regress', (t) => { +test('names the pinned generator when type shapes regress', () => { const types = { ...cleanTypes, 'project-obj.ts': "export interface ProjectObj { 'id': any; }" }; - const dir = setup(t, { types }); - fails(t, dir, /FAILED \(generator 7\.25\.0\)/); + const dir = setup({ types }); + fails(dir, /FAILED \(generator 7\.25\.0\)/); }); for (const file of ['role-create.ts', 'resource-role-create.ts']) { - test(`rejects degraded inheritance in ${file}`, (t) => { + test(`rejects degraded inheritance in ${file}`, () => { const types = { ...cleanTypes, [file]: cleanTypes[file].replace('Array', 'any') }; - fails(t, setup(t, { types }), /extends/); + fails(setup({ types }), /extends/); }); } @@ -180,68 +316,87 @@ for (const [label, value] of [ ['degraded', "export interface TenantObj { 'id': any; }"], ['wrong scalar', "export interface TenantObj { 'id': number; }"], ]) { - test(`rejects a ${label} canary`, (t) => { + test(`rejects a ${label} canary`, () => { const types = { ...cleanTypes, 'tenant-obj.ts': value }; - fails(t, setup(t, { types }), /tenant-obj\.ts/); + fails(setup({ types }), /tenant-obj\.ts/); }); } -test('rejects lost OpenAPI 3.1 nullability', (t) => { +test('rejects lost OpenAPI 3.1 nullability', () => { const types = { ...cleanTypes, 'codegen-probe.ts': cleanTypes['codegen-probe.ts'].replace('string | null', 'string'), }; - fails(t, setup(t, { types }), /nullable_string/); + fails(setup({ types }), /nullable_string/); }); -test('allows nested free-form dictionaries and comments mentioning index signatures', (t) => { +test('rejects Set output for the monthly tenants JSON array', () => { + const types = { + ...cleanTypes, + 'monthly-usage.ts': "export interface MonthlyUsage { 'monthly_tenants'?: Set; }", + }; + fails(setup({ types }), /monthly-usage\.ts:monthly_tenants: expected Array/); +}); + +test('allows nested free-form dictionaries and comments mentioning index signatures', () => { const types = { ...cleanTypes, 'metadata.ts': `/** [key: string]: any; */ export interface Metadata { 'key': string; 'metadata'?: { [key: string]: any; }; }`, 'audit-log-model.ts': "export interface AuditLogModel { 'input': any; }", }; - const result = run(setup(t, { types })); - t.is(result.status, 0, result.output); - t.notRegex(result.output, /fully typed/); + const result = run(setup({ types })); + expect(result.status, result.output).toBe(0); + expect(result.output).not.toMatch(/fully typed/); }); -test('reads additional properties and validation flags from the package script', (t) => { - const dir = setup(t, { modelPackage: 'models' }); - const pkg = structuredClone(packageJson); - pkg.scripts['generate-openapi-client'] = pkg.scripts['generate-openapi-client'] - .replace('modelPackage=types', 'modelPackage=models,stringEnums=true') - .replace(' --skip-validate-spec', ''); - writeFileSync(join(dir, 'package.json'), JSON.stringify(pkg)); +test('reads the shared generator configuration with validation enabled', () => { + const dir = setup({ modelPackage: 'models' }); + const config = structuredClone(generatorConfig); + config.additionalProperties.modelPackage = 'models'; + config.additionalProperties.stringEnums = true; + writeFileSync(join(dir, 'openapi/generator.json'), JSON.stringify(config)); const result = run(dir); - t.is(result.status, 0, result.output); + expect(result.status, result.output).toBe(0); const { args } = JSON.parse(readFileSync(join(dir, 'invocation.json'), 'utf8')); - t.true(args.some((arg) => arg.includes('modelPackage=models,stringEnums=true'))); - t.false(args.includes('--skip-validate-spec')); + expect(args[args.indexOf('-c') + 1]).toBe('openapi/generator.json'); + expect(args[args.indexOf('-t') + 1]).toBe('openapi/templates'); + expect(args.includes('--skip-validate-spec')).toBe(false); }); -for (const [label, transform, pattern] of [ - ['generator flag', (s) => s.replace('-g typescript-axios', ''), /generate-openapi-client/], - ['additional properties', (s) => s.replace(/--additional-properties=\S+/, ''), /additional/], - ['unknown flag', (s) => s.replace(' -g ', ' --unknown-option -g '), /unsupported|unknown/i], +for (const [label, changes, pattern] of [ + ['generator', { generatorName: 'java' }, /typescript-axios/], + ['additional properties', { additionalProperties: undefined }, /apiPackage/], + ['unknown option', { unknown: true }, /unsupported/i], + [ + 'unsafe model directory', + { additionalProperties: { apiPackage: 'api', modelPackage: '$HOME' } }, + /modelPackage/, + ], + [ + 'nested model directory', + { additionalProperties: { apiPackage: 'api', modelPackage: '..' } }, + /modelPackage/, + ], ]) { - test(`rejects an unsupported package script: ${label}`, (t) => { - const dir = setup(t); - const pkg = structuredClone(packageJson); - pkg.scripts['generate-openapi-client'] = transform(pkg.scripts['generate-openapi-client']); - writeFileSync(join(dir, 'package.json'), JSON.stringify(pkg)); - fails(t, dir, pattern); + test(`rejects unsupported generator configuration: ${label}`, () => { + const dir = setup(); + writeFileSync( + join(dir, 'openapi/generator.json'), + JSON.stringify({ ...generatorConfig, ...changes }), + ); + fails(dir, pattern); }); } -test('rejects a downgraded fixture header', (t) => { - const dir = setup(t); +test('rejects a downgraded fixture header', () => { + const dir = setup(); writeFileSync(join(dir, 'src/tests/codegen/fixtures/openapi-3.1.0.json'), '{"openapi":"3.0.3"}'); - fails(t, dir, /3\.1\.0/); + fails(dir, /3\.1\.0/); }); for (const [label, file, content, pattern] of [ - ['invalid JSON', 'openapitools.json', '{', /Cannot read JSON.*openapitools.json/], + ['invalid JSON', 'openapitools.json', '{', /JSON/], ['missing version', 'openapitools.json', '{}', /explicit stable generator version/], [ 'non-numeric version', @@ -249,63 +404,172 @@ for (const [label, file, content, pattern] of [ '{"generator-cli":{"version":"latest"}}', /explicit stable generator version/, ], - ['missing script', 'package.json', '{}', /generate-openapi-client/], + ['missing generator', 'openapi/generator.json', '{}', /typescript-axios/], ]) { - test(`rejects ${label} before generation`, (t) => { - const dir = setup(t); + test(`rejects ${label} before generation`, () => { + const dir = setup(); writeFileSync(join(dir, file), content); - fails(t, dir, pattern); - }); -} - -for (const [label, transform, pattern] of [ - ['unsafe options', (s) => s.replace('modelPackage=types', 'modelPackage=$HOME'), /syntax/], - ['missing model directory', (s) => s.replace(',modelPackage=types', ''), /modelPackage/], - [ - 'nested model directory', - (s) => s.replace('modelPackage=types', 'modelPackage=..'), - /modelPackage/, - ], -]) { - test(`rejects ${label}`, (t) => { - const dir = setup(t); - const pkg = structuredClone(packageJson); - pkg.scripts['generate-openapi-client'] = transform(pkg.scripts['generate-openapi-client']); - writeFileSync(join(dir, 'package.json'), JSON.stringify(pkg)); - fails(t, dir, pattern); + fails(dir, pattern); }); } for (const [label, source, pattern] of [ + ['empty interface', 'export interface Example {}', /empty interface/], ['type alias collapse', 'export type Example = any;', /type alias Example/], ['untyped property', 'export interface Example { key; }', /example.ts:key/], ['invalid TypeScript', 'export interface Example {', /Invalid generated TypeScript/], ]) { - test(`rejects ${label}`, (t) => { + test(`rejects ${label}`, () => { const types = { ...cleanTypes, 'example.ts': source }; - fails(t, setup(t, { types }), pattern); + fails(setup({ types }), pattern); }); } -test('rejects model files missing from the completion manifest', (t) => { - const dir = setup(t); - const path = join(dir, 'node_modules/@openapitools/openapi-generator-cli/main.js'); - writeFileSync(path, wrapper + "\nfs.writeFileSync(path.join(types, 'unlisted.ts'), '');"); - fails(t, dir, /differ from the completion manifest/); +test('rejects model files missing from the completion manifest', () => { + const dir = setup(); + const path = join(dir, 'mock-java/bin/java'); + writeFileSync(path, javaFixture + "\nfs.writeFileSync(path.join(types, 'unlisted.ts'), '');"); + fails(dir, /differ from the completion manifest/); }); -test('rejects a missing model directory after reported completion', (t) => { - const dir = setup(t); - const path = join(dir, 'node_modules/@openapitools/openapi-generator-cli/main.js'); - writeFileSync(path, wrapper + '\nfs.rmSync(types, {recursive: true});'); - fails(t, dir, /Incomplete generation/); +test('rejects a missing model directory after reported completion', () => { + const dir = setup(); + const path = join(dir, 'mock-java/bin/java'); + writeFileSync(path, javaFixture + '\nfs.rmSync(types, {recursive: true});'); + fails(dir, /Incomplete generation/); }); -test('reports yarn install when all node dependencies are missing', (t) => { - const dir = setup(t); +test('reports pnpm install when all node dependencies are missing', () => { + const dir = setup(); rmSync(join(dir, 'node_modules'), { recursive: true }); const result = run(dir); - t.is(result.status, 1); - t.regex(result.output, /yarn install/); - t.notRegex(result.output, /ERR_MODULE_NOT_FOUND/); + expect(result.status).toBe(1); + expect(result.output).toMatch(/pnpm install/); + expect(result.output).not.toMatch(/ERR_MODULE_NOT_FOUND/); +}); + +test('rejects an unexpected successful generator warning', () => { + fails( + setup({ warning: '[main] WARN unsupported schema keyword' }), + /Unexpected generator diagnostic/, + ); +}); + +test('does not accept a known diagnostic promoted to an error', () => { + fails( + setup({ warning: '[main] ERROR Failed to get the schema name: null' }), + /Unexpected generator diagnostic/, + ); +}); + +test('rejects changed tuple output instead of applying a stale repair', () => { + fails( + setup({ + types: { ...cleanTypes, 'callbacks-inner.ts': 'export type CallbacksInner = string;' }, + }), + /tuple generator behavior changed/, + ); +}); + +test('rejects changed routing output instead of applying a stale compatibility correction', () => { + const dir = setup(); + const path = join(dir, 'mock-java/bin/java'); + writeFileSync( + path, + javaFixture + + "\nfs.writeFileSync(require('path').join(out, 'common.ts'), 'export const changed = true;');", + ); + fails(dir, /Generated request routing changed/); +}); + +test('a mismatched cached JAR never executes the generator', () => { + const dir = setup(); + writeFileSync(join(dir, 'node_modules/.cache/openapi-generator/7.25.0.jar'), 'wrong archive'); + fails(dir, /Generator JAR hash differs/); + expect(existsSync(join(dir, 'invocation.json'))).toBe(false); }); + +test('rejects changed generic return code instead of concealing its type', () => { + const dir = setup(); + const path = join(dir, 'mock-java/bin/java'); + writeFileSync( + path, + javaFixture + + "\nconst file = require('path').join(out, 'common.ts'); fs.writeFileSync(file, fs.readFileSync(file, 'utf8').replace('as Promise', 'as any'));", + ); + fails(dir, /Generated Axios return type changed/); +}); + +test.each(['project_id', 'environment_id'])( + 'rejects lost API-key scope %s nullability in generated output', + (field) => { + const types = { + ...cleanTypes, + 'apikey-scope-read.ts': cleanTypes['apikey-scope-read.ts'].replace( + `${field}?: string | null`, + `${field}?: string`, + ), + }; + fails(setup({ types }), new RegExp(`apikey-scope-read\\.ts:${field}: expected string\\|null`)); + }, +); +test.each(['organization_id', 'project_id', 'environment_id'])( + 'rejects changed API-key scope %s requiredness in generated output', + (field) => { + const original = cleanTypes['apikey-scope-read.ts']; + const types = { + ...cleanTypes, + 'apikey-scope-read.ts': + field === 'organization_id' + ? original.replace('organization_id:', 'organization_id?:') + : original.replace(`${field}?:`, `${field}:`), + }; + fails(setup({ types }), new RegExp(`apikey-scope-read\\.ts:${field}: expected .* field`)); + }, +); + +test.each([ + ...[ + 'project_id', + 'environment_id', + 'object_type', + 'access_level', + 'name', + 'secret', + 'created_by_member', + 'last_used_at', + 'env', + 'project', + ].map((field) => ['apikey-read.ts', field]), + ['paginated-result-apikey-read.ts', 'page_count'], +])('rejects lost %s:%s readonly nullability in generated output', (file, field) => { + const types = { + ...cleanTypes, + [file]: cleanTypes[file].replace(new RegExp(`(${field}\\?: [^;]+) \\| null;`), '$1;'), + }; + fails(setup({ types }), new RegExp(`${file}:${field}: expected`)); +}); + +for (const field of ['result', 'error']) { + test(`rejects lost environment task ${field} nullability at the generator boundary`, () => { + const file = 'task-result-environment-read.ts'; + const types = { + ...cleanTypes, + [file]: cleanTypes[file].replace(new RegExp(`(${field}\\?: [^;]+) \\| null;`), '$1;'), + }; + fails(setup({ types }), new RegExp(`${file}:${field}: expected`)); + }); +} +for (const field of ['task_id', 'status', 'result', 'error']) { + test(`rejects changed environment task ${field} requiredness at the generator boundary`, () => { + const file = 'task-result-environment-read.ts'; + const original = cleanTypes[file]; + const types = { + ...cleanTypes, + [file]: ['result', 'error'].includes(field) + ? original.replace(`${field}?:`, `${field}:`) + : original.replace(`${field}:`, `${field}?:`), + }; + fails(setup({ types }), new RegExp(`${file}:${field}: expected .* field`)); + }); +} diff --git a/scripts/check-packed-consumers.mjs b/scripts/check-packed-consumers.mjs new file mode 100644 index 00000000..b8c74894 --- /dev/null +++ b/scripts/check-packed-consumers.mjs @@ -0,0 +1,248 @@ +import { spawnSync } from 'node:child_process'; +import { + cpSync, + mkdirSync, + mkdtempSync, + readFileSync, + realpathSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, resolve, sep } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { parseArgs } from 'node:util'; + +import ts from '@permitio/compiler-tools'; +import { inspectReleaseArchive, validatePackageSurface } from '#scripts/release-artifact.mjs'; +import { evaluateTestReport } from '#scripts/test-report.mjs'; + +function checked(command, args, { cwd, env = process.env, timeout = 120_000 } = {}) { + const result = spawnSync(command, args, { + cwd, + env, + encoding: 'utf8', + timeout, + maxBuffer: 8 * 1024 * 1024, + }); + if (result.error || result.status !== 0 || result.signal) { + throw new Error( + `${command} consumer check failed: ${result.error?.message ?? result.stderr + result.stdout}`, + ); + } + return result.stdout; +} + +/** Installs and checks supplied bytes in an external directory using local customer fixtures. */ +export function checkPackedConsumers({ root = process.cwd(), artifact, sha256 }) { + artifact = resolve(artifact); + const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + const inspected = validatePackageSurface(inspectReleaseArchive(artifact), manifest); + if (sha256 !== undefined && inspected.sha256 !== sha256) + throw new Error('Packed consumer input hash differs from the validated candidate.'); + const directory = mkdtempSync(join(tmpdir(), 'permit-packed-consumer-')); + try { + const consumer = join(directory, 'consumer'); + mkdirSync(consumer); + writeFileSync( + join(consumer, 'package.json'), + JSON.stringify({ + private: true, + dependencies: { permitio: `file:${artifact}` }, + packageManager: manifest.packageManager, + }), + ); + writeFileSync( + join(consumer, 'pnpm-workspace.yaml'), + 'packages: []\nignoreScripts: true\nminimumReleaseAge: 1440\nautoInstallPeers: false\n', + ); + checked('pnpm', ['install', '--lockfile-only', '--no-frozen-lockfile', '--ignore-scripts'], { + cwd: consumer, + }); + checked('pnpm', ['audit', '--audit-level=moderate'], { cwd: consumer }); + checked('pnpm', ['install', '--frozen-lockfile', '--ignore-scripts'], { cwd: consumer }); + const packageRoot = realpathSync(join(consumer, 'node_modules/permitio')); + if (packageRoot.startsWith(realpathSync(root) + sep)) + throw new Error('Consumer resolved the working tree instead of the supplied archive.'); + for (const file of ['consumer.mts', 'consumer.cts']) + cpSync(join(root, 'scripts/fixtures/migration/after', file), join(consumer, file)); + for (const file of ['types.mts', 'types.cts']) + cpSync(join(root, 'scripts/fixtures/migration', file), join(consumer, file)); + cpSync(join(root, 'scripts/fixtures/packed-consumer.mts'), join(consumer, 'mixed.mts')); + for (const extension of ['mts', 'cts']) { + cpSync( + join(root, `scripts/fixtures/public-reference.${extension}`), + join(consumer, `public-reference.${extension}`), + ); + } + const guide = /```ts\n([\s\S]*?)\n```/u.exec(readFileSync(join(root, 'MIGRATION.md'), 'utf8')); + if (!guide) throw new Error('Migration guide has no complete TypeScript example.'); + writeFileSync(join(consumer, 'guide.mts'), guide[1]); + const compiler = join(root, 'node_modules/typescript/bin/tsc'); + const modes = []; + for (const [module, moduleResolution] of [ + ['Node16', 'Node16'], + ['NodeNext', 'NodeNext'], + ['ESNext', 'Bundler'], + ]) { + const files = [ + 'consumer.mts', + 'types.mts', + 'guide.mts', + 'public-reference.mts', + ...(module === 'ESNext' + ? [] + : ['consumer.cts', 'types.cts', 'mixed.mts', 'public-reference.cts']), + ]; + const options = { + target: 'ES2023', + module, + moduleResolution, + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }; + const config = join(consumer, 'tsconfig.json'); + writeFileSync(config, JSON.stringify({ compilerOptions: options, files })); + checked(process.execPath, [compiler, '-p', config], { cwd: consumer }); + const program = ts.createProgram( + files.map((file) => join(consumer, file)), + ts.convertCompilerOptionsFromJson(options, consumer).options, + ); + const diagnostics = ts.getPreEmitDiagnostics(program); + if (diagnostics.length) + throw new Error( + ts.formatDiagnosticsWithColorAndContext(diagnostics, { + getCurrentDirectory: () => consumer, + getCanonicalFileName: (path) => path, + getNewLine: () => '\n', + }), + ); + for (const [entry, format, extension] of [ + ['consumer.mts', ts.ModuleKind.ESNext, '.d.mts'], + ['consumer.cts', ts.ModuleKind.CommonJS, '.d.ts'], + ]) { + const resolved = ts.resolveModuleName( + 'permitio', + join(consumer, entry), + program.getCompilerOptions(), + ts.sys, + undefined, + undefined, + format, + ).resolvedModule; + const expected = join(packageRoot, `build/index${extension}`); + const source = resolved && program.getSourceFile(resolved.resolvedFileName); + if ( + !resolved || + realpathSync(resolved.resolvedFileName) !== expected || + source?.impliedNodeFormat !== format + ) + throw new Error(`${moduleResolution} resolved the wrong ${entry} declaration format.`); + } + modes.push(moduleResolution); + } + const probe = ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import { fileURLToPath } from 'node:url'; +import * as esm from 'permitio'; +const require = createRequire(import.meta.url); +const cjs = require('permitio'); +assert.equal(fileURLToPath(import.meta.resolve('permitio')), ${JSON.stringify( + join(packageRoot, 'build/index.mjs'), + )}); +assert.equal(require.resolve('permitio'), ${JSON.stringify(join(packageRoot, 'build/index.js'))}); +for (const [from, to] of [[esm, cjs], [cjs, esm]]) { + assert.equal(typeof to.PermitApiError, 'function'); + assert.equal(typeof to.PermitConnectionError, 'function'); + const context = new from.ApiContext(); + context._saveApiKeyAccessibleScope('org', 'project'); + context.setEnvironmentLevelContext('org', 'project', 'env'); + const permit = new to.Permit({ token: 'fixture', apiContext: context, log: { level: 'silent' } }); + assert.equal(permit.config.apiContext.environment, 'env'); + assert.equal(typeof permit.check, 'function'); + assert.ok(permit.api.resourceRelations instanceof to.ResourceRelationsApi); + assert.ok(permit.api.resourceRoles instanceof to.ResourceRolesApi); + assert.equal(to.ApiContextLevel.ENVIRONMENT, 3); + assert.throws(() => new to.ApiContext().setEnvironmentLevelContext('org', 'project', 'env'), + to.PermitContextChangeError); +} +console.log('PACKED_LOADERS_PASS'); +`; + checked(process.execPath, ['--input-type=module', '-e', probe], { cwd: consumer }); + const native = join(directory, 'migration.json'); + checked( + process.execPath, + [ + join(root, 'node_modules/vitest/vitest.mjs'), + 'run', + '--project', + 'codegen', + 'scripts/migration-package.test.mjs', + '--reporter=json', + `--outputFile=${native}`, + ], + { + cwd: root, + env: { ...process.env, PERMIT_PACKED_ARTIFACT: artifact }, + timeout: 360_000, + }, + ); + const migration = evaluateTestReport(JSON.parse(readFileSync(native, 'utf8')), { + root, + expectedFiles: ['scripts/migration-package.test.mjs'], + env: process.env, + }); + if (migration.status !== 'PASS' || migration.executed < 7) + throw new Error('Packed migration fixture did not execute every required behavior test.'); + return { + status: 'PASS', + node: process.versions.node, + artifactSha256: inspected.sha256, + version: inspected.manifest.version, + modes, + loaders: ['import', 'require'], + migration, + }; + } finally { + rmSync(directory, { recursive: true, force: true }); + } +} + +/** Runs the clean customer gate and saves only its bounded, credential-free summary. */ +export function main(args = process.argv.slice(2)) { + const { values } = parseArgs({ + args, + strict: true, + allowPositionals: false, + options: { + artifact: { type: 'string' }, + output: { type: 'string' }, + sha256: { type: 'string' }, + }, + }); + if (!values.artifact || !values.output) throw new Error('Use --artifact TGZ --output JSON.'); + let report; + try { + report = checkPackedConsumers({ artifact: values.artifact, sha256: values.sha256 }); + } catch (error) { + console.error(`Packed consumers did not pass: ${error.message}`); + report = { status: 'INVALID', node: process.versions.node }; + } + mkdirSync(dirname(resolve(values.output)), { recursive: true }); + writeFileSync(values.output, `${JSON.stringify(report, null, 2)}\n`); + console.log(`Packed consumers: ${report.status}.`); + return report.status === 'PASS' ? 0 : 2; +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) + process.exitCode = main(); diff --git a/scripts/check-public-reference.mjs b/scripts/check-public-reference.mjs new file mode 100644 index 00000000..7c38d0f9 --- /dev/null +++ b/scripts/check-public-reference.mjs @@ -0,0 +1,14 @@ +import { resolve } from 'node:path'; + +import { auditPublicExports, checkReferenceLinks } from '#scripts/public-reference.mjs'; + +try { + const output = process.argv[2] ?? 'docs'; + if (process.argv.length > 3) throw new Error('Usage: node check-public-reference.mjs [output]'); + const contracts = auditPublicExports(process.cwd()); + const links = checkReferenceLinks(resolve(output), contracts.groups); + console.log('Public reference check PASS: ' + JSON.stringify(links)); +} catch (error) { + console.error(`Public reference check FAILED: ${error.message}`); + process.exitCode = 1; +} diff --git a/scripts/check-publication-readiness.mjs b/scripts/check-publication-readiness.mjs new file mode 100644 index 00000000..ce1b726c --- /dev/null +++ b/scripts/check-publication-readiness.mjs @@ -0,0 +1,26 @@ +import { readFileSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; + +/** Reports unresolved shared acceptance without treating local quality as release approval. */ +export function publicationBlockers(root = process.cwd()) { + const sources = JSON.parse(readFileSync(join(root, 'api-coverage/sources.json'), 'utf8')); + const shared = sources.unmeasuredCapabilities?.sharedTarget; + const blockers = []; + if (shared?.status === 'UNAVAILABLE' && shared.owner === 'PER-16345') + blockers.push('UNAVAILABLE: the adopted shared target is missing (PER-16345).'); + else + blockers.push( + 'INVALID: shared-target adoption needs a reviewed acceptance contract (PER-16561).', + ); + blockers.push( + 'BLOCKED: SDK71 validates local evidence and has no releaseReady=true contract; ' + + 'shared acceptance and Curtain Call remain unresolved (PER-16561, PER-16574).', + ); + return blockers; +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { + for (const blocker of publicationBlockers()) console.error(blocker); + process.exitCode = 2; +} diff --git a/scripts/check-publish-runtime.mjs b/scripts/check-publish-runtime.mjs new file mode 100644 index 00000000..b6ad3324 --- /dev/null +++ b/scripts/check-publish-runtime.mjs @@ -0,0 +1,39 @@ +import { spawnSync } from 'node:child_process'; +import { resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +function meetsStableFloor(version, floor) { + if ( + typeof version !== 'string' || + !/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/.test( + version, + ) + ) + return false; + const parts = version.split('+')[0].split('.').map(Number); + if (!parts.every(Number.isSafeInteger)) return false; + for (let index = 0; index < floor.length; index++) { + if (parts[index] !== floor[index]) return parts[index] > floor[index]; + } + return true; +} + +/** Rejects runtimes that cannot authenticate npm Trusted Publishing with OIDC. */ +export function checkPublishingRuntime({ node, npm }) { + // https://docs.npmjs.com/trusted-publishers/ (verified 2026-09-30). + if (!meetsStableFloor(node, [22, 14, 0]) || !meetsStableFloor(npm, [11, 5, 1])) { + throw new Error( + `Trusted Publishing needs Node >=22.14.0 and npm >=11.5.1; got Node ${node}, npm ${npm}.`, + ); + } +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + const result = spawnSync('npm', ['--version'], { encoding: 'utf8' }); + if (result.error || result.status !== 0) { + throw new Error('Cannot verify bundled npm for Trusted Publishing.', { cause: result.error }); + } + const versions = { node: process.versions.node, npm: result.stdout.trim() }; + checkPublishingRuntime(versions); + console.log(`Trusted Publishing runtime: Node ${versions.node}, npm ${versions.npm}.`); +} diff --git a/scripts/check-publish-runtime.test.mjs b/scripts/check-publish-runtime.test.mjs new file mode 100644 index 00000000..3ac7eda2 --- /dev/null +++ b/scripts/check-publish-runtime.test.mjs @@ -0,0 +1,27 @@ +import { expect, test } from 'vitest'; + +import { checkPublishingRuntime } from '#scripts/check-publish-runtime.mjs'; + +for (const versions of [ + { node: '22.14.0', npm: '11.5.1' }, + { node: '24.15.0', npm: '11.12.1' }, + { node: '24.0.0+build.1', npm: '11.5.1+build' }, +]) { + test(`Trusted Publishing supports ${JSON.stringify(versions)}`, () => { + expect(() => checkPublishingRuntime(versions)).not.toThrow(); + }); +} +for (const versions of [ + { node: '22.13.0', npm: '11.5.1' }, + { node: '24.0.0', npm: '11.5.0' }, + { node: 'invalid', npm: '11.5.1' }, + { node: '24.0.0', npm: 'invalid' }, + { node: '22.14.0-rc.1', npm: '11.5.1' }, + { node: '24.0.0', npm: '11.5.1+bad..metadata' }, + { node: '24.0.0', npm: '011.5.1' }, + { node: '9007199254740993.0.0', npm: '11.5.1' }, +]) { + test(`Trusted Publishing rejects ${JSON.stringify(versions)}`, () => { + expect(() => checkPublishingRuntime(versions)).toThrow(/Trusted Publishing needs/); + }); +} diff --git a/scripts/check-release-evidence.mjs b/scripts/check-release-evidence.mjs new file mode 100644 index 00000000..c6c2d165 --- /dev/null +++ b/scripts/check-release-evidence.mjs @@ -0,0 +1,205 @@ +#!/usr/bin/env node +import { spawnSync } from 'node:child_process'; +import { + lstatSync, + mkdirSync, + mkdtempSync, + readFileSync, + readdirSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { isDeepStrictEqual, parseArgs } from 'node:util'; + +import { inspectReleaseArchive } from '#scripts/release-artifact.mjs'; + +export { inspectReleaseArchive } from '#scripts/release-artifact.mjs'; + +import { + bytesSha256, + expectedReleaseInventory, + validateReleaseEvidence, +} from '#scripts/release-evidence.mjs'; + +function requireValid(condition, message) { + if (!condition) throw new Error(message); +} + +function checked(command, args, cwd, maximum = 16 * 1024 * 1024) { + const result = spawnSync(command, args, { cwd, maxBuffer: maximum, timeout: 120_000 }); + requireValid( + !result.error && result.status === 0 && !result.signal, + `${command} inspection did not complete successfully.`, + ); + return result.stdout; +} + +function boundedBytes(path, maximum) { + requireValid( + lstatSync(path).isFile() && lstatSync(path).size <= maximum, + 'Input exceeds its size limit.', + ); + return readFileSync(path); +} + +/** Rebuilds and packs clean source with pinned pnpm and disabled package lifecycle hooks. */ +export function prepareReleaseReference(root) { + const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + const pnpm = checked('pnpm', ['--version'], root).toString('utf8').trim(); + requireValid( + manifest.packageManager === `pnpm@${pnpm}`, + 'Use the repository-pinned pnpm version.', + ); + checked('pnpm', ['run', 'build'], root); + const directory = mkdtempSync(join(tmpdir(), 'permit-release-reference-')); + try { + checked('pnpm', ['pack', '--ignore-scripts', '--pack-destination', directory], root); + const entries = readdirSync(directory, { withFileTypes: true }); + requireValid( + entries.length === 1 && entries[0].isFile() && entries[0].name.endsWith('.tgz'), + 'Reference packing did not produce exactly one regular archive.', + ); + return inspectReleaseArchive(join(directory, entries[0].name)); + } finally { + rmSync(directory, { recursive: true, force: true }); + } +} + +/** Requires exact bytes from a freshly rebuilt package, including every file boundary. */ +export function verifyCandidateArchive(candidate, reference) { + requireValid( + candidate.sha256 === reference.sha256 && + candidate.fileCount === reference.fileCount && + isDeepStrictEqual(candidate.manifest, reference.manifest), + 'Candidate differs from the freshly built reference package.', + ); +} + +/** Builds independent local inputs; baseline identity comes from reviewed official npm metadata. */ +export async function inspectReleaseInputs({ + root, + artifact, + baseline, + candidateLock, + baselineLock, +}) { + const status = checked( + 'git', + ['status', '--porcelain', '--untracked-files=normal'], + root, + ).toString('utf8'); + requireValid(status.length === 0, 'Release evidence requires a clean committed SDK checkout.'); + const tree = checked('git', ['rev-parse', 'HEAD^{tree}'], root).toString('utf8').trim(); + const requirements = JSON.parse( + readFileSync(join(root, 'api-coverage/release-matrix.json'), 'utf8'), + ); + const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + const candidate = inspectReleaseArchive(artifact); + const released = inspectReleaseArchive(baseline); + const reference = prepareReleaseReference(root); + verifyCandidateArchive(candidate, reference); + requireValid( + checked('git', ['status', '--porcelain', '--untracked-files=normal'], root).length === 0 && + checked('git', ['rev-parse', 'HEAD^{tree}'], root).toString('utf8').trim() === tree, + 'SDK source changed during independent package inspection.', + ); + requireValid( + released.manifest.version === requirements.baseline.version && + released.sha256 === requirements.baseline.sha256 && + released.integrity === requirements.baseline.integrity, + 'Baseline differs from the reviewed official npm release.', + ); + requireValid( + candidate.sha256 !== released.sha256, + 'Candidate and baseline artifacts are identical.', + ); + const { inventory, methodLevels } = await expectedReleaseInventory(root); + return { + tree, + inventory, + methodLevels, + requirements, + artifact: { + name: 'permitio', + version: manifest.version, + sha256: candidate.sha256, + fileCount: candidate.fileCount, + lockSha256: bytesSha256(boundedBytes(candidateLock, 16 * 1024 * 1024)), + }, + baseline: { + version: released.manifest.version, + sha256: released.sha256, + fileCount: released.fileCount, + lockSha256: bytesSha256(boundedBytes(baselineLock, 16 * 1024 * 1024)), + kind: 'released-npm', + integrity: released.integrity, + }, + }; +} + +/** Validates a private runner's allowlisted export using local files; never contacts services. */ +export async function main( + args = process.argv.slice(2), + root = resolve(import.meta.dirname, '..'), +) { + let output = resolve(root, 'coverage/release-evidence'); + let report; + try { + const { values } = parseArgs({ + args, + strict: true, + allowPositionals: false, + options: { + evidence: { type: 'string' }, + artifact: { type: 'string' }, + baseline: { type: 'string' }, + 'candidate-lock': { type: 'string' }, + 'baseline-lock': { type: 'string' }, + output: { type: 'string' }, + }, + }); + if (values.output) output = resolve(values.output); + requireValid( + ['evidence', 'artifact', 'baseline', 'candidate-lock', 'baseline-lock'].every( + (key) => values[key], + ), + 'Use --evidence FILE --artifact TGZ --baseline TGZ ' + + '--candidate-lock FILE --baseline-lock FILE.', + ); + const expected = await inspectReleaseInputs({ + root, + artifact: values.artifact, + baseline: values.baseline, + candidateLock: values['candidate-lock'], + baselineLock: values['baseline-lock'], + }); + const evidence = JSON.parse(boundedBytes(values.evidence, 16 * 1024 * 1024).toString('utf8')); + report = validateReleaseEvidence(evidence, expected); + } catch (error) { + console.error(`Release evidence inspection failed: ${error.message}`); + report = { + schema: 1, + localEvidence: 'INVALID', + exitCode: 2, + releaseReady: false, + sharedTarget: { status: 'UNAVAILABLE', owner: 'PER-16345' }, + incomplete: ['Independent input inspection failed; consult local diagnostics.'], + failures: [], + }; + } + try { + mkdirSync(output, { recursive: true }); + writeFileSync(join(output, 'report.json'), `${JSON.stringify(report, null, 2)}\n`); + } catch (error) { + console.error(`Cannot save release evidence: ${error.message}`); + return 2; + } + console.log(`Local release evidence: ${report.localEvidence}; release ready: false (PER-16345).`); + return report.exitCode; +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) + process.exitCode = await main(); diff --git a/scripts/check-release-evidence.test.mjs b/scripts/check-release-evidence.test.mjs new file mode 100644 index 00000000..38393470 --- /dev/null +++ b/scripts/check-release-evidence.test.mjs @@ -0,0 +1,162 @@ +import { spawnSync } from 'node:child_process'; +import { + linkSync, + mkdirSync, + mkdtempSync, + readFileSync, + rmSync, + symlinkSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; + +import { expect, onTestFinished, test, vi } from 'vitest'; + +import { + inspectReleaseArchive, + main, + verifyCandidateArchive, + prepareReleaseReference, +} from '#scripts/check-release-evidence.mjs'; + +function directory() { + const root = mkdtempSync(join(tmpdir(), 'permit-release-evidence-')); + onTestFinished(() => rmSync(root, { recursive: true, force: true })); + return root; +} + +function archiveFixture(change) { + const root = directory(); + const packageRoot = join(root, 'package'); + mkdirSync(join(packageRoot, 'build'), { recursive: true }); + writeFileSync( + join(packageRoot, 'package.json'), + JSON.stringify({ name: 'permitio', version: '3.0.0' }), + ); + writeFileSync(join(packageRoot, 'build/index.js'), 'module.exports = { Permit: class {} };\n'); + writeFileSync(join(packageRoot, 'build/index.mjs'), 'export class Permit {}\n'); + change?.(packageRoot); + const artifact = join(root, 'permitio.tgz'); + const packed = spawnSync('tar', ['-czf', artifact, '-C', root, 'package'], { encoding: 'utf8' }); + expect(packed.status, packed.stderr).toBe(0); + return { root: packageRoot, artifact }; +} + +test('inspects actual archive bytes and matches every member against the local build', () => { + const { artifact } = archiveFixture(); + const inspected = inspectReleaseArchive(artifact); + expect(inspected).toMatchObject({ + fileCount: 3, + manifest: { name: 'permitio', version: '3.0.0' }, + }); + expect(inspected.sha256).toMatch(/^[a-f0-9]{64}$/); + expect(inspected.integrity).toMatch(/^sha512-/); + expect(() => verifyCandidateArchive(inspected, inspected)).not.toThrow(); + const other = archiveFixture((path) => + writeFileSync(join(path, 'build/index.js'), 'module.exports = {};\n'), + ); + expect(() => verifyCandidateArchive(inspectReleaseArchive(other.artifact), inspected)).toThrow( + 'differs from the freshly built', + ); +}); + +test('rejects a different package even if its filename looks correct', () => { + const { artifact } = archiveFixture((root) => { + writeFileSync(join(root, 'package.json'), JSON.stringify({ name: 'other', version: '3.0.0' })); + }); + expect(() => inspectReleaseArchive(artifact)).toThrow('not a versioned permitio package'); +}); + +test.each(['symbolic', 'hard'])('rejects %s archive links without extracting them', (kind) => { + const { artifact } = archiveFixture((root) => { + if (kind === 'symbolic') symlinkSync('/etc/passwd', join(root, 'outside')); + else linkSync(join(root, 'build/index.js'), join(root, 'duplicate')); + }); + expect(() => inspectReleaseArchive(artifact)).toThrow('link or unsupported'); +}); + +test('rejects extra private members and missing runtime files with the same manifest', () => { + const reference = inspectReleaseArchive(archiveFixture().artifact); + const extra = archiveFixture((path) => { + writeFileSync(join(path, '.env'), 'private'); + }); + expect(() => verifyCandidateArchive(inspectReleaseArchive(extra.artifact), reference)).toThrow(); + const subset = archiveFixture((path) => { + rmSync(join(path, 'build'), { recursive: true }); + }); + expect(() => verifyCandidateArchive(inspectReleaseArchive(subset.artifact), reference)).toThrow(); +}); + +test('rejects changed file boundaries even when concatenated content is unchanged', () => { + const reference = inspectReleaseArchive(archiveFixture().artifact); + const changed = archiveFixture((path) => { + const a = join(path, 'build/index.js'); + const b = join(path, 'build/index.mjs'); + writeFileSync(a, Buffer.concat([readFileSync(a), readFileSync(b)])); + writeFileSync(b, ''); + }); + expect(() => + verifyCandidateArchive(inspectReleaseArchive(changed.artifact), reference), + ).toThrow(); +}); + +test('rejects corrupted archive input and does not execute archive content', () => { + const root = directory(); + const artifact = join(root, 'invalid.tgz'); + writeFileSync(artifact, 'not a tarball'); + expect(() => inspectReleaseArchive(artifact)).toThrow('inspection did not complete'); + const packed = archiveFixture((path) => { + writeFileSync( + join(path, 'package.json'), + JSON.stringify({ name: 'permitio', version: '3.0.0', scripts: { preinstall: 'exit 99' } }), + ); + }); + expect(inspectReleaseArchive(packed.artifact).manifest.scripts.preinstall).toBe('exit 99'); +}); + +test('does not accept a symlink as an independently supplied artifact', () => { + const { artifact } = archiveFixture(); + const link = join(directory(), 'link.tgz'); + symlinkSync(artifact, link); + expect(() => inspectReleaseArchive(link)).toThrow(); +}); + +test('invalid CLI inputs exit 2 and redact filesystem diagnostics', async () => { + const root = directory(); + const output = join(root, 'evidence'); + vi.spyOn(console, 'error').mockImplementation(() => {}); + vi.spyOn(console, 'log').mockImplementation(() => {}); + onTestFinished(() => vi.restoreAllMocks()); + expect(await main(['--output', output], root)).toBe(2); + const report = readFileSync(join(output, 'report.json'), 'utf8'); + expect(JSON.parse(report)).toMatchObject({ localEvidence: 'INVALID', releaseReady: false }); + expect(report).not.toContain(root); + expect(await main(['--unrecognized'], root)).toBe(2); +}); + +test('reference packaging rebuilds from source and disables package lifecycle scripts', () => { + const { root } = archiveFixture(); + writeFileSync( + join(root, 'package.json'), + JSON.stringify({ + name: 'permitio', + version: '3.0.0', + packageManager: 'pnpm@12.8.1', + type: 'module', + files: ['build'], + scripts: { build: 'node compile.mjs', prepack: 'node -e "process.exit(99)"' }, + }), + ); + writeFileSync( + join(root, 'compile.mjs'), + "import {writeFileSync} from 'node:fs'; writeFileSync('build/index.js', 'freshly built');", + ); + const reference = prepareReleaseReference(root); + expect(reference.manifest.version).toBe('3.0.0'); + expect(reference.manifest.packageManager).toBeUndefined(); + expect(reference.files).toEqual( + expect.arrayContaining(['package/build/index.js', 'package/build/index.mjs']), + ); + expect(readFileSync(join(root, 'build/index.js'), 'utf8')).toBe('freshly built'); +}, 30_000); diff --git a/scripts/check-release-gates.mjs b/scripts/check-release-gates.mjs new file mode 100644 index 00000000..1b61a38e --- /dev/null +++ b/scripts/check-release-gates.mjs @@ -0,0 +1,40 @@ +import { resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; + +const stages = { + candidate: [ + 'lint', + 'types', + 'docs', + 'unit', + 'workflow-validation', + 'codegen-guard', + 'build-candidate', + 'packed-consumers', + 'dependency-security', + ], + ci: ['candidate', 'test', 'cleanup'], + publication: ['candidate', 'publication-acceptance'], +}; + +/** Requires every named dependency to succeed; skipped and cancelled jobs fail the gate. */ +export function checkGateResults(results, stage) { + const expected = stages[stage]; + if ( + !expected || + results === null || + typeof results !== 'object' || + Array.isArray(results) || + Object.keys(results).length !== expected.length || + expected.some((name) => !Object.hasOwn(results, name)) + ) + throw new Error(`Missing or unexpected required jobs for ${stage}.`); + const failed = expected.filter((name) => results[name]?.result !== 'success'); + if (failed.length) + throw new Error(`Required ${stage} checks did not succeed: ${failed.join(', ')}.`); +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { + checkGateResults(JSON.parse(process.env['GATE_RESULTS'] ?? 'null'), process.env['GATE_STAGE']); + console.log(`Required ${process.env['GATE_STAGE']} checks passed.`); +} diff --git a/scripts/check-release-tag.mjs b/scripts/check-release-tag.mjs new file mode 100644 index 00000000..bbbeb0f7 --- /dev/null +++ b/scripts/check-release-tag.mjs @@ -0,0 +1,30 @@ +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import semver from 'semver'; + +/** Requires the tag to identify the committed version without rewriting reviewed metadata. */ +export function validateReviewedVersion({ version, tag, prerelease }) { + if (semver.valid(version) !== version) + throw new Error('Commit a valid normalized package version before validating a candidate.'); + if (tag === undefined || tag === '') return version; + if (semver.valid(tag) !== version) + throw new Error( + 'Release tag must match the committed package version; review the version first.', + ); + if ( + !['true', 'false'].includes(prerelease) || + (semver.prerelease(version) !== null) !== (prerelease === 'true') + ) + throw new Error('Release prerelease setting must match the committed semantic version.'); + return version; +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { + const manifest = JSON.parse(readFileSync('package.json', 'utf8')); + validateReviewedVersion({ + version: manifest.version, + tag: process.env['RELEASE_TAG'], + prerelease: process.env['IS_PRERELEASE'], + }); +} diff --git a/scripts/declarations.mjs b/scripts/declarations.mjs new file mode 100644 index 00000000..a9aee8f3 --- /dev/null +++ b/scripts/declarations.mjs @@ -0,0 +1,64 @@ +import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { dirname, join, relative, resolve, sep } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import ts from '@permitio/compiler-tools'; + +/** + * Rewrites authored source aliases in emitted declarations to published file paths. + * + * @param directory - Declaration output directory, containing every referenced SDK declaration. + * @throws If an alias escapes the output directory or its declaration is missing. + */ +export function rewriteDeclarationAliases(directory) { + const root = resolve(directory); + const visitDirectory = (current) => { + for (const entry of readdirSync(current, { withFileTypes: true })) { + const file = join(current, entry.name); + if (entry.isDirectory()) { + visitDirectory(file); + continue; + } + if (!entry.name.endsWith('.d.ts')) continue; + let text = readFileSync(file, 'utf8'); + const source = ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true); + const edits = []; + const visit = (node) => { + if (ts.isStringLiteral(node) && node.text.startsWith('#src/')) { + const parent = node.parent; + const isModule = + ((ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) && + parent.moduleSpecifier === node) || + (ts.isLiteralTypeNode(parent) && ts.isImportTypeNode(parent.parent)); + if (isModule) { + const target = resolve(root, node.text.slice('#src/'.length)); + if (!target.startsWith(`${root}${sep}`) || !existsSync(`${target}.d.ts`)) { + throw new Error(`Cannot publish ${file}: alias ${node.text} has no SDK declaration.`); + } + const path = relative(dirname(file), target).split(sep).join('/'); + edits.push({ + start: node.getStart(source) + 1, + end: node.end - 1, + text: `${path.startsWith('.') ? path : `./${path}`}.js`, + }); + } + } + ts.forEachChild(node, visit); + }; + visit(source); + for (const edit of edits.reverse()) { + text = text.slice(0, edit.start) + edit.text + text.slice(edit.end); + } + writeFileSync(file, text); + } + }; + visitDirectory(root); + if (existsSync(join(root, 'index.d.ts'))) { + // Canonical class declarations preserve nominal identity across the two loader entry points. + writeFileSync(join(root, 'index.d.mts'), "export * from './index.js';\n"); + } +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + rewriteDeclarationAliases('build'); +} diff --git a/scripts/declarations.test.mjs b/scripts/declarations.test.mjs new file mode 100644 index 00000000..60a57ecb --- /dev/null +++ b/scripts/declarations.test.mjs @@ -0,0 +1,186 @@ +import { spawnSync } from 'node:child_process'; +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; + +import { expect, onTestFinished, test } from 'vitest'; + +import { rewriteDeclarationAliases } from '#scripts/declarations.mjs'; + +function fixture() { + const root = mkdtempSync(join(tmpdir(), 'permit declarations ')); + onTestFinished(() => rmSync(root, { recursive: true, force: true })); + mkdirSync(join(root, 'nested')); + writeFileSync(join(root, 'model.d.ts'), 'export interface Model { key: string }'); + return root; +} + +test('published declarations resolve import, export and import-type aliases without source files', () => { + const root = fixture(); + writeFileSync( + join(root, 'nested/index.d.ts'), + `import type { Model } from '#src/model'; +export type { Model } from '#src/model'; +export * from '#src/model'; +export declare function read(): Model; +export type Nested = import('#src/model').Model;`, + ); + rewriteDeclarationAliases(root); + expect(readFileSync(join(root, 'nested/index.d.ts'), 'utf8')).not.toContain('#src'); + writeFileSync( + join(root, 'consumer.ts'), + `import { read, type Model, type Nested } from './nested/index.js'; +const model: Model = read(); +const nested: Nested = model; +export const key: string = nested.key;`, + ); + writeFileSync( + join(root, 'tsconfig.json'), + JSON.stringify({ + compilerOptions: { strict: true, noEmit: true, types: [], module: 'NodeNext' }, + files: ['consumer.ts'], + }), + ); + const result = spawnSync( + process.execPath, + [join(process.cwd(), 'node_modules/typescript/bin/tsc')], + { + cwd: root, + encoding: 'utf8', + }, + ); + expect(result.status, result.stdout + result.stderr).toBe(0); +}); + +for (const alias of ['#src/missing', '#src/../outside']) { + test(`rejects an unresolved published alias: ${alias}`, () => { + const root = fixture(); + writeFileSync(join(root, 'index.d.ts'), `export type { Model } from '${alias}';`); + expect(() => rewriteDeclarationAliases(root)).toThrow(/has no SDK declaration/); + }); +} + +test('the generated request keeps default response data and custom response contracts', () => { + const root = fixture(); + const common = join(process.cwd(), 'build/openapi/common.js'); + const axios = join(process.cwd(), 'node_modules/axios/index.js'); + writeFileSync( + join(root, 'contract.ts'), + `import { createRequestFunction } from ${JSON.stringify(common)}; +import axios, { type AxiosResponse } from ${JSON.stringify(axios)}; +const request = createRequestFunction({ url: '/fixture', options: {} }, axios, 'http://localhost'); +const typed: Promise> = request<{ key: string }>(); +const custom: Promise<{ transformed: boolean }> = request(); +const unknown: Promise> = request(); +void typed; void custom; void unknown; +// @ts-expect-error The default response's key remains a string. +const wrong: Promise> = request<{ key: string }>(); +void wrong;`, + ); + writeFileSync( + join(root, 'tsconfig.json'), + JSON.stringify({ + compilerOptions: { + strict: true, + noEmit: true, + types: [], + module: 'ESNext', + moduleResolution: 'Bundler', + target: 'ES2023', + }, + files: ['contract.ts'], + }), + ); + const result = spawnSync( + process.execPath, + [join(process.cwd(), 'node_modules/typescript/bin/tsc')], + { + cwd: root, + encoding: 'utf8', + }, + ); + expect(result.status, result.stdout + result.stderr).toBe(0); +}); + +test('every bulk API request declaration resolves its referenced generated models', () => { + const root = fixture(); + const bulk = join(process.cwd(), 'build/openapi/api/bulk-operations-api.js'); + writeFileSync( + join(root, 'bulk.ts'), + `import type { BulkOperationsApi } from ${JSON.stringify(bulk)}; +const create: Parameters[0] = { + projId: 'project', envId: 'environment', + resourceInstanceCreateBulkOperation: { operations: [{ key: 'instance', resource: 'document', tenant: 'default' }] }, +}; +const remove: Parameters[0] = { + projId: 'project', envId: 'environment', + resourceInstanceDeleteBulkOperation: { idents: ['document:instance'] }, +}; +const createUsers: Parameters[0] = { + projId: 'project', envId: 'environment', userCreateBulkOperation: { operations: [] }, +}; +const deleteUsers: Parameters[0] = { + projId: 'project', envId: 'environment', userDeleteBulkOperation: { idents: [] }, +}; +const replaceUsers: Parameters[0] = { + projId: 'project', envId: 'environment', userReplaceBulkOperation: { operations: [] }, +}; +void create; void remove; void createUsers; void deleteUsers; void replaceUsers;`, + ); + writeFileSync( + join(root, 'tsconfig.json'), + JSON.stringify({ + compilerOptions: { + strict: true, + exactOptionalPropertyTypes: true, + noEmit: true, + types: [], + module: 'ESNext', + moduleResolution: 'Bundler', + target: 'ES2023', + }, + files: ['bulk.ts'], + }), + ); + const result = spawnSync( + process.execPath, + [join(process.cwd(), 'node_modules/typescript/bin/tsc')], + { cwd: root, encoding: 'utf8' }, + ); + expect(result.status, result.stdout + result.stderr).toBe(0); +}); + +test('the ESM declaration entry shares private class identity with CommonJS', () => { + const root = fixture(); + writeFileSync( + join(root, 'index.d.ts'), + 'export declare class Context { private state; set(value: string): void; }', + ); + rewriteDeclarationAliases(root); + writeFileSync(join(root, 'package.json'), JSON.stringify({ type: 'commonjs' })); + writeFileSync( + join(root, 'consumer.mts'), + `import { Context } from './index.mjs'; +import cjs = require('./index.js'); +const fromCommonjs: Context = new cjs.Context(); +const fromEsm: cjs.Context = new Context(); +void [fromCommonjs, fromEsm];`, + ); + const result = spawnSync( + process.execPath, + [ + join(process.cwd(), 'node_modules/typescript/bin/tsc'), + '--strict', + '--noEmit', + '--module', + 'NodeNext', + '--types', + 'node', + '--typeRoots', + join(process.cwd(), 'node_modules/@types'), + 'consumer.mts', + ], + { cwd: root, encoding: 'utf8' }, + ); + expect(result.status, result.stdout + result.stderr).toBe(0); +}); diff --git a/scripts/fixtures/audit-read-nullability.json b/scripts/fixtures/audit-read-nullability.json new file mode 100644 index 00000000..e45875dc --- /dev/null +++ b/scripts/fixtures/audit-read-nullability.json @@ -0,0 +1,77 @@ +{ + "source": "https://github.com/permitio/permit-python/blob/ef80ae2393b4c74e400fdd40ca838d589ee43709/permit/api/models.py", + "fields": { + "AVPEngineDecisionLog": ["engine", "process_time_ms"], + "ActionObj": ["name"], + "AuditLogModel": [ + "raw_data", + "created_at", + "query", + "user_key", + "user_email", + "user_name", + "resource_type", + "tenant", + "action", + "decision", + "reason", + "pdp_config_id" + ], + "AuditLogObjectsModel": [ + "id", + "organization_object", + "project_object", + "environment_object", + "pdp_config_object", + "user_object", + "action_object", + "resource_type_object", + "tenant_object", + "created_at" + ], + "DetailedAuditLogModel": [ + "created_at", + "query", + "user_key", + "user_email", + "user_name", + "resource_type", + "tenant", + "action", + "decision", + "reason", + "pdp_config_id", + "objects" + ], + "DummyEngineModel": ["engine", "timestamp"], + "EnvironmentObj": ["name"], + "GenericEngineDecisionLog": [ + "engine", + "decision_id", + "process_time_ms", + "query", + "user_key", + "user_email", + "user_name", + "action", + "resource_type", + "tenant" + ], + "LimitedPaginatedResult_AuditLogModel_": ["page_count"], + "OPAEngineDecisionLog": ["engine"], + "OPAMetrics": [ + "timer_rego_input_parse_ns", + "timer_rego_query_parse_ns", + "timer_rego_query_compile_ns", + "timer_rego_query_eval_ns", + "timer_rego_module_parse_ns", + "timer_rego_module_compile_ns", + "timer_server_handler_ns" + ], + "OrganizationObj": ["name"], + "ProjectObj": ["name"], + "ResourceTypeObj": ["name", "attributes"], + "TenantObj": ["name", "attributes"], + "UserObj": ["email", "first_name", "last_name", "attributes", "roles", "assigned_roles"] + } +} diff --git a/scripts/fixtures/migration/after/consumer.cts b/scripts/fixtures/migration/after/consumer.cts new file mode 100644 index 00000000..1ee4876b --- /dev/null +++ b/scripts/fixtures/migration/after/consumer.cts @@ -0,0 +1,30 @@ +import SDK = require('permitio'); + +/** + * Runs the grouped CommonJS migration against configured owned fixtures. + * + * @returns Typed grouped results and a literal authorization decision. + * @throws Error When deployment values are missing or an SDK operation fails. + */ +async function migratedConsumer() { + const token = process.env['PERMIT_API_KEY']; + const apiUrl = process.env['PERMIT_API_URL']; + const pdp = process.env['PERMIT_PDP_URL']; + if (!token || /[\s\p{Cc}]/u.test(token) || !apiUrl || !pdp) { + throw new Error('Set valid Permit API key, API URL and PDP URL deployment values.'); + } + const permit = new SDK.Permit({ token, apiUrl, pdp, log: { level: 'silent' } }); + const page = await permit.api.users.list({ page: 2, perPage: 3 }); + const sync = await permit.api.users.sync({ key: 'customer' }); + const rule = await permit.api.conditionSetRules.create({ + user_set: 'set', + resource_set: 'resource-set', + permission: 'document:read', + }); + const rules = await permit.api.conditionSetRules.list({ permissionKey: 'read' }); + await permit.api.users.unassignRole({ user: 'customer', role: 'reader', tenant: 'tenant' }); + const allow = await permit.check('customer', 'read', { type: 'document', tenant: 'tenant' }); + return { users: page.data, user: sync.user, created: sync.created, rule, rules, allow }; +} + +export = migratedConsumer; diff --git a/scripts/fixtures/migration/after/consumer.mts b/scripts/fixtures/migration/after/consumer.mts new file mode 100644 index 00000000..d698731f --- /dev/null +++ b/scripts/fixtures/migration/after/consumer.mts @@ -0,0 +1,41 @@ +import { Permit, PermitApiError, PermitConnectionError, PermitPDPStatusError } from 'permitio'; + +/** + * Runs a representative migration against the configured environment and PDP. + * + * @returns Typed grouped records and authorization decisions. + * @throws Error When deployment values are missing or an SDK operation fails. + */ +export default async function migratedConsumer() { + const token = process.env['PERMIT_API_KEY']; + const apiUrl = process.env['PERMIT_API_URL']; + const pdp = process.env['PERMIT_PDP_URL']; + if (!token || /[\s\p{Cc}]/u.test(token) || !apiUrl || !pdp) { + throw new Error('Set valid Permit API key, API URL and PDP URL deployment values.'); + } + const permit = new Permit({ token, apiUrl, pdp, log: { level: 'silent' } }); + try { + const page = await permit.api.users.list({ page: 2, perPage: 3 }); + const sync = await permit.api.users.sync({ key: 'customer' }); + const rule = await permit.api.conditionSetRules.create({ + user_set: 'set', + resource_set: 'resource-set', + permission: 'document:read', + }); + const rules = await permit.api.conditionSetRules.list({ permissionKey: 'read' }); + await permit.api.users.unassignRole({ user: 'customer', role: 'reader', tenant: 'tenant' }); + const allow = await permit.check('customer', 'read', { type: 'document', tenant: 'tenant' }); + return { users: page.data, user: sync.user, created: sync.created, rule, rules, allow }; + } catch (error: unknown) { + if (error instanceof PermitPDPStatusError) { + throw new Error(`PDP status ${error.statusCode ?? 'unknown'}`, { cause: error }); + } + if (error instanceof PermitConnectionError) { + throw new Error(`PDP connection ${error.code ?? 'unknown'}`, { cause: error }); + } + if (error instanceof PermitApiError) { + throw new Error(`REST status ${error.status ?? 'unknown'}`, { cause: error }); + } + throw error; + } +} diff --git a/scripts/fixtures/migration/after/package.json b/scripts/fixtures/migration/after/package.json new file mode 100644 index 00000000..9ab8cde2 --- /dev/null +++ b/scripts/fixtures/migration/after/package.json @@ -0,0 +1,9 @@ +{ + "private": true, + "dependencies": { + "permitio": "^3.0.0" + }, + "engines": { + "node": ">=22.13.0" + } +} diff --git a/scripts/fixtures/migration/before/customer.mjs b/scripts/fixtures/migration/before/customer.mjs new file mode 100644 index 00000000..fde61992 --- /dev/null +++ b/scripts/fixtures/migration/before/customer.mjs @@ -0,0 +1,41 @@ +import { Permit } from 'permitio'; + +const permit = new Permit({ token: 'opaque-example' }); +const api = permit.api; +api.listUsers(); +api.listRoles(); +api.listConditionSets('userset', 1, 20); +api.listConditionSetsRules(1, 20); +api.getUser('user'); +api.getTenant('tenant'); +api.listTenants(1); +api.getRole('role'); +api.getAssignedRoles('user', 'tenant'); +api.createResource({ key: 'document', name: 'Document', actions: { read: {} } }); +api.updateResource('document', { name: 'Document' }); +api.deleteResource('document'); +api.createUser({ key: 'user' }); +api.syncUser({ key: 'user' }); +api.updateUser('user', { first_name: 'Updated' }); +api.deleteUser('user'); +api.createTenant({ key: 'tenant', name: 'Tenant' }); +api.updateTenant('tenant', { name: 'Tenant' }); +api.deleteTenant('tenant'); +api.createRole({ key: 'reader', name: 'Reader', permissions: ['document:read'] }); +api.updateRole('reader', { name: 'Reader' }); +api.deleteRole('reader'); +api.assignRole({ user: 'user', role: 'reader', tenant: 'tenant' }); +api.unassignRole({ user: 'user', role: 'reader', tenant: 'tenant' }); +api.createConditionSet({ key: 'userset', name: 'Userset', type: 'userset', conditions: {} }); +api.updateConditionSet('userset', { name: 'Userset' }); +api.deleteConditionSet('userset'); +api.assignConditionSetRule({ + user_set: 'userset', + resource_set: 'resource-set', + permission: 'document:read', +}); +api.unassignConditionSetRule({ + user_set: 'userset', + resource_set: 'resource-set', + permission: 'document:read', +}); diff --git a/scripts/fixtures/migration/before/package.json b/scripts/fixtures/migration/before/package.json new file mode 100644 index 00000000..b506a496 --- /dev/null +++ b/scripts/fixtures/migration/before/package.json @@ -0,0 +1,10 @@ +{ + "private": true, + "type": "module", + "dependencies": { + "permitio": "^2.7.5" + }, + "engines": { + "node": ">=10" + } +} diff --git a/scripts/fixtures/migration/types.cts b/scripts/fixtures/migration/types.cts new file mode 100644 index 00000000..bad37645 --- /dev/null +++ b/scripts/fixtures/migration/types.cts @@ -0,0 +1,26 @@ +import SDK = require('permitio'); + +const resource: SDK.ResourceInstanceCreate = { + key: 'one', + resource: 'document', + tenant: 'tenant', +}; +const assignment: SDK.RoleAssignmentRemove = { + user: 'customer', + role: 'reader', + tenant: 'tenant', +}; +const strategy: 'fail' = SDK.EnvironmentCopyConflictStrategy.Fail; +void [resource, assignment, strategy]; + +// @ts-expect-error T1 requires actual tenant data for resource creation. +const missingResourceTenant: SDK.ResourceInstanceCreate = { key: 'one', resource: 'document' }; +// @ts-expect-error T1 requires the unassignment tenant. +const missingAssignmentTenant: SDK.RoleAssignmentRemove = { user: 'customer', role: 'reader' }; +// @ts-expect-error T3 removed the response body generic. +type OldError = SDK.PermitApiError<{ private: string }>; +declare const bulk: Awaited>; +// @ts-expect-error T2 does not promise processing operation arrays. +void bulk.operations; +void [missingResourceTenant, missingAssignmentTenant]; +export type { OldError }; diff --git a/scripts/fixtures/migration/types.mts b/scripts/fixtures/migration/types.mts new file mode 100644 index 00000000..3cfb736b --- /dev/null +++ b/scripts/fixtures/migration/types.mts @@ -0,0 +1,24 @@ +import { + EnvironmentCopyConflictStrategy, + type ResourceInstanceCreate, + type RoleAssignmentRemove, + type PermitApiError, + type IUsersApi, +} from 'permitio'; + +const resource: ResourceInstanceCreate = { key: 'one', resource: 'document', tenant: 'tenant' }; +const assignment: RoleAssignmentRemove = { user: 'customer', role: 'reader', tenant: 'tenant' }; +const strategy: 'fail' = EnvironmentCopyConflictStrategy.Fail; +void [resource, assignment, strategy]; + +// @ts-expect-error T1 requires actual tenant data for resource creation. +const missingResourceTenant: ResourceInstanceCreate = { key: 'one', resource: 'document' }; +// @ts-expect-error T1 requires the unassignment tenant. +const missingAssignmentTenant: RoleAssignmentRemove = { user: 'customer', role: 'reader' }; +// @ts-expect-error T3 removed the response body generic. +type OldError = PermitApiError<{ private: string }>; +declare const bulk: Awaited>; +// @ts-expect-error T2 does not promise processing operation arrays. +void bulk.operations; +void [missingResourceTenant, missingAssignmentTenant]; +export type { OldError }; diff --git a/scripts/fixtures/packed-consumer.mts b/scripts/fixtures/packed-consumer.mts new file mode 100644 index 00000000..73cfb29a --- /dev/null +++ b/scripts/fixtures/packed-consumer.mts @@ -0,0 +1,33 @@ +import { ApiContext, Permit, type IPermitApi, type PermitApiError } from 'permitio'; +import cjs = require('permitio'); + +const fromCommonjs: ApiContext = new cjs.ApiContext(); +const fromEsm: cjs.ApiContext = new ApiContext(); +new Permit({ token: 'typecheck-only', apiContext: fromCommonjs }); +new cjs.Permit({ token: 'typecheck-only', apiContext: fromEsm }); +// @ts-expect-error A constructor requires a complete context. +new Permit({ token: 'typecheck-only', apiContext: {} }); + +declare const api: IPermitApi; +async function results() { + const paged = await api.resources.list({ includeTotalCount: true }); + const all = await api.resources.list(); + const mode: boolean = Math.random() > 0.5; + const dynamic = await api.resources.list({ includeTotalCount: mode }); + const count: number = paged.total_count; + const key: string = all[0]?.key ?? 'empty'; + // @ts-expect-error All-page mode returns the records, without a page envelope. + void all.total_count; + // @ts-expect-error Dynamic pagination requires narrowing before using a page envelope. + void dynamic.total_count; + const synced = await api.users.sync({ key: 'customer' }); + const created: boolean = synced.created; + const userKey: string = synced.user.key; + // @ts-expect-error Sync returns a user/result envelope rather than the old raw record. + void synced.key; + return { count, key, created, userKey }; +} + +declare const error: PermitApiError; +const status: number | undefined = error.status; +void [results, status]; diff --git a/scripts/fixtures/public-reference.cts b/scripts/fixtures/public-reference.cts new file mode 100644 index 00000000..f54ff5bb --- /dev/null +++ b/scripts/fixtures/public-reference.cts @@ -0,0 +1,531 @@ +import SDK = require('permitio'); + +async function urlAuthorization(client: SDK.IPermitClient): Promise { + const config: SDK.CheckUrlConfig = { + tenant: 'east', + context: { enabled: false, count: 0 }, + timeout: 0, + throwOnError: true, + }; + const decision: boolean = await client.checkUrl( + { key: 'alice', attributes: { eligible: true } }, + 'CUSTOM', + 'https://example.test/document', + config, + ); + const defaultTenant: boolean = await client.checkUrl('alice', 'get', 'urn:example:document'); + // @ts-expect-error User objects require a key. + void client.checkUrl({ attributes: {} }, 'GET', 'https://example.test/document'); + // @ts-expect-error URL authorization requires a URL string. + void client.checkUrl('alice', 'GET', new URL('https://example.test/document')); + // @ts-expect-error The HTTP method must be a string. + void client.checkUrl('alice', 7, 'https://example.test/document'); + // @ts-expect-error Tenant and context use the fourth options argument. + void client.checkUrl('alice', 'GET', 'https://example.test/document', 'east'); + // @ts-expect-error URL decisions are boolean, never a PDP response envelope. + const envelope: { allow: boolean } = await client.checkUrl( + 'alice', + 'GET', + 'https://example.test/document', + ); + // @ts-expect-error Exact optional tenant values cannot explicitly be undefined. + const invalidConfig: SDK.CheckUrlConfig = { tenant: undefined }; + void [decision, defaultTenant, envelope, invalidConfig]; +} +void urlAuthorization; + +async function userAttributeSchema(client: SDK.IPermitApi): Promise { + const definitions: SDK.IUserAttributesApi = client.userAttributes; + const listMethod: SDK.UserAttributesApi['list'] = definitions.list; + const body: SDK.ResourceAttributeCreate = { key: 'department', type: SDK.AttributeType.String }; + const patch: SDK.ResourceAttributeUpdate = { description: 'Department schema' }; + const created: SDK.ResourceAttributeRead = await definitions.create(body); + const stored: SDK.ResourceAttributeRead = await definitions.get(created.id); + const changed: SDK.ResourceAttributeRead = await definitions.update(created.key, patch); + const rows: SDK.ResourceAttributeRead[] = await definitions.list({ page: 1, perPage: 7 }); + const deleted: void = await definitions.delete(created.id); + const metadata: string[] = [ + created.id, + created.resource_id, + created.resource_key, + created.organization_id, + created.project_id, + created.environment_id, + created.created_at, + created.updated_at, + ]; + const builtIn: boolean = created.built_in; + // @ts-expect-error The schema body requires both key and type. + void definitions.create({ key: 'department' }); + // @ts-expect-error Individual user values do not belong in a schema definition. + void definitions.create({ ...body, attributes: { department: 'engineering' } }); + // @ts-expect-error The dedicated list has no resource selector. + void definitions.list({ resourceId: 'document' }); + // @ts-expect-error Definitions return rows, not a total-count envelope. + const page: { data: SDK.ResourceAttributeRead[] } = await definitions.list(); + // @ts-expect-error The public update contract does not allow a key change. + void definitions.update(created.id, { key: 'changed' }); + // @ts-expect-error Schema description is not nullable. + void definitions.update(created.id, { description: null }); + // @ts-expect-error Schema has no facts synchronization operation. + void definitions.waitForSync(5); + void [listMethod, stored, changed, rows, deleted, metadata, builtIn, page]; +} +void userAttributeSchema; + +async function bulkRoleDefinitions(client: SDK.IPermitApi): Promise { + const definitions: SDK.RoleCreateBulk[] = [ + { key: 'reader', name: 'Reader', permissions: ['document:read'] }, + { key: 'editor', name: 'Editor', resource: 'document', permissions: ['read', 'write'] }, + ]; + const method: SDK.RolesApi['bulkCreateOrReplace'] = client.roles.bulkCreateOrReplace; + const result: SDK.RoleCreateBulkOperationResult = + await client.roles.bulkCreateOrReplace(definitions); + const created: string[] = result.created; + const updated: string[] = result.updated; + // @ts-expect-error The facade receives an array, not the HTTP body wrapper. + void client.roles.bulkCreateOrReplace({ operations: definitions }); + // @ts-expect-error The existing result requires both arrays even when empty. + const incomplete: SDK.RoleCreateBulkOperationResult = { created: [] }; + // @ts-expect-error The existing result does not contain bulk count fields. + void result.created_count; + void [method, created, updated, incomplete]; +} +void bulkRoleDefinitions; + +declare const api: SDK.IPermitApi; +declare const permit: SDK.Permit; +declare const relationClient: SDK.ResourceRelationsApi; +declare const roleClient: SDK.ResourceRolesApi; +const relations: SDK.IResourceRelationsApi = relationClient; +const roles: SDK.IResourceRolesApi = roleClient; +const relationQuery: SDK.IListRelations = { resourceKey: 'document', page: 1 }; +const roleQuery: SDK.IListResourceRoles = { resourceKey: 'document' }; +const relationInput: SDK.RelationCreate = { + key: 'parent', + name: 'Parent', + subject_resource: 'folder', +}; +const roleInput: SDK.ResourceRoleCreate = { key: 'reader', name: 'Reader', permissions: ['read'] }; +const roleUpdate: SDK.ResourceRoleUpdate = { permissions: ['read'] }; +const conditions: SDK.PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings = { + no_direct_roles_on_object: true, +}; +const derivation: SDK.DerivedRoleRuleCreate = { + role: 'reader', + on_resource: 'folder', + linked_by_relation: 'parent', + when: conditions, +}; +const remove: SDK.DerivedRoleRuleDelete = derivation; +const groupUpdate: SDK.ResourceActionGroupUpdate = { actions: ['read'] }; +const check: SDK.ICheckQuery = { user: 'alice', action: 'read', resource: 'document' }; +const checkConfig: SDK.CheckConfig = { timeout: 0, throwOnError: false }; +const pagination: SDK.IPaginationExtended = { includeTotalCount: true }; +const userRoles: SDK.IGetUserRoles = { user: 'alice', tenant: 'default', includeTotalCount: true }; +const syncPolicy: SDK.FactsSyncTimeoutPolicy = 'fail'; +declare const error: SDK.PermitApiError; +const formatted: SDK.FormattedAxiosError = error.formattedAxiosError; + +async function contracts() { + const relation: SDK.RelationRead = await relations.create('document', relationInput); + const role: SDK.ResourceRoleRead = await roles.update('document', 'reader', roleUpdate); + const derived: SDK.DerivedRoleRuleRead = await roles.createRoleDerivation( + 'document', + 'reader', + derivation, + ); + const permissions: SDK.IUserPermissions = await permit.getUserPermissions('alice'); + const page: SDK.ReturnPaginationType< + { includeTotalCount: true }, + SDK.PaginatedResultResourceRead, + SDK.ResourceRead[] + > = await api.resources.list({ includeTotalCount: true }); + const assigned: SDK.ReturnListRoleAssignments<{ includeTotalCount: true }> = + await api.roleAssignments.list({ includeTotalCount: true }); + const userAssigned: SDK.ReturnIGetUserRolesType<{ user: string; includeTotalCount: true }> = + await api.users.getAssignedRoles({ user: 'alice', includeTotalCount: true }); + await roles.deleteRoleDerivation('document', 'reader', remove); + await api.ensureContext(SDK.ApiContextLevel.ENVIRONMENT); + try { + new SDK.ApiContext().setEnvironmentLevelContext('org', 'project', 'env'); + } catch (failure) { + if (!(failure instanceof SDK.PermitContextChangeError)) throw failure; + const status: number | undefined = failure.status; + void status; + } + return { relation, role, derived, permissions, page, assigned, userAssigned }; +} + +// @ts-expect-error Relation creation retains its required subject resource. +const invalidRelation: SDK.RelationCreate = { key: 'parent', name: 'Parent' }; +// @ts-expect-error Permission entries retain string arrays. +const invalidRole: SDK.ResourceRoleUpdate = { permissions: [123] }; +const invalidConditions: SDK.PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings = { + // @ts-expect-error Derived-role conditions retain boolean fields. + no_direct_roles_on_object: 'true', +}; +// @ts-expect-error Check policy fields are booleans. +const invalidCheck: SDK.CheckConfig = { throwOnError: 'false' }; +// @ts-expect-error Context levels remain the actual enum rather than arbitrary strings. +const invalidContext: SDK.ApiContextLevel = 'ENVIRONMENT'; +// @ts-expect-error Sanitized REST diagnostics remain unknown until narrowed. +void formatted.error.secret; +void [ + relations, + roles, + relationQuery, + roleQuery, + roleInput, + groupUpdate, + check, + checkConfig, + pagination, + userRoles, + syncPolicy, + formatted, + contracts, + invalidRelation, + invalidRole, + invalidConditions, + invalidCheck, + invalidContext, +]; + +async function localRolePages(client: SDK.IPermitClient): Promise { + const query: SDK.ILocalRoleAssignmentsQuery = { + user: 'alice', + role: 'reader', + tenant: 'east', + resource: 'document', + resourceInstance: 'document:report', + page: 1, + perPage: 30, + }; + const rows: SDK.ILocalRoleAssignment[] = await client.getLocalRoleAssignments(query, { + timeout: 0, + }); + const instance: string | null | undefined = rows[0]?.resource_instance; + // @ts-expect-error Local reads have no total-count option. + void client.getLocalRoleAssignments({ includeTotalCount: true }); + // @ts-expect-error The query uses camelCase names, mapped internally to the wire. + void client.getLocalRoleAssignments({ resource_instance: 'document:report' }); + // @ts-expect-error Local rows do not require control-plane IDs or timestamps. + const control: SDK.RoleAssignmentRead[] = rows; + void [instance, control]; +} +void localRolePages; + +async function proxyConfigurations(client: SDK.IPermitApi): Promise { + const api: SDK.IProxyConfigsApi = client.proxyConfigs; + const rule: SDK.MappingRule = { + url: '^https://service.example.test/items/[0-9]+$', + url_type: SDK.MappingRuleUrlTypeEnum.Regex, + http_method: SDK.Methods.Get, + resource: 'document', + action: 'read', + headers: { 'X-Tenant': 'east' }, + priority: 0, + }; + const input: SDK.ProxyConfigCreate = { + key: 'payments', + name: 'Payments', + secret: 'dummy', + auth_mechanism: SDK.AuthMechanism.Basic, + mapping_rules: [rule], + }; + const patch: SDK.ProxyConfigUpdate = { + secret: { 'X-Authorization': 'dummy-header' }, + auth_mechanism: SDK.AuthMechanism.Headers, + mapping_rules: [{ ...rule, should_delete: false }], + }; + const created: SDK.ProxyConfigRead = await api.create(input); + const got: SDK.ProxyConfigRead = await api.get(created.id); + const changed: SDK.ProxyConfigRead = await api.update(created.key, patch); + const listed: SDK.ProxyConfigRead[] = await api.list({ page: 1, perPage: 7 }); + const deleted: void = await api.delete(created.id); + const secret: SDK.Secret = got.secret; + // @ts-expect-error Proxy creation requires key, name and secret. + void api.create({ key: 'payments', name: 'Payments' }); + // @ts-expect-error Secret dictionaries contain strings. + void api.update(created.id, { secret: { 'X-Authorization': 7 } }); + // @ts-expect-error PATCH cannot rename a key. + void api.update(created.id, { key: 'other' }); + // @ts-expect-error Plain URL matching omits url_type; none is not an enum member. + const invalidRule: SDK.MappingRule = { ...rule, url_type: 'none' }; + // @ts-expect-error Lists return a plain array without invented counts. + const page: { data: SDK.ProxyConfigRead[] } = await api.list(); + // @ts-expect-error This configuration API has no facts synchronization helper. + void api.waitForSync(5); + void [changed, listed, deleted, secret, invalidRule, page]; +} +void proxyConfigurations; + +async function apiKeyManagement(client: SDK.IPermitApi): Promise { + const api: SDK.IApiKeysApi = client.apiKeys; + const input: SDK.APIKeyCreate = { + organization_id: 'organization-id', + project_id: 'project-id', + environment_id: 'environment-id', + object_type: SDK.MemberAccessObj.Env, + access_level: SDK.MemberAccessLevel.Read, + owner_type: SDK.APIKeyOwnerType.Member, + name: 'Disposable key', + }; + const query: SDK.IListApiKeys = { + objectType: SDK.MemberAccessObj.Project, + projId: 'project-key-or-id', + page: 1, + perPage: 3, + }; + const page: SDK.PaginatedResultAPIKeyRead = await api.list(query); + const created: SDK.APIKeyRead = await api.create(input); + const got: SDK.APIKeyRead = await api.get(created.id); + const rotated: SDK.APIKeyRead = await api.rotate(created.id); + const deleted: void = await api.delete(rotated.id); + const scope: SDK.APIKeyScopeRead = await api.getScope(); + const secret: string | null | undefined = got.secret; + const counts: [number, number | null | undefined] = [page.total_count, page.page_count]; + const ids: [string, string | null | undefined, string | null | undefined] = [ + scope.organization_id, + scope.project_id, + scope.environment_id, + ]; + const organizationScope: SDK.APIKeyScopeRead = { + organization_id: 'org', + project_id: null, + environment_id: null, + }; + const projectScope: SDK.APIKeyScopeRead = { + organization_id: 'org', + project_id: 'project', + environment_id: null, + }; + if (scope.project_id !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable project ID. + scope.project_id.toUpperCase(); + } + if (scope.environment_id !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable environment ID. + scope.environment_id.toUpperCase(); + } + if (scope.project_id != null) scope.project_id.toUpperCase(); + if (scope.environment_id != null) scope.environment_id.toUpperCase(); + // @ts-expect-error The organization ID remains required and nonnullable. + const invalidScope: SDK.APIKeyScopeRead = { organization_id: null }; + // @ts-expect-error Creation input is not widened by scope-response nullability. + void api.create({ organization_id: 'org', environment_id: null }); + void [organizationScope, projectScope, invalidScope]; + const nullableRecord: SDK.APIKeyRead = { + organization_id: 'org', + owner_type: SDK.APIKeyOwnerType.Member, + id: 'id', + created_at: 'created', + project_id: null, + environment_id: null, + object_type: null, + access_level: null, + name: null, + secret: null, + created_by_member: null, + last_used_at: null, + env: null, + project: null, + }; + const nullablePage: SDK.PaginatedResultAPIKeyRead = { + data: [nullableRecord], + total_count: 1, + page_count: null, + }; + if (got.secret !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable secret. + got.secret.toUpperCase(); + } + if (got.project !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable nested project. + void got.project.id; + } + if (page.page_count !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable page count. + page.page_count.toFixed(); + } + if (got.secret != null) got.secret.toUpperCase(); + if (got.project != null) void got.project.id; + if (page.page_count != null) page.page_count.toFixed(); + // @ts-expect-error Required key record IDs stay nonnullable. + const nullId: SDK.APIKeyRead = { ...got, id: null }; + // @ts-expect-error Required list totals stay nonnullable. + const nullTotal: SDK.PaginatedResultAPIKeyRead = { data: [], total_count: null }; + void [nullableRecord, nullablePage, nullId, nullTotal]; + // @ts-expect-error Creation requires organization_id. + void api.create({ name: 'Incomplete' }); + // @ts-expect-error Secrets are server responses, not creation input. + void api.create({ ...input, secret: 'caller-supplied' }); + // @ts-expect-error The published project filter is projId. + void api.list({ projectId: 'project' }); + // @ts-expect-error No environment filter is published. + void api.list({ environmentId: 'environment' }); + // @ts-expect-error Lists preserve their complete envelope. + const rows: SDK.APIKeyRead[] = await api.list(); + // @ts-expect-error A returned secret is optional. + const requiredSecret: string = created.secret; + // @ts-expect-error Rotation is bodyless. + void api.rotate(created.id, input); + // @ts-expect-error Scope discovery takes no selected-context argument. + void api.getScope({ projectId: 'project' }); + // @ts-expect-error API-key management has no update operation. + void api.update(created.id, {}); + // @ts-expect-error Exact optional scope does not accept explicit undefined. + void api.create({ organization_id: 'org', environment_id: undefined }); + void [deleted, secret, counts, ids, rows, requiredSecret]; +} +void apiKeyManagement; + +async function auditLogs(client: SDK.IPermitApi) { + const api: SDK.IAuditLogsApi = client.auditLogs; + const options: SDK.IListAuditLogs = { + users: ['alice'] as const, + decision: false, + timestampFrom: 0, + query: SDK.AuditLogQueryType.None, + sortBy: SDK.AuditLogSortKey.None, + }; + const page: SDK.LimitedPaginatedResultAuditLogModel = await api.list(options); + for (const row of page.data) { + const detail: SDK.DetailedAuditLogModel = await api.get(row.id); + const raw: SDK.RawData1 = detail.raw_data; + if ('metrics' in raw) { + const duration: number | null | undefined = raw.metrics.timer_rego_query_eval_ns; + void duration; + } + const objects: SDK.AuditLogObjectsModel | null | undefined = detail.objects; + const count: number | null | undefined = page.page_count; + void [objects, count]; + // @ts-expect-error The optional engine tag does not exclude the dummy union branch. + if (raw.engine === 'OPA') void raw.metrics; + } + // @ts-expect-error User filters require repeated arrays, not CSV strings. + void api.list({ users: 'alice,bob' }); + // @ts-expect-error False is boolean, not a numeric decision. + void api.list({ decision: 0 }); + // @ts-expect-error List preserves the complete envelope. + const rows: SDK.AuditLogModel[] = await api.list(); + // @ts-expect-error Audit reads have no replay API. + void api.replay('id'); + void rows; +} +void auditLogs; + +async function asynchronousEnvironmentCopy(client: SDK.IPermitApi): Promise { + const api: SDK.IEnvironmentsApi = client.environments; + const copy: SDK.EnvironmentCopy = { + target_env: { + new: { + key: 'target', + name: 'Target', + jwks: { url: 'https://keys.example' }, + settings: { count: 0, enabled: false }, + }, + existing: 'existing-target', + }, + conflict_strategy: SDK.EnvironmentCopyConflictStrategy.Overwrite, + scope: { + resources: { include: ['doc'], exclude: [] }, + roles: { exclude: ['other'] }, + user_sets: { include: [] }, + resource_sets: { exclude: [] }, + custom_policies: { include: [] }, + }, + }; + const submitted: SDK.TaskResultEnvironmentRead = await api.copyAsync( + 'project', + 'source', + copy, + 0, + ); + const read: SDK.TaskResultEnvironmentRead = await api.getCopyResult( + 'project', + 'source', + submitted.task_id, + 0.5, + ); + const status: SDK.TaskStatus = read.status; + const nullable: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status: SDK.TaskStatus.Processing, + result: null, + error: null, + }; + const omitted: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status: SDK.TaskStatus.Cancelled, + }; + if (read.result) { + const result: SDK.EnvironmentRead = read.result; + const required: string[] = [ + result.key, + result.name, + result.id, + result.organization_id, + result.project_id, + result.created_at, + result.updated_at, + ]; + void [ + required, + result.description, + result.custom_branch_name, + result.avp_policy_store_id, + result.jwks?.url, + result.jwks?.ttl, + result.jwks?.jwks, + result.settings, + ]; + } + if (read.error) { + const error: SDK.ErrorDetails = read.error; + const required: string[] = [error.id, error.title, error.error_code]; + const details: unknown = error.additional_info; + void [required, details, error.message, error.support_link]; + } + // @ts-expect-error A copy body requires the published target_env. + void api.copyAsync('project', 'source', { scope: {} }); + // @ts-expect-error Wait seconds require a number. + void api.copyAsync('project', 'source', copy, '0'); + // @ts-expect-error Result wait seconds require a number. + void api.getCopyResult('project', 'source', 'task', null); + // @ts-expect-error The published task status has no failed alias. + const badStatus: SDK.TaskStatus = 'failed'; + // @ts-expect-error Task result requires complete environment metadata. + const badResult: SDK.TaskResultEnvironmentRead['result'] = { key: 'target' }; + // @ts-expect-error ErrorDetails requires its ID, title and error_code. + const badError: SDK.TaskResultEnvironmentRead['error'] = { message: 'failure' }; + // @ts-expect-error Exact optional result does not accept explicit undefined. + const undefinedResult: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status, + result: undefined, + }; + // @ts-expect-error Exact optional error does not accept explicit undefined. + const undefinedError: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status, + error: undefined, + }; + // @ts-expect-error Task ID is required even for processing. + const missingTask: SDK.TaskResultEnvironmentRead = { status: SDK.TaskStatus.Processing }; + // @ts-expect-error Async copy returns the task envelope, not only its environment. + const projected: SDK.EnvironmentRead = await api.copyAsync('project', 'source', copy); + void [ + nullable, + omitted, + badStatus, + badResult, + badError, + undefinedResult, + undefinedError, + missingTask, + projected, + ]; +} +void asynchronousEnvironmentCopy; diff --git a/scripts/fixtures/public-reference.mts b/scripts/fixtures/public-reference.mts new file mode 100644 index 00000000..039c145b --- /dev/null +++ b/scripts/fixtures/public-reference.mts @@ -0,0 +1,531 @@ +import * as SDK from 'permitio'; + +async function urlAuthorization(client: SDK.IPermitClient): Promise { + const config: SDK.CheckUrlConfig = { + tenant: 'east', + context: { enabled: false, count: 0 }, + timeout: 0, + throwOnError: true, + }; + const decision: boolean = await client.checkUrl( + { key: 'alice', attributes: { eligible: true } }, + 'CUSTOM', + 'https://example.test/document', + config, + ); + const defaultTenant: boolean = await client.checkUrl('alice', 'get', 'urn:example:document'); + // @ts-expect-error User objects require a key. + void client.checkUrl({ attributes: {} }, 'GET', 'https://example.test/document'); + // @ts-expect-error URL authorization requires a URL string. + void client.checkUrl('alice', 'GET', new URL('https://example.test/document')); + // @ts-expect-error The HTTP method must be a string. + void client.checkUrl('alice', 7, 'https://example.test/document'); + // @ts-expect-error Tenant and context use the fourth options argument. + void client.checkUrl('alice', 'GET', 'https://example.test/document', 'east'); + // @ts-expect-error URL decisions are boolean, never a PDP response envelope. + const envelope: { allow: boolean } = await client.checkUrl( + 'alice', + 'GET', + 'https://example.test/document', + ); + // @ts-expect-error Exact optional tenant values cannot explicitly be undefined. + const invalidConfig: SDK.CheckUrlConfig = { tenant: undefined }; + void [decision, defaultTenant, envelope, invalidConfig]; +} +void urlAuthorization; + +async function userAttributeSchema(client: SDK.IPermitApi): Promise { + const definitions: SDK.IUserAttributesApi = client.userAttributes; + const listMethod: SDK.UserAttributesApi['list'] = definitions.list; + const body: SDK.ResourceAttributeCreate = { key: 'department', type: SDK.AttributeType.String }; + const patch: SDK.ResourceAttributeUpdate = { description: 'Department schema' }; + const created: SDK.ResourceAttributeRead = await definitions.create(body); + const stored: SDK.ResourceAttributeRead = await definitions.get(created.id); + const changed: SDK.ResourceAttributeRead = await definitions.update(created.key, patch); + const rows: SDK.ResourceAttributeRead[] = await definitions.list({ page: 1, perPage: 7 }); + const deleted: void = await definitions.delete(created.id); + const metadata: string[] = [ + created.id, + created.resource_id, + created.resource_key, + created.organization_id, + created.project_id, + created.environment_id, + created.created_at, + created.updated_at, + ]; + const builtIn: boolean = created.built_in; + // @ts-expect-error The schema body requires both key and type. + void definitions.create({ key: 'department' }); + // @ts-expect-error Individual user values do not belong in a schema definition. + void definitions.create({ ...body, attributes: { department: 'engineering' } }); + // @ts-expect-error The dedicated list has no resource selector. + void definitions.list({ resourceId: 'document' }); + // @ts-expect-error Definitions return rows, not a total-count envelope. + const page: { data: SDK.ResourceAttributeRead[] } = await definitions.list(); + // @ts-expect-error The public update contract does not allow a key change. + void definitions.update(created.id, { key: 'changed' }); + // @ts-expect-error Schema description is not nullable. + void definitions.update(created.id, { description: null }); + // @ts-expect-error Schema has no facts synchronization operation. + void definitions.waitForSync(5); + void [listMethod, stored, changed, rows, deleted, metadata, builtIn, page]; +} +void userAttributeSchema; + +async function bulkRoleDefinitions(client: SDK.IPermitApi): Promise { + const definitions: SDK.RoleCreateBulk[] = [ + { key: 'reader', name: 'Reader', permissions: ['document:read'] }, + { key: 'editor', name: 'Editor', resource: 'document', permissions: ['read', 'write'] }, + ]; + const method: SDK.RolesApi['bulkCreateOrReplace'] = client.roles.bulkCreateOrReplace; + const result: SDK.RoleCreateBulkOperationResult = + await client.roles.bulkCreateOrReplace(definitions); + const created: string[] = result.created; + const updated: string[] = result.updated; + // @ts-expect-error The facade receives an array, not the HTTP body wrapper. + void client.roles.bulkCreateOrReplace({ operations: definitions }); + // @ts-expect-error The existing result requires both arrays even when empty. + const incomplete: SDK.RoleCreateBulkOperationResult = { created: [] }; + // @ts-expect-error The existing result does not contain bulk count fields. + void result.created_count; + void [method, created, updated, incomplete]; +} +void bulkRoleDefinitions; + +declare const api: SDK.IPermitApi; +declare const permit: SDK.Permit; +declare const relationClient: SDK.ResourceRelationsApi; +declare const roleClient: SDK.ResourceRolesApi; +const relations: SDK.IResourceRelationsApi = relationClient; +const roles: SDK.IResourceRolesApi = roleClient; +const relationQuery: SDK.IListRelations = { resourceKey: 'document', page: 1 }; +const roleQuery: SDK.IListResourceRoles = { resourceKey: 'document' }; +const relationInput: SDK.RelationCreate = { + key: 'parent', + name: 'Parent', + subject_resource: 'folder', +}; +const roleInput: SDK.ResourceRoleCreate = { key: 'reader', name: 'Reader', permissions: ['read'] }; +const roleUpdate: SDK.ResourceRoleUpdate = { permissions: ['read'] }; +const conditions: SDK.PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings = { + no_direct_roles_on_object: true, +}; +const derivation: SDK.DerivedRoleRuleCreate = { + role: 'reader', + on_resource: 'folder', + linked_by_relation: 'parent', + when: conditions, +}; +const remove: SDK.DerivedRoleRuleDelete = derivation; +const groupUpdate: SDK.ResourceActionGroupUpdate = { actions: ['read'] }; +const check: SDK.ICheckQuery = { user: 'alice', action: 'read', resource: 'document' }; +const checkConfig: SDK.CheckConfig = { timeout: 0, throwOnError: false }; +const pagination: SDK.IPaginationExtended = { includeTotalCount: true }; +const userRoles: SDK.IGetUserRoles = { user: 'alice', tenant: 'default', includeTotalCount: true }; +const syncPolicy: SDK.FactsSyncTimeoutPolicy = 'fail'; +declare const error: SDK.PermitApiError; +const formatted: SDK.FormattedAxiosError = error.formattedAxiosError; + +async function contracts() { + const relation: SDK.RelationRead = await relations.create('document', relationInput); + const role: SDK.ResourceRoleRead = await roles.update('document', 'reader', roleUpdate); + const derived: SDK.DerivedRoleRuleRead = await roles.createRoleDerivation( + 'document', + 'reader', + derivation, + ); + const permissions: SDK.IUserPermissions = await permit.getUserPermissions('alice'); + const page: SDK.ReturnPaginationType< + { includeTotalCount: true }, + SDK.PaginatedResultResourceRead, + SDK.ResourceRead[] + > = await api.resources.list({ includeTotalCount: true }); + const assigned: SDK.ReturnListRoleAssignments<{ includeTotalCount: true }> = + await api.roleAssignments.list({ includeTotalCount: true }); + const userAssigned: SDK.ReturnIGetUserRolesType<{ user: string; includeTotalCount: true }> = + await api.users.getAssignedRoles({ user: 'alice', includeTotalCount: true }); + await roles.deleteRoleDerivation('document', 'reader', remove); + await api.ensureContext(SDK.ApiContextLevel.ENVIRONMENT); + try { + new SDK.ApiContext().setEnvironmentLevelContext('org', 'project', 'env'); + } catch (failure) { + if (!(failure instanceof SDK.PermitContextChangeError)) throw failure; + const status: number | undefined = failure.status; + void status; + } + return { relation, role, derived, permissions, page, assigned, userAssigned }; +} + +// @ts-expect-error Relation creation retains its required subject resource. +const invalidRelation: SDK.RelationCreate = { key: 'parent', name: 'Parent' }; +// @ts-expect-error Permission entries retain string arrays. +const invalidRole: SDK.ResourceRoleUpdate = { permissions: [123] }; +const invalidConditions: SDK.PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings = { + // @ts-expect-error Derived-role conditions retain boolean fields. + no_direct_roles_on_object: 'true', +}; +// @ts-expect-error Check policy fields are booleans. +const invalidCheck: SDK.CheckConfig = { throwOnError: 'false' }; +// @ts-expect-error Context levels remain the actual enum rather than arbitrary strings. +const invalidContext: SDK.ApiContextLevel = 'ENVIRONMENT'; +// @ts-expect-error Sanitized REST diagnostics remain unknown until narrowed. +void formatted.error.secret; +void [ + relations, + roles, + relationQuery, + roleQuery, + roleInput, + groupUpdate, + check, + checkConfig, + pagination, + userRoles, + syncPolicy, + formatted, + contracts, + invalidRelation, + invalidRole, + invalidConditions, + invalidCheck, + invalidContext, +]; + +async function localRolePages(client: SDK.IPermitClient): Promise { + const query: SDK.ILocalRoleAssignmentsQuery = { + user: 'alice', + role: 'reader', + tenant: 'east', + resource: 'document', + resourceInstance: 'document:report', + page: 1, + perPage: 30, + }; + const rows: SDK.ILocalRoleAssignment[] = await client.getLocalRoleAssignments(query, { + timeout: 0, + }); + const instance: string | null | undefined = rows[0]?.resource_instance; + // @ts-expect-error Local reads have no total-count option. + void client.getLocalRoleAssignments({ includeTotalCount: true }); + // @ts-expect-error The query uses camelCase names, mapped internally to the wire. + void client.getLocalRoleAssignments({ resource_instance: 'document:report' }); + // @ts-expect-error Local rows do not require control-plane IDs or timestamps. + const control: SDK.RoleAssignmentRead[] = rows; + void [instance, control]; +} +void localRolePages; + +async function proxyConfigurations(client: SDK.IPermitApi): Promise { + const api: SDK.IProxyConfigsApi = client.proxyConfigs; + const rule: SDK.MappingRule = { + url: '^https://service.example.test/items/[0-9]+$', + url_type: SDK.MappingRuleUrlTypeEnum.Regex, + http_method: SDK.Methods.Get, + resource: 'document', + action: 'read', + headers: { 'X-Tenant': 'east' }, + priority: 0, + }; + const input: SDK.ProxyConfigCreate = { + key: 'payments', + name: 'Payments', + secret: 'dummy', + auth_mechanism: SDK.AuthMechanism.Basic, + mapping_rules: [rule], + }; + const patch: SDK.ProxyConfigUpdate = { + secret: { 'X-Authorization': 'dummy-header' }, + auth_mechanism: SDK.AuthMechanism.Headers, + mapping_rules: [{ ...rule, should_delete: false }], + }; + const created: SDK.ProxyConfigRead = await api.create(input); + const got: SDK.ProxyConfigRead = await api.get(created.id); + const changed: SDK.ProxyConfigRead = await api.update(created.key, patch); + const listed: SDK.ProxyConfigRead[] = await api.list({ page: 1, perPage: 7 }); + const deleted: void = await api.delete(created.id); + const secret: SDK.Secret = got.secret; + // @ts-expect-error Proxy creation requires key, name and secret. + void api.create({ key: 'payments', name: 'Payments' }); + // @ts-expect-error Secret dictionaries contain strings. + void api.update(created.id, { secret: { 'X-Authorization': 7 } }); + // @ts-expect-error PATCH cannot rename a key. + void api.update(created.id, { key: 'other' }); + // @ts-expect-error Plain URL matching omits url_type; none is not an enum member. + const invalidRule: SDK.MappingRule = { ...rule, url_type: 'none' }; + // @ts-expect-error Lists return a plain array without invented counts. + const page: { data: SDK.ProxyConfigRead[] } = await api.list(); + // @ts-expect-error This configuration API has no facts synchronization helper. + void api.waitForSync(5); + void [changed, listed, deleted, secret, invalidRule, page]; +} +void proxyConfigurations; + +async function apiKeyManagement(client: SDK.IPermitApi): Promise { + const api: SDK.IApiKeysApi = client.apiKeys; + const input: SDK.APIKeyCreate = { + organization_id: 'organization-id', + project_id: 'project-id', + environment_id: 'environment-id', + object_type: SDK.MemberAccessObj.Env, + access_level: SDK.MemberAccessLevel.Read, + owner_type: SDK.APIKeyOwnerType.Member, + name: 'Disposable key', + }; + const query: SDK.IListApiKeys = { + objectType: SDK.MemberAccessObj.Project, + projId: 'project-key-or-id', + page: 1, + perPage: 3, + }; + const page: SDK.PaginatedResultAPIKeyRead = await api.list(query); + const created: SDK.APIKeyRead = await api.create(input); + const got: SDK.APIKeyRead = await api.get(created.id); + const rotated: SDK.APIKeyRead = await api.rotate(created.id); + const deleted: void = await api.delete(rotated.id); + const scope: SDK.APIKeyScopeRead = await api.getScope(); + const secret: string | null | undefined = got.secret; + const counts: [number, number | null | undefined] = [page.total_count, page.page_count]; + const ids: [string, string | null | undefined, string | null | undefined] = [ + scope.organization_id, + scope.project_id, + scope.environment_id, + ]; + const organizationScope: SDK.APIKeyScopeRead = { + organization_id: 'org', + project_id: null, + environment_id: null, + }; + const projectScope: SDK.APIKeyScopeRead = { + organization_id: 'org', + project_id: 'project', + environment_id: null, + }; + if (scope.project_id !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable project ID. + scope.project_id.toUpperCase(); + } + if (scope.environment_id !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable environment ID. + scope.environment_id.toUpperCase(); + } + if (scope.project_id != null) scope.project_id.toUpperCase(); + if (scope.environment_id != null) scope.environment_id.toUpperCase(); + // @ts-expect-error The organization ID remains required and nonnullable. + const invalidScope: SDK.APIKeyScopeRead = { organization_id: null }; + // @ts-expect-error Creation input is not widened by scope-response nullability. + void api.create({ organization_id: 'org', environment_id: null }); + void [organizationScope, projectScope, invalidScope]; + const nullableRecord: SDK.APIKeyRead = { + organization_id: 'org', + owner_type: SDK.APIKeyOwnerType.Member, + id: 'id', + created_at: 'created', + project_id: null, + environment_id: null, + object_type: null, + access_level: null, + name: null, + secret: null, + created_by_member: null, + last_used_at: null, + env: null, + project: null, + }; + const nullablePage: SDK.PaginatedResultAPIKeyRead = { + data: [nullableRecord], + total_count: 1, + page_count: null, + }; + if (got.secret !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable secret. + got.secret.toUpperCase(); + } + if (got.project !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable nested project. + void got.project.id; + } + if (page.page_count !== undefined) { + // @ts-expect-error Excluding undefined still leaves a nullable page count. + page.page_count.toFixed(); + } + if (got.secret != null) got.secret.toUpperCase(); + if (got.project != null) void got.project.id; + if (page.page_count != null) page.page_count.toFixed(); + // @ts-expect-error Required key record IDs stay nonnullable. + const nullId: SDK.APIKeyRead = { ...got, id: null }; + // @ts-expect-error Required list totals stay nonnullable. + const nullTotal: SDK.PaginatedResultAPIKeyRead = { data: [], total_count: null }; + void [nullableRecord, nullablePage, nullId, nullTotal]; + // @ts-expect-error Creation requires organization_id. + void api.create({ name: 'Incomplete' }); + // @ts-expect-error Secrets are server responses, not creation input. + void api.create({ ...input, secret: 'caller-supplied' }); + // @ts-expect-error The published project filter is projId. + void api.list({ projectId: 'project' }); + // @ts-expect-error No environment filter is published. + void api.list({ environmentId: 'environment' }); + // @ts-expect-error Lists preserve their complete envelope. + const rows: SDK.APIKeyRead[] = await api.list(); + // @ts-expect-error A returned secret is optional. + const requiredSecret: string = created.secret; + // @ts-expect-error Rotation is bodyless. + void api.rotate(created.id, input); + // @ts-expect-error Scope discovery takes no selected-context argument. + void api.getScope({ projectId: 'project' }); + // @ts-expect-error API-key management has no update operation. + void api.update(created.id, {}); + // @ts-expect-error Exact optional scope does not accept explicit undefined. + void api.create({ organization_id: 'org', environment_id: undefined }); + void [deleted, secret, counts, ids, rows, requiredSecret]; +} +void apiKeyManagement; + +async function auditLogs(client: SDK.IPermitApi) { + const api: SDK.IAuditLogsApi = client.auditLogs; + const options: SDK.IListAuditLogs = { + users: ['alice'] as const, + decision: false, + timestampFrom: 0, + query: SDK.AuditLogQueryType.None, + sortBy: SDK.AuditLogSortKey.None, + }; + const page: SDK.LimitedPaginatedResultAuditLogModel = await api.list(options); + for (const row of page.data) { + const detail: SDK.DetailedAuditLogModel = await api.get(row.id); + const raw: SDK.RawData1 = detail.raw_data; + if ('metrics' in raw) { + const duration: number | null | undefined = raw.metrics.timer_rego_query_eval_ns; + void duration; + } + const objects: SDK.AuditLogObjectsModel | null | undefined = detail.objects; + const count: number | null | undefined = page.page_count; + void [objects, count]; + // @ts-expect-error The optional engine tag does not exclude the dummy union branch. + if (raw.engine === 'OPA') void raw.metrics; + } + // @ts-expect-error User filters require repeated arrays, not CSV strings. + void api.list({ users: 'alice,bob' }); + // @ts-expect-error False is boolean, not a numeric decision. + void api.list({ decision: 0 }); + // @ts-expect-error List preserves the complete envelope. + const rows: SDK.AuditLogModel[] = await api.list(); + // @ts-expect-error Audit reads have no replay API. + void api.replay('id'); + void rows; +} +void auditLogs; + +async function asynchronousEnvironmentCopy(client: SDK.IPermitApi): Promise { + const api: SDK.IEnvironmentsApi = client.environments; + const copy: SDK.EnvironmentCopy = { + target_env: { + new: { + key: 'target', + name: 'Target', + jwks: { url: 'https://keys.example' }, + settings: { count: 0, enabled: false }, + }, + existing: 'existing-target', + }, + conflict_strategy: SDK.EnvironmentCopyConflictStrategy.Overwrite, + scope: { + resources: { include: ['doc'], exclude: [] }, + roles: { exclude: ['other'] }, + user_sets: { include: [] }, + resource_sets: { exclude: [] }, + custom_policies: { include: [] }, + }, + }; + const submitted: SDK.TaskResultEnvironmentRead = await api.copyAsync( + 'project', + 'source', + copy, + 0, + ); + const read: SDK.TaskResultEnvironmentRead = await api.getCopyResult( + 'project', + 'source', + submitted.task_id, + 0.5, + ); + const status: SDK.TaskStatus = read.status; + const nullable: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status: SDK.TaskStatus.Processing, + result: null, + error: null, + }; + const omitted: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status: SDK.TaskStatus.Cancelled, + }; + if (read.result) { + const result: SDK.EnvironmentRead = read.result; + const required: string[] = [ + result.key, + result.name, + result.id, + result.organization_id, + result.project_id, + result.created_at, + result.updated_at, + ]; + void [ + required, + result.description, + result.custom_branch_name, + result.avp_policy_store_id, + result.jwks?.url, + result.jwks?.ttl, + result.jwks?.jwks, + result.settings, + ]; + } + if (read.error) { + const error: SDK.ErrorDetails = read.error; + const required: string[] = [error.id, error.title, error.error_code]; + const details: unknown = error.additional_info; + void [required, details, error.message, error.support_link]; + } + // @ts-expect-error A copy body requires the published target_env. + void api.copyAsync('project', 'source', { scope: {} }); + // @ts-expect-error Wait seconds require a number. + void api.copyAsync('project', 'source', copy, '0'); + // @ts-expect-error Result wait seconds require a number. + void api.getCopyResult('project', 'source', 'task', null); + // @ts-expect-error The published task status has no failed alias. + const badStatus: SDK.TaskStatus = 'failed'; + // @ts-expect-error Task result requires complete environment metadata. + const badResult: SDK.TaskResultEnvironmentRead['result'] = { key: 'target' }; + // @ts-expect-error ErrorDetails requires its ID, title and error_code. + const badError: SDK.TaskResultEnvironmentRead['error'] = { message: 'failure' }; + // @ts-expect-error Exact optional result does not accept explicit undefined. + const undefinedResult: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status, + result: undefined, + }; + // @ts-expect-error Exact optional error does not accept explicit undefined. + const undefinedError: SDK.TaskResultEnvironmentRead = { + task_id: 'task', + status, + error: undefined, + }; + // @ts-expect-error Task ID is required even for processing. + const missingTask: SDK.TaskResultEnvironmentRead = { status: SDK.TaskStatus.Processing }; + // @ts-expect-error Async copy returns the task envelope, not only its environment. + const projected: SDK.EnvironmentRead = await api.copyAsync('project', 'source', copy); + void [ + nullable, + omitted, + badStatus, + badResult, + badError, + undefinedResult, + undefinedError, + missingTask, + projected, + ]; +} +void asynchronousEnvironmentCopy; diff --git a/scripts/generate-openapi.mjs b/scripts/generate-openapi.mjs new file mode 100644 index 00000000..4bb4b92a --- /dev/null +++ b/scripts/generate-openapi.mjs @@ -0,0 +1,129 @@ +#!/usr/bin/env node +import { execFileSync } from 'node:child_process'; +import { + cpSync, + mkdirSync, + mkdtempSync, + readdirSync, + readFileSync, + renameSync, + rmSync, + symlinkSync, + writeFileSync, +} from 'node:fs'; +import { dirname, join, relative, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { normalizeOpenApi } from '#scripts/normalize-openapi.mjs'; +import { generateOpenApi } from '#scripts/openapi-generator.mjs'; +import { assertModelShapes } from '#scripts/openapi-shapes.mjs'; +import { loadReviewedOpenApi } from '#scripts/openapi-source.mjs'; + +/** Compares the complete TypeScript tree, including removed and added files. */ +export function assertSameOutput(expected, actual, context) { + const files = new Set( + [ + ...readdirSync(expected, { recursive: true }), + ...readdirSync(actual, { recursive: true }), + ].filter((file) => file.endsWith('.ts')), + ); + for (const file of [...files].sort()) { + let left; + let right; + try { + left = readFileSync(join(expected, file)); + right = readFileSync(join(actual, file)); + } catch (cause) { + throw new Error(`${context}: generated file ${file} was added or removed.`, { cause }); + } + if (!left.equals(right)) throw new Error(`${context}: generated file ${file} differs.`); + } +} + +/** + * Regenerates from the reviewed offline snapshot, or checks two runs and committed output. + * + * @param root - Repository with the pinned toolchain installed. + * @param check - Verify determinism and committed output without changing SDK files. + * @throws If generation, schema/type validation, normalization or comparison fails. + */ +export async function regenerateOpenApi(root, check = false) { + const spec = loadReviewedOpenApi(root); + const work = mkdtempSync(join(root, '.openapi-')); + try { + const input = join(work, 'input.json'); + const formatConfig = join(work, '.oxfmtrc.json'); + const formatter = JSON.parse(readFileSync(join(root, '.oxfmtrc.json'), 'utf8')); + // The staged target contains only generated source; repository exclusions must not hide it. + writeFileSync(formatConfig, JSON.stringify({ ...formatter, ignorePatterns: [] })); + writeFileSync(input, JSON.stringify(spec)); + async function generate(name) { + const stage = join(work, name); + const generated = join(stage, 'generated'); + const files = await generateOpenApi({ root, input, output: generated }); + cpSync(join(root, 'src'), join(stage, 'src'), { + recursive: true, + filter: (file) => relative(join(root, 'src'), file) !== 'openapi', + }); + cpSync(join(root, 'tsconfig.build.json'), join(stage, 'tsconfig.build.json')); + symlinkSync(join(root, 'node_modules'), join(stage, 'node_modules'), 'junction'); + const output = join(stage, 'src/openapi'); + for (const file of files) { + mkdirSync(dirname(join(output, file)), { recursive: true }); + cpSync(join(generated, file), join(output, file)); + } + normalizeOpenApi(stage); + execFileSync( + process.execPath, + [join(root, 'node_modules/oxfmt/bin/oxfmt'), '--config', formatConfig, '--write', output], + { cwd: root, stdio: 'pipe' }, + ); + const models = join(output, 'types'); + await assertModelShapes( + models, + readdirSync(models).filter((file) => file.endsWith('.ts')), + ); + return output; + } + const first = await generate('first'); + const committed = join(root, 'src/openapi'); + if (check) { + const second = await generate('second'); + assertSameOutput(first, second, 'Generation is not deterministic'); + assertSameOutput( + first, + committed, + 'Committed output is stale; run pnpm generate-openapi-client', + ); + console.log('OpenAPI check OK: two clean generations and committed output match.'); + } else { + const previous = join(work, 'previous'); + renameSync(committed, previous); + try { + renameSync(first, committed); + } catch (cause) { + renameSync(previous, committed); + throw cause; + } + console.log('OpenAPI generation OK: reviewed, validated and normalized output installed.'); + } + } finally { + rmSync(work, { recursive: true, force: true }); + } +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + try { + const args = process.argv.slice(2); + if (args.length > 1 || (args.length === 1 && args[0] !== '--check')) { + throw new Error('Usage: node scripts/generate-openapi.mjs [--check]'); + } + await regenerateOpenApi( + resolve(dirname(fileURLToPath(import.meta.url)), '..'), + args[0] === '--check', + ); + } catch (error) { + console.error(error.message); + process.exitCode = 1; + } +} diff --git a/scripts/hooks.mjs b/scripts/hooks.mjs new file mode 100644 index 00000000..41e538fa --- /dev/null +++ b/scripts/hooks.mjs @@ -0,0 +1,25 @@ +import { execFileSync } from 'node:child_process'; +import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +/** + * Installs pinned prek hooks in a private directory for this checkout. + * + * @param cwd - Checkout whose hook should change; sibling worktrees keep their configuration. + */ +export function installHooks(cwd = process.cwd()) { + const git = (...args) => execFileSync('git', args, { cwd, encoding: 'utf8' }).trim(); + const gitDir = git('rev-parse', '--absolute-git-dir'); + const installation = join(gitDir, 'permit-hooks'); + execFileSync( + fileURLToPath(new URL('../node_modules/.bin/prek', import.meta.url)), + ['install', '--git-dir', installation], + { cwd, stdio: 'inherit' }, + ); + git('config', '--local', 'extensions.worktreeConfig', 'true'); + git('config', '--worktree', 'core.hooksPath', join(installation, 'hooks')); +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + installHooks(); +} diff --git a/scripts/hooks.test.mjs b/scripts/hooks.test.mjs new file mode 100644 index 00000000..ea21cced --- /dev/null +++ b/scripts/hooks.test.mjs @@ -0,0 +1,133 @@ +import { execFileSync, spawnSync } from 'node:child_process'; +import { + existsSync, + mkdirSync, + mkdtempSync, + readFileSync, + readdirSync, + realpathSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { expect, onTestFinished, test } from 'vitest'; + +import { installHooks } from '#scripts/hooks.mjs'; + +const git = (cwd, ...args) => execFileSync('git', args, { cwd, encoding: 'utf8' }).trim(); + +function fixture(sharedPath) { + const root = realpathSync(mkdtempSync(join(tmpdir(), 'permit hooks '))); + onTestFinished(() => rmSync(root, { recursive: true, force: true })); + const primary = join(root, 'primary'); + const sibling = join(root, 'sibling'); + mkdirSync(primary); + git(primary, 'init', '--quiet'); + git(primary, 'config', 'user.email', 'test@example.invalid'); + git(primary, 'config', 'user.name', 'Hook test'); + writeFileSync(join(primary, 'README.md'), 'Hook fixture\n'); + git(primary, 'add', 'README.md'); + git(primary, 'commit', '--quiet', '-m', 'Create fixture'); + git(primary, 'worktree', 'add', '--quiet', '--detach', sibling); + if (sharedPath !== 'unset') { + const path = sharedPath === 'relative' ? '.husky' : join(root, 'shared hooks'); + git(primary, 'config', '--local', 'core.hooksPath', path); + } + const hooks = new Map(); + const directories = new Set([join(git(primary, 'rev-parse', '--absolute-git-dir'), 'hooks')]); + for (const cwd of [primary, sibling]) { + directories.add(git(cwd, 'rev-parse', '--path-format=absolute', '--git-path', 'hooks')); + } + for (const directory of directories) { + mkdirSync(directory, { recursive: true }); + const file = join(directory, 'pre-commit'); + const text = '#!/bin/sh\nprintf shared > shared-hook-ran\n'; + writeFileSync(file, text, { mode: 0o755 }); + hooks.set(file, { text, names: readdirSync(directory).sort() }); + } + return { primary, sibling, hooks }; +} + +function configureHook(cwd) { + writeFileSync( + join(cwd, 'hook-fixture.cjs'), + "require('node:fs').writeFileSync('hook-ran', 'yes');", + ); + const command = `${JSON.stringify(process.execPath)} hook-fixture.cjs`; + writeFileSync( + join(cwd, '.pre-commit-config.yaml'), + `repos: + - repo: local + hooks: + - id: fixture + name: Hook fixture + language: system + entry: ${JSON.stringify(command)} + pass_filenames: false + always_run: true +`, + ); +} + +for (const target of ['primary', 'sibling']) { + test.each(['unset', 'relative', 'absolute'])( + `isolates ${target} installation from shared %s hooks, including repeated commits`, + (sharedPath) => { + const state = fixture(sharedPath); + const cwd = state[target]; + const other = state[target === 'primary' ? 'sibling' : 'primary']; + const sharedConfig = git(state.primary, 'config', '--local', '--list') + .split('\n') + .filter((line) => line.startsWith('core.hookspath=')); + const otherHooks = git(other, 'rev-parse', '--path-format=absolute', '--git-path', 'hooks'); + configureHook(cwd); + git(cwd, 'add', '.pre-commit-config.yaml', 'hook-fixture.cjs'); + for (let iteration = 0; iteration < 2; iteration += 1) { + installHooks(cwd); + expect( + git(state.primary, 'config', '--local', '--list') + .split('\n') + .filter((line) => line.startsWith('core.hookspath=')), + ).toEqual(sharedConfig); + expect(git(other, 'rev-parse', '--path-format=absolute', '--git-path', 'hooks')).toBe( + otherHooks, + ); + for (const [file, original] of state.hooks) { + expect(readFileSync(file, 'utf8')).toBe(original.text); + expect(readdirSync(dirname(file)).sort()).toEqual(original.names); + } + writeFileSync(join(cwd, 'hook-ran'), 'not yet'); + git(cwd, 'commit', '--quiet', '--allow-empty', '-m', `Run hook ${iteration}`); + expect(readFileSync(join(cwd, 'hook-ran'), 'utf8')).toBe('yes'); + expect(existsSync(join(cwd, 'shared-hook-ran'))).toBe(false); + } + git(other, 'commit', '--quiet', '--allow-empty', '-m', 'Keep existing hook'); + expect(readFileSync(join(other, 'shared-hook-ran'), 'utf8')).toBe('shared'); + }, + ); +} + +test('leaves configuration and existing hooks intact when shim installation fails', () => { + const state = fixture('relative'); + const gitDir = git(state.primary, 'rev-parse', '--absolute-git-dir'); + const before = git(state.primary, 'config', '--local', '--list'); + writeFileSync(join(gitDir, 'permit-hooks'), 'Owned obstruction, not a directory'); + const result = spawnSync( + process.execPath, + [fileURLToPath(new URL('./hooks.mjs', import.meta.url))], + { cwd: state.primary, encoding: 'utf8' }, + ); + expect(result.error).toBeUndefined(); + expect(result.signal).toBeNull(); + expect(result.status).not.toBe(0); + expect(result.stderr).toContain('permit-hooks'); + expect(git(state.primary, 'config', '--local', '--list')).toBe(before); + expect(existsSync(join(gitDir, 'config.worktree'))).toBe(false); + for (const [file, original] of state.hooks) { + expect(readFileSync(file, 'utf8')).toBe(original.text); + expect(readdirSync(dirname(file)).sort()).toEqual(original.names); + } +}); diff --git a/scripts/http-fixture.test.mjs b/scripts/http-fixture.test.mjs new file mode 100644 index 00000000..62fa6434 --- /dev/null +++ b/scripts/http-fixture.test.mjs @@ -0,0 +1,73 @@ +import { spawnSync } from 'node:child_process'; +import { + mkdtempSync, + readFileSync, + rmdirSync, + symlinkSync, + unlinkSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { expect, onTestFinished, test } from 'vitest'; + +const root = dirname(dirname(fileURLToPath(import.meta.url))); + +test.each([ + ['unqueued', "await fetch(api.url + '/extra');"], + [ + 'mismatched', + ` + api.enqueue({method: 'POST', path: '/expected', body: {value: 1}}, {body: {}}); + await fetch(api.url + '/expected'); + `, + ], + ['unused', "api.enqueue({method: 'GET', path: '/unused'}, {body: {}});"], +])('the real HTTP fixture fails the owning test for %s requests', (_name, operation) => { + const directory = mkdtempSync(join(tmpdir(), 'permit-http-fixture-')); + const files = ['node_modules', 'vitest.config.mjs', 'fixture.test.mjs', 'report.json']; + onTestFinished(() => { + for (const file of files) unlinkSync(join(directory, file)); + rmdirSync(directory); + }); + symlinkSync(join(root, 'node_modules'), join(directory, 'node_modules'), 'dir'); + writeFileSync( + join(directory, 'vitest.config.mjs'), + ` +export default { + resolve: {alias: {'#src': ${JSON.stringify(join(root, 'src'))}}}, + test: {include: ['fixture.test.mjs']}, +}; +`, + ); + writeFileSync( + join(directory, 'fixture.test.mjs'), + ` +import {test} from 'vitest'; +import {startApi} from '#src/tests/helpers/api-test-server'; +test('cannot swallow fixture violations', async () => { + const api = await startApi(); + ${operation} +}); +`, + ); + const output = join(directory, 'report.json'); + const run = spawnSync( + process.execPath, + [ + join(root, 'node_modules/vitest/vitest.mjs'), + 'run', + '--reporter=json', + `--outputFile=${output}`, + '--maxWorkers=1', + ], + { cwd: directory, encoding: 'utf8', timeout: 15_000 }, + ); + expect(run.status, run.stderr).toBe(1); + expect(JSON.parse(readFileSync(output, 'utf8'))).toMatchObject({ + success: false, + numFailedTests: 1, + }); +}); diff --git a/scripts/integration-fixture.test.mjs b/scripts/integration-fixture.test.mjs new file mode 100644 index 00000000..67c5c5c9 --- /dev/null +++ b/scripts/integration-fixture.test.mjs @@ -0,0 +1,273 @@ +import { spawn } from 'node:child_process'; +import { mkdtempSync, readFileSync, rmdirSync, unlinkSync } from 'node:fs'; +import { createServer } from 'node:http'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { expect, onTestFinished, test } from 'vitest'; + +import { discoverTestFiles, evaluateTestReport } from '#scripts/test-report.mjs'; + +const root = dirname(dirname(fileURLToPath(import.meta.url))); +const sharedProject = { id: 'proj', key: 'provided-project', name: 'Provided Project' }; + +async function integrationFixture({ lostProjectReply = false, absenceStatus = 404 } = {}) { + const projects = new Map([[sharedProject.key, sharedProject]]); + const environments = new Map(); + const requests = []; + const failures = []; + const server = createServer((request, response) => { + let text = ''; + request.setEncoding('utf8'); + request.on('data', (chunk) => { + text += chunk; + }); + request.on('end', () => { + try { + const url = new URL(request.url, 'http://127.0.0.1'); + const path = url.pathname; + const body = text ? JSON.parse(text) : undefined; + const captured = { method: request.method, path, body }; + requests.push(captured); + function reply(status, value) { + captured.status = status; + response.writeHead(status, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify(value)); + } + if (path === '/v2/api-key/scope' && request.method === 'GET') { + const token = request.headers.authorization; + if (token === 'Bearer org-key') return reply(200, { organization_id: 'org' }); + if (token === 'Bearer project-key') { + return reply(200, { organization_id: 'org', project_id: sharedProject.id }); + } + if (token === 'Bearer env-key') { + return reply(200, { + organization_id: 'org', + project_id: 'proj', + environment_id: 'env', + }); + } + throw new Error('Unexpected loopback scope key'); + } + if (path === '/v2/facts/proj/env/users' && request.method === 'GET') { + expect(url.searchParams.get('search')).toMatch(/^absent-/); + expect(url.searchParams.get('page')).toBe('1'); + expect(url.searchParams.get('per_page')).toBe('2'); + return reply(200, { data: [], total_count: 0 }); + } + if (path === '/v2/projects' && request.method === 'POST') { + expect(body.key).toMatch(/^node-proj-/); + const project = { ...body, id: `id-${body.key}`, description: null }; + projects.set(project.key, project); + if (lostProjectReply) return response.destroy(); + return reply(201, project); + } + const segments = path.split('/').filter(Boolean); + if (segments[0] === 'v2' && segments[1] === 'projects') { + const project = [...projects.values()].find((value) => + [value.key, value.id].includes(segments[2]), + ); + if (segments.length === 3) { + if (request.method === 'GET') { + return reply(project ? 200 : absenceStatus, project ?? { message: 'absent' }); + } + if (request.method === 'DELETE') { + expect(segments[2]).not.toBe(sharedProject.key); + expect(segments[2]).not.toBe(sharedProject.id); + projects.delete(segments[2]); + for (const key of environments.keys()) { + if (key.startsWith(`${segments[2]}/`)) environments.delete(key); + } + return reply(204, undefined); + } + } + if (project && segments[3] === 'envs') { + const key = `${project.key}/${segments[4]}`; + if (request.method === 'POST' && segments.length === 4) { + expect(body.key).toMatch(/^node-env-/); + const environment = { + ...body, + id: `id-${body.key}`, + project_id: project.id, + description: null, + }; + environments.set(`${project.key}/${body.key}`, environment); + return reply(201, environment); + } + if (request.method === 'GET' && segments.length === 4) { + return reply( + 200, + [...environments.entries()] + .filter(([entry]) => entry.startsWith(`${project.key}/`)) + .map(([, value]) => value), + ); + } + if (request.method === 'DELETE' && segments.length === 5) { + environments.delete(key); + return reply(204, undefined); + } + if (request.method === 'GET' && segments.length === 5) { + const environment = environments.get(key); + return reply(environment ? 200 : absenceStatus, environment ?? { message: 'absent' }); + } + } + if (!project && segments[3] === 'envs') { + return reply(absenceStatus, { message: 'project absent' }); + } + } + throw new Error(`Unqueued integration fixture request: ${request.method} ${path}`); + } catch (error) { + failures.push(error); + response.writeHead(500).end('{"message":"integration fixture failed"}'); + } + }); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished(async () => { + await new Promise((resolve) => server.close(resolve)); + expect(failures).toStrictEqual([]); + }); + return { url: `http://127.0.0.1:${server.address().port}`, projects, environments, requests }; +} + +async function runIntegration(fixture, optionalKeys = {}, testName) { + const directory = mkdtempSync(join(tmpdir(), 'permit-integration-fixture-')); + const output = join(directory, 'report.json'); + onTestFinished(() => { + unlinkSync(output); + rmdirSync(directory); + }); + const child = spawn( + process.execPath, + [ + join(root, 'node_modules/vitest/vitest.mjs'), + 'run', + '--project', + 'integration', + '--reporter=json', + `--outputFile=${output}`, + '--maxWorkers=1', + ...(testName ? ['--testNamePattern', testName] : []), + ], + { + cwd: root, + env: { + ...process.env, + PDP_API_KEY: 'env-key', + PERMIT_API_KEY: 'env-key', + ORG_PDP_API_KEY: '', + PROJECT_PDP_API_KEY: '', + PDP_CONTROL_PLANE: fixture.url, + PDP_URL: fixture.url, + NO_PROXY: '127.0.0.1', + ...optionalKeys, + }, + stdio: ['ignore', 'pipe', 'pipe'], + }, + ); + let diagnostics = ''; + child.stdout.on('data', (chunk) => { + diagnostics += chunk; + }); + child.stderr.on('data', (chunk) => { + diagnostics += chunk; + }); + const timer = setTimeout(() => child.kill(), 15_000); + const code = await new Promise((resolve, reject) => { + child.once('error', reject); + child.once('exit', resolve); + }).finally(() => clearTimeout(timer)); + return { code, diagnostics, report: JSON.parse(readFileSync(output, 'utf8')) }; +} + +test.each(['', ' '])( + 'absent optional keys %j report unavailable while the real environment suite executes', + async (key) => { + const fixture = await integrationFixture(); + const run = await runIntegration(fixture, { ORG_PDP_API_KEY: key, PROJECT_PDP_API_KEY: key }); + expect(run.code, run.diagnostics).toBe(0); + const summary = evaluateTestReport(run.report, { + root, + expectedFiles: discoverTestFiles(root, ['integration']), + env: {}, + }); + expect(summary).toMatchObject({ status: 'PARTIAL', executed: 1, errors: [] }); + expect(summary.limitations).toHaveLength(2); + expect(summary.limitations.every((entry) => entry.status === 'UNAVAILABLE')).toBe(true); + expect(fixture.requests.map(({ method, path }) => `${method} ${path}`)).toStrictEqual([ + 'GET /v2/api-key/scope', + 'GET /v2/facts/proj/env/users', + ]); + }, + 20_000, +); + +test('a supplied wrong-scope key fails without writing any fixture', async () => { + const fixture = await integrationFixture(); + const run = await runIntegration(fixture, { ORG_PDP_API_KEY: 'env-key' }); + expect(run.code, run.diagnostics).toBe(1); + expect(run.report.numFailedTests).toBe(1); + expect(fixture.requests.every((request) => request.method === 'GET')).toBe(true); + expect(fixture.projects.size).toBe(1); +}, 20_000); + +test('owned projects and environments are removed and verified without deleting the supplied project', async () => { + const fixture = await integrationFixture(); + const run = await runIntegration(fixture, { + ORG_PDP_API_KEY: 'org-key', + PROJECT_PDP_API_KEY: 'project-key', + }); + expect(run.code, run.diagnostics).toBe(0); + expect(run.report.numPassedTests).toBe(3); + expect([...fixture.projects.values()]).toStrictEqual([sharedProject]); + expect(fixture.environments.size).toBe(0); + const removed = fixture.requests.filter((request) => request.method === 'DELETE'); + expect(removed).toHaveLength(5); + for (const request of removed) { + expect( + fixture.requests + .slice(fixture.requests.indexOf(request) + 1) + .some((read) => read.method === 'GET' && read.path === request.path && read.status === 404), + ).toBe(true); + } +}, 20_000); + +test('project cleanup is registered before a committed create loses its response', async () => { + const fixture = await integrationFixture({ lostProjectReply: true }); + const run = await runIntegration( + fixture, + { ORG_PDP_API_KEY: 'org-key' }, + 'environment creation with org level api key', + ); + expect(run.code, run.diagnostics).toBe(1); + expect([...fixture.projects.values()]).toStrictEqual([sharedProject]); + const create = fixture.requests.find((request) => request.method === 'POST'); + expect(create).toBeDefined(); + const path = `/v2/projects/${create.body.key}`; + expect(fixture.requests.slice(-2).map(({ method, path }) => `${method} ${path}`)).toStrictEqual([ + `DELETE ${path}`, + `GET ${path}`, + ]); +}, 20_000); + +test('non-404 cleanup verification errors fail the actual integration suite', async () => { + const fixture = await integrationFixture({ absenceStatus: 403 }); + const run = await runIntegration( + fixture, + { ORG_PDP_API_KEY: 'org-key' }, + 'environment creation with org level api key', + ); + expect(run.code, run.diagnostics).toBe(1); + expect(run.report.numFailedTests).toBe(1); + expect([...fixture.projects.values()]).toStrictEqual([sharedProject]); + expect( + run.report.testResults + .flatMap((file) => file.assertionResults) + .flatMap((entry) => entry.failureMessages) + .join('\n'), + ).toContain('cleanup failed:'); +}, 20_000); diff --git a/scripts/migration-package.test.mjs b/scripts/migration-package.test.mjs new file mode 100644 index 00000000..c99e27ea --- /dev/null +++ b/scripts/migration-package.test.mjs @@ -0,0 +1,380 @@ +import { execFile, spawnSync } from 'node:child_process'; +import { createServer } from 'node:http'; +import { once } from 'node:events'; +import { createRequire } from 'node:module'; +import { cp, mkdir, mkdtemp, readFile, realpath, rm, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { promisify } from 'node:util'; +import { afterAll, beforeAll, describe, expect, it } from 'vitest'; + +const repo = process.cwd(); +const fixtures = resolve('scripts/fixtures/migration'); +const run = promisify(execFile); +let directory; +let consumer; +let skill; +let artifact; + +function command(executable, args, cwd) { + const result = spawnSync(executable, args, { cwd, encoding: 'utf8', timeout: 120_000 }); + if (result.error || result.status !== 0) { + throw new Error( + `Migration fixture ${executable} ${args[0]} failed: ` + + `${result.error?.message ?? result.stderr + result.stdout}`, + ); + } + return result.stdout; +} + +beforeAll(async () => { + directory = await mkdtemp(join(tmpdir(), 'permit-migration-package-')); + consumer = join(directory, 'consumer'); + await mkdir(consumer); + const suppliedArtifact = process.env['PERMIT_PACKED_ARTIFACT']; + if (!suppliedArtifact) command('pnpm', ['pack', '--pack-destination', directory], repo); + const sdkManifest = JSON.parse(await readFile(join(repo, 'package.json'), 'utf8')); + artifact = suppliedArtifact + ? resolve(suppliedArtifact) + : join(directory, `permitio-${sdkManifest.version}.tgz`); + await writeFile( + join(consumer, 'package.json'), + JSON.stringify({ + private: true, + dependencies: { permitio: `file:${artifact}` }, + }), + ); + await writeFile( + join(consumer, 'pnpm-workspace.yaml'), + 'packages: []\nignoreScripts: true\nminimumReleaseAge: 1440\nautoInstallPeers: false\n', + ); + command( + 'pnpm', + ['install', '--lockfile-only', '--no-frozen-lockfile', '--ignore-scripts'], + consumer, + ); + command('pnpm', ['audit', '--audit-level=moderate'], consumer); + command('pnpm', ['install', '--frozen-lockfile', '--ignore-scripts'], consumer); + await cp(join(fixtures, 'after', 'consumer.mts'), join(consumer, 'consumer.mts')); + await cp(join(fixtures, 'after', 'consumer.cts'), join(consumer, 'consumer.cts')); + await cp(join(fixtures, 'types.mts'), join(consumer, 'types.mts')); + await cp(join(fixtures, 'types.cts'), join(consumer, 'types.cts')); + const guide = await readFile(join(repo, 'MIGRATION.md'), 'utf8'); + const complete = /```ts\n([\s\S]*?)\n```/u.exec(guide); + if (!complete) throw new Error('Complete migration guide example is missing.'); + await writeFile(join(consumer, 'guide.mts'), complete[1]); + await writeFile( + join(consumer, 'tsconfig.json'), + JSON.stringify({ + compilerOptions: { + target: 'ES2022', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + typeRoots: [join(repo, 'node_modules', '@types')], + types: ['node'], + outDir: 'compiled', + }, + include: ['*.mts', '*.cts'], + }), + ); + command('pnpm', ['exec', 'tsc', '-p', join(consumer, 'tsconfig.json')], repo); + const packedSkill = join(consumer, 'node_modules/permitio/skills/permit-node-3-migration'); + skill = join(directory, 'copied-skill'); + await cp(packedSkill, skill, { recursive: true }); + await cp(join(skill, 'compiler-lock.yaml'), join(skill, 'pnpm-lock.yaml')); + command('pnpm', ['audit', '--audit-level=moderate'], skill); + command('pnpm', ['install', '--frozen-lockfile', '--ignore-scripts'], skill); +}, 300_000); + +afterAll(async () => { + if (directory) await rm(directory, { recursive: true }); +}); + +describe('packed customer migration tooling', () => { + it('ships isolated scanner prerequisites without adding SDK runtime dependencies', async () => { + const manifest = JSON.parse(await readFile(join(skill, 'package.json'), 'utf8')); + expect(manifest.dependencies).toEqual({ semver: '7.8.5', typescript: '6.0.3' }); + const require = createRequire(pathToFileURL(join(skill, 'package.json'))); + const compiler = require.resolve('typescript'); + expect(compiler.startsWith(join(await realpath(skill), 'node_modules'))).toBe(true); + const semver = require.resolve('semver'); + expect(semver.startsWith(join(await realpath(skill), 'node_modules'))).toBe(true); + expect(require('typescript').version).toBe('6.0.3'); + expect(require('semver/package.json').version).toBe('7.8.5'); + const lock = await readFile(join(skill, 'pnpm-lock.yaml'), 'utf8'); + expect(lock).toContain('y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38'); + const sdk = JSON.parse(await readFile(join(consumer, 'node_modules/permitio/package.json'))); + const source = JSON.parse(await readFile(join(repo, 'package.json'), 'utf8')); + expect(sdk.version).toBe(source.version); + expect(Object.keys(sdk.dependencies)).toEqual(['axios', 'lodash', 'pino', 'pino-pretty']); + const files = command('tar', ['-tzf', artifact], directory); + expect(files).not.toContain('/node_modules/'); + expect(files).not.toContain('/tools/compiler/'); + }); + + it('detects old sites and compiles its emitted result migrations', async () => { + const result = spawnSync( + process.execPath, + [join(skill, 'scripts/scan.mjs'), join(fixtures, 'before')], + { cwd: directory, encoding: 'utf8' }, + ); + expect(result.status).toBe(1); + const report = JSON.parse(result.stdout); + expect(report.status).toBe('COMPLETE'); + expect(report.findings.filter((item) => item.id === 'A1')).toHaveLength(29); + expect(new Set(report.findings.map((item) => item.id))).toEqual( + new Set(['A1', 'A3', 'P1', 'C1']), + ); + expect(result.stderr).toBe(''); + const listAction = report.findings.find((item) => item.action.includes('api.users.list(')); + const syncAction = report.findings.find((item) => item.action.includes('api.users.sync(')); + expect(listAction.action).toContain('(await api.users.list()).data'); + expect(syncAction.action).toContain('(await api.users.sync(data)).user'); + const listExpression = listAction.action.slice(4).split(';')[0]; + const syncExpression = syncAction.action.slice(4).split(';')[0]; + const migrated = [ + "import type { IPermitApi } from 'permitio';", + 'declare const api: IPermitApi;', + "declare const data: Parameters[0];", + `const users = ${listExpression};`, + `const user = ${syncExpression};`, + 'void [users, user];', + ].join('\n'); + await writeFile(join(consumer, 'emitted-hints.mts'), migrated); + command('pnpm', ['exec', 'tsc', '-p', join(consumer, 'tsconfig.json')], repo); + }); + + it('keeps the migrated strict dual-entry fixture clean within declared syntax coverage', () => { + const result = spawnSync( + process.execPath, + [join(skill, 'scripts/scan.mjs'), join(fixtures, 'after')], + { cwd: directory, encoding: 'utf8' }, + ); + expect(result.status).toBe(0); + const report = JSON.parse(result.stdout); + expect(report.status).toBe('COMPLETE'); + expect(report.findings).toEqual([]); + expect(report.scanned).toEqual(['consumer.cts', 'consumer.mts', 'package.json']); + }); + + it.each([ + 'FROM node AS final', + 'from --platform=linux/amd64 node AS final', + `FROM node@sha256:${'a'.repeat(64)} AS final`, + ])('reviews unversioned official Node stages using the copied scanner: %s', async (stage) => { + const customer = await mkdtemp(join(directory, 'docker-customer-')); + await writeFile(join(customer, 'customer.ts'), 'const value = 1;'); + await writeFile(join(customer, 'Dockerfile'), `FROM node:26.11.0 AS build\n${stage}\n`); + const result = spawnSync(process.execPath, [join(skill, 'scripts/scan.mjs'), customer], { + cwd: directory, + encoding: 'utf8', + }); + expect(result.status).toBe(1); + expect(result.stderr).toBe(''); + const report = JSON.parse(result.stdout); + expect(report.status).toBe('COMPLETE'); + expect(report.exitCode).toBe(1); + expect(report.failures).toEqual([]); + expect(report.findings).toEqual([ + expect.objectContaining({ id: 'C1', classification: 'REVIEW_REQUIRED' }), + ]); + }); + + it('keeps a prior Node-named stage alias clean using the copied scanner', async () => { + const customer = await mkdtemp(join(directory, 'docker-customer-')); + await writeFile(join(customer, 'customer.ts'), 'const value = 1;'); + await writeFile( + join(customer, 'Dockerfile'), + 'FROM node:26.11.0 AS node\nFROM --platform=linux/amd64 node AS final\n', + ); + const result = spawnSync(process.execPath, [join(skill, 'scripts/scan.mjs'), customer], { + cwd: directory, + encoding: 'utf8', + }); + expect(result.status).toBe(0); + expect(result.stderr).toBe(''); + const report = JSON.parse(result.stdout); + expect(report.status).toBe('COMPLETE'); + expect(report.exitCode).toBe(0); + expect(report.failures).toEqual([]); + expect(report.findings).toEqual([]); + }); + + it('fails clearly when the copied compiler prerequisite is absent', async () => { + const bare = join(directory, 'bare-skill'); + await cp(join(consumer, 'node_modules/permitio/skills/permit-node-3-migration'), bare, { + recursive: true, + }); + const result = spawnSync( + process.execPath, + [join(bare, 'scripts/scan.mjs'), join(fixtures, 'after')], + { cwd: directory, encoding: 'utf8', env: { ...process.env, NODE_PATH: '' } }, + ); + expect(result.status).not.toBe(0); + expect(result.stderr).toContain('Cannot find package'); + expect(result.stdout).toBe(''); + }); + + it('keeps all stable IDs in the guide, skill reference and unreleased notes', async () => { + const docs = await Promise.all( + ['MIGRATION.md', 'CHANGELOG.md', 'skills/permit-node-3-migration/references/changes.md'].map( + (name) => readFile(join(repo, name), 'utf8'), + ), + ); + const headings = [...docs[0].matchAll(/^### ([A-Z]\d+) —/gmu)].map((match) => match[1]); + expect(headings).toHaveLength(24); + expect(new Set([...docs[2].matchAll(/^### ([A-Z]\d+) —/gmu)].map((match) => match[1]))).toEqual( + new Set(headings), + ); + expect( + new Set([...docs[1].matchAll(/^- \*\*([A-Z]\d+)\*\*/gmu)].map((match) => match[1])), + ).toEqual(new Set(headings)); + const reference = await readFile(join(skill, 'references/changes.md'), 'utf8'); + const link = /\[the customer migration skill\]\(([^)]+)\)/u.exec(reference); + expect(link).not.toBeNull(); + const linkedSkill = await readFile(resolve(skill, 'references', link[1]), 'utf8'); + expect(linkedSkill).toContain('# Permit Node SDK 3.0 migration'); + const { scan } = await import(pathToFileURL(join(skill, 'scripts/scan.mjs')).href); + const report = await scan(join(fixtures, 'before')); + for (const item of report.findings) expect(headings).toContain(item.id); + }); + + it.each(['esm', 'commonjs'])( + 'runs strict %s consumer through meaningful real loopback requests', + async (entry) => { + const requests = []; + const failures = []; + const user = { + id: 'id', + key: 'customer', + email: null, + first_name: null, + last_name: null, + attributes: {}, + roles: [], + associated_tenants: [], + }; + const rule = { + id: 'rule-id', + user_set: 'set', + resource_set: 'resource-set', + permission: 'document:read', + tenant: null, + }; + const server = createServer(async (request, response) => { + let text = ''; + for await (const chunk of request) text += chunk; + const path = new URL(request.url, 'http://localhost'); + requests.push({ + method: request.method, + path: path.pathname, + query: [...path.searchParams], + auth: request.headers.authorization, + body: text ? JSON.parse(text) : undefined, + }); + let reply; + const method = request.method; + if (method === 'GET' && path.pathname === '/v2/api-key/scope') { + reply = { organization_id: 'org', project_id: 'project', environment_id: 'env' }; + } else if (method === 'GET' && path.pathname === '/v2/facts/project/env/users') { + reply = { data: [user], total_count: 1 }; + } else if (method === 'PUT' && path.pathname === '/v2/facts/project/env/users/customer') { + reply = user; + } else if (method === 'POST' && path.pathname === '/v2/facts/project/env/set_rules') { + reply = [rule]; + } else if (method === 'GET' && path.pathname === '/v2/facts/project/env/set_rules') { + reply = [rule]; + } else if ( + method === 'DELETE' && + path.pathname === '/v2/facts/project/env/role_assignments' + ) { + reply = {}; + } else if (method === 'POST' && path.pathname === '/allowed') { + reply = { allow: true }; + } else { + failures.push(`${method} ${path.pathname}`); + response.writeHead(500).end(); + return; + } + response.setHeader('Content-Type', 'application/json'); + response.end(JSON.stringify(reply)); + }); + server.listen(0, '127.0.0.1'); + await once(server, 'listening'); + const url = `http://127.0.0.1:${server.address().port}`; + const runner = + entry === 'esm' + ? "import run from './compiled/consumer.mjs'; console.log(JSON.stringify(await run()));" + : "const run = require('./compiled/consumer.cjs'); " + + 'run().then(r=>console.log(JSON.stringify(r)));'; + try { + const args = entry === 'esm' ? ['--input-type=module', '-e', runner] : ['-e', runner]; + const result = await run(process.execPath, args, { + cwd: consumer, + timeout: 10_000, + env: { + ...process.env, + PERMIT_API_KEY: 'opaque-example', + PERMIT_API_URL: url, + PERMIT_PDP_URL: url, + }, + }); + expect(JSON.parse(result.stdout)).toEqual({ + users: [user], + user, + created: false, + rule, + rules: [rule], + allow: true, + }); + expect(result.stderr).toBe(''); + expect(failures).toEqual([]); + expect(requests).toHaveLength(7); + expect(requests.map((item) => `${item.method} ${item.path}`)).toEqual([ + 'GET /v2/api-key/scope', + 'GET /v2/facts/project/env/users', + 'PUT /v2/facts/project/env/users/customer', + 'POST /v2/facts/project/env/set_rules', + 'GET /v2/facts/project/env/set_rules', + 'DELETE /v2/facts/project/env/role_assignments', + 'POST /allowed', + ]); + expect(requests.every((item) => item.auth === 'Bearer opaque-example')).toBe(true); + expect(requests[1].query).toEqual([ + ['page', '2'], + ['per_page', '3'], + ]); + expect(requests[2].body).toEqual({ key: 'customer' }); + expect(requests[3].body).toEqual({ + user_set: 'set', + resource_set: 'resource-set', + permission: 'document:read', + }); + expect(requests[4].query).toEqual([ + ['permission', 'read'], + ['page', '1'], + ['per_page', '100'], + ]); + expect(requests[5].body).toEqual({ user: 'customer', role: 'reader', tenant: 'tenant' }); + expect(requests[6].body).toEqual({ + user: { key: 'customer' }, + action: 'read', + resource: { type: 'document', tenant: 'tenant' }, + context: {}, + }); + } finally { + server.closeAllConnections(); + await new Promise((done) => server.close(done)); + } + }, + ); +}); diff --git a/scripts/migration-scanner.test.mjs b/scripts/migration-scanner.test.mjs new file mode 100644 index 00000000..a6c87e3c --- /dev/null +++ b/scripts/migration-scanner.test.mjs @@ -0,0 +1,593 @@ +import { cp, mkdtemp, mkdir, readFile, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { spawnSync } from 'node:child_process'; +import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest'; + +const sourceScript = resolve('skills/permit-node-3-migration/scripts/scan.mjs'); +let script; +let scan; +let toolDirectory; +const directories = []; + +beforeAll(async () => { + toolDirectory = await mkdtemp(join(tmpdir(), 'permit-migration-scanner-tool-')); + const skill = resolve('skills/permit-node-3-migration'); + for (const name of ['package.json', 'pnpm-workspace.yaml', 'compiler-lock.yaml']) { + await cp(join(skill, name), join(toolDirectory, name)); + } + await cp(join(skill, 'compiler-lock.yaml'), join(toolDirectory, 'pnpm-lock.yaml')); + await mkdir(join(toolDirectory, 'scripts')); + script = join(toolDirectory, 'scripts/scan.mjs'); + await cp(sourceScript, script); + const install = spawnSync('pnpm', ['install', '--frozen-lockfile', '--ignore-scripts'], { + cwd: toolDirectory, + encoding: 'utf8', + timeout: 120_000, + }); + if (install.error || install.status !== 0) { + throw new Error( + `Copied scanner dependency install failed: ` + + `${install.error?.message ?? install.stderr + install.stdout}`, + ); + } + ({ scan } = await import(pathToFileURL(script).href)); +}, 125_000); + +afterAll(async () => { + if (toolDirectory) await rm(toolDirectory, { recursive: true }); +}); + +async function project(files) { + const path = await mkdtemp(join(tmpdir(), 'permit-migration-scan-')); + directories.push(path); + for (const [name, text] of Object.entries(files)) { + const target = join(path, name); + await mkdir(resolve(target, '..'), { recursive: true }); + await writeFile(target, text); + } + return path; +} + +afterEach(async () => { + for (const path of directories.splice(0)) await rm(path, { recursive: true }); +}); + +const construct = "import { Permit } from 'permitio'; const p = new Permit({ token: 'opaque' });"; + +describe('customer migration scanner', () => { + it.each([ + "import Permit from 'permitio'; const p = new Permit({ token: 'opaque' });", + "import { Permit as Auth } from 'permitio'; const p = new Auth({ token: 'opaque' });", + "import * as SDK from 'permitio'; const p = new SDK.Permit({ token: 'opaque' });", + "const { Permit: Auth } = require('permitio'); const p = new Auth({ token: 'opaque' });", + "const SDK = require('permitio'); const p = new SDK.Permit({ token: 'opaque' });", + "const SDK = await import('permitio'); const p = new SDK.Permit({ token: 'opaque' });", + "import SDK = require('permitio'); const p = new SDK.Permit({ token: 'opaque' });", + ])('recognizes SDK construction provenance: %s', async (prefix) => { + const path = await project({ 'customer.ts': `${prefix} p.api.getUser('u');` }); + const report = await scan(path); + expect(report.status).toBe('COMPLETE'); + expect(report.exitCode).toBe(1); + expect(report.findings).toContainEqual(expect.objectContaining({ id: 'A1', line: 1 })); + }); + + it.each([ + "const client = p; const api = client.api; api.getUser('u');", + "const { api: a } = p; a['getUser']('u');", + "const { getUser: get } = p.api; get('u');", + "p.api?.['getUser']?.('u');", + "const methods = p.api.getMethods(); methods.getUser('u');", + "const a = p.api; const other = a; other.getUser('u');", + 'const {api:{listUsers}} = p; await listUsers();', + 'const groups = p.api.actionGroups; useElsewhere(groups);', + ])('preserves local alias and literal member provenance: %s', async (source) => { + const report = await scan(await project({ 'customer.mts': `${construct} ${source}` })); + expect(report.findings.some((item) => item.id === 'A1')).toBe(true); + expect(report.exitCode).toBe(1); + }); + + it('tracks nested grouped results without labeling the supported call removed', async () => { + const source = `${construct} + const {api:{users:{unassignRole}}} = p; + const result = await unassignRole({}); result.data;`; + const report = await scan(await project({ 'customer.ts': source })); + expect(report.findings.some((item) => item.id === 'A3')).toBe(true); + expect(report.findings.some((item) => item.id === 'A1')).toBe(false); + expect(report.exitCode).toBe(1); + }); + + it.each([ + "import { IPermitClient } from 'permitio';" + + " function f(p: IPermitClient) { p.api.getUser('u'); }", + "import { IPermitApi } from 'permitio'; function f(a: IPermitApi) { a.getUser('u'); }", + "import { ApiClient } from 'permitio'; const a = new ApiClient(c, l); a.getUser('u');", + "import { IPermitApi } from 'permitio'; function f({getUser}: IPermitApi) { getUser('u'); }", + "import * as SDK from 'permitio'; function f(p: SDK.Permit) { p.api.getUser('u'); }", + "import { Permit } from 'permitio'; (unknown as Permit).api.getUser('u');", + "import { Permit } from 'permitio'; let p; p = new Permit(); p.api.getUser('u');", + "function app(p: import('permitio').Permit) { p.api.listUsers(); }", + "import type { Permit } from 'permitio';" + + ' function app(p: Permit | undefined) { p?.api.listUsers(); }', + ])('recognizes SDK typed/direct clients: %s', async (source) => { + const report = await scan(await project({ 'customer.ts': source })); + expect(report.findings.some((item) => item.id === 'A1')).toBe(true); + }); + + it.each([ + "p.api[key]('u');", + "let client = p; client = unrelated; client.api.getUser('u');", + 'sendElsewhere(p);', + 'export default p;', + 'export const api = p.api;', + 'const client = flag ? p : unrelated; client.api.getUser();', + 'const client = p || unrelated; client.api.getUser();', + 'let client; client = p; client = unrelated; client.api.getUser();', + 'const {...rest} = p.api; rest.getUser();', + 'returnValue({ client: p });', + 'returnValue([p.api]);', + 'returnValue({ ...p.api });', + 'function getUsers() { return p.api.users; }' + + ' const result = await getUsers().unassignRole({}); result.data;', + 'const box = {}; box.client = p; box.client.api.getUser();', + 'const box = []; box[0] = p.api; box[0].getUser();', + 'class App { constructor() { this.client = p; } run() { this.client.api.getUser(); } }', + "class App { client = new Permit({token:'opaque'}); run() {this.client.api.getUser();} }", + 'let a; ({api:a}=p); a.getUser();', + 'let a; a??=p.api; a.getUser();', + 'throw p.api;', + 'function* stream() { yield p.api; }', + 'class Child extends Permit {}; new Child().api.getUser();', + ])('requires review for known unresolved/dynamic/escaped SDK sites: %s', async (source) => { + const report = await scan(await project({ 'customer.ts': `${construct} ${source}` })); + expect(report.findings).toContainEqual( + expect.objectContaining({ + id: 'A1', + classification: 'REVIEW_REQUIRED', + }), + ); + }); + + it.each([ + "import type { Permit } from 'permitio';" + + " function app(p: Pick) { p.api.getUser(); }", + "import type { Permit } from 'permitio';" + + ' function app(p: T) { p.api.getUser(); }', + "import('permitio').then(({Permit}) => {new Permit({token:'opaque'}).api.getUser();});", + "import { Permit } from 'permitio';" + + " class App { constructor() {this.client = new Permit({token:'opaque'});} }", + "import type { Permit } from 'permitio'; function app(p: Holder) {p.api.getUser();}", + "import type { Permit } from 'permitio'; function app(p: Permit[]) {p[0].api.getUser();}", + "import type { Permit } from 'permitio'; function app(p: Permit['api']) {p.getUser();}", + ])('qualifies known unsupported SDK type/import boundaries: %s', async (source) => { + const report = await scan(await project({ 'customer.ts': source })); + expect(report.status).toBe('COMPLETE'); + expect(report.exitCode).toBe(1); + expect(report.findings).toContainEqual( + expect.objectContaining({ id: 'A1', classification: 'REVIEW_REQUIRED' }), + ); + }); + + it('ignores unrelated lookalikes, strings, comments and shadowed imported bindings', async () => { + const report = await scan( + await project({ + 'customer.ts': `${construct} + p.api.users.get('u'); + function other(Permit: any) { new Permit().api.getUser('u'); } + function local(p: any) { p.api.getUser('u'); } + const unrelated = { api: { getUser() {} } }; unrelated.api.getUser(); + const box = {}; box.client = unrelated; box.client.api.getUser(); + class App { client = unrelated; run() {this.client.api.getUser();} } + function typed(x: Pick) {x.api.getUser();} + function collections(x: Other[], y: Other['api']) {x[0].api.getUser();y.getUser();} + class Derived extends Other {}; new Derived().api.getUser(); + let alias; ({api:alias} = unrelated); alias ??= unrelated.api; + function* stream() {yield unrelated.api;} function fail() {throw unrelated.api;} + import('permitio-other').then(({Permit}) => {new Permit().api.getUser();}); + const text = 'p.api.getMethods()'; // p.api.getUser('u'); + `, + }), + ); + expect(report.findings).toEqual([]); + expect(report.exitCode).toBe(0); + }); + + it('ignores shadowed require and similarly named packages', async () => { + const report = await scan( + await project({ + 'customer.js': ` + function other(require) { const SDK = require('permitio'); new SDK.Permit().api.getUser(); } + import { Permit } from 'permitio-other'; new Permit().api.getUser(); + `, + }), + ); + expect(report.findings).toEqual([]); + }); + + it('reports selected result/config/error migrations on actual SDK-derived values', async () => { + const report = await scan( + await project({ + 'customer.ts': `${construct} + import { PermitApiError, EnvironmentCopyConflictStrategyEnum, Statistics } from 'permitio'; + const page = await p.api.users.list(); page.length; + const result = await p.api.users.unassignRole({}); result.data; + const bulk = await p.api.users.bulkUserCreate([]); bulk.operations; + const config = p.config; config.token = 'new'; + const context = config.apiContext; context.level; + function failure(error: PermitApiError<{secret: string}>) { error.originalError.request; } + `, + }), + ); + expect(new Set(report.findings.map((item) => item.id))).toEqual( + new Set(['A3', 'T2', 'F2', 'A2', 'E2', 'T1', 'T3']), + ); + }); + + it('finds removed named/CJS exports and deep entry imports', async () => { + const report = await scan( + await project({ + 'customer.ts': ` + import { DeprecatedApiClient, ContextTransform } from 'permitio'; + import model from 'permitio/build/openapi'; + const { IDeprecatedPermitApi } = require('permitio'); + `, + }), + ); + expect(report.findings.filter((item) => item.id === 'A2')).toHaveLength(3); + expect(report.findings.filter((item) => item.id === 'C2')).toHaveLength(1); + }); + + it('reports constructor, OPA hook and all-tenants review sites', async () => { + const report = await scan( + await project({ + 'customer.ts': ` + import { Permit } from 'permitio'; + const p = new Permit({ token: '', opaAxiosInstance: transport }); + p.checkAllTenants('u', 'read', 'document'); + `, + }), + ); + expect(new Set(report.findings.map((item) => item.id))).toEqual(new Set(['F1', 'W2', 'W3'])); + }); + + it('detects old dependency and runtime metadata separately from source', async () => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + 'package.json': JSON.stringify({ + dependencies: { permitio: '^2.7.5' }, + engines: { node: '>=18' }, + }), + '.node-version': '22.12.0', + Dockerfile: 'FROM node:20.0.0-alpine', + '.tool-versions': 'nodejs 21.0.0', + }), + ); + expect(report.findings.filter((item) => item.id === 'P1')).toHaveLength(1); + expect(report.findings.filter((item) => item.id === 'C1')).toHaveLength(4); + }); + + it('keeps explicit target metadata and exact supported runtime pins clean', async () => { + const report = await scan( + await project({ + 'customer.ts': `${construct} p.api.users.get('u');`, + 'package.json': JSON.stringify({ + dependencies: { permitio: '^3.0.0' }, + engines: { node: '>=22.13.0' }, + }), + '.nvmrc': '22.13.0', + Dockerfile: 'FROM node:24.0.0-alpine', + }), + ); + expect(report.exitCode).toBe(0); + }); + + it.each(['^22.13.0 || ^24.0.0', '^23.0.0', '>=25.0.0', '26.x', '>=22.13.0 <27'])( + 'accepts customer engine ranges contained in the supported Node range: %s', + async (node) => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + 'package.json': JSON.stringify({ engines: { node } }), + }), + ); + expect(report.exitCode).toBe(0); + expect(report.findings).toEqual([]); + }, + ); + + it.each(['>=22', '22.x', '>=20 || >=25', '<22.13.0', '*', 'not-a-range', 26])( + 'requires review for engines admitting unsupported or unspecified Node versions: %s', + async (node) => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + 'package.json': JSON.stringify({ engines: { node } }), + }), + ); + expect(report.exitCode).toBe(1); + expect(report.findings).toContainEqual( + expect.objectContaining({ id: 'C1', classification: 'REVIEW_REQUIRED' }), + ); + }, + ); + + it.each(['22.13.0', '23.0.0', '25.0.0', '26.11.0', '27.0.0'])( + 'accepts literal pins across supported Node majors: %s', + async (node) => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + '.node-version': node, + '.nvmrc': `v${node}`, + '.tool-versions': `nodejs ${node}`, + Dockerfile: `FROM node:${node}-alpine`, + }), + ); + expect(report.exitCode).toBe(0); + expect(report.findings).toEqual([]); + }, + ); + + it.each(['22.12.9', '20.0.0', '026.0.0', '26', '26.0.0-rc.1'])( + 'requires review for unsupported or ambiguous literal runtime pins: %s', + async (node) => { + const report = await scan( + await project({ 'customer.ts': 'const value = 1;', '.node-version': node }), + ); + expect(report.exitCode).toBe(1); + expect(report.findings).toContainEqual(expect.objectContaining({ id: 'C1' })); + }, + ); + + it.each([ + '22.13.0-rc.1', + '26.11.0-beta.1', + '26.11.0-alpine-rc.1', + '26.11.0-custom', + '26.11.0@sha256:invalid', + `22.13.0-rc.1@sha256:${'a'.repeat(64)}`, + ])('requires review for prerelease or ambiguous Docker tags: %s', async (tag) => { + const report = await scan( + await project({ 'customer.ts': 'const value = 1;', Dockerfile: `FROM node:${tag}` }), + ); + expect(report.exitCode).toBe(1); + expect(report.findings).toContainEqual(expect.objectContaining({ id: 'C1' })); + }); + + it.each([ + '22.13.0', + '26.11.0-alpine', + '26.11.0-alpine3.23', + '26.11.0-bookworm', + '26.11.0-bookworm-slim', + '26.11.0-trixie-slim', + '26.11.0-slim', + `26.11.0@sha256:${'a'.repeat(64)}`, + `26.11.0-alpine@sha256:${'b'.repeat(64)}`, + ])('accepts stable Docker tags with recognized distributions and digests: %s', async (tag) => { + const report = await scan( + await project({ 'customer.ts': 'const value = 1;', Dockerfile: `FROM node:${tag}` }), + ); + expect(report.exitCode).toBe(0); + expect(report.findings).toEqual([]); + }); + + it.each([ + 'FROM --platform=linux/arm64 node:20.0.0-alpine AS final', + 'from --platform=linux/amd64 node:22.12.9', + 'FROM --platform=$BUILDPLATFORM node:26.11.0', + 'FROM --platform=${TARGETPLATFORM} node:26.11.0', + 'FROM --platform=linux/arm64 ${BASE_IMAGE} AS final', + 'FROM --platform=linux/arm64 node:${NODE_VERSION}', + 'FROM --platform linux/arm64 node:26.11.0', + 'FROM --platform=linux/arm64 docker.io/library/node:20.0.0', + ])('reviews every unsupported or ambiguous Docker stage: %s', async (stage) => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + Dockerfile: `FROM node:26.11.0 AS build\n${stage}\n`, + }), + ); + expect(report.exitCode).toBe(1); + expect(report.findings).toContainEqual(expect.objectContaining({ id: 'C1' })); + }); + + it('accepts supported literal Node pins across platform-qualified Docker stages', async () => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + Dockerfile: `FROM --platform=linux/arm64 node:22.13.0-alpine AS build +from --platform=linux/amd64 docker.io/library/node:26.11.0-bookworm-slim AS final`, + }), + ); + expect(report.exitCode).toBe(0); + expect(report.findings).toEqual([]); + }); + + it.each([ + 'FROM node AS final', + 'from library/node AS final', + 'FROM docker.io/node AS final', + 'FROM --platform=linux/amd64 docker.io/library/node AS final', + `FROM node@sha256:${'a'.repeat(64)} AS final`, + `from --platform=linux/arm64 node@sha256:${'a'.repeat(64)} AS final`, + `FROM library/node@sha256:${'a'.repeat(64)} AS final`, + `FROM --platform=linux/amd64 docker.io/library/node@sha256:${'a'.repeat(64)} AS final`, + 'FROM node: AS final', + 'FROM --platform=linux/amd64 node@ AS final', + ])('reviews official Node stages without a literal stable version: %s', async (stage) => { + const report = await scan( + await project({ + 'customer.ts': 'const value = 1;', + Dockerfile: `FROM node:26.11.0 AS build\n${stage}\n`, + }), + ); + expect(report.status).toBe('COMPLETE'); + expect(report.exitCode).toBe(1); + expect(report.failures).toEqual([]); + expect(report.findings).toEqual([ + expect.objectContaining({ id: 'C1', classification: 'REVIEW_REQUIRED' }), + ]); + }); + + it.each([ + 'FROM node:26.11.0 AS node\nFROM node AS final', + 'FROM node:26.11.0 AS Node\nfrom --platform=linux/arm64 node AS final', + 'FROM node:26.11.0 AS build\nFROM build AS final', + 'FROM node:26.11.0 AS build\nFROM alpine:3.23 AS final', + 'FROM node:26.11.0 AS build\nFROM example/node:latest AS final', + ])('keeps prior stage aliases and non-Node images clean: %s', async (dockerfile) => { + const report = await scan( + await project({ 'customer.ts': 'const value = 1;', Dockerfile: dockerfile }), + ); + expect(report.status).toBe('COMPLETE'); + expect(report.exitCode).toBe(0); + expect(report.failures).toEqual([]); + expect(report.findings).toEqual([]); + }); + + it('makes partial parse failure incomplete even when migration findings exist', async () => { + const report = await scan( + await project({ + 'old.ts': `${construct} p.api.getUser('u');`, + 'broken.ts': 'function broken( {', + }), + ); + expect(report.findings.some((item) => item.id === 'A1')).toBe(true); + expect(report.status).toBe('INCOMPLETE'); + expect(report.exitCode).toBe(2); + expect(report.failures).not.toEqual([]); + }); + + it.each([ + { 'component.vue': '', 'ok.ts': 'const x = 1;' }, + { 'package.json': '{invalid', 'ok.ts': 'const x = 1;' }, + { 'README.md': 'No source in this project.' }, + { 'package.json': '{"dependencies": []}', 'ok.ts': 'const x = 1;' }, + { 'package.json': '{"engines": "node22"}', 'ok.ts': 'const x = 1;' }, + { 'package.json': '{"peerDependencies": null}', 'ok.ts': 'const x = 1;' }, + ])('does not report clean for unsupported/malformed/empty inputs', async (files) => { + const report = await scan(await project(files)); + expect(report.status).toBe('INCOMPLETE'); + expect(report.exitCode).toBe(2); + }); + + it('does not follow symlinks or dependency/build exclusions', async () => { + const path = await project({ + 'customer.ts': 'const x = 1;', + 'node_modules/dep.ts': `${construct} p.api.getUser('u');`, + 'dist/bundle.js': `${construct} p.api.getUser('u');`, + }); + await symlink(path, join(path, 'loop')); + await symlink(tmpdir(), join(path, 'escape')); + const report = await scan(path); + expect(report.findings).toEqual([]); + expect(report.exitCode).toBe(2); + expect(report.excluded.map((item) => item.path)).toEqual([ + 'dist', + 'escape', + 'loop', + 'node_modules', + ]); + expect(report.failures[0].reason).toContain('escapes'); + }); + + it('does not execute target code, scripts or target dependencies', async () => { + const path = await project({ + 'customer.js': `throw new Error('MUST NOT EXECUTE'); + const { Permit } = require('permitio'); new Permit().api.getUser('u');`, + 'package.json': JSON.stringify({ scripts: { prepare: 'touch EXECUTED' } }), + 'node_modules/permitio/index.js': "throw new Error('MUST NOT LOAD');", + }); + const report = await scan(path); + expect(report.findings.some((item) => item.id === 'A1')).toBe(true); + await expect(readFile(join(path, 'EXECUTED'))).rejects.toMatchObject({ code: 'ENOENT' }); + }); + + it('returns an actionable incomplete result for an unavailable root', async () => { + const report = await scan(join(await project({}), 'missing')); + expect(report.exitCode).toBe(2); + expect(report.failures[0].reason).toContain('Cannot read scan root'); + }); + + it('qualifies known SDK local-module indirection instead of declaring it clean', async () => { + const report = await scan( + await project({ + 'client.ts': `${construct} export { p };`, + 'forward.ts': "export { p } from './client.js';", + 'use.ts': "import { p } from './forward.js'; p.api.getUser('u');", + }), + ); + expect(report.findings.map((item) => item.path)).toEqual( + expect.arrayContaining(['client.ts', 'forward.ts', 'use.ts']), + ); + expect(report.findings.every((item) => item.classification === 'REVIEW_REQUIRED')).toBe(true); + }); + + it.each([ + 'function factory() { return p; } const value = factory(); value.api.getUser();', + 'module.exports = p;', + 'export { p };', + ])('qualifies known SDK returns and exports: %s', async (source) => { + const report = await scan(await project({ 'customer.ts': `${construct} ${source}` })); + expect(report.findings).toContainEqual( + expect.objectContaining({ + id: 'A1', + classification: 'REVIEW_REQUIRED', + }), + ); + }); + + it('detects nested settings writes but permits live caller transport defaults', async () => { + const report = await scan( + await project({ + 'customer.ts': `${construct} + p.config.log.level = 'silent'; + p.config.multiTenancy.defaultTenant = 'other'; + p.config = unrelated; + p.config.axiosInstance.defaults.headers.common['X-Caller'] = 'live'; + `, + }), + ); + expect(report.findings.filter((item) => item.id === 'F2')).toHaveLength(3); + }); + + it('does not merge unrelated globals across independent source files', async () => { + const report = await scan( + await project({ + 'sdk.js': + "const { Permit } = require('permitio'); const p = new Permit(); p.api.users.get('u');", + 'other.js': "const p = { api: { getUser() {} } }; p.api.getUser('u');", + }), + ); + expect(report.findings).toEqual([]); + }); + + it.each(['latest', 'workspace:*', '^3.malformed', '>=2 <4'])( + 'reviews ambiguous dependency %s', + async (version) => { + const report = await scan( + await project({ + 'source.ts': 'const x = 1;', + 'package.json': JSON.stringify({ dependencies: { permitio: version } }), + }), + ); + expect(report.findings).toContainEqual( + expect.objectContaining({ + id: 'P1', + classification: 'REVIEW_REQUIRED', + }), + ); + }, + ); + + it('uses the documented real CLI status and parseable report', async () => { + const path = await project({ 'customer.ts': `${construct} p.api.getUser('u');` }); + const result = spawnSync(process.execPath, [script, path], { encoding: 'utf8' }); + expect(result.status).toBe(1); + expect(JSON.parse(result.stdout).status).toBe('COMPLETE'); + expect(result.stderr).toBe(''); + }); +}); diff --git a/scripts/normalize-openapi.mjs b/scripts/normalize-openapi.mjs new file mode 100644 index 00000000..73823d21 --- /dev/null +++ b/scripts/normalize-openapi.mjs @@ -0,0 +1,203 @@ +import { execFileSync } from 'node:child_process'; +import { readFileSync, writeFileSync } from 'node:fs'; +import { resolve, sep } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import ts from '@permitio/compiler-tools'; + +/** + * Applies compiler-directed compatibility edits after OpenAPI generation. + * + * @param root - Repository containing tsconfig.build.json and src/openapi. + * @throws If the compiler configuration cannot be read. + */ +export function normalizeOpenApi(root = process.cwd()) { + const configFile = resolve(root, 'tsconfig.build.json'); + const config = ts.readConfigFile(configFile, ts.sys.readFile); + if (config.error) + throw new Error(`Cannot read ${configFile}; repair the compiler configuration.`); + const parsed = ts.parseJsonConfigFileContent(config.config, ts.sys, root); + if (parsed.errors.length) { + throw new Error( + ts.formatDiagnostics(parsed.errors, { + getCanonicalFileName: (file) => file, + getCurrentDirectory: () => root, + getNewLine: () => '\n', + }), + ); + } + const generated = resolve(root, 'src/openapi') + sep; + for (const file of parsed.fileNames.filter((name) => name.startsWith(generated))) { + const text = readFileSync(file, 'utf8') + .replace(/^\s*\/\/ @ts-ignore[^\n]*\n/gm, '') + .replace(/^\s*\/\/ Some imports not used depending on template conditions\n/gm, ''); + writeFileSync(file, text); + } + const host = { + ...ts.sys, + useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames, + getCompilationSettings: () => parsed.options, + getScriptFileNames: () => parsed.fileNames, + getScriptVersion: () => '0', + getScriptSnapshot: (file) => { + const text = ts.sys.readFile(file); + return text === undefined ? undefined : ts.ScriptSnapshot.fromString(text); + }, + getCurrentDirectory: () => root, + getDefaultLibFileName: ts.getDefaultLibFilePath, + }; + const service = ts.createLanguageService(host); + const program = service.getProgram(); + if (!program) throw new Error('Cannot initialize the compiler API for generated imports.'); + const syntaxErrors = program + .getSyntacticDiagnostics() + .filter((diagnostic) => diagnostic.file?.fileName.startsWith(generated)); + if (syntaxErrors.length) { + service.dispose(); + throw new Error( + ts.formatDiagnostics(syntaxErrors, { + getCanonicalFileName: (file) => file, + getCurrentDirectory: () => root, + getNewLine: () => '\n', + }), + ); + } + const printer = ts.createPrinter(); + for (const file of parsed.fileNames.filter((name) => name.startsWith(generated))) { + const source = program.getSourceFile(file); + if (!source) throw new Error(`Cannot read generated source ${file}.`); + const edits = []; + for (const diagnostic of service.getSemanticDiagnostics(file)) { + if (diagnostic.start === undefined) continue; + let node = source; + const visit = (current) => { + if (current.getStart(source) <= diagnostic.start && current.end > diagnostic.start) { + node = current; + ts.forEachChild(current, visit); + } + }; + visit(source); + if (diagnostic.code === 1484 || diagnostic.code === 1205) { + while (node && !ts.isImportSpecifier(node) && !ts.isExportSpecifier(node)) { + node = node.parent; + } + if (node) edits.push({ start: node.getStart(source), length: 0, newText: 'type ' }); + } else if (diagnostic.code === 4111) { + while (node && !ts.isPropertyAccessExpression(node)) node = node.parent; + if (node) + edits.push({ + start: node.expression.end, + length: node.end - node.expression.end, + newText: `${node.questionDotToken ? '?.' : ''}[${JSON.stringify(node.name.text)}]`, + }); + } else if (diagnostic.code === 4114) { + while (node && !ts.isPropertyDeclaration(node)) node = node.parent; + if (node) + edits.push({ start: node.name.getStart(source), length: 0, newText: 'override ' }); + } else if (diagnostic.code === 2412) { + while (node && !ts.isPropertyAccessExpression(node)) node = node.parent; + if (!node || node.expression.kind !== ts.SyntaxKind.ThisKeyword) continue; + const property = program.getTypeChecker().getSymbolAtLocation(node.name)?.valueDeclaration; + if (!property || !ts.isPropertyDeclaration(property) || !property.type) continue; + // Generated constructors assign optional parameters even when absent. Preserve that + // runtime behavior by describing those particular stored properties truthfully. + const type = ts.factory.createUnionTypeNode([ + property.type, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.UndefinedKeyword), + ]); + edits.push({ + start: property.type.getStart(source), + length: property.type.end - property.type.getStart(source), + newText: printer.printNode(ts.EmitHint.Unspecified, type, source), + }); + } + } + const annotateRequest = (node) => { + if ( + ts.isPropertyDeclaration(node) && + node.type && + node.initializer && + ts.isLiteralTypeNode(node.type) && + ts.isStringLiteral(node.type.literal) && + ts.isStringLiteral(node.initializer) && + node.type.literal.text === node.initializer.text + ) { + edits.push({ start: node.name.end, length: node.type.end - node.name.end, newText: '' }); + edits.push({ start: node.initializer.end, length: 0, newText: ' as const' }); + } + if (ts.isVariableDeclaration(node) && node.name.getText(source) === 'createRequestFunction') { + const visit = (child) => { + if (ts.isArrowFunction(child) && !child.type) { + edits.push({ + start: child.equalsGreaterThanToken.getStart(source), + length: 0, + newText: ': ReturnType> ', + }); + } else { + ts.forEachChild(child, visit); + } + }; + ts.forEachChild(node, visit); + } + ts.forEachChild(node, annotateRequest); + }; + annotateRequest(source); + let text = readFileSync(file, 'utf8'); + for (const edit of edits.sort((a, b) => b.start - a.start)) { + text = text.slice(0, edit.start) + edit.newText + text.slice(edit.start + edit.length); + } + text = text.replaceAll('/* tslint:disable */\n', '').replaceAll('/* eslint-disable */\n', ''); + text = text.replace(/^\s*\* @(?:export|memberof)\b[^\n]*\n/gm, ''); + text = text.replace(/^(\s*\*.*?)[ \t]+$/gm, '$1'); + // JSDoc-only RequiredError imports are retained by TypeScript but unused at runtime. + text = text.replaceAll( + '@throws {RequiredError}', + '@throws If a required parameter is missing.', + ); + writeFileSync(file, text); + } + service.dispose(); + // Recreate the service after edits so unused generated imports are removed against current text. + const imports = ts.createLanguageService(host); + for (const file of parsed.fileNames.filter((name) => name.startsWith(generated))) { + const changes = imports.organizeImports({ type: 'file', fileName: file }, {}, {}); + for (const change of changes) { + let text = readFileSync(change.fileName, 'utf8'); + for (const edit of [...change.textChanges].reverse()) { + text = + text.slice(0, edit.span.start) + + edit.newText + + text.slice(edit.span.start + edit.span.length); + } + writeFileSync(change.fileName, text); + } + } + imports.dispose(); + try { + execFileSync( + process.execPath, + [ + fileURLToPath(new URL('../node_modules/typescript/bin/tsc', import.meta.url)), + '-p', + configFile, + '--noEmit', + '--emitDeclarationOnly', + 'false', + '--pretty', + 'false', + ], + { cwd: root, encoding: 'utf8', stdio: 'pipe' }, + ); + } catch (cause) { + throw new Error( + 'Generated source failed the TypeScript 7 SDK check; fix the generator output.\n' + + String(cause.stdout ?? '') + + String(cause.stderr ?? ''), + { cause }, + ); + } +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + normalizeOpenApi(); +} diff --git a/scripts/normalize-openapi.test.mjs b/scripts/normalize-openapi.test.mjs new file mode 100644 index 00000000..2f6f9a92 --- /dev/null +++ b/scripts/normalize-openapi.test.mjs @@ -0,0 +1,145 @@ +import { spawnSync } from 'node:child_process'; +import { mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; + +import ts from '@permitio/compiler-tools'; +import { expect, onTestFinished, test } from 'vitest'; + +import { normalizeOpenApi } from '#scripts/normalize-openapi.mjs'; + +function fixture() { + const root = mkdtempSync(join(tmpdir(), 'permit normalization ')); + onTestFinished(() => rmSync(root, { recursive: true, force: true })); + mkdirSync(join(root, 'src/openapi'), { recursive: true }); + symlinkSync(join(process.cwd(), 'node_modules'), join(root, 'node_modules'), 'dir'); + writeFileSync( + join(root, 'tsconfig.build.json'), + JSON.stringify({ + compilerOptions: { + strict: true, + exactOptionalPropertyTypes: true, + noUncheckedIndexedAccess: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + module: 'ESNext', + moduleResolution: 'Bundler', + target: 'ES2023', + types: [], + declaration: true, + emitDeclarationOnly: true, + outDir: 'build', + rootDir: 'src/openapi', + }, + include: ['src/**/*.ts'], + }), + ); + return root; +} + +test.each([false, true])( + 'normalizes generated source idempotently on a case-sensitive=%s filesystem', + (caseSensitive) => { + const original = ts.sys.useCaseSensitiveFileNames; + ts.sys.useCaseSensitiveFileNames = caseSensitive; + onTestFinished(() => { + ts.sys.useCaseSensitiveFileNames = original; + }); + const root = fixture(); + writeFileSync( + join(root, 'src/openapi/model.ts'), + 'export interface Model { key: string }\nexport interface Unused { unused: number }', + ); + const file = join(root, 'src/openapi/api.ts'); + writeFileSync( + file, + `/* eslint-disable */ +// @ts-ignore +import { Model, Unused } from './model'; +import { AxiosInstance, AxiosResponse } from 'axios'; +/** + * Stored API configuration.${' '} + * @export + * @memberof Configuration + */ +export class Configuration { + token?: string; + constructor(parameters: { token?: string }) { this.token = parameters.token; } +} +export class RequiredError extends Error { name: 'RequiredError' = 'RequiredError'; } +export function read(model: Model): Model { return model; } +export function header(headers?: Record) { return headers?.contentType; } +export const createRequestFunction = function (globalAxios: AxiosInstance) { + return >(axios: AxiosInstance = globalAxios) => { + return axios.request({ url: '/fixture' }); + }; +};`, + ); + normalizeOpenApi(root); + const normalized = readFileSync(file, 'utf8'); + expect(normalized).not.toContain('eslint-disable'); + expect(normalized).not.toContain('@ts-ignore'); + expect(normalized).not.toContain('Unused'); + expect(normalized).not.toContain('@export'); + expect(normalized).not.toContain('@memberof'); + expect(normalized).not.toMatch(/configuration\. +\n/); + const result = spawnSync( + process.execPath, + [join(process.cwd(), 'node_modules/typescript/bin/tsc'), '-p', 'tsconfig.build.json'], + { cwd: root, encoding: 'utf8' }, + ); + expect(result.status, result.stdout + result.stderr).toBe(0); + const declaration = readFileSync(join(root, 'build/api.d.ts'), 'utf8'); + expect(declaration).toContain('read(model: Model): Model'); + expect(declaration).toContain('ReturnType>'); + normalizeOpenApi(root); + expect(readFileSync(file, 'utf8')).toBe(normalized); + }, + // Two compiler-backed normalization passes and a compiler subprocess share the CI runner. + 30_000, +); + +test('reports a missing compiler configuration', () => { + const root = fixture(); + rmSync(join(root, 'tsconfig.build.json')); + expect(() => normalizeOpenApi(root)).toThrow(/repair the compiler configuration/); +}); + +for (const [name, source, diagnostic] of [ + ['malformed generated source', 'export interface Broken {', /TS1005/], + [ + 'unsupported generated assignment', + 'export const value: string = 123;', + /TypeScript 7[\s\S]*TS2322/, + ], +]) { + test(`rejects ${name}`, () => { + const root = fixture(); + writeFileSync(join(root, 'src/openapi/broken.ts'), source); + expect(() => normalizeOpenApi(root)).toThrow(diagnostic); + }); +} + +test('rejects invalid compiler options instead of silently normalizing a partial program', () => { + const root = fixture(); + writeFileSync(join(root, 'tsconfig.build.json'), '{"compilerOptions":{"target":"invalid"}}'); + expect(() => normalizeOpenApi(root)).toThrow(/TS6046/); +}); + +test('removes imports used only by generated required-parameter documentation', () => { + const root = fixture(); + writeFileSync(join(root, 'src/openapi/base.ts'), 'export class RequiredError extends Error {}'); + const file = join(root, 'src/openapi/api.ts'); + writeFileSync( + file, + `import { RequiredError } from './base'; +/** @throws {RequiredError} */ +export function read(): string { return 'ok'; }`, + ); + normalizeOpenApi(root); + const result = readFileSync(file, 'utf8'); + expect(result).not.toContain("from './base'"); + expect(result).toContain('@throws If a required parameter is missing.'); +}); diff --git a/scripts/openapi-generator.mjs b/scripts/openapi-generator.mjs new file mode 100644 index 00000000..e5ecaaa9 --- /dev/null +++ b/scripts/openapi-generator.mjs @@ -0,0 +1,272 @@ +import { createHash } from 'node:crypto'; +import { spawnSync } from 'node:child_process'; +import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { dirname, join, relative } from 'node:path'; + +// These generator diagnostics have specific contract tests; all other warnings fail generation. +const KNOWN_WARNINGS = [ + 'OpenAPI 3.1 support is still in beta. To report an issue related to 3.1 spec, please kindly open an issue in the Github repo: https://github.com/openAPITools/openapi-generator.', + 'Failed to get the schema name: null', // The checked callback tuple repair below preserves its type. + // The generator safely renames the inline Object model; its emitted shape is checked with all models. + 'Object (model name matches existing language type) cannot be used as a model name. Renamed to ModelObject', +]; + +/** Loads the single generator configuration shared by regeneration and both CI guards. */ +export function generatorOptions(root) { + const path = join(root, 'openapi/generator.json'); + const config = JSON.parse(readFileSync(path, 'utf8')); + if (config.generatorName !== 'typescript-axios') + throw new Error('Expected typescript-axios generator.'); + const allowed = ['generatorName', 'additionalProperties', 'globalProperties', 'typeMappings']; + if (Object.keys(config).some((key) => !allowed.includes(key))) + throw new Error('Unsupported generator configuration option.'); + if (config.typeMappings?.set !== 'Array' || Object.keys(config.typeMappings).length !== 1) { + throw new Error('Generator typeMappings must preserve unique JSON arrays with set: Array.'); + } + for (const key of ['apiPackage', 'modelPackage']) { + if (!/^[a-z][a-z0-9-]*$/i.test(config.additionalProperties?.[key] ?? '')) { + throw new Error(`Generator ${key} must be a single directory name.`); + } + } + return config; +} + +/** Checks completion metadata and every generated TypeScript file before consuming output. */ +export function assertGeneratedComplete(output, pin) { + const metadata = join(output, '.openapi-generator'); + for (const file of ['VERSION', 'FILES']) { + if (!existsSync(join(metadata, file))) + throw new Error(`Missing completion metadata ${file}; rerun generation.`); + } + const version = readFileSync(join(metadata, 'VERSION'), 'utf8').trim(); + if (version !== pin) + throw new Error(`Generator ran ${version}, but openapitools.json pins ${pin}.`); + const manifest = readFileSync(join(metadata, 'FILES'), 'utf8') + .split(/\r?\n/) + .filter((file) => file.endsWith('.ts')); + if (manifest.length === 0) + throw new Error('Completion manifest FILES lists no TypeScript files.'); + for (const file of manifest) { + if (file.startsWith('/') || file.split('/').includes('..') || !existsSync(join(output, file))) { + throw new Error(`Incomplete generation: manifest file ${file} is missing or invalid.`); + } + } + const actual = readdirSync(output, { recursive: true }).filter((file) => file.endsWith('.ts')); + if (actual.length !== new Set(manifest).size) + throw new Error('Generated files differ from the completion manifest FILES.'); + return manifest; +} + +/** Restores the one tuple that the pinned generator currently widens to Array. */ +export function repairCallbackTuple(output, modelDirectory) { + const file = join(output, modelDirectory, 'callbacks-inner.ts'); + const text = readFileSync(file, 'utf8'); + const expected = /^export type CallbacksInner = Array \| string;$/m; + if (!expected.test(text)) + throw new Error( + 'Callback tuple generator behavior changed; review the narrow tuple correction.', + ); + writeFileSync( + file, + text.replace( + expected, + "import type { OPALHttpFetcherConfig } from './opalhttp-fetcher-config';\n" + + 'export type CallbacksInner = string | [string, OPALHttpFetcherConfig];', + ), + ); +} + +/** Preserves explicit SDK API/PDP routing when the injected Axios instance has a baseURL. */ +export function repairRequestRouting(output) { + const file = join(output, 'common.ts'); + const text = readFileSync(file, 'utf8'); + const original = + "(axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url"; + if (text.split(original).length !== 2) { + throw new Error( + 'Generated request routing changed; review the explicit SDK base-path correction.', + ); + } + writeFileSync( + file, + text.replace(original, '(configuration?.basePath || basePath) + axiosArgs.url'), + ); +} + +/** Restores the reviewed Axios return type without asserting a generic Promise shape. */ +export function repairRequestReturnType(output) { + const file = join(output, 'common.ts'); + let text = readFileSync(file, 'utf8'); + for (const [original, replacement] of [ + [': Promise => {', ': ReturnType> => {'], + [ + 'axios.request(axiosRequestArgs) as Promise', + 'axios.request(axiosRequestArgs)', + ], + ]) { + if (text.split(original).length !== 2) { + throw new Error( + 'Generated Axios return type changed; review the generic return-type correction.', + ); + } + text = text.replace(original, replacement); + } + writeFileSync(file, text); +} + +/** + * Restores five reviewed comment wraps flattened by the pinned generator. + * + * @param output - Completed generator output directory. + * @param modelDirectory - Checked model directory from the shared generator configuration. + * @param input - Prepared schema containing the five exact multiline descriptions. + * @throws If a source description or its single generated property occurrence changes. + */ +export function repairPropertyDescriptions(output, modelDirectory, input) { + const spec = JSON.parse(readFileSync(input, 'utf8')); + for (const [model, property, filename] of [ + [ + 'data_generator_lib__schemas__schema_opal_data__DerivationSettings', + 'superseded_by_direct_role', + 'data-generator-lib-schemas-schema-opal-data-derivation-settings', + ], + ...['GroupAssignment', 'GroupCreate', 'GroupReadSchema'].map((model) => [ + model, + 'group_instance_key', + model.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`).slice(1), + ]), + ['TenantBlockRead', 'attributes', 'tenant-block-read'], + ]) { + const description = spec.components?.schemas?.[model]?.properties?.[property]?.description; + if (typeof description !== 'string' || !description.includes('\n')) { + throw new Error(`Checked comment source for ${model}.${property} changed; review it.`); + } + const file = join(output, modelDirectory, filename + '.ts'); + const text = readFileSync(file, 'utf8'); + const suffix = `\n */\n '${property}'`; + const original = ' * ' + description.replaceAll('\n', ' ') + suffix; + if (text.split(original).length !== 2) { + throw new Error(`Generated comment for ${model}.${property} changed; review the repair.`); + } + const wrapped = ' * ' + description.split('\n').join('\n * ') + suffix; + writeFileSync(file, text.replace(original, wrapped)); + } +} + +/** Downloads a missing pinned JAR and verifies its reviewed digest before any Java execution. */ +export async function verifyGeneratorArtifact(root) { + const provenance = JSON.parse(readFileSync(join(root, 'openapi/provenance.json'), 'utf8')); + const pin = JSON.parse(readFileSync(join(root, 'openapitools.json'), 'utf8'))['generator-cli'] + ?.version; + if (!/^\d+\.\d+\.\d+$/.test(pin ?? '')) { + throw new Error('openapitools.json must pin an explicit stable generator version.'); + } + if (pin !== provenance.generator || !/^[a-f0-9]{64}$/.test(provenance.generatorSha256 ?? '')) { + throw new Error('Generator pin and reviewed artifact provenance disagree.'); + } + const jar = join(root, `node_modules/.cache/openapi-generator/${pin}.jar`); + const expected = provenance.generatorSha256; + function verify(bytes) { + if (createHash('sha256').update(bytes).digest('hex') !== expected) { + throw new Error( + 'Generator JAR hash differs from the reviewed artifact; restore the pinned archive.', + ); + } + } + if (!existsSync(jar)) { + const url = `https://repo.maven.apache.org/maven2/org/openapitools/openapi-generator-cli/${pin}/openapi-generator-cli-${pin}.jar`; + let response; + try { + response = await fetch(url, { signal: AbortSignal.timeout(120_000) }); + } catch (cause) { + throw new Error(`Cannot download pinned generator ${pin} from Maven Central.`, { cause }); + } + if (!response.ok) + throw new Error(`Generator download failed with HTTP ${response.status}: ${url}`); + const bytes = Buffer.from(await response.arrayBuffer()); + verify(bytes); + mkdirSync(dirname(jar), { recursive: true }); + writeFileSync(jar, bytes); + } + verify(readFileSync(jar)); + return pin; +} + +/** + * Generates a prepared local schema with validation enabled and rejects unexpected warnings. + * + * @param options - Repository, prepared input file and fresh output directory. + * @returns The generated TypeScript manifest. + */ +export async function generateOpenApi({ root, input, output }) { + const config = generatorOptions(root); + const pin = await verifyGeneratorArtifact(root); + const jar = join(root, `node_modules/.cache/openapi-generator/${pin}.jar`); + const java = process.env.JAVA_HOME ? join(process.env.JAVA_HOME, 'bin/java') : 'java'; + mkdirSync(dirname(output), { recursive: true }); + const result = spawnSync( + java, + [ + '-jar', + relative(root, jar), + 'generate', + '-i', + relative(root, input), + '-o', + relative(root, output), + '-c', + 'openapi/generator.json', + '-t', + 'openapi/templates', + ], + { + cwd: root, + env: { ...process.env, PWD: root, INIT_CWD: root }, + encoding: 'utf8', + maxBuffer: 10 * 1024 * 1024, + }, + ); + const log = `${result.stdout ?? ''}${result.stderr ?? ''}`; + if (result.error || result.status !== 0) { + const detail = result.error?.code ?? result.signal ?? `exit ${result.status}`; + let message = `OpenAPI generator ${pin} failed (${detail}).`; + if (result.error?.code === 'ENOENT') { + message = + `Cannot execute Java at ${java} (ENOENT); ` + + 'install Java 17 and check JAVA_HOME or PATH.'; + } else if (result.error?.code === 'EACCES') { + message = + `Cannot execute Java at ${java} (EACCES); ` + + 'check executable permissions and JAVA_HOME or PATH.'; + } else if (result.error?.code === 'ENOBUFS') { + message = + `OpenAPI generator ${pin} exceeded its 10 MiB output limit (ENOBUFS); ` + + 'inspect the captured diagnostics and reduce generator output.'; + } + const diagnosticLimit = 16 * 1024; + for (const [stream, output] of [ + ['stdout', result.stdout ?? ''], + ['stderr', result.stderr ?? ''], + ]) { + if (output.length === 0) continue; + const diagnostic = + output.length > diagnosticLimit + ? output.slice(0, diagnosticLimit / 2) + + '\n[output truncated]\n' + + output.slice(-diagnosticLimit / 2) + : output; + message += `\n${stream}:\n${diagnostic}`; + } + throw new Error(message, { cause: result.error }); + } + for (const warning of log.split(/\r?\n/).filter((line) => /\b(?:WARN|ERROR)\b/.test(line))) { + if (/\bERROR\b/.test(warning) || !KNOWN_WARNINGS.some((known) => warning.endsWith(known))) + throw new Error(`Unexpected generator diagnostic: ${warning}`); + } + const manifest = assertGeneratedComplete(output, pin); + repairCallbackTuple(output, config.additionalProperties.modelPackage); + repairRequestRouting(output); + repairRequestReturnType(output); + repairPropertyDescriptions(output, config.additionalProperties.modelPackage, input); + return manifest; +} diff --git a/scripts/openapi-generator.test.mjs b/scripts/openapi-generator.test.mjs new file mode 100644 index 00000000..e19a38c9 --- /dev/null +++ b/scripts/openapi-generator.test.mjs @@ -0,0 +1,237 @@ +import { createHash } from 'node:crypto'; +import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; + +import { expect, onTestFinished, test, vi } from 'vitest'; + +import { + generateOpenApi, + generatorOptions, + repairPropertyDescriptions, + verifyGeneratorArtifact, +} from '#scripts/openapi-generator.mjs'; + +function fixture() { + const root = mkdtempSync(join(tmpdir(), 'permit-jar-')); + onTestFinished(() => { + rmSync(root, { recursive: true, force: true }); + vi.unstubAllGlobals(); + vi.unstubAllEnvs(); + }); + const bytes = Buffer.from('verified test archive'); + mkdirSync(join(root, 'openapi')); + writeFileSync( + join(root, 'openapitools.json'), + JSON.stringify({ 'generator-cli': { version: '7.25.0' } }), + ); + writeFileSync( + join(root, 'openapi/provenance.json'), + JSON.stringify({ + generator: '7.25.0', + generatorSha256: createHash('sha256').update(bytes).digest('hex'), + }), + ); + const jar = join(root, 'node_modules/.cache/openapi-generator/7.25.0.jar'); + return { root, jar, bytes }; +} + +test('verifies a downloaded artifact before caching it and reuses it without a network call', async () => { + const { root, jar, bytes } = fixture(); + const download = vi.fn().mockResolvedValue({ ok: true, arrayBuffer: async () => bytes }); + vi.stubGlobal('fetch', download); + await expect(verifyGeneratorArtifact(root)).resolves.toBe('7.25.0'); + expect(readFileSync(jar)).toEqual(bytes); + expect(download.mock.calls[0][0]).toBe( + 'https://repo.maven.apache.org/maven2/org/openapitools/openapi-generator-cli/7.25.0/openapi-generator-cli-7.25.0.jar', + ); + await expect(verifyGeneratorArtifact(root)).resolves.toBe('7.25.0'); + expect(download).toHaveBeenCalledTimes(1); +}); + +for (const [name, response, pattern] of [ + ['HTTP failure', { ok: false, status: 404 }, /HTTP 404/], + [ + 'wrong archive', + { ok: true, arrayBuffer: async () => Buffer.from('wrong bytes') }, + /hash differs/, + ], +]) { + test(`rejects ${name} without installing an unverified archive`, async () => { + const { root, jar } = fixture(); + vi.stubGlobal('fetch', vi.fn().mockResolvedValue(response)); + await expect(verifyGeneratorArtifact(root)).rejects.toThrow(pattern); + expect(existsSync(jar)).toBe(false); + }); +} + +test('download transport failure retains operation context and its cause', async () => { + const { root, jar } = fixture(); + const cause = new Error('offline'); + vi.stubGlobal('fetch', vi.fn().mockRejectedValue(cause)); + await expect(verifyGeneratorArtifact(root)).rejects.toMatchObject({ + message: 'Cannot download pinned generator 7.25.0 from Maven Central.', + cause, + }); + expect(existsSync(jar)).toBe(false); +}); + +test('a missing Java executable preserves the spawn failure as its cause', async () => { + const { root, jar, bytes } = fixture(); + mkdirSync(dirname(jar), { recursive: true }); + writeFileSync(jar, bytes); + writeFileSync(join(root, 'openapi/generator.json'), JSON.stringify(reviewedConfig)); + vi.stubEnv('JAVA_HOME', join(root, 'missing java')); + await expect( + generateOpenApi({ root, input: join(root, 'input.json'), output: join(root, 'output') }), + ).rejects.toMatchObject({ + message: expect.stringMatching(/Cannot execute Java.*ENOENT.*install Java 17/), + cause: expect.objectContaining({ code: 'ENOENT' }), + }); +}); + +test('Java output overflow retains bounded stdout and stderr with its cause', async () => { + const { root, jar, bytes } = fixture(); + mkdirSync(dirname(jar), { recursive: true }); + writeFileSync(jar, bytes); + writeFileSync(join(root, 'openapi/generator.json'), JSON.stringify(reviewedConfig)); + const javaHome = join(root, 'fixture java'); + mkdirSync(join(javaHome, 'bin'), { recursive: true }); + writeFileSync( + join(javaHome, 'bin/java'), + `#!${process.execPath} +const fs = require('node:fs'); +fs.writeFileSync('java-executed', 'yes'); +fs.writeSync(2, 'stderr before overflow\\n'); +fs.writeSync(1, 'stdout before overflow\\n'); +fs.writeSync(1, Buffer.alloc(12 * 1024 * 1024, 'x')); +`, + { mode: 0o755 }, + ); + vi.stubEnv('JAVA_HOME', javaHome); + const failure = await generateOpenApi({ + root, + input: join(root, 'input.json'), + output: join(root, 'output'), + }).catch((error) => error); + expect(readFileSync(join(root, 'java-executed'), 'utf8')).toBe('yes'); + expect(failure).toBeInstanceOf(Error); + expect(failure).toMatchObject({ cause: expect.objectContaining({ code: 'ENOBUFS' }) }); + expect(failure.message).toMatch(/generator 7\.25\.0 exceeded its 10 MiB output limit/); + expect(failure.message).toContain('stdout before overflow'); + expect(failure.message).toContain('stderr before overflow'); + expect(failure.message).toContain('[output truncated]'); + expect(failure.message.length).toBeLessThan(34 * 1024); + expect(failure.message).not.toContain('install Java'); +}); + +test('a Java permission failure preserves its cause and names executable permissions', async () => { + const { root, jar, bytes } = fixture(); + mkdirSync(dirname(jar), { recursive: true }); + writeFileSync(jar, bytes); + writeFileSync(join(root, 'openapi/generator.json'), JSON.stringify(reviewedConfig)); + const javaHome = join(root, 'fixture java'); + mkdirSync(join(javaHome, 'bin'), { recursive: true }); + writeFileSync(join(javaHome, 'bin/java'), 'not executable', { mode: 0o644 }); + vi.stubEnv('JAVA_HOME', javaHome); + await expect( + generateOpenApi({ root, input: join(root, 'input.json'), output: join(root, 'output') }), + ).rejects.toMatchObject({ + message: expect.stringMatching(/Cannot execute Java.*EACCES.*check executable permissions/), + cause: expect.objectContaining({ code: 'EACCES' }), + }); +}); + +test('rejects changed pin provenance before download', async () => { + const { root } = fixture(); + const download = vi.fn(); + vi.stubGlobal('fetch', download); + writeFileSync( + join(root, 'openapitools.json'), + JSON.stringify({ 'generator-cli': { version: '8.0.0' } }), + ); + await expect(verifyGeneratorArtifact(root)).rejects.toThrow(/pin and reviewed artifact/); + expect(download).not.toHaveBeenCalled(); +}); + +const reviewedConfig = JSON.parse( + readFileSync(new URL('../openapi/generator.json', import.meta.url), 'utf8'), +); + +test('uses the checked JSON-array mapping in the shared generation configuration', () => { + const { root } = fixture(); + writeFileSync(join(root, 'openapi/generator.json'), JSON.stringify(reviewedConfig)); + expect(generatorOptions(root).typeMappings).toEqual({ set: 'Array' }); +}); + +test.each([undefined, null, { set: 'Set' }, { set: 'Array', array: 'Set' }])( + 'rejects missing or unreviewed JSON-array mappings: %j', + (typeMappings) => { + const { root } = fixture(); + writeFileSync( + join(root, 'openapi/generator.json'), + JSON.stringify({ ...reviewedConfig, typeMappings }), + ); + expect(() => generatorOptions(root)).toThrow('preserve unique JSON arrays'); + }, +); + +const wrappedProperties = [ + [ + 'data_generator_lib__schemas__schema_opal_data__DerivationSettings', + 'superseded_by_direct_role', + 'data-generator-lib-schemas-schema-opal-data-derivation-settings', + ], + ['GroupAssignment', 'group_instance_key', 'group-assignment'], + ['GroupCreate', 'group_instance_key', 'group-create'], + ['GroupReadSchema', 'group_instance_key', 'group-read-schema'], + ['TenantBlockRead', 'attributes', 'tenant-block-read'], +]; + +function commentFixture() { + const { root } = fixture(); + const models = join(root, 'types'); + mkdirSync(models); + const schemas = {}; + for (const [model, property, filename] of wrappedProperties) { + schemas[model] = { properties: { [property]: { description: 'First line.\nSecond line.' } } }; + writeFileSync( + join(models, filename + '.ts'), + `/**\n * First line. Second line.\n */\n '${property}'?: string;`, + ); + } + const input = join(root, 'input.json'); + writeFileSync(input, JSON.stringify({ components: { schemas } })); + return { root, models, input }; +} + +test('restores only checked property-comment lines without changing surrounding source', () => { + const { root, models, input } = commentFixture(); + repairPropertyDescriptions(root, 'types', input); + for (const [, property, filename] of wrappedProperties) { + expect(readFileSync(join(models, filename + '.ts'), 'utf8')).toBe( + `/**\n * First line.\n * Second line.\n */\n '${property}'?: string;`, + ); + } +}); + +test.each(wrappedProperties)( + 'rejects missing, changed or duplicate %s comment source', + (model, property, filename) => { + for (const mode of ['missing', 'changed', 'duplicate']) { + const { root, models, input } = commentFixture(); + const path = join(models, filename + '.ts'); + const text = readFileSync(path, 'utf8'); + const changed = mode === 'duplicate' ? text + text : text.replace('First line.', 'Changed.'); + writeFileSync(path, changed); + if (mode === 'missing') { + const spec = JSON.parse(readFileSync(input, 'utf8')); + delete spec.components.schemas[model].properties[property].description; + writeFileSync(input, JSON.stringify(spec)); + } + expect(() => repairPropertyDescriptions(root, 'types', input)).toThrow( + /comment.*changed; review/i, + ); + } + }, +); diff --git a/scripts/openapi-shapes.mjs b/scripts/openapi-shapes.mjs new file mode 100644 index 00000000..7cf33548 --- /dev/null +++ b/scripts/openapi-shapes.mjs @@ -0,0 +1,199 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; + +// These individual properties are intentionally unconstrained in the pinned API spec. +// No entire model is exempt from the checks below. +const FREE_FORM = new Set([ + 'audit-log-model.ts:input', + 'audit-log-model.ts:result', + 'audit-log-model.ts:context', + 'detailed-audit-log-model.ts:input', + 'detailed-audit-log-model.ts:result', + 'detailed-audit-log-model.ts:context', + 'error-details.ts:additional_info', + 'generic-engine-decision-log.ts:input', + 'generic-engine-decision-log.ts:result', + 'generic-engine-decision-log.ts:context', + 'jsonpatch-action.ts:value', + 'opaengine-decision-log.ts:input', + 'opaengine-decision-log.ts:result', + 'opalhttp-fetcher-config.ts:data', + 'raw-data.ts:input', + 'raw-data.ts:result', + 'raw-data.ts:context', + 'raw-data1.ts:input', + 'raw-data1.ts:result', + 'raw-data1.ts:context', +]); +const EXPECTED = { + 'task-result-environment-read.ts:task_id': 'string', + 'task-result-environment-read.ts:status': 'TaskStatus', + 'task-result-environment-read.ts:result': 'EnvironmentRead|null', + 'task-result-environment-read.ts:error': 'ErrorDetails|null', + 'apikey-read.ts:organization_id': 'string', + 'apikey-read.ts:owner_type': 'APIKeyOwnerType', + 'apikey-read.ts:id': 'string', + 'apikey-read.ts:created_at': 'string', + 'apikey-read.ts:project_id': 'string|null', + 'apikey-read.ts:environment_id': 'string|null', + 'apikey-read.ts:object_type': 'MemberAccessObj|null', + 'apikey-read.ts:access_level': 'MemberAccessLevel|null', + 'apikey-read.ts:name': 'string|null', + 'apikey-read.ts:secret': 'string|null', + 'apikey-read.ts:created_by_member': 'OrgMemberRead|null', + 'apikey-read.ts:last_used_at': 'string|null', + 'apikey-read.ts:env': 'EnvironmentRead|null', + 'apikey-read.ts:project': 'ProjectRead|null', + 'paginated-result-apikey-read.ts:data': 'Array', + 'paginated-result-apikey-read.ts:total_count': 'number', + 'paginated-result-apikey-read.ts:page_count': 'number|null', + + 'apikey-scope-read.ts:organization_id': 'string', + 'apikey-scope-read.ts:project_id': 'string|null', + 'apikey-scope-read.ts:environment_id': 'string|null', + 'monthly-usage.ts:monthly_tenants': 'Array', + 'role-create.ts:key': 'string', + 'role-create.ts:extends': 'Array', + 'resource-role-create.ts:extends': 'Array', + 'group-assign-user.ts:tenant': 'string', + 'tenant-obj.ts:id': 'string', + 'user-obj.ts:id': 'string', + 'action-obj.ts:id': 'string', + 'codegen-probe.ts:nullable_string': 'string|null', + 'codegen-probe.ts:nullable_any_of': 'string|null', + 'codegen-probe.ts:nullable_ref': 'CodegenProbeInner|null', + 'codegen-probe.ts:nullable_array': 'Array|null', +}; + +const OPTIONAL = { + 'task-result-environment-read.ts:task_id': false, + 'task-result-environment-read.ts:status': false, + 'task-result-environment-read.ts:result': true, + 'task-result-environment-read.ts:error': true, + 'apikey-read.ts:organization_id': false, + 'apikey-read.ts:owner_type': false, + 'apikey-read.ts:id': false, + 'apikey-read.ts:created_at': false, + 'apikey-read.ts:project_id': true, + 'apikey-read.ts:environment_id': true, + 'apikey-read.ts:object_type': true, + 'apikey-read.ts:access_level': true, + 'apikey-read.ts:name': true, + 'apikey-read.ts:secret': true, + 'apikey-read.ts:created_by_member': true, + 'apikey-read.ts:last_used_at': true, + 'apikey-read.ts:env': true, + 'apikey-read.ts:project': true, + 'paginated-result-apikey-read.ts:data': false, + 'paginated-result-apikey-read.ts:total_count': false, + 'paginated-result-apikey-read.ts:page_count': true, + + 'apikey-scope-read.ts:organization_id': false, + 'apikey-scope-read.ts:project_id': true, + 'apikey-scope-read.ts:environment_id': true, +}; + +const UNIONS = { + 'response-list-condition-sets-v2-schema-proj-id-env-id-condition-sets-get.ts': + 'Array|PaginatedResultConditionSetRead', + 'response-list-tenants-v2-facts-proj-id-env-id-tenants-get.ts': + 'Array|PaginatedResultTenantRead', + 'response-list-relationship-tuples-v2-facts-proj-id-env-id-relationship-tuples-get.ts': + 'Array|PaginatedResultRelationshipTupleRead', + 'response-list-roles-v2-schema-proj-id-env-id-roles-get.ts': + 'Array|PaginatedResultRoleRead', + 'response-list-resource-instances-v2-facts-proj-id-env-id-resource-instances-get.ts': + 'Array|PaginatedResultResourceInstanceRead', + 'response-list-resources-v2-schema-proj-id-env-id-resources-get.ts': + 'Array|PaginatedResultResourceRead', + 'response-list-elements-configs-v2-elements-proj-id-env-id-config-get.ts': + 'Array|PaginatedResultElementsConfigRead', + 'response-list-role-assignments-v2-facts-proj-id-env-id-role-assignments-get.ts': + 'Array|Array|PaginatedResultRoleAssignmentDetailedRead|PaginatedResultRoleAssignmentRead', + 'secret.ts': 'string|{[key:string]:string}', + 'callbacks-inner.ts': 'string|[string,OPALHttpFetcherConfig]', +}; + +export async function assertModelShapes(typesDir, files, { fixture = false } = {}) { + let ts; + try { + ({ default: ts } = await import('@permitio/compiler-tools')); + } catch (cause) { + throw new Error('Compiler API dependency unavailable; run pnpm install first.', { cause }); + } + function containsAny(node) { + if (!node) return false; + if (node.kind === ts.SyntaxKind.AnyKeyword) return true; + // A nested dictionary is legitimate free-form data, not a collapsed model. + if (ts.isIndexSignatureDeclaration(node)) return false; + return Boolean(ts.forEachChild(node, containsAny)); + } + + const properties = new Map(); + const optionalProperties = new Map(); + const aliases = new Map(); + const problems = []; + for (const file of files) { + const source = ts.createSourceFile( + file, + readFileSync(join(typesDir, file), 'utf8'), + ts.ScriptTarget.Latest, + true, + ); + if (source.parseDiagnostics.length) { + throw new Error(`Invalid generated TypeScript in ${file}; inspect the generator output.`); + } + for (const declaration of source.statements) { + if (ts.isTypeAliasDeclaration(declaration)) + aliases.set(file, declaration.type.getText(source).replace(/\s+/g, '').replace(/^\|/, '')); + // DataSourceEntryWithPollingInterval.data explicitly includes unconstrained array items. + // Permit only its exact reviewed union, never a whole-model any exemption. + if ( + ts.isTypeAliasDeclaration(declaration) && + containsAny(declaration.type) && + !(file === 'data.ts' && aliases.get(file) === 'Array|Array|object') + ) { + problems.push(`${file}: unexpected any in type alias ${declaration.name.text}`); + } + if (!ts.isInterfaceDeclaration(declaration)) continue; + if (declaration.members.length === 0 && !declaration.heritageClauses?.length) + problems.push(`${file}: empty interface loses its schema`); + for (const member of declaration.members) { + if (ts.isIndexSignatureDeclaration(member) && containsAny(member.type)) { + problems.push(`${file}: unexpected top-level any index signature`); + } + if (!ts.isPropertySignature(member)) continue; + const key = `${file}:${member.name.text}`; + properties.set(key, member.type?.getText(source).replace(/\s+/g, '')); + optionalProperties.set(key, Boolean(member.questionToken)); + if ((!member.type || containsAny(member.type)) && !FREE_FORM.has(key)) { + problems.push(`${key}: unexpected any (named type lost)`); + } + } + } + } + for (const [key, expected] of Object.entries(EXPECTED)) { + if (key.startsWith('codegen-probe.ts:') && !fixture) continue; + if (properties.get(key) !== expected) { + problems.push(`${key}: expected ${expected}, got ${properties.get(key) ?? 'missing'}`); + } + } + for (const [key, optional] of Object.entries(OPTIONAL)) { + if (optionalProperties.get(key) !== optional) { + problems.push(`${key}: expected ${optional ? 'optional' : 'required'} field`); + } + } + if (!fixture) { + for (const [file, expected] of Object.entries(UNIONS)) { + const actual = aliases.get(file); + if (actual !== expected) + problems.push(`${file}: expected union ${expected}, got ${actual ?? 'missing'}`); + } + } + if (problems.length) { + throw new Error( + `${problems.length} type-shape regression(s):\n ${problems.slice(0, 12).join('\n ')}\n` + + 'Inspect the fixture and models before changing the generator pin or expectations.', + ); + } +} diff --git a/scripts/openapi-shapes.test.mjs b/scripts/openapi-shapes.test.mjs new file mode 100644 index 00000000..e0374fea --- /dev/null +++ b/scripts/openapi-shapes.test.mjs @@ -0,0 +1,182 @@ +import { cpSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; + +import { expect, onTestFinished, test } from 'vitest'; + +import { assertSameOutput } from '#scripts/generate-openapi.mjs'; +import { assertModelShapes } from '#scripts/openapi-shapes.mjs'; + +const types = resolve(import.meta.dirname, '../src/openapi/types'); + +function temporaryModels() { + const path = mkdtempSync(join(tmpdir(), 'permit-openapi-shapes-')); + onTestFinished(() => rmSync(path, { recursive: true, force: true })); + cpSync(types, path, { recursive: true }); + return path; +} + +test('accepts every current model including exact unconstrained source fields', async () => { + await expect(assertModelShapes(types, readdirSync(types))).resolves.toBeUndefined(); +}); + +for (const [file, source, pattern] of [ + ['secret.ts', 'export interface Secret {}', /empty interface/], + [ + 'callbacks-inner.ts', + 'export type CallbacksInner = Array | string;', + /callbacks-inner.*any/, + ], + [ + 'response-list-roles-v2-schema-proj-id-env-id-roles-get.ts', + 'export interface ResponseListRoles { data: Array; total_count: number; }', + /expected union/, + ], + [ + 'monthly-usage.ts', + 'export interface MonthlyUsage { monthly_tenants?: Set; }', + /monthly-usage.ts:monthly_tenants: expected Array, got Set/, + ], + ['data.ts', 'export type Data = any;', /data.ts.*any/], +]) { + test(`rejects the previous generator degradation in ${file}`, async () => { + const path = temporaryModels(); + writeFileSync(join(path, file), source); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow(pattern); + }); +} + +test('detects content drift, additions and deletions across the entire output tree', () => { + const path = temporaryModels(); + expect(() => assertSameOutput(types, path, 'drift')).not.toThrow(); + const file = join(path, 'role-create.ts'); + const original = readFileSync(file); + writeFileSync(file, '// changed'); + expect(() => assertSameOutput(types, path, 'drift')).toThrow(/differs/); + writeFileSync(file, original); + writeFileSync(join(path, 'stale.ts'), 'export type Stale = string;'); + expect(() => assertSameOutput(types, path, 'drift')).toThrow(/added or removed/); + rmSync(join(path, 'stale.ts')); + rmSync(file); + expect(() => assertSameOutput(types, path, 'drift')).toThrow(/added or removed/); +}); + +test.each(['project_id', 'environment_id'])( + 'rejects loss of nullable API-key scope %s in production declarations', + async (field) => { + const path = temporaryModels(); + const file = join(path, 'apikey-scope-read.ts'); + writeFileSync( + file, + readFileSync(file, 'utf8').replace(`${field}?: string | null`, `${field}?: string`), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + new RegExp(`apikey-scope-read\\.ts:${field}: expected string\\|null`), + ); + }, +); + +test.each(['organization_id', 'project_id', 'environment_id'])( + 'rejects changed scope %s requiredness in production declarations', + async (field) => { + const path = temporaryModels(); + const file = join(path, 'apikey-scope-read.ts'); + const original = readFileSync(file, 'utf8'); + writeFileSync( + file, + field === 'organization_id' + ? original.replace('organization_id:', 'organization_id?:') + : original.replace(`${field}?:`, `${field}:`), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + new RegExp(`apikey-scope-read\\.ts:${field}: expected .* field`), + ); + }, +); + +test.each([ + ...[ + 'project_id', + 'environment_id', + 'object_type', + 'access_level', + 'name', + 'secret', + 'created_by_member', + 'last_used_at', + 'env', + 'project', + ].map((field) => ['apikey-read.ts', field]), + ['paginated-result-apikey-read.ts', 'page_count'], +])('rejects lost %s:%s readonly nullability in production declarations', async (name, field) => { + const path = temporaryModels(); + const file = join(path, name); + writeFileSync( + file, + readFileSync(file, 'utf8').replace(new RegExp(`(${field}\\?: [^;]+) \\| null;`), '$1;'), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + new RegExp(`${name}:${field}: expected`), + ); +}); +test.each([ + ...['organization_id', 'owner_type', 'id', 'created_at'].map((field) => [ + 'apikey-read.ts', + field, + ]), + ['paginated-result-apikey-read.ts', 'data'], + ['paginated-result-apikey-read.ts', 'total_count'], +])('rejects lost %s:%s readonly requiredness', async (name, field) => { + const path = temporaryModels(); + const file = join(path, name); + writeFileSync( + file, + readFileSync(file, 'utf8').replace(new RegExp(`^(\\s*)${field}:`, 'm'), `$1${field}?:`), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + new RegExp(`${name}:${field}: expected required field`), + ); +}); + +test.each(['result', 'error'])('rejects loss of nullable environment task %s', async (field) => { + const path = temporaryModels(); + const file = join(path, 'task-result-environment-read.ts'); + writeFileSync( + file, + readFileSync(file, 'utf8').replace(new RegExp(`(${field}\\?: [^;]+) \\| null;`), '$1;'), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + new RegExp(`task-result-environment-read.ts:${field}: expected`), + ); +}); +test.each(['task_id', 'status', 'result', 'error'])( + 'rejects changed environment task %s requiredness', + async (field) => { + const path = temporaryModels(); + const file = join(path, 'task-result-environment-read.ts'); + const original = readFileSync(file, 'utf8'); + writeFileSync( + file, + ['result', 'error'].includes(field) + ? original.replace(`${field}?:`, `${field}:`) + : original.replace(`${field}:`, `${field}?:`), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + new RegExp(`task-result-environment-read.ts:${field}: expected .* field`), + ); + }, +); +test.each(['any', 'unknown', 'object', 'EnvironmentRead'])( + 'rejects a collapsed environment task result %s', + async (type) => { + const path = temporaryModels(); + const file = join(path, 'task-result-environment-read.ts'); + writeFileSync( + file, + readFileSync(file, 'utf8').replace(/result\?: [^;]+;/, `result?: ${type};`), + ); + await expect(assertModelShapes(path, readdirSync(path))).rejects.toThrow( + /task-result-environment-read.ts:result/, + ); + }, +); diff --git a/scripts/openapi-source.mjs b/scripts/openapi-source.mjs new file mode 100644 index 00000000..7b8975c3 --- /dev/null +++ b/scripts/openapi-source.mjs @@ -0,0 +1,701 @@ +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { isDeepStrictEqual } from 'node:util'; + +function requireShape(actual, expected, location) { + if (!isDeepStrictEqual(actual, expected)) { + throw new Error( + `OpenAPI correction at ${location} is stale; review the source before updating it.`, + ); + } +} + +// Public permit-python ef80ae2393b4c74e400fdd40ca838d589ee43709, permit/api/models.py. +// Only its 71 explicit Optional read-output fields below are corrected; inputs are excluded. +const AUDIT_READ_NULLABILITY = { + AVPEngineDecisionLog: { + sha256: '627e1f19fa9dee86f208a174b36d5831bcbc1d742318bcc9387efeab0b98c382', + fields: ['engine', 'process_time_ms'], + }, + ActionObj: { + sha256: '96e255f7be87c4a1e8367b27845ca73848e6857d02e7c02452b3127d85deaf67', + fields: ['name'], + }, + AuditLogModel: { + sha256: '3101bc7d1c1634b381101b252ed12842729113e600f92dfd7136f5b6e61602e2', + fields: [ + 'raw_data', + 'created_at', + 'query', + 'user_key', + 'user_email', + 'user_name', + 'resource_type', + 'tenant', + 'action', + 'decision', + 'reason', + 'pdp_config_id', + ], + }, + AuditLogObjectsModel: { + sha256: '3c6fd5d927e0ac3eafda0e83794f710228f6c63be796c887e9d1878f23fb424b', + fields: [ + 'id', + 'organization_object', + 'project_object', + 'environment_object', + 'pdp_config_object', + 'user_object', + 'action_object', + 'resource_type_object', + 'tenant_object', + 'created_at', + ], + }, + DetailedAuditLogModel: { + sha256: 'd8d12c8c6e41f2c6e08ac4ad76d0b0e4c0f6ac7fcbc73f1c07a177bf6e7486b5', + fields: [ + 'created_at', + 'query', + 'user_key', + 'user_email', + 'user_name', + 'resource_type', + 'tenant', + 'action', + 'decision', + 'reason', + 'pdp_config_id', + 'objects', + ], + }, + DummyEngineModel: { + sha256: '876d535102a6db8ab6642e3866bfb761eff340bfd2aba43233a1b9b4e5cf88dd', + fields: ['engine', 'timestamp'], + }, + EnvironmentObj: { + sha256: '268b0aa006e1016ee348966b45e1a80da7ce3c8a6c930c0668d481e9da2de66d', + fields: ['name'], + }, + GenericEngineDecisionLog: { + sha256: '6b68a0015680cc155dec4d941ffd717394cbba9a6a1f6acface809b414182f04', + fields: [ + 'engine', + 'decision_id', + 'process_time_ms', + 'query', + 'user_key', + 'user_email', + 'user_name', + 'action', + 'resource_type', + 'tenant', + ], + }, + LimitedPaginatedResult_AuditLogModel_: { + sha256: 'cc5e880c98a692c01c90f63f44e6ab4465de7b6e64f1d2353d71f813df5e061e', + fields: ['page_count'], + }, + OPAEngineDecisionLog: { + sha256: 'f5fcc30b1507d9244b8157511148c0bc58e8c46278057a35837f7439ea2b16a9', + fields: ['engine'], + }, + OPAMetrics: { + sha256: 'b15d6ffac83b14f5536b199fd1395f2e8f213f8edc3dd46875744f223d5557a4', + fields: [ + 'timer_rego_input_parse_ns', + 'timer_rego_query_parse_ns', + 'timer_rego_query_compile_ns', + 'timer_rego_query_eval_ns', + 'timer_rego_module_parse_ns', + 'timer_rego_module_compile_ns', + 'timer_server_handler_ns', + ], + }, + OrganizationObj: { + sha256: 'a8864abb658259aa78fcaabd316bc8193a2175ea162b903a9388b94c807d445b', + fields: ['name'], + }, + ProjectObj: { + sha256: 'e3ad7af6f58465026396142aeb868fa6d158d64ba5ff6dca6294b5bef9f2cbaf', + fields: ['name'], + }, + ResourceTypeObj: { + sha256: '05b7d465a260ceedd729171a3db21ef2e5dde525c4d362a9b71e2e0b1c394e17', + fields: ['name', 'attributes'], + }, + TenantObj: { + sha256: '25be63e87b33fc7c104b2681404c826482c9911b695691db2a12c73261c3a8ef', + fields: ['name', 'attributes'], + }, + UserObj: { + sha256: '8312e23114aca5279679d127c90cfd148539a3cd9921cbd266172a48deb56431', + fields: ['email', 'first_name', 'last_name', 'attributes', 'roles', 'assigned_roles'], + }, +}; + +/** Refuses direct and transitive input uses of corrected read-only schemas. */ +function rejectReadInputUse(spec, affected, label) { + function rejectInputUse(value, location, visited = new Set()) { + if (!value || typeof value !== 'object') return; + if (typeof value.$ref === 'string') { + const ref = value.$ref; + if (affected.has(ref)) { + throw new Error(`${label} nullability reaches an input at ${location}; review the source.`); + } + if (!visited.has(ref) && ref.startsWith('#/')) { + visited.add(ref); + const target = ref + .slice(2) + .split('/') + .reduce((node, key) => node?.[key.replaceAll('~1', '/').replaceAll('~0', '~')], spec); + rejectInputUse(target, location, visited); + } + } + for (const [key, child] of Object.entries(value)) { + if (!['example', 'examples', 'default', 'enum', 'const'].includes(key)) + rejectInputUse(child, `${location}/${key}`, visited); + } + } + for (const [name, body] of Object.entries(spec.components.requestBodies ?? {})) { + rejectInputUse(body, `/components/requestBodies/${name}`); + } + function inspectPathItem(item, path, visited = new Set()) { + if (!item || typeof item !== 'object' || Array.isArray(item)) { + throw new Error( + `${label} Path Item reference cannot be checked at ${path}; review the source.`, + ); + } + if (item.$ref !== undefined) { + const ref = item.$ref; + if (typeof ref !== 'string' || !ref.startsWith('#/') || visited.has(ref)) { + throw new Error( + `${label} Path Item reference is unsupported at ${path}; review the source.`, + ); + } + visited.add(ref); + const target = ref + .slice(2) + .split('/') + .reduce((node, key) => node?.[key.replaceAll('~1', '/').replaceAll('~0', '~')], spec); + inspectPathItem(target, path, visited); + } + for (const parameter of item.parameters ?? []) rejectInputUse(parameter, `${path}/parameters`); + for (const [method, operation] of Object.entries(item)) { + if (!['get', 'put', 'post', 'delete', 'patch', 'head', 'options', 'trace'].includes(method)) + continue; + rejectInputUse(operation.requestBody, `${method.toUpperCase()} ${path}/requestBody`); + for (const parameter of operation.parameters ?? []) + rejectInputUse(parameter, `${method.toUpperCase()} ${path}/parameters`); + } + } + for (const [path, item] of Object.entries(spec.paths)) inspectPathItem(item, path); +} + +/** Corrects only the pinned public audit read graph, refusing new input uses or source drift. */ +function correctAuditReadNullability(spec) { + const affected = new Set( + Object.keys(AUDIT_READ_NULLABILITY).map((name) => `#/components/schemas/${name}`), + ); + rejectReadInputUse(spec, affected, 'Audit read'); + for (const [name, { sha256, fields }] of Object.entries(AUDIT_READ_NULLABILITY)) { + const model = spec.components.schemas[name]; + requireShape( + createHash('sha256') + .update(JSON.stringify(model ?? null)) + .digest('hex'), + sha256, + `/components/schemas/${name}`, + ); + for (const field of fields) { + const property = model.properties[field]; + if (property.enum) { + const { type, enum: values, ...metadata } = property; + model.properties[field] = { + ...metadata, + anyOf: [{ type, enum: values }, { type: 'null' }], + }; + } else if (typeof property.type === 'string') { + property.type = [property.type, 'null']; + } else if (property.anyOf) { + property.anyOf.push({ type: 'null' }); + } else { + const { $ref, allOf, ...metadata } = property; + model.properties[field] = { + ...metadata, + anyOf: [$ref ? { $ref } : { allOf }, { type: 'null' }], + }; + } + } + } +} + +// Official permitio/docs 6ec47cd3f04da6fa1bc9d48226ccbe781b304f77 background-task examples. +function correctCopyTaskNullability(spec) { + rejectReadInputUse( + spec, + new Set(['#/components/schemas/TaskResult_EnvironmentRead_']), + 'Environment copy task', + ); + const model = spec.components.schemas.TaskResult_EnvironmentRead_; + requireShape( + model, + { + properties: { + task_id: { + type: 'string', + title: 'Task Id', + description: 'The unique id of the task.', + }, + status: { + allOf: [ + { + $ref: '#/components/schemas/TaskStatus', + }, + ], + description: 'The status of the task.', + }, + result: { + allOf: [ + { + $ref: '#/components/schemas/EnvironmentRead', + }, + ], + title: 'Result', + description: 'The result of the task when the task finished.', + }, + error: { + allOf: [ + { + $ref: '#/components/schemas/ErrorDetails', + }, + ], + title: 'Error', + description: 'The error details when the task failed.', + }, + }, + additionalProperties: false, + type: 'object', + required: ['task_id', 'status'], + title: 'TaskResult[EnvironmentRead]', + }, + '/components/schemas/TaskResult_EnvironmentRead_', + ); + for (const field of ['result', 'error']) { + const { allOf, ...metadata } = model.properties[field]; + model.properties[field] = { ...metadata, anyOf: [{ allOf }, { type: 'null' }] }; + } +} + +/** + * Rejects unresolved references and invalid JSON Schema primitive names before generation. + * + * @param spec - Complete OpenAPI document, including reviewed supplemental operations. + * @throws If a schema reference or primitive type cannot be resolved. + */ +export function validateSource(spec) { + const types = new Set(['array', 'boolean', 'integer', 'null', 'number', 'object', 'string']); + function schema(value, pointer) { + if (!value || typeof value !== 'object') return; + for (const type of value.type === undefined ? [] : [value.type].flat()) { + if (!types.has(type)) throw new Error(`Invalid schema type ${type} at ${pointer}/type.`); + } + for (const [key, child] of Object.entries(value)) { + if (['example', 'examples', 'default', 'enum', 'const'].includes(key)) continue; + if (['properties', 'patternProperties', '$defs'].includes(key)) { + for (const [name, property] of Object.entries(child)) + schema(property, `${pointer}/${key}/${name}`); + } else if (Array.isArray(child)) { + child.forEach((entry, index) => schema(entry, `${pointer}/${key}/${index}`)); + } else if (typeof child === 'object') schema(child, `${pointer}/${key}`); + } + } + function visit(value, pointer) { + if (!value || typeof value !== 'object') return; + if (typeof value.$ref === 'string') { + const ref = value.$ref; + const target = ref.startsWith('#/') + ? ref + .slice(2) + .split('/') + .reduce((node, key) => node?.[key.replaceAll('~1', '/').replaceAll('~0', '~')], spec) + : undefined; + if (target === undefined) + throw new Error(`Unresolved schema reference ${ref} at ${pointer}.`); + } + for (const [key, child] of Object.entries(value)) { + if (['example', 'examples', 'default', 'enum', 'const'].includes(key)) continue; + if (key === 'schema') schema(child, `${pointer}/${key}`); + visit(child, `${pointer}/${key}`); + } + } + for (const [name, value] of Object.entries(spec.components?.schemas ?? {})) { + schema(value, `/components/schemas/${name}`); + } + visit(spec, ''); +} + +/** + * Applies exact, documented corrections to the reviewed backend schema. + * + * @param source - Unmodified public snapshot or the historical generator regression fixture. + * @param supplement - Existing Elements login operation and its original request/response schemas. + * @returns A separate OpenAPI 3.1 document suitable for validated generation. + */ +export function prepareOpenApi(source, supplement) { + if (source.openapi !== '3.1.0') throw new Error('The OpenAPI source must declare 3.1.0.'); + const spec = structuredClone(source); + const duplicates = spec.tags.filter((tag) => tag.name === 'Bulk Operations'); + requireShape( + duplicates, + [ + { name: 'Bulk Operations', description: 'None' }, + { name: 'Bulk Operations', description: 'None' }, + ], + '/tags:Bulk Operations', + ); + spec.tags.splice( + spec.tags.findLastIndex((tag) => tag.name === 'Bulk Operations'), + 1, + ); + if (new Set(spec.tags.map((tag) => tag.name)).size !== spec.tags.length) { + throw new Error('Unexpected duplicate OpenAPI tag; repair the source document.'); + } + + const callback = spec.components.schemas.OPALUpdateCallback.properties.callbacks.items; + requireShape( + callback, + { + anyOf: [ + { type: 'string' }, + { + items: [{ type: 'string' }, { $ref: '#/components/schemas/OPALHttpFetcherConfig' }], + type: 'array', + maxItems: 2, + minItems: 2, + }, + ], + }, + '/components/schemas/OPALUpdateCallback/properties/callbacks/items', + ); + const tuple = callback.anyOf[1]; + tuple.prefixItems = tuple.items; + tuple.items = false; + + for (const name of ['ProxyConfigCreate', 'ProxyConfigRead', 'ProxyConfigUpdate']) { + const secret = spec.components.schemas[name].properties.secret; + requireShape( + secret.anyOf, + [ + { + type: 'HeadersAuth', + title: 'HeadersAuth', + description: 'HeadersAuth is a dictionary of headers to be sent with the request.', + }, + { + type: 'BasicAuth', + pattern: '^.+:.+$', + title: 'BasicAuth', + description: "BasicAuth is a string of the form 'username:password'.", + }, + { + type: 'BearerAuth', + minLength: 1, + title: 'BearerAuth', + description: 'BearerAuth is a string of the token to be sent with the request.', + }, + ], + `${name}/secret/anyOf`, + ); + secret.anyOf[0].type = 'object'; + secret.anyOf[0].additionalProperties = { type: 'string' }; + secret.anyOf[1].type = 'string'; + secret.anyOf[2].type = 'string'; + } + + const keyScope = spec.components.schemas.APIKeyScopeRead; + requireShape( + keyScope, + { + properties: { + organization_id: { + type: 'string', + format: 'uuid', + title: 'Organization Id', + description: 'Unique id of the organization that the api_key belongs to.', + }, + project_id: { + type: 'string', + format: 'uuid', + title: 'Project Id', + description: 'Unique id of the project that the api_key belongs to.', + }, + environment_id: { + type: 'string', + format: 'uuid', + title: 'Environment Id', + description: 'Unique id of the environment that the api_key belongs to.', + }, + }, + additionalProperties: false, + type: 'object', + required: ['organization_id'], + title: 'APIKeyScopeRead', + }, + '/components/schemas/APIKeyScopeRead', + ); + for (const field of ['project_id', 'environment_id']) { + keyScope.properties[field].type = ['string', 'null']; + } + + const keyRead = spec.components.schemas.APIKeyRead; + requireShape( + keyRead, + { + properties: { + organization_id: { + type: 'string', + format: 'uuid', + title: 'Organization Id', + }, + project_id: { + type: 'string', + format: 'uuid', + title: 'Project Id', + }, + environment_id: { + type: 'string', + format: 'uuid', + title: 'Environment Id', + }, + object_type: { + allOf: [ + { + $ref: '#/components/schemas/MemberAccessObj', + }, + ], + default: 'env', + }, + access_level: { + allOf: [ + { + $ref: '#/components/schemas/MemberAccessLevel', + }, + ], + default: 'admin', + }, + owner_type: { + $ref: '#/components/schemas/APIKeyOwnerType', + }, + name: { + type: 'string', + title: 'Name', + }, + id: { + type: 'string', + format: 'uuid', + title: 'Id', + }, + secret: { + type: 'string', + title: 'Secret', + }, + created_at: { + type: 'string', + format: 'date-time', + title: 'Created At', + }, + created_by_member: { + $ref: '#/components/schemas/OrgMemberRead', + }, + last_used_at: { + type: 'string', + format: 'date-time', + title: 'Last Used At', + }, + env: { + $ref: '#/components/schemas/EnvironmentRead', + }, + project: { + $ref: '#/components/schemas/ProjectRead', + }, + }, + additionalProperties: false, + type: 'object', + required: ['organization_id', 'owner_type', 'id', 'created_at'], + title: 'APIKeyRead', + }, + '/components/schemas/APIKeyRead', + ); + for (const field of [ + 'project_id', + 'environment_id', + 'object_type', + 'access_level', + 'name', + 'secret', + 'created_by_member', + 'last_used_at', + 'env', + 'project', + ]) { + const property = keyRead.properties[field]; + if (property.type === 'string') { + property.type = ['string', 'null']; + } else if (property.$ref) { + keyRead.properties[field] = { anyOf: [{ $ref: property.$ref }, { type: 'null' }] }; + } else { + property.anyOf = [...property.allOf, { type: 'null' }]; + delete property.allOf; + } + } + + const keyPage = spec.components.schemas.PaginatedResult_APIKeyRead_; + requireShape( + keyPage, + { + properties: { + data: { + items: { + $ref: '#/components/schemas/APIKeyRead', + }, + type: 'array', + title: 'Data', + description: 'List of Api Keys', + }, + total_count: { + type: 'integer', + minimum: 0.0, + title: 'Total Count', + }, + page_count: { + type: 'integer', + minimum: 0.0, + title: 'Page Count', + default: 0, + }, + }, + additionalProperties: false, + type: 'object', + required: ['data', 'total_count'], + title: 'PaginatedResult[APIKeyRead]', + }, + '/components/schemas/PaginatedResult_APIKeyRead_', + ); + keyPage.properties.page_count.type = ['integer', 'null']; + + requireShape( + spec.components.schemas.MonthlyUsage?.properties?.monthly_tenants, + { + items: { type: 'string', format: 'uuid' }, + type: 'array', + uniqueItems: true, + title: 'Monthly Tenants', + default: [], + }, + '/components/schemas/MonthlyUsage/properties/monthly_tenants', + ); + + const groupDescription = + 'Either the unique id of the resource instance that that the group belongs to, or the ' + + 'URL-friendly key of the (i.e: file:my_file)'; + for (const [model, property, original, replacement] of [ + [ + 'data_generator_lib__schemas__schema_opal_data__DerivationSettings', + 'superseded_by_direct_role', + 'If True, the derived role is superseded by a direct role.meaning role derivation is ' + + 'not considered if the user has a direct role.', + 'If True, the derived role is superseded by a direct role.\n' + + 'Meaning role derivation is not considered if the user has a direct role.', + ], + [ + 'ElementsUserInviteApprove', + 'email', + 'The email of the user that being invited', + 'The email of the user that is being invited', + ], + ...['GroupAssignment', 'GroupCreate', 'GroupReadSchema'].map((model) => [ + model, + 'group_instance_key', + groupDescription, + 'Either the unique id of the resource instance that the group belongs to, or the\n' + + 'URL-friendly key of the (i.e: file:my_file)', + ]), + [ + 'PaginatedResult_RelationshipTupleDetailedRead_', + 'data', + 'List of Relationship Tuple Detaileds', + 'List of Detailed Relationship Tuples', + ], + [ + 'PaginatedResult_ResourceInstanceDetailedRead_', + 'data', + 'List of Resource Instance Detaileds', + 'List of Detailed Resource Instances', + ], + [ + 'TenantBlockRead', + 'attributes', + 'Arbitraty tenant attributes that will be used to enforce attribute-based ' + + 'access control policies.', + 'Arbitrary tenant attributes that will be used to enforce\n' + + 'attribute-based access control policies.', + ], + ]) { + const field = spec.components.schemas[model]?.properties?.[property]; + requireShape( + field?.description, + original, + `/components/schemas/${model}/${property}/description`, + ); + field.description = replacement; + } + + if (supplement) { + for (const [path, operation] of Object.entries(supplement.paths)) { + if (spec.paths[path]) + throw new Error(`Supplemental route ${path} is now published; remove the stale exception.`); + spec.paths[path] = structuredClone(operation); + } + for (const [name, model] of Object.entries(supplement.schemas)) { + if (spec.components.schemas[name]) requireShape(spec.components.schemas[name], model, name); + spec.components.schemas[name] = structuredClone(model); + } + } + correctAuditReadNullability(spec); + correctCopyTaskNullability(spec); + validateSource(spec); + return spec; +} + +/** Loads the exact reviewed bytes so refreshing the live API is always an explicit change. */ +export function loadReviewedOpenApi(root) { + const provenance = JSON.parse(readFileSync(join(root, 'openapi/provenance.json'), 'utf8')); + const bytes = readFileSync(join(root, 'openapi/permit-api.json')); + const digest = createHash('sha256').update(bytes).digest('hex'); + if (digest !== provenance.sha256) + throw new Error('OpenAPI snapshot hash changed; review and record its provenance.'); + const source = JSON.parse(bytes); + const operations = Object.values(source.paths) + .flatMap((path) => Object.values(path)) + .filter((operation) => operation.operationId); + requireShape( + { + paths: Object.keys(source.paths).length, + operations: operations.length, + schemas: Object.keys(source.components.schemas).length, + }, + provenance.counts, + 'snapshot inventory', + ); + const supplementBytes = readFileSync(join(root, 'openapi/elements-login.json')); + if ( + createHash('sha256').update(supplementBytes).digest('hex') !== provenance.elementsLogin.sha256 + ) { + throw new Error('Elements login supplement changed; review and record its provenance.'); + } + const supplement = JSON.parse(supplementBytes); + return prepareOpenApi(source, supplement); +} diff --git a/scripts/openapi-source.test.mjs b/scripts/openapi-source.test.mjs new file mode 100644 index 00000000..2ead5021 --- /dev/null +++ b/scripts/openapi-source.test.mjs @@ -0,0 +1,819 @@ +import { createHash } from 'node:crypto'; +import { cpSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; + +import ts from '@permitio/compiler-tools'; +import { expect, onTestFinished, test } from 'vitest'; + +import { loadReviewedOpenApi, prepareOpenApi, validateSource } from '#scripts/openapi-source.mjs'; + +const root = resolve(import.meta.dirname, '..'); +const source = JSON.parse(readFileSync(resolve(root, 'openapi/permit-api.json'), 'utf8')); +const supplement = JSON.parse(readFileSync(resolve(root, 'openapi/elements-login.json'), 'utf8')); + +test('preserves the reviewed source and prepares only the documented corrections', () => { + const original = structuredClone(source); + const prepared = loadReviewedOpenApi(root); + expect(source).toEqual(original); + expect(prepared.openapi).toBe('3.1.0'); + expect(Object.keys(prepared.paths)).toHaveLength(165); + expect(Object.keys(prepared.components.schemas)).toHaveLength(335); + expect(prepared.tags.filter((tag) => tag.name === 'Bulk Operations')).toHaveLength(1); + const tuple = prepared.components.schemas.OPALUpdateCallback.properties.callbacks.items.anyOf[1]; + expect(tuple).toEqual({ + type: 'array', + minItems: 2, + maxItems: 2, + items: false, + prefixItems: [{ type: 'string' }, { $ref: '#/components/schemas/OPALHttpFetcherConfig' }], + }); + expect(prepared.paths['/v2/auth/elements_login_as']).toEqual( + supplement.paths['/v2/auth/elements_login_as'], + ); + for (const name of ['ProxyConfigCreate', 'ProxyConfigRead', 'ProxyConfigUpdate']) { + const secret = prepared.components.schemas[name].properties.secret; + expect(secret.anyOf.map((branch) => branch.type)).toEqual(['object', 'string', 'string']); + expect(secret.anyOf[0].additionalProperties).toEqual({ type: 'string' }); + } + for (const [name, schema] of Object.entries(prepared.components.schemas)) { + if (name.endsWith('BulkOperationResult') && Object.keys(schema.properties ?? {}).length === 0) { + expect(schema).toEqual(source.components.schemas[name]); + } + } +}); + +for (const [name, mutate, pattern] of [ + [ + 'schema version', + (s) => { + s.openapi = '3.0.3'; + }, + /3.1.0/, + ], + [ + 'corrected upstream tag', + (s) => { + s.tags.splice(19, 1); + }, + /stale/, + ], + [ + 'unrelated duplicated tag', + (s) => { + s.tags.push(s.tags[0]); + }, + /Unexpected duplicate/, + ], + [ + 'corrected upstream tuple', + (s) => { + s.components.schemas.OPALUpdateCallback.properties.callbacks.items.anyOf[1].items = false; + }, + /stale/, + ], + [ + 'changed proxy types', + (s) => { + s.components.schemas.ProxyConfigRead.properties.secret.anyOf[1].type = 'string'; + }, + /stale/, + ], + [ + 'new proxy dictionary constraint', + (s) => { + s.components.schemas.ProxyConfigRead.properties.secret.anyOf[0].additionalProperties = false; + }, + /stale/, + ], + [ + 'new published Elements login', + (s) => { + s.paths['/v2/auth/elements_login_as'] = supplement.paths['/v2/auth/elements_login_as']; + }, + /now published/, + ], + [ + 'unresolved reference', + (s) => { + s.components.schemas.RoleRead.properties.name = { $ref: '#/components/schemas/Missing' }; + }, + /Unresolved.*Missing/, + ], + [ + 'invalid primitive', + (s) => { + s.components.schemas.RoleRead.properties.name.type = 'NamedString'; + }, + /Invalid schema type NamedString/, + ], +]) { + test(`fails closed for ${name}`, () => { + const changed = structuredClone(source); + mutate(changed); + expect(() => prepareOpenApi(changed, supplement)).toThrow(pattern); + }); +} + +test('does not interpret application example values as schema keywords', () => { + expect(() => + validateSource({ + components: { + schemas: { + Sample: { + type: 'object', + example: { type: 'custom-value', $ref: 'application-data' }, + }, + }, + }, + }), + ).not.toThrow(); +}); + +for (const [file, mutate, pattern] of [ + [ + 'permit-api.json', + (s) => { + s.info.title = 'unreviewed'; + }, + /snapshot hash changed/, + ], + [ + 'elements-login.json', + (s) => { + s.paths = {}; + }, + /supplement changed/, + ], + [ + 'provenance.json', + (s) => { + s.counts.operations = 0; + }, + /inventory.*stale/, + ], +]) { + test(`rejects unreviewed ${file} changes before generating files`, () => { + const path = mkdtempSync(join(tmpdir(), 'permit-source-hash-')); + onTestFinished(() => rmSync(path, { recursive: true, force: true })); + mkdirSync(join(path, 'openapi')); + for (const name of ['permit-api.json', 'elements-login.json', 'provenance.json']) { + cpSync(join(root, 'openapi', name), join(path, 'openapi', name)); + } + const changed = JSON.parse(readFileSync(join(path, 'openapi', file), 'utf8')); + mutate(changed); + writeFileSync(join(path, 'openapi', file), JSON.stringify(changed)); + expect(() => loadReviewedOpenApi(path)).toThrow(pattern); + }); +} + +const reviewedDescriptions = [ + [ + 'data_generator_lib__schemas__schema_opal_data__DerivationSettings', + 'superseded_by_direct_role', + 'If True, the derived role is superseded by a direct role.\n' + + 'Meaning role derivation is not considered if the user has a direct role.', + ], + ['ElementsUserInviteApprove', 'email', 'The email of the user that is being invited'], + ...['GroupAssignment', 'GroupCreate', 'GroupReadSchema'].map((model) => [ + model, + 'group_instance_key', + 'Either the unique id of the resource instance that the group belongs to, or the\n' + + 'URL-friendly key of the (i.e: file:my_file)', + ]), + [ + 'PaginatedResult_RelationshipTupleDetailedRead_', + 'data', + 'List of Detailed Relationship Tuples', + ], + ['PaginatedResult_ResourceInstanceDetailedRead_', 'data', 'List of Detailed Resource Instances'], + [ + 'TenantBlockRead', + 'attributes', + 'Arbitrary tenant attributes that will be used to enforce\n' + + 'attribute-based access control policies.', + ], +]; + +test('preserves unique UUID arrays while correcting exactly eight descriptions', () => { + const original = structuredClone(source); + const prepared = prepareOpenApi(source, supplement); + expect(source).toEqual(original); + const tenants = prepared.components.schemas.MonthlyUsage.properties.monthly_tenants; + expect(tenants).toEqual({ + items: { type: 'string', format: 'uuid' }, + type: 'array', + uniqueItems: true, + title: 'Monthly Tenants', + default: [], + }); + for (const [model, property, expected] of reviewedDescriptions) { + expect(prepared.components.schemas[model].properties[property].description).toBe(expected); + const unchanged = structuredClone(prepared.components.schemas[model]); + unchanged.properties[property].description = + source.components.schemas[model].properties[property].description; + expect(unchanged).toEqual(source.components.schemas[model]); + } +}); + +test.each(reviewedDescriptions)('rejects stale reviewed %s.%s description', (model, property) => { + const changed = structuredClone(source); + changed.components.schemas[model].properties[property].description += ' changed upstream'; + expect(() => prepareOpenApi(changed, supplement)).toThrow(/description is stale/); +}); + +test('preserves wrapped reviewed descriptions in generated property JSDoc', () => { + for (const [model, property, expected] of reviewedDescriptions) { + if (!expected.includes('\n')) continue; + const filename = + model === 'data_generator_lib__schemas__schema_opal_data__DerivationSettings' + ? 'data-generator-lib-schemas-schema-opal-data-derivation-settings' + : model.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`).slice(1); + const file = join(root, 'src/openapi/types', filename + '.ts'); + const parsed = ts.createSourceFile( + file, + readFileSync(file, 'utf8'), + ts.ScriptTarget.Latest, + true, + ); + const declaration = parsed.statements.find(ts.isInterfaceDeclaration); + const member = declaration?.members.find((node) => node.name?.getText(parsed) === property); + expect(member).toBeDefined(); + const comments = ts.getJSDocCommentsAndTags(member); + expect(comments).toHaveLength(1); + expect(comments[0].comment).toBe(expected); + for (const line of comments[0].getText(parsed).split('\n')) { + expect(line.length).toBeLessThanOrEqual(100); + } + } +}); + +test.each([ + ['uniqueItems', false], + ['default', ['unexpected']], + ['items', { type: 'string' }], +])('rejects changed monthly_tenants %s before generation', (field, value) => { + const changed = structuredClone(source); + changed.components.schemas.MonthlyUsage.properties.monthly_tenants[field] = value; + expect(() => prepareOpenApi(changed, supplement)).toThrow(/monthly_tenants is stale/); +}); + +test.each(['model', 'property'])( + 'rejects a removed corrected description %s with its source location', + (missing) => { + const changed = structuredClone(source); + if (missing === 'model') delete changed.components.schemas.GroupAssignment; + else delete changed.components.schemas.GroupAssignment.properties.group_instance_key; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + /GroupAssignment\/group_instance_key\/description is stale/, + ); + }, +); + +test('rejects a removed monthly usage model with its source location', () => { + const changed = structuredClone(source); + delete changed.components.schemas.MonthlyUsage; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + /MonthlyUsage.*monthly_tenants is stale/, + ); +}); + +test('corrects only two optional API-key scope read fields without mutating source', () => { + const original = structuredClone(source); + const prepared = prepareOpenApi(source, supplement); + const scope = prepared.components.schemas.APIKeyScopeRead; + expect(scope.required).toEqual(['organization_id']); + for (const field of ['project_id', 'environment_id']) { + expect(scope.properties[field]).toEqual({ + ...source.components.schemas.APIKeyScopeRead.properties[field], + type: ['string', 'null'], + }); + } + const restored = structuredClone(scope); + for (const field of ['project_id', 'environment_id']) restored.properties[field].type = 'string'; + expect(restored).toEqual(source.components.schemas.APIKeyScopeRead); + for (const name of ['APIKeyCreate', 'ProjectCreate', 'TenantCreate', 'RoleCreate']) { + expect(prepared.components.schemas[name]).toEqual(source.components.schemas[name]); + } + expect(source).toEqual(original); +}); + +test.each([ + [ + 'organization requiredness', + (scope) => { + scope.required = []; + }, + ], + [ + 'project requiredness', + (scope) => { + scope.required.push('project_id'); + }, + ], + [ + 'environment requiredness', + (scope) => { + scope.required.push('environment_id'); + }, + ], + [ + 'organization type', + (scope) => { + scope.properties.organization_id.type = ['string', 'null']; + }, + ], + [ + 'project type', + (scope) => { + scope.properties.project_id.type = ['string', 'null']; + }, + ], + [ + 'environment type', + (scope) => { + scope.properties.environment_id.type = ['string', 'null']; + }, + ], + [ + 'UUID format', + (scope) => { + scope.properties.project_id.format = 'email'; + }, + ], + [ + 'field description', + (scope) => { + scope.properties.environment_id.description += ' changed'; + }, + ], + [ + 'removed optional field', + (scope) => { + delete scope.properties.environment_id; + }, + ], + [ + 'new field', + (scope) => { + scope.properties.secret = { type: 'string' }; + }, + ], +])('rejects stale API-key scope %s before generation', (_label, mutate) => { + const changed = structuredClone(source); + mutate(changed.components.schemas.APIKeyScopeRead); + expect(() => prepareOpenApi(changed, supplement)).toThrow(/APIKeyScopeRead is stale/); +}); + +test('rejects a removed API-key scope read model before generation', () => { + const changed = structuredClone(source); + delete changed.components.schemas.APIKeyScopeRead; + expect(() => prepareOpenApi(changed, supplement)).toThrow(/APIKeyScopeRead is stale/); +}); + +const nullableKeyReadFields = [ + 'project_id', + 'environment_id', + 'object_type', + 'access_level', + 'name', + 'secret', + 'created_by_member', + 'last_used_at', + 'env', + 'project', +]; +test('prepares only the published nullable key output fields and preserves input/required shapes', () => { + const original = structuredClone(source); + const prepared = prepareOpenApi(source, supplement); + const read = prepared.components.schemas.APIKeyRead; + expect(read.required).toEqual(['organization_id', 'owner_type', 'id', 'created_at']); + for (const field of nullableKeyReadFields) { + const property = read.properties[field]; + const captured = source.components.schemas.APIKeyRead.properties[field]; + if (captured.type === 'string') + expect(property).toEqual({ ...captured, type: ['string', 'null'] }); + else if (captured.$ref) expect(property).toEqual({ anyOf: [captured, { type: 'null' }] }); + else { + const { allOf, ...metadata } = captured; + expect(property).toEqual({ ...metadata, anyOf: [...allOf, { type: 'null' }] }); + } + } + const restored = structuredClone(read); + for (const field of nullableKeyReadFields) + restored.properties[field] = source.components.schemas.APIKeyRead.properties[field]; + expect(restored).toEqual(source.components.schemas.APIKeyRead); + const page = structuredClone(prepared.components.schemas.PaginatedResult_APIKeyRead_); + expect(page.properties.page_count).toEqual({ + ...source.components.schemas.PaginatedResult_APIKeyRead_.properties.page_count, + type: ['integer', 'null'], + }); + page.properties.page_count.type = 'integer'; + expect(page).toEqual(source.components.schemas.PaginatedResult_APIKeyRead_); + expect(prepared.components.schemas.APIKeyCreate).toEqual(source.components.schemas.APIKeyCreate); + expect(source).toEqual(original); +}); +test.each(nullableKeyReadFields)( + 'rejects stale nullable key output %s before generation', + (field) => { + const changed = structuredClone(source); + changed.components.schemas.APIKeyRead.properties[field] = { type: ['string', 'null'] }; + expect(() => prepareOpenApi(changed, supplement)).toThrow(/APIKeyRead is stale/); + }, +); +test.each(['organization_id', 'owner_type', 'id', 'created_at'])( + 'rejects changed required key output %s before generation', + (field) => { + const changed = structuredClone(source); + changed.components.schemas.APIKeyRead.required = + changed.components.schemas.APIKeyRead.required.filter((required) => required !== field); + expect(() => prepareOpenApi(changed, supplement)).toThrow(/APIKeyRead is stale/); + }, +); +test.each([ + [ + 'required page_count', + (page) => { + page.required.push('page_count'); + }, + ], + [ + 'optional total_count', + (page) => { + page.required = ['data']; + }, + ], + [ + 'optional data', + (page) => { + page.required = ['total_count']; + }, + ], + [ + 'nullable total_count', + (page) => { + page.properties.total_count.type = ['integer', 'null']; + }, + ], + [ + 'page count bound', + (page) => { + page.properties.page_count.minimum = -1; + }, + ], + [ + 'page count default', + (page) => { + page.properties.page_count.default = null; + }, + ], +])('rejects stale key pagination %s before generation', (_label, mutate) => { + const changed = structuredClone(source); + mutate(changed.components.schemas.PaginatedResult_APIKeyRead_); + expect(() => prepareOpenApi(changed, supplement)).toThrow(/PaginatedResult_APIKeyRead_ is stale/); +}); + +const auditNullability = JSON.parse( + readFileSync(join(root, 'scripts/fixtures/audit-read-nullability.json'), 'utf8'), +).fields; + +test('corrects exactly the 71 pinned public audit read fields and preserves their metadata', () => { + const prepared = prepareOpenApi(source, supplement); + expect(Object.keys(auditNullability)).toHaveLength(16); + expect(Object.values(auditNullability).flat()).toHaveLength(71); + for (const [name, fields] of Object.entries(auditNullability)) { + const original = source.components.schemas[name]; + const actual = structuredClone(prepared.components.schemas[name]); + for (const field of fields) { + const previous = original.properties[field]; + const property = actual.properties[field]; + expect(original.required ?? []).not.toContain(field); + if (previous.enum) { + expect(property.anyOf).toEqual([ + { type: previous.type, enum: previous.enum }, + { type: 'null' }, + ]); + const metadata = structuredClone(property); + delete metadata.anyOf; + const previousMetadata = structuredClone(previous); + delete previousMetadata.type; + delete previousMetadata.enum; + expect(metadata).toEqual(previousMetadata); + } else if (typeof previous.type === 'string') { + expect(property.type).toEqual([previous.type, 'null']); + property.type = previous.type; + expect(property).toEqual(previous); + } else if (previous.anyOf) { + expect(property.anyOf.at(-1)).toEqual({ type: 'null' }); + property.anyOf.pop(); + expect(property).toEqual(previous); + } else { + expect(property.anyOf.at(-1)).toEqual({ type: 'null' }); + expect(property.anyOf[0]).toEqual( + previous.$ref ? { $ref: previous.$ref } : { allOf: previous.allOf }, + ); + const metadata = structuredClone(property); + delete metadata.anyOf; + const previousMetadata = structuredClone(previous); + delete previousMetadata.$ref; + delete previousMetadata.allOf; + expect(metadata).toEqual(previousMetadata); + } + actual.properties[field] = structuredClone(previous); + } + expect(actual).toEqual(original); + } + const unaffected = [ + 'PdpConfigObj', + 'OPALabels', + 'RelationshipTupleObj', + 'ResourceAttributes', + 'AttributeType', + 'Engine', + 'GenericEngineDecisionLogBatch', + 'AuditLogQueryType', + 'AuditLogSortKey', + ]; + for (const name of unaffected) + expect(prepared.components.schemas[name]).toEqual(source.components.schemas[name]); + expect(prepared.paths).toEqual({ + ...source.paths, + '/v2/auth/elements_login_as': supplement.paths['/v2/auth/elements_login_as'], + }); +}); + +test.each(Object.keys(auditNullability))( + 'fails closed for removed or changed audit output %s', + (name) => { + for (const mutation of ['missing', 'required', 'metadata']) { + const changed = structuredClone(source); + if (mutation === 'missing') delete changed.components.schemas[name]; + else if (mutation === 'required') + changed.components.schemas[name].required = [ + ...(changed.components.schemas[name].required ?? []), + auditNullability[name][0], + ]; + else + changed.components.schemas[name].properties[auditNullability[name][0]].description = + 'New upstream metadata'; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + new RegExp(`/components/schemas/${name} is stale`), + ); + } + }, +); + +test.each(Object.keys(auditNullability))( + 'rejects new direct and transitive request uses of audit output %s', + (name) => { + for (const transitive of [false, true]) { + const changed = structuredClone(source); + const reference = { $ref: `#/components/schemas/${name}` }; + if (transitive) { + changed.components.schemas.AuditInputWrapper = { + type: 'object', + properties: { nested: { type: 'array', items: reference } }, + }; + changed.components.requestBodies = { + AuditInput: { + content: { + 'application/json': { schema: { $ref: '#/components/schemas/AuditInputWrapper' } }, + }, + }, + }; + } + changed.paths['/audit-input-regression'] = { + post: { + requestBody: transitive + ? { $ref: '#/components/requestBodies/AuditInput' } + : { + content: { 'application/json': { schema: reference } }, + }, + responses: { 204: { description: 'No content' } }, + }, + }; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + /Audit read nullability reaches an input.*requestBod/, + ); + } + }, +); + +test.each(Object.keys(auditNullability))( + 'rejects direct and transitive supplemental request uses of audit output %s', + (name) => { + for (const transitive of [false, true]) { + const changed = structuredClone(supplement); + const reference = { $ref: `#/components/schemas/${name}` }; + if (transitive) { + changed.schemas.SupplementedAuditInput = { + type: 'object', + properties: { nested: { type: 'array', items: reference } }, + }; + } + changed.paths['/audit-supplement-request-regression'] = { + post: { + requestBody: { + content: { + 'application/json': { + schema: transitive + ? { $ref: '#/components/schemas/SupplementedAuditInput' } + : reference, + }, + }, + }, + responses: { 204: { description: 'No content' } }, + }, + }; + expect(() => prepareOpenApi(source, changed)).toThrow( + /Audit read nullability reaches an input.*requestBody/, + ); + } + }, +); + +test('rejects audit read references in unused request body components', () => { + const changed = structuredClone(source); + changed.components.requestBodies = { + NewInput: { + content: { 'application/json': { schema: { $ref: '#/components/schemas/AuditLogModel' } } }, + }, + }; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + /Audit read nullability reaches an input.*components\/requestBodies\/NewInput/, + ); +}); + +test.each(['path', 'operation'])( + 'rejects new %s parameter uses of nullable audit reads', + (level) => { + const changed = structuredClone(source); + const parameter = { + name: 'audit', + in: 'query', + schema: { $ref: '#/components/schemas/OPAMetrics' }, + }; + changed.paths['/audit-parameter-regression'] = { + ...(level === 'path' ? { parameters: [parameter] } : {}), + get: { + ...(level === 'operation' ? { parameters: [parameter] } : {}), + responses: { 204: { description: 'No content' } }, + }, + }; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + /Audit read nullability reaches an input.*parameters/, + ); + }, +); + +test('input reachability handles reference cycles and ignores application examples', () => { + const changed = structuredClone(source); + changed.components.schemas.SafeAuditInput = { + type: 'object', + properties: { next: { $ref: '#/components/schemas/SafeAuditInput' } }, + example: { $ref: '#/components/schemas/OPAMetrics' }, + }; + changed.paths['/safe-audit-input-regression'] = { + post: { + requestBody: { + content: { + 'application/json': { schema: { $ref: '#/components/schemas/SafeAuditInput' } }, + }, + }, + responses: { 204: { description: 'No content' } }, + }, + }; + expect(() => prepareOpenApi(changed, supplement)).not.toThrow(); +}); + +const taskModelName = 'TaskResult_EnvironmentRead_'; +test('corrects only the two nullable environment task fields from public examples', () => { + const prepared = prepareOpenApi(source, supplement); + const actual = structuredClone(prepared.components.schemas[taskModelName]); + const original = source.components.schemas[taskModelName]; + for (const field of ['result', 'error']) { + const { allOf, ...metadata } = original.properties[field]; + expect(actual.properties[field]).toEqual({ + ...metadata, + anyOf: [{ allOf }, { type: 'null' }], + }); + actual.properties[field] = structuredClone(original.properties[field]); + } + expect(actual).toEqual(original); + for (const [name, model] of Object.entries(source.components.schemas)) { + if (name.startsWith('TaskResult_') && name !== taskModelName) + expect(prepared.components.schemas[name]).toEqual(model); + } + expect(prepared.paths).toEqual({ + ...source.paths, + '/v2/auth/elements_login_as': supplement.paths['/v2/auth/elements_login_as'], + }); +}); +test.each(['result', 'error', 'status', 'task_id', 'required', 'metadata'])( + 'refuses environment task source drift at %s', + (field) => { + const changed = structuredClone(source); + const model = changed.components.schemas[taskModelName]; + if (field === 'required') model.required.push('result'); + else if (field === 'metadata') model.title = 'Changed upstream'; + else delete model.properties[field]; + expect(() => prepareOpenApi(changed, supplement)).toThrow( + /TaskResult_EnvironmentRead_ is stale/, + ); + }, +); +test.each(['direct', 'transitive', 'supplement', 'unused body', 'parameter'])( + 'refuses a new %s input use of the environment copy task', + (kind) => { + const changed = structuredClone(source); + const extra = structuredClone(supplement); + const ref = { $ref: '#/components/schemas/TaskResult_EnvironmentRead_' }; + changed.components.schemas.CopyInput = { type: 'object', properties: { value: ref } }; + const schema = kind === 'transitive' ? { $ref: '#/components/schemas/CopyInput' } : ref; + const body = { content: { 'application/json': { schema } } }; + if (kind === 'unused body') changed.components.requestBodies = { CopyInput: body }; + else if (kind === 'parameter') + changed.paths['/copy-input'] = { + get: { parameters: [{ name: 'copy', in: 'query', schema }], responses: {} }, + }; + else + (kind === 'supplement' ? extra.paths : changed.paths)['/copy-input'] = { + post: { requestBody: body, responses: {} }, + }; + expect(() => prepareOpenApi(changed, extra)).toThrow( + /Environment copy task nullability reaches an input/, + ); + }, +); + +test('the complete prepared source delta is exactly the two task null branches', () => { + const prepared = prepareOpenApi(source, supplement); + prepared.components.schemas.TaskResult_EnvironmentRead_ = structuredClone( + source.components.schemas.TaskResult_EnvironmentRead_, + ); + expect(createHash('sha256').update(JSON.stringify(prepared)).digest('hex')).toBe( + '610c6f124d2e2bba92e607696957218e2a82f67164389234197faadafb8ff98b', + ); +}); + +for (const name of ['TaskResult_EnvironmentRead_', 'AuditLogModel']) { + for (const form of ['trace', 'path item', 'path item trace']) { + test.each(['direct', 'transitive', 'supplement'])( + `rejects ${name} ${form} %s input references`, + (kind) => { + const changed = structuredClone(source), + extra = structuredClone(supplement); + const schemas = kind === 'supplement' ? extra.schemas : changed.components.schemas; + schemas.CopyInput = { + type: 'object', + properties: { value: { $ref: `#/components/schemas/${name}` } }, + }; + const schema = { + $ref: `#/components/schemas/${kind === 'transitive' ? 'CopyInput' : name}`, + }; + const operation = { parameters: [{ name: 'copy', in: 'query', schema }], responses: {} }; + const selected = kind === 'supplement' ? extra : changed; + const method = form.includes('trace') ? 'trace' : 'get'; + if (form.startsWith('path item')) { + changed.components.pathItems = { CopyInput: { [method]: operation } }; + selected.paths['/copy-input'] = { $ref: '#/components/pathItems/CopyInput' }; + } else selected.paths['/copy-input'] = { [method]: operation }; + expect(() => prepareOpenApi(changed, extra)).toThrow(/nullability reaches an input/); + }, + ); + } +} + +test.each([ + 'https://example.test/path-item.json', + '#/components/pathItems/Missing', + '#/components/pathItems/Cycle', +])('refuses unsupported or cyclic Path Item input reachability %s', (ref) => { + const changed = structuredClone(source); + changed.components.pathItems = { Cycle: { $ref: '#/components/pathItems/Cycle' } }; + changed.paths['/path-ref'] = { $ref: ref }; + expect(() => prepareOpenApi(changed, supplement)).toThrow(/Path Item reference/); +}); + +test('resolves safe chained Path Items and checks sibling parameters', () => { + const changed = structuredClone(source); + changed.components.pathItems = { + 'escaped/item': { + get: { + parameters: [{ name: 'safe', in: 'query', schema: { type: 'string' } }], + responses: {}, + }, + }, + Chain: { $ref: '#/components/pathItems/escaped~1item' }, + }; + changed.paths['/path-ref'] = { $ref: '#/components/pathItems/Chain' }; + expect(() => prepareOpenApi(changed, supplement)).not.toThrow(); + changed.paths['/path-ref'].parameters = [ + { + name: 'unsafe', + in: 'query', + schema: { $ref: '#/components/schemas/TaskResult_EnvironmentRead_' }, + }, + ]; + expect(() => prepareOpenApi(changed, supplement)).toThrow(/nullability reaches an input/); +}); diff --git a/scripts/package.json b/scripts/package.json new file mode 100644 index 00000000..c6ed0275 --- /dev/null +++ b/scripts/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "type": "module", + "imports": { + "#scripts/*": "./*" + } +} diff --git a/scripts/public-reference.mjs b/scripts/public-reference.mjs new file mode 100644 index 00000000..a6fca7b3 --- /dev/null +++ b/scripts/public-reference.mjs @@ -0,0 +1,197 @@ +import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { isAbsolute, relative, resolve, sep } from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; +import { inflateSync } from 'node:zlib'; + +import ts from '@permitio/compiler-tools'; + +/** + * Audits existing named public method inputs/results/errors and derives the API group pages. + * + * @param root - SDK checkout containing its strict build configuration and root entry source. + * @returns Export names, required contracts and actual IPermitApi group interfaces. + * @throws If a public contract is not root-exported or source/configuration cannot be inspected. + */ +export function auditPublicExports(root) { + const config = ts.readConfigFile(resolve(root, 'tsconfig.build.json'), ts.sys.readFile); + if (config.error) throw new Error('Cannot read public-reference compiler configuration.'); + const parsed = ts.parseJsonConfigFileContent(config.config, ts.sys, root); + if (parsed.errors.length) throw new Error('Public-reference compiler configuration is invalid.'); + const program = ts.createProgram(parsed.fileNames, parsed.options); + if (program.getSyntacticDiagnostics().length) throw new Error('Public source has syntax errors.'); + const checker = program.getTypeChecker(); + const source = program.getSourceFile(resolve(root, 'src/index.ts')); + const module = source && checker.getSymbolAtLocation(source); + if (!module) throw new Error('Public root entry source is missing.'); + const target = (symbol) => + symbol?.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol; + const exports = checker.getExportsOfModule(module); + const symbols = new Set(exports.map(target)); + const required = new Map(); + const visited = new Set(); + const prefix = resolve(root, 'src') + sep; + function requireSymbol(symbol, site) { + const actual = target(symbol); + if ( + actual && + !(actual.flags & ts.SymbolFlags.TypeParameter) && + actual.declarations?.some((node) => node.getSourceFile().fileName.startsWith(prefix)) + ) { + required.set(actual, new Set([...(required.get(actual) ?? []), site])); + } + } + function typeReferences(node, site) { + if (ts.isTypeReferenceNode(node)) { + requireSymbol(checker.getSymbolAtLocation(node.typeName), site); + } + ts.forEachChild(node, (child) => typeReferences(child, site)); + } + function declaration(node) { + if (visited.has(node)) return; + visited.add(node); + if (!ts.isInterfaceDeclaration(node) && !ts.isClassDeclaration(node)) return; + for (const clause of node.heritageClauses ?? []) { + for (const item of clause.types) { + const symbol = target(checker.getSymbolAtLocation(item.expression)); + for (const parent of symbol?.declarations ?? []) declaration(parent); + } + } + for (const member of node.members) { + if ( + member.modifiers?.some((modifier) => + [ts.SyntaxKind.PrivateKeyword, ts.SyntaxKind.ProtectedKeyword].includes(modifier.kind), + ) + ) + continue; + if ( + !ts.isMethodSignature(member) && + !ts.isMethodDeclaration(member) && + !ts.isConstructorDeclaration(member) && + !ts.isGetAccessorDeclaration(member) + ) + continue; + const site = `${node.name?.text}.${member.name?.getText() ?? 'constructor'}`; + for (const parameter of member.parameters) { + if (parameter.type) typeReferences(parameter.type, site); + } + if (member.type) typeReferences(member.type, site); + for (const parameter of member.typeParameters ?? []) typeReferences(parameter, site); + for (const tag of ts.getJSDocTags(member)) { + if (tag.tagName.text !== 'throws') continue; + const name = tag.getText().match(/^@throws\s+(?:\{@link\s+|\{)?([\w]+)/)?.[1]; + if (name) { + const error = checker.resolveName(name, member, ts.SymbolFlags.Type, false); + requireSymbol(error ?? exports.find((symbol) => symbol.name === name), site + ' throws'); + } + } + } + } + for (const symbol of symbols) { + for (const node of symbol.declarations ?? []) declaration(node); + } + const api = target(exports.find((symbol) => symbol.name === 'IPermitApi')); + if (!api) throw new Error('IPermitApi is not exported from the public root.'); + const groups = []; + for (const property of checker.getDeclaredTypeOfSymbol(api).getProperties()) { + const node = property.valueDeclaration ?? property.declarations?.[0]; + if (!node || !ts.isPropertySignature(node)) continue; + const group = checker.getTypeOfSymbolAtLocation(property, node).symbol; + if (!group) throw new Error(`Cannot resolve public API group ${property.name}.`); + requireSymbol(group, `IPermitApi.${property.name}`); + for (const item of group.declarations ?? []) declaration(item); + groups.push({ field: property.name, interface: group.name }); + } + const contracts = [...required].map(([symbol, sites]) => ({ + name: symbol.name, + exported: symbols.has(symbol), + sites: [...sites].sort(), + })); + const missing = contracts.filter((contract) => !contract.exported); + if (missing.length) { + throw new Error( + 'Public root contracts are missing: ' + + missing.map((item) => `${item.name} (${item.sites.join(', ')})`).join('; '), + ); + } + return { exports: exports.map((symbol) => symbol.name).sort(), contracts, groups }; +} + +function attributes(text, name) { + const expression = new RegExp(`(?:^|\\s)(?:${name})\\s*=\\s*(["'])(.*?)\\1`, 'gi'); + return [...text.matchAll(expression)].map((match) => + match[2].replace(/&(?:amp|quot|#39);/g, (entity) => { + if (entity === '&') return '&'; + if (entity === '"') return '"'; + return "'"; + }), + ); +} + +/** + * Checks generated group navigation/field links and all local HTML file/fragment/asset targets. + * + * @param output - Standalone TypeDoc output directory. + * @param groups - Compiler-derived public IPermitApi fields and interface names. + * @returns Counts of checked HTML files, local references and public groups. + * @throws If output is missing, navigation/field links are absent or a local target is broken. + */ +export function checkReferenceLinks(output, groups) { + const root = resolve(output); + const read = (file) => readFileSync(resolve(root, file), 'utf8'); + const script = read('assets/navigation.js'); + const encoded = script.match(/^window\.navigationData\s*=\s*("[^"]+")\s*;?\s*$/)?.[1]; + if (!encoded) throw new Error('Generated TypeDoc navigation data is unreadable.'); + const navigation = JSON.parse(inflateSync(Buffer.from(JSON.parse(encoded), 'base64'))); + const paths = new Set(); + function collect(items) { + for (const item of items) { + if (typeof item.path === 'string') paths.add(item.path); + if (item.children) collect(item.children); + } + } + collect(navigation); + const api = read('interfaces/IPermitApi.html'); + for (const group of groups) { + const page = `interfaces/${group.interface}.html`; + if (!paths.has(page)) throw new Error(`Public API navigation is missing ${page}.`); + const position = api.indexOf(`id="${group.field.toLowerCase()}"`); + const section = api.slice( + api.lastIndexOf('', position), + ); + if (position === -1 || !attributes(section, 'href').includes(`${group.interface}.html`)) { + throw new Error(`IPermitApi.${group.field} is missing its ${group.interface} page link.`); + } + } + const files = readdirSync(root, { recursive: true }).filter((file) => file.endsWith('.html')); + if (!files.length) throw new Error('Generated reference contains no HTML pages.'); + const fragments = new Map(); + let references = 0; + for (const file of files) { + const current = resolve(root, file); + for (const value of attributes(read(file), 'href|src')) { + if (/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(value)) continue; + const url = new URL(value, pathToFileURL(current)); + const target = fileURLToPath(url); + const path = relative(root, target); + if (path === '..' || path.startsWith('..' + sep) || isAbsolute(path)) { + throw new Error(`${file}: local reference escapes output: ${value}`); + } + try { + if (!statSync(target).isFile()) throw new Error('not a file'); + } catch (cause) { + throw new Error(`${file}: missing local reference ${value}`, { cause }); + } + if (url.hash) { + if (!fragments.has(target)) { + fragments.set(target, new Set(attributes(readFileSync(target, 'utf8'), 'id|name'))); + } + if (!fragments.get(target).has(decodeURIComponent(url.hash.slice(1)))) { + throw new Error(`${file}: missing local fragment ${value}`); + } + } + references += 1; + } + } + return { htmlFiles: files.length, localReferences: references, publicGroups: groups.length }; +} diff --git a/scripts/public-reference.test.mjs b/scripts/public-reference.test.mjs new file mode 100644 index 00000000..4b563356 --- /dev/null +++ b/scripts/public-reference.test.mjs @@ -0,0 +1,188 @@ +import { execFileSync } from 'node:child_process'; +import { + cpSync, + mkdirSync, + mkdtempSync, + readFileSync, + renameSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { deflateSync, inflateSync } from 'node:zlib'; + +import { afterAll, beforeAll, expect, onTestFinished, test } from 'vitest'; + +import { auditPublicExports, checkReferenceLinks } from '#scripts/public-reference.mjs'; + +const root = resolve(import.meta.dirname, '..'); +let output; +let contracts; +beforeAll(() => { + output = mkdtempSync(join(tmpdir(), 'permit-reference-output-')); + execFileSync(process.execPath, [join(root, 'tools/compiler/docs.mjs'), '--out', output], { + cwd: root, + stdio: 'pipe', + }); + contracts = auditPublicExports(root); +}, 30_000); +afterAll(() => rmSync(output, { recursive: true, force: true })); + +function fixture() { + const directory = mkdtempSync(join(tmpdir(), 'permit-reference-regression-')); + onTestFinished(() => rmSync(directory, { recursive: true, force: true })); + cpSync(output, directory, { recursive: true }); + return directory; +} + +test('generated public groups have real navigation, member links and local targets', () => { + expect(contracts.groups.some((group) => group.field === 'resourceRoles')).toBe(true); + expect(contracts.groups.some((group) => group.field === 'resourceRelations')).toBe(true); + expect(contracts.contracts.every((contract) => contract.exported)).toBe(true); + const result = checkReferenceLinks(output, contracts.groups); + expect(result.publicGroups).toBe(contracts.groups.length); + expect(result.htmlFiles).toBeGreaterThan(0); + expect(result.localReferences).toBeGreaterThan(result.htmlFiles); +}); + +test('rejects a missing navigation entry even while its interface page exists', () => { + const directory = fixture(); + const file = join(directory, 'assets/navigation.js'); + const source = readFileSync(file, 'utf8'); + const encoded = JSON.parse(source.slice(source.indexOf('=') + 1).trim()); + const navigation = JSON.parse(inflateSync(Buffer.from(encoded, 'base64'))); + const page = 'interfaces/IResourceRolesApi.html'; + const filtered = navigation.filter((item) => item.path !== page); + expect(filtered.length).toBeLessThan(navigation.length); + writeFileSync( + file, + 'window.navigationData = ' + + JSON.stringify(deflateSync(JSON.stringify(filtered)).toString('base64')), + ); + expect(() => checkReferenceLinks(directory, contracts.groups)).toThrow( + /navigation.*IResourceRolesApi/, + ); +}); + +test('rejects an unlinked API member even when the summary still links its interface', () => { + const directory = fixture(); + const file = join(directory, 'interfaces/IPermitApi.html'); + const text = readFileSync(file, 'utf8'); + const position = text.indexOf('id="resourcerelations"'); + const start = text.lastIndexOf('', position); + const section = text + .slice(start, end) + .replace('href="IResourceRelationsApi.html"', 'data-page="missing"'); + const changed = text.slice(0, start) + section + text.slice(end); + expect(changed).not.toBe(text); + expect(changed).toContain('href="IResourceRelationsApi.html"'); + writeFileSync(file, changed); + expect(() => checkReferenceLinks(directory, contracts.groups)).toThrow( + /resourceRelations.*page link/, + ); +}); + +test.each(['interfaces/IResourceRelationsApi.html', 'assets/style.css', 'media/Node.png'])( + 'rejects a missing generated page or media asset: %s', + (file) => { + const directory = fixture(); + renameSync(join(directory, file), join(directory, file + '.removed')); + expect(() => checkReferenceLinks(directory, contracts.groups)).toThrow( + /missing local reference/, + ); + }, +); + +test.each(['classes/Permit.html#missing-member', 'assets/icons.svg#missing-icon'])( + 'rejects a missing local fragment: %s', + (link) => { + const directory = fixture(); + const file = join(directory, 'index.html'); + writeFileSync(file, readFileSync(file, 'utf8') + `Broken`); + expect(() => checkReferenceLinks(directory, contracts.groups)).toThrow( + /missing local fragment/, + ); + }, +); + +test('checks a same-page encoded anchor and leaves remote links offline', () => { + const directory = fixture(); + const file = join(directory, 'index.html'); + writeFileSync( + file, + readFileSync(file, 'utf8') + + 'Local' + + 'External', + ); + expect(() => checkReferenceLinks(directory, contracts.groups)).not.toThrow(); +}); + +test.each([ + ['ampersand', 'asset&.txt', 'asset&.txt'], + ['quote', 'asset".txt', 'asset".txt'], + ['apostrophe', 'asset'.txt', "asset'.txt"], + ['encoded quote entity', 'asset&quot;.txt', 'asset".txt'], +])('decodes the %s in a file reference exactly once', (_name, encoded, filename) => { + const directory = fixture(); + const file = join(directory, 'index.html'); + writeFileSync(join(directory, filename), 'Public fixture'); + writeFileSync(file, readFileSync(file, 'utf8') + `Asset`); + expect(() => checkReferenceLinks(directory, contracts.groups)).not.toThrow(); +}); + +test('does not accept a target reachable only after decoding a second time', () => { + const directory = fixture(); + const file = join(directory, 'index.html'); + writeFileSync(join(directory, 'asset".txt'), 'Wrong public fixture'); + writeFileSync( + file, + readFileSync(file, 'utf8') + 'Missing asset', + ); + expect(() => checkReferenceLinks(directory, contracts.groups)).toThrow(/missing local reference/); +}); + +test('rejects links outside the standalone output directory', () => { + const directory = fixture(); + const file = join(directory, 'index.html'); + writeFileSync(file, readFileSync(file, 'utf8') + 'Outside'); + expect(() => checkReferenceLinks(directory, contracts.groups)).toThrow(/escapes output/); +}); + +test.each(['contract', 'group', 'error'])( + 'compiler audit rejects a missing root %s export', + (kind) => { + const directory = mkdtempSync(join(tmpdir(), 'permit-export-regression-')); + onTestFinished(() => rmSync(directory, { recursive: true, force: true })); + mkdirSync(join(directory, 'src')); + writeFileSync( + join(directory, 'tsconfig.build.json'), + JSON.stringify({ + compilerOptions: { strict: true, target: 'ES2023' }, + include: ['src/*.ts'], + }), + ); + writeFileSync( + join(directory, 'src/group.ts'), + ` +export interface Input { key: string; } +export class GroupError extends Error {} +export interface IGroupApi { + /** @throws {GroupError} When the operation fails. */ + create(input: Input): Promise; +}`, + ); + const omitted = { contract: 'Input', group: 'IGroupApi', error: 'GroupError' }[kind]; + const names = ['Input', 'IGroupApi', 'GroupError'].filter((name) => name !== omitted); + writeFileSync( + join(directory, 'src/index.ts'), + ` +import type { IGroupApi } from './group'; +export { ${names.join(', ')} } from './group'; +export interface IPermitApi { group: IGroupApi; } +`, + ); + expect(() => auditPublicExports(directory)).toThrow(new RegExp(`missing:.*${omitted}`)); + }, +); diff --git a/scripts/reference-pages.mjs b/scripts/reference-pages.mjs new file mode 100644 index 00000000..ebc6d6b3 --- /dev/null +++ b/scripts/reference-pages.mjs @@ -0,0 +1,121 @@ +import { execFileSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; +import { + existsSync, + lstatSync, + readFileSync, + readdirSync, + realpathSync, + writeFileSync, +} from 'node:fs'; +import { join, relative, resolve, sep } from 'node:path'; +import { isDeepStrictEqual } from 'node:util'; +import { pathToFileURL } from 'node:url'; + +const marker = 'reference-source.json'; +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +/** Binds the actual reference files to the checked-out commit and the uploading workflow run. */ +export function bindReference({ + root, + output, + commit, + repository, + runId, + runAttempt, + write = false, +}) { + if ( + repository !== 'permitio/permit-node' || + !/^[0-9a-f]{40}$/.test(commit ?? '') || + !/^[1-9]\d*$/.test(runId ?? '') || + !/^[1-9]\d*$/.test(runAttempt ?? '') + ) + throw new Error( + 'Reference identity needs the trusted repository, full commit and run identity.', + ); + const head = execFileSync('git', ['rev-parse', 'HEAD'], { + cwd: root, + encoding: 'utf8', + timeout: 10_000, + }).trim(); + if (head !== commit) + throw new Error( + 'Reference source differs from the intended commit; rebuild that exact commit.', + ); + const dirty = execFileSync('git', ['status', '--porcelain=v1', '--untracked-files=all'], { + cwd: root, + encoding: 'utf8', + timeout: 10_000, + }).trim(); + if (dirty) + throw new Error('Reference source checkout is dirty; rebuild from the clean intended commit.'); + + const checkout = realpathSync(root); + const directory = resolve(checkout, output); + if ( + !directory.startsWith(checkout + sep) || + realpathSync(directory) !== directory || + !lstatSync(directory).isDirectory() + ) + throw new Error('Reference output must be a real directory inside the checked-out repository.'); + const files = []; + function visit(path) { + const name = relative(directory, path).split(sep).join('/'); + const info = lstatSync(path); + if (info.isSymbolicLink() || name.split('/').some((part) => ['.git', '.github'].includes(part))) + throw new Error(`Reference artifact contains an excluded or symbolic path: ${name}.`); + if (info.isDirectory()) { + for (const child of readdirSync(path).sort()) visit(join(path, child)); + } else if (!info.isFile() || info.nlink !== 1) { + throw new Error(`Reference artifact requires regular files without hard links: ${name}.`); + } else if (name !== marker) { + files.push({ path: name, sha256: sha256(readFileSync(path)) }); + } + } + visit(directory); + if (!files.some((file) => file.path === 'index.html')) + throw new Error('Reference artifact has no index.html; rebuild the public documentation.'); + files.sort((left, right) => (left.path < right.path ? -1 : left.path > right.path ? 1 : 0)); + const identity = { + schema: 1, + repository, + commit, + runId, + runAttempt, + fileCount: files.length, + contentSha256: sha256(JSON.stringify(files)), + }; + const file = join(directory, marker); + if (write) { + writeFileSync(file, JSON.stringify(identity, null, 2) + '\n'); + } else { + if (!existsSync(file)) + throw new Error('Missing reference-source.json; bind the validated reference before upload.'); + if (!isDeepStrictEqual(JSON.parse(readFileSync(file, 'utf8')), identity)) + throw new Error('Reference artifact differs from its source/content identity; rebuild it.'); + } + return identity; +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { + const args = process.argv.slice(2); + if ( + args[0] !== '--out' || + !args[1] || + args[1].startsWith('--') || + args.length > 3 || + (args.length === 3 && args[2] !== '--write') + ) + throw new Error('Usage: node scripts/reference-pages.mjs --out DIRECTORY [--write]'); + const identity = bindReference({ + root: process.cwd(), + output: args[1], + commit: process.env['EXPECTED_COMMIT'], + repository: process.env['GITHUB_REPOSITORY'], + runId: process.env['GITHUB_RUN_ID'], + runAttempt: process.env['GITHUB_RUN_ATTEMPT'], + write: args.includes('--write'), + }); + console.log('Reference source/content identity PASS: ' + JSON.stringify(identity)); +} diff --git a/scripts/reference-pages.test.mjs b/scripts/reference-pages.test.mjs new file mode 100644 index 00000000..e8d3efc4 --- /dev/null +++ b/scripts/reference-pages.test.mjs @@ -0,0 +1,232 @@ +import { execFileSync, spawnSync } from 'node:child_process'; +import { + linkSync, + mkdirSync, + mkdtempSync, + readFileSync, + realpathSync, + rmSync, + symlinkSync, + writeFileSync, +} from 'node:fs'; +import { join, resolve } from 'node:path'; +import { tmpdir } from 'node:os'; +import { afterAll, beforeAll, expect, onTestFinished, test } from 'vitest'; + +import { bindReference } from '#scripts/reference-pages.mjs'; + +const root = resolve(import.meta.dirname, '..'); +const commit = execFileSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' }).trim(); +let cleanRoot; +beforeAll(() => { + cleanRoot = realpathSync(mkdtempSync(join(tmpdir(), 'permit-pages-clean-source-'))); + execFileSync( + 'git', + [ + '-c', + 'core.hooksPath=/dev/null', + 'clone', + '--quiet', + '--shared', + '--no-checkout', + root, + cleanRoot, + ], + { encoding: 'utf8' }, + ); + execFileSync( + 'git', + ['-c', 'core.hooksPath=/dev/null', 'checkout', '--quiet', '--detach', commit], + { + cwd: cleanRoot, + encoding: 'utf8', + }, + ); +}, 30_000); +afterAll(() => rmSync(cleanRoot, { recursive: true, force: true })); +const workflow = readFileSync(join(root, '.github/workflows/reference-pages.yaml'), 'utf8'); +const guardJob = workflow.slice(workflow.indexOf(' guard:'), workflow.indexOf(' build:')); +const guard = guardJob + .slice(guardJob.indexOf(' run: |\n') + ' run: |\n'.length) + .trimEnd() + .split('\n') + .map((line) => line.slice(10)) + .join('\n'); + +function fixture() { + mkdirSync(join(cleanRoot, '.test-results'), { recursive: true }); + const directory = mkdtempSync(join(cleanRoot, '.test-results/pages-test-')); + onTestFinished(() => rmSync(directory, { recursive: true, force: true })); + const output = join(directory, 'reference'); + mkdirSync(output); + writeFileSync(join(output, 'index.html'), 'Reference'); + writeFileSync(join(output, 'asset.txt'), 'Public bytes'); + return { + root: cleanRoot, + output, + commit, + repository: 'permitio/permit-node', + runId: '12345', + runAttempt: '2', + }; +} + +function dispatch(env = {}) { + const directory = mkdtempSync(join(root, '.test-results/pages-guard-')); + onTestFinished(() => rmSync(directory, { recursive: true, force: true })); + const output = join(directory, 'github-output'); + writeFileSync(output, ''); + const result = spawnSync('bash', ['--noprofile', '--norc', '-c', guard], { + cwd: directory, + encoding: 'utf8', + env: { + PATH: process.env['PATH'], + GITHUB_EVENT_NAME: 'workflow_dispatch', + GITHUB_REPOSITORY: 'permitio/permit-node', + GITHUB_REF: 'refs/heads/main', + GITHUB_SHA: commit, + EXPECTED_COMMIT: commit, + GITHUB_OUTPUT: output, + ...env, + }, + timeout: 5_000, + }); + return { ...result, output: readFileSync(output, 'utf8') }; +} + +test('actual pre-checkout dispatch guard accepts only the intended trusted main source', () => { + mkdirSync(join(root, '.test-results'), { recursive: true }); + const result = dispatch(); + expect(result.status).toBe(0); + expect(result.stderr).toBe(''); + expect(result.output).toBe(''); +}); + +test.each([ + ['pull request', { GITHUB_EVENT_NAME: 'pull_request' }], + ['another repository', { GITHUB_REPOSITORY: 'fork/permit-node' }], + ['another branch', { GITHUB_REF: 'refs/heads/unreviewed' }], + ['a tag', { GITHUB_REF: 'refs/tags/v3.0.0' }], + ['empty commit', { EXPECTED_COMMIT: '' }], + ['short commit', { EXPECTED_COMMIT: commit.slice(0, 7) }], + ['uppercase commit', { EXPECTED_COMMIT: commit.toUpperCase() }], + ['another full commit', { EXPECTED_COMMIT: 'f'.repeat(40) }], + ['shell expansion', { EXPECTED_COMMIT: '$(echo injected)' }], + ['multiline commit', { EXPECTED_COMMIT: commit + '\n' }], +])('actual dispatch guard actively fails %s before checkout', (_name, env) => { + mkdirSync(join(root, '.test-results'), { recursive: true }); + const result = dispatch(env); + expect(result.status).toBe(1); + expect(result.stderr).toContain('::error::'); + expect(result.output).toBe(''); + expect(result.stdout).toBe(''); +}); + +test('binds real files to actual HEAD/run and excludes the marker from its own digest', () => { + const options = fixture(); + const identity = bindReference({ ...options, write: true }); + expect(identity.commit).toBe(commit); + expect(identity.fileCount).toBe(2); + expect(identity.contentSha256).toMatch(/^[a-f0-9]{64}$/); + expect(bindReference(options)).toEqual(identity); + expect(bindReference({ ...options, write: true })).toEqual(identity); +}); + +test.each(['modified', 'added', 'removed'])('rejects %s built artifact bytes', (change) => { + const options = fixture(); + bindReference({ ...options, write: true }); + if (change === 'modified') writeFileSync(join(options.output, 'asset.txt'), 'Changed'); + if (change === 'added') writeFileSync(join(options.output, '.nojekyll'), ''); + if (change === 'removed') rmSync(join(options.output, 'asset.txt')); + expect(() => bindReference(options)).toThrow('differs from its source/content identity'); +}); + +test.each(['commit', 'runId', 'runAttempt', 'contentSha256', 'fileCount'])( + 'rejects an altered marker %s', + (field) => { + const options = fixture(); + const marker = join(options.output, 'reference-source.json'); + bindReference({ ...options, write: true }); + const identity = JSON.parse(readFileSync(marker)); + identity[field] = 'wrong'; + writeFileSync(marker, JSON.stringify(identity)); + expect(() => bindReference(options)).toThrow('differs from its source/content identity'); + }, +); + +test('rejects a mismatched actual checkout and a missing binding', () => { + const options = fixture(); + expect(() => bindReference({ ...options, commit: 'f'.repeat(40), write: true })).toThrow( + 'source differs from the intended commit', + ); + expect(() => bindReference(options)).toThrow('Missing reference-source.json'); +}); + +test.each([ + ['repository', 'fork/permit-node'], + ['commit', 'short'], + ['runId', '0'], + ['runAttempt', 'unknown'], +])('rejects malformed reference identity %s', (field, value) => { + const options = fixture(); + expect(() => bindReference({ ...options, [field]: value, write: true })).toThrow( + 'trusted repository, full commit and run identity', + ); +}); + +test('rejects incomplete documentation without an index', () => { + const options = fixture(); + rmSync(join(options.output, 'index.html')); + expect(() => bindReference({ ...options, write: true })).toThrow('no index.html'); +}); + +test.each(['staged', 'unstaged', 'untracked'])( + 'rejects %s source changes while ignored generated output remains valid', + (kind) => { + const options = fixture(); + const file = join(cleanRoot, kind === 'untracked' ? 'src/pages-untracked.ts' : 'package.json'); + if (kind === 'untracked') { + writeFileSync(file, 'export const unreviewed = true;'); + onTestFinished(() => rmSync(file)); + } else { + const original = readFileSync(file); + onTestFinished(() => { + writeFileSync(file, original); + execFileSync('git', ['reset', '--quiet', 'HEAD', '--', 'package.json'], { cwd: cleanRoot }); + }); + writeFileSync(file, original.toString() + '\n'); + if (kind === 'staged') execFileSync('git', ['add', 'package.json'], { cwd: cleanRoot }); + } + expect(() => bindReference({ ...options, write: true })).toThrow('checkout is dirty'); + }, +); + +test.each(['file', 'directory', 'output'])('rejects a symbolic %s path', (kind) => { + const options = fixture(); + const target = join(options.output, kind === 'file' ? 'asset.txt' : '.'); + const link = join(options.output, 'symbolic'); + symlinkSync(target, link, kind === 'file' ? 'file' : 'dir'); + expect(() => + bindReference({ ...options, output: kind === 'output' ? link : options.output, write: true }), + ).toThrow(/symbolic path|real directory/); +}); + +test('rejects a hard link before the official uploader dereferences it', () => { + const options = fixture(); + linkSync(join(options.output, 'asset.txt'), join(options.output, 'linked.txt')); + expect(() => bindReference({ ...options, write: true })).toThrow('without hard links'); +}); + +test.each(['.git', '.github'])('rejects uploader-excluded %s paths', (name) => { + const options = fixture(); + mkdirSync(join(options.output, name)); + writeFileSync(join(options.output, name, 'metadata'), 'Excluded'); + expect(() => bindReference({ ...options, write: true })).toThrow('excluded'); +}); + +test('rejects an output directory outside the source checkout', () => { + const options = fixture(); + expect(() => bindReference({ ...options, output: '/private/tmp', write: true })).toThrow( + 'inside the checked-out repository', + ); +}); diff --git a/scripts/release-artifact.mjs b/scripts/release-artifact.mjs new file mode 100644 index 00000000..7603cc59 --- /dev/null +++ b/scripts/release-artifact.mjs @@ -0,0 +1,239 @@ +import { spawnSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, writeFileSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { isDeepStrictEqual, parseArgs } from 'node:util'; + +function requireValid(condition, message) { + if (!condition) throw new Error(message); +} + +function checked(command, args, cwd, maximum = 16 * 1024 * 1024) { + const result = spawnSync(command, args, { cwd, maxBuffer: maximum, timeout: 120_000 }); + requireValid( + !result.error && result.status === 0 && !result.signal, + `${command} inspection did not complete successfully.`, + ); + return result.stdout; +} + +function boundedBytes(path, maximum) { + requireValid( + lstatSync(path).isFile() && lstatSync(path).size <= maximum, + 'Input exceeds its size limit.', + ); + return readFileSync(path); +} + +/** Reads package metadata without extracting files or executing code from the archive. */ +export function inspectReleaseArchive(path) { + const archive = resolve(path); + const bytes = boundedBytes(archive, 64 * 1024 * 1024); + const names = checked('tar', ['-tzf', archive]).toString('utf8').trimEnd().split('\n'); + const listing = checked('tar', ['-tvzf', archive]).toString('utf8').trimEnd().split('\n'); + requireValid( + names.length === listing.length && names.length > 0, + 'Archive listing is incomplete.', + ); + const files = []; + for (let index = 0; index < names.length; index++) { + const name = names[index]; + requireValid( + (['package', 'package/'].includes(name) || /^package\/[A-Za-z0-9_.@+/-]+$/.test(name)) && + !name.split('/').some((part) => ['..', '.'].includes(part)), + 'Archive has an unsafe member name.', + ); + if (listing[index].startsWith('d')) { + requireValid(!name.includes('//'), 'Archive directory is not canonical.'); + } else { + requireValid( + listing[index].startsWith('-') && !name.endsWith('/'), + 'Archive contains a link or unsupported member type.', + ); + files.push(name); + } + } + requireValid(new Set(names).size === names.length, 'Archive contains duplicate members.'); + requireValid(files.includes('package/package.json'), 'Archive has no package manifest.'); + const manifestBytes = checked( + 'tar', + ['-xOzf', archive, 'package/package.json'], + undefined, + 1024 * 1024, + ); + const manifest = JSON.parse(manifestBytes.toString('utf8')); + requireValid( + manifest.name === 'permitio' && typeof manifest.version === 'string', + 'Archive is not a versioned permitio package.', + ); + return { + sha256: createHash('sha256').update(bytes).digest('hex'), + fileCount: files.length, + files, + manifest, + manifestBytes, + integrity: `sha512-${createHash('sha512').update(bytes).digest('base64')}`, + }; +} + +const skill = 'skills/permit-node-3-migration/'; +const requiredFiles = [ + 'package.json', + 'build/index.js', + 'build/index.mjs', + 'build/index.d.ts', + 'build/index.d.mts', + 'README.md', + 'MIGRATION.md', + 'CHANGELOG.md', + 'LICENSE', + ...[ + 'SKILL.md', + 'package.json', + 'compiler-lock.yaml', + 'pnpm-workspace.yaml', + 'references/changes.md', + 'scripts/scan.mjs', + ].map((path) => skill + path), +]; + +/** Validates the documented package surface before any consumer extracts or executes it. */ +export function validatePackageSurface(archive, manifest) { + for (const field of [ + 'name', + 'version', + 'license', + 'repository', + 'type', + 'main', + 'module', + 'typings', + 'exports', + 'files', + 'dependencies', + 'engines', + ]) { + requireValid( + isDeepStrictEqual(archive.manifest[field], manifest[field]), + `Packed package metadata differs from reviewed ${field}.`, + ); + } + requireValid( + manifest.name === 'permitio' && + manifest.type === 'commonjs' && + manifest.main === 'build/index.js' && + manifest.module === 'build/index.mjs' && + manifest.typings === 'build/index.d.ts' && + isDeepStrictEqual(manifest.exports, { + '.': { + import: { types: './build/index.d.mts', default: './build/index.mjs' }, + require: { types: './build/index.d.ts', default: './build/index.js' }, + }, + }), + 'Reviewed package does not expose both promised loader and declaration entry points.', + ); + requireValid( + Object.values(manifest.dependencies).every( + (version) => typeof version === 'string' && /^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(version), + ), + 'Runtime dependencies must use exact versions.', + ); + const files = archive.files.map((path) => path.slice('package/'.length)); + for (const path of requiredFiles) { + requireValid(files.includes(path), `Packed package is missing required ${path}.`); + } + for (const path of files) { + requireValid( + requiredFiles.includes(path) || + (/^build\/[\w./-]+\.d\.ts$/.test(path) && !path.startsWith('build/tests/')), + `Packed package contains an unapproved file: ${path}.`, + ); + } + return archive; +} + +function sourceIdentity(root) { + requireValid( + checked('git', ['status', '--porcelain', '--untracked-files=normal'], root).length === 0, + 'Release candidate identity requires a clean committed checkout.', + ); + return { + commit: checked('git', ['rev-parse', 'HEAD'], root).toString('utf8').trim(), + tree: checked('git', ['rev-parse', 'HEAD^{tree}'], root).toString('utf8').trim(), + }; +} + +/** Binds a validated archive to its reviewed source without changing its version or rebuilding. */ +export function releaseIdentity({ root = process.cwd(), artifact }) { + const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + const archive = validatePackageSurface(inspectReleaseArchive(artifact), manifest); + return { + schema: 1, + name: archive.manifest.name, + version: archive.manifest.version, + sha256: archive.sha256, + integrity: archive.integrity, + fileCount: archive.fileCount, + ...sourceIdentity(root), + }; +} + +/** Rejects replacement bytes, a different source revision, or changed package metadata. */ +export function verifyReleaseIdentity({ + root = process.cwd(), + artifact, + identity, + expectedSha256, +}) { + const actual = releaseIdentity({ root, artifact }); + requireValid( + isDeepStrictEqual(actual, identity), + 'Archive or reviewed source identity differs from the validated candidate.', + ); + if (expectedSha256 !== undefined) { + requireValid( + /^[a-f0-9]{64}$/.test(expectedSha256) && actual.sha256 === expectedSha256, + 'Archive hash differs from the successful candidate build output.', + ); + } + return actual; +} + +/** Command-line boundary used by candidate, scanner, consumer and publisher jobs. */ +export function main(args = process.argv.slice(2)) { + try { + const { values } = parseArgs({ + args, + strict: true, + allowPositionals: false, + options: { + artifact: { type: 'string' }, + identity: { type: 'string' }, + write: { type: 'boolean', default: false }, + sha256: { type: 'string' }, + }, + }); + requireValid( + values.artifact && values.identity, + 'Use --artifact TGZ --identity JSON [--write | --sha256 EXPECTED].', + ); + requireValid(!(values.write && values.sha256), '--write cannot accept a preexisting hash.'); + const identity = values.write + ? releaseIdentity({ artifact: values.artifact }) + : verifyReleaseIdentity({ + artifact: values.artifact, + identity: JSON.parse(boundedBytes(values.identity, 1024 * 1024).toString('utf8')), + expectedSha256: values.sha256, + }); + if (values.write) writeFileSync(values.identity, `${JSON.stringify(identity, null, 2)}\n`); + console.log(`Validated permitio ${identity.version}: ${identity.sha256}.`); + return 0; + } catch (error) { + console.error(`Release archive validation failed: ${error.message}`); + return 2; + } +} + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) + process.exitCode = main(); diff --git a/scripts/release-artifact.test.mjs b/scripts/release-artifact.test.mjs new file mode 100644 index 00000000..77d0bd9e --- /dev/null +++ b/scripts/release-artifact.test.mjs @@ -0,0 +1,130 @@ +import { execFileSync } from 'node:child_process'; +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; +import { expect, onTestFinished, test } from 'vitest'; +import { + inspectReleaseArchive, + releaseIdentity, + validatePackageSurface, + verifyReleaseIdentity, +} from '#scripts/release-artifact.mjs'; + +function fixture() { + const directory = mkdtempSync(join(tmpdir(), 'permit-package-gate-')); + onTestFinished(() => rmSync(directory, { recursive: true, force: true })); + const root = join(directory, 'source'); + const packed = join(directory, 'package'); + mkdirSync(root); + mkdirSync(packed); + const manifest = JSON.parse(readFileSync('package.json', 'utf8')); + writeFileSync(join(root, 'package.json'), JSON.stringify(manifest)); + const files = [ + 'package.json', + 'build/index.js', + 'build/index.mjs', + 'build/index.d.ts', + 'build/index.d.mts', + 'README.md', + 'MIGRATION.md', + 'CHANGELOG.md', + 'LICENSE', + ...[ + 'SKILL.md', + 'package.json', + 'compiler-lock.yaml', + 'pnpm-workspace.yaml', + 'references/changes.md', + 'scripts/scan.mjs', + ].map((path) => 'skills/permit-node-3-migration/' + path), + ]; + for (const file of files) { + const path = join(packed, file); + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, file === 'package.json' ? JSON.stringify(manifest) : 'fixture'); + } + const git = (...args) => execFileSync('git', args, { cwd: root, encoding: 'utf8' }); + git('init', '--quiet'); + git('add', 'package.json'); + git( + '-c', + 'user.name=Fixture', + '-c', + 'user.email=fixture@example.invalid', + 'commit', + '--quiet', + '--no-gpg-sign', + '-m', + 'Fixture source', + ); + const artifact = join(directory, 'candidate.tgz'); + const pack = () => execFileSync('tar', ['-czf', artifact, '-C', directory, 'package']); + pack(); + return { root, manifest, artifact, packed, pack }; +} + +test('validates both entrypoints and the whole shipped customer skill', () => { + const f = fixture(); + expect(validatePackageSurface(inspectReleaseArchive(f.artifact), f.manifest).fileCount).toBe(15); + const identity = releaseIdentity(f); + expect(verifyReleaseIdentity({ ...f, identity, expectedSha256: identity.sha256 })).toEqual( + identity, + ); +}); + +test.each(['build/index.d.mts', 'skills/permit-node-3-migration/compiler-lock.yaml'])( + 'rejects missing promised file %s', + (file) => { + const f = fixture(); + rmSync(join(f.packed, file)); + f.pack(); + expect(() => validatePackageSurface(inspectReleaseArchive(f.artifact), f.manifest)).toThrow( + 'missing required', + ); + }, +); + +test.each([ + '.npmrc', + '.env', + 'src/index.ts', + 'build/tests/private.d.ts', + 'node_modules/x/index.js', +])('rejects unapproved archive member %s', (file) => { + const f = fixture(); + const path = join(f.packed, file); + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, 'private fixture'); + f.pack(); + expect(() => validatePackageSurface(inspectReleaseArchive(f.artifact), f.manifest)).toThrow( + 'unapproved file', + ); +}); + +test('rejects wrong loader declaration metadata even when both files are present', () => { + const f = fixture(); + const wrong = structuredClone(f.manifest); + wrong.exports['.'].require.types = './build/index.d.mts'; + writeFileSync(join(f.packed, 'package.json'), JSON.stringify(wrong)); + f.pack(); + expect(() => validatePackageSurface(inspectReleaseArchive(f.artifact), wrong)).toThrow( + 'both promised loader', + ); +}); + +test('rejects replacement bytes and a different expected source hash', () => { + const f = fixture(); + const identity = releaseIdentity(f); + expect(() => verifyReleaseIdentity({ ...f, identity, expectedSha256: '0'.repeat(64) })).toThrow( + 'successful candidate build', + ); + writeFileSync(join(f.packed, 'build/index.js'), 'replacement'); + f.pack(); + expect(() => verifyReleaseIdentity({ ...f, identity })).toThrow('differs'); +}); + +test('refuses an uncommitted source change before assigning archive identity', () => { + const f = fixture(); + writeFileSync(join(f.root, 'unexpected.txt'), 'changed source'); + expect(() => releaseIdentity(f)).toThrow('clean committed'); +}); diff --git a/scripts/release-evidence.mjs b/scripts/release-evidence.mjs new file mode 100644 index 00000000..69c0f36d --- /dev/null +++ b/scripts/release-evidence.mjs @@ -0,0 +1,578 @@ +import { createHash } from 'node:crypto'; +import { isDeepStrictEqual } from 'node:util'; + +import { gte, valid } from 'semver'; + +import { compareStrings, digest, extractSdk } from '#scripts/api-contracts.mjs'; +import { inspectContracts } from '#scripts/check-api-contracts.mjs'; + +const statuses = ['PASSED', 'FAILED', 'INVALID', 'NOT_RUN']; +const levels = ['package', 'wire', 'mock-pdp', 'api', 'pdp']; +const sha256 = /^[a-f0-9]{64}$/; +const stableId = /^[a-z][A-Za-z0-9]*(?:[.-][A-Za-z0-9]+)*$/; +const supportedNodeVersion = (value) => + typeof value === 'string' && + /^\d+\.\d+\.\d+$/u.test(value) && + valid(value) !== null && + gte(value, '22.13.0'); +const changeId = /^[A-Z][1-9]\d*$/; +const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value); +const integer = (value) => Number.isSafeInteger(value) && value >= 0; +const positive = (value) => integer(value) && value > 0; +const hash = (value) => typeof value === 'string' && sha256.test(value); +const label = (value) => typeof value === 'string' && stableId.test(value); +const oneOf = (values) => (value) => values.includes(value); +const text = (value) => typeof value === 'string' && value.length > 0; + +function requireValid(condition, message) { + if (!condition) throw new Error(message); +} + +function record(value, fields, context) { + requireValid(object(value), `${context}: expected an object.`); + requireValid( + isDeepStrictEqual(Object.keys(value).sort(), Object.keys(fields).sort()), + `${context}: missing or unrecognized fields.`, + ); + for (const [key, predicate] of Object.entries(fields)) + requireValid(predicate(value[key]), `${context}.${key}: invalid value.`); +} + +function unique(values, key, context) { + requireValid(Array.isArray(values), `${context}: expected an array.`); + const keys = values.map(key); + requireValid(new Set(keys).size === keys.length, `${context}: duplicate entries.`); + return values; +} + +function strings(value, predicate) { + return Array.isArray(value) && value.every(predicate) && new Set(value).size === value.length; +} + +const ids = (value) => strings(value, label); +const names = (value) => strings(value, (name) => /^permit(?:\.[A-Za-z][A-Za-z0-9]*)+$/.test(name)); +const array = Array.isArray; +export const operationKey = (row) => `${row.source} ${row.method} ${row.path}`; + +/** Removes case links and orders the complete inventory for the shared SHA-256 contract. */ +export function canonicalReleaseInventory(inventory) { + return { + methods: inventory.methods.map((row) => row.name).sort(compareStrings), + operations: inventory.operations + .map(({ source, method, path, decision }) => ({ source, method, path, decision })) + .sort((a, b) => compareStrings(operationKey(a), operationKey(b))), + }; +} + +/** Extracts current public methods and reviewed source decisions; throws on contract drift. */ +export async function expectedReleaseInventory(root) { + const report = await inspectContracts({ root }); + requireValid( + report.integrity === 'PASS', + 'API contract inventory must pass before release evidence.', + ); + const sdk = extractSdk(root); + const inventory = { + methods: [...sdk.methods, ...sdk.helpers].map(({ name }) => ({ name, caseIds: [] })), + operations: report.operations.map(({ source, method, path, decision }) => ({ + source, + method, + path, + decision: decision.action, + caseIds: [], + })), + }; + return { + inventory, + inventorySha256: digest(canonicalReleaseInventory(inventory)), + methodLevels: Object.fromEntries([ + ...sdk.methods.map(({ name }) => [name, 'wire']), + ...sdk.helpers.map(({ name }) => [name, 'package']), + ]), + }; +} + +function validateSchema(evidence) { + record( + evidence, + { + schema: (v) => v === 1, + artifact: object, + sdk: object, + inventory: object, + runs: array, + ab: object, + gates: object, + }, + 'evidence', + ); + record( + evidence.artifact, + { + name: (v) => v === 'permitio', + version: text, + sha256: hash, + fileCount: positive, + lockSha256: hash, + }, + 'artifact', + ); + record( + evidence.sdk, + { + tree: (v) => typeof v === 'string' && /^[a-f0-9]{40}$/.test(v), + inventorySha256: hash, + }, + 'sdk', + ); + record(evidence.inventory, { methods: array, operations: array }, 'inventory'); + for (const row of unique(evidence.inventory.methods, (v) => v?.name, 'inventory.methods')) + record(row, { name: (v) => names([v]), caseIds: ids }, 'inventory.method'); + for (const row of unique(evidence.inventory.operations, operationKey, 'inventory.operations')) + record( + row, + { + source: oneOf(['control-plane', 'pdp-container', 'pdp-cloud']), + method: oneOf(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE']), + path: (v) => typeof v === 'string' && v.startsWith('/') && !/[\s?#]/.test(v), + decision: oneOf(['add', 'retain', 'defer', 'exclude', 'undecided']), + caseIds: ids, + }, + 'inventory.operation', + ); + for (const run of unique(evidence.runs, (v) => v?.id, 'runs')) { + record( + run, + { + id: label, + artifactSha256: hash, + nativeReportSha256: hash, + node: supportedNodeVersion, + target: oneOf(['offline', 'local']), + pdp: object, + phaseResults: array, + caseResults: array, + cleanup: object, + setupErrorCount: integer, + cleanupErrorCount: integer, + }, + 'run', + ); + record( + run.pdp, + { + digest: (v) => typeof v === 'string' && /^sha256:[a-f0-9]{64}$/.test(v), + roles: (v) => strings(v, oneOf(['pinned', 'current'])) && v.length > 0, + resolvedAt: (v) => + typeof v === 'string' && + /^\d{4}-\d{2}-\d{2}$/.test(v) && + new Date(v).toISOString().slice(0, 10) === v, + }, + 'run.pdp', + ); + record( + run.cleanup, + { registered: integer, completed: integer, verified: integer }, + 'run.cleanup', + ); + for (const phase of unique(run.phaseResults, (v) => v?.id, 'run.phaseResults')) + record( + phase, + { id: label, kind: oneOf(levels), status: oneOf(statuses), assertions: integer }, + 'phase', + ); + for (const entry of unique(run.caseResults, (v) => v?.id, 'run.caseResults')) + record( + entry, + { + id: label, + phaseId: label, + methodNames: names, + operationKeys: (v) => strings(v, text), + level: oneOf(levels), + status: oneOf(statuses), + assertions: integer, + }, + 'case', + ); + } + record( + evidence.ab, + { + baseline: object, + candidateSha256: hash, + cases: array, + intentionalDifferences: array, + }, + 'ab', + ); + record( + evidence.ab.baseline, + { + version: text, + sha256: hash, + fileCount: positive, + lockSha256: hash, + kind: (v) => v === 'released-npm', + integrity: (v) => typeof v === 'string' && /^sha512-[A-Za-z0-9+/]{86}==$/.test(v), + }, + 'ab.baseline', + ); + for (const entry of unique( + evidence.ab.cases, + (v) => `${v?.id}/${v?.baselineRunId}/${v?.candidateRunId}`, + 'ab.cases', + )) + record( + entry, + { + id: label, + baselineRunId: label, + candidateRunId: label, + status: oneOf(statuses), + assertions: integer, + }, + 'ab.case', + ); + for (const entry of unique( + evidence.ab.intentionalDifferences, + (v) => v?.id, + 'ab.intentionalDifferences', + )) + record( + entry, + { id: label, changeId: (v) => typeof v === 'string' && changeId.test(v) }, + 'ab.difference', + ); + record(evidence.gates, { sharedTarget: object }, 'gates'); + record( + evidence.gates.sharedTarget, + { + status: (v) => v === 'UNAVAILABLE', + owner: (v) => v === 'PER-16345', + }, + 'gates.sharedTarget', + ); +} + +function equal(actual, expected, message) { + requireValid(isDeepStrictEqual(actual, expected), message); +} + +function validateRequirements(expected) { + const plan = expected.requirements; + requireValid( + strings(plan.nodes, supportedNodeVersion) && + plan.nodes.includes('22.13.0') && + plan.nodes.includes('24.0.0'), + 'Reviewed runtime matrix must use supported Node versions and retain both test floors.', + ); + requireValid( + ids(plan.runIds) && plan.runIds.length > 0 && ids(plan.phaseIds) && plan.phaseIds.length > 0, + 'Reviewed run and phase registries must be nonempty and unique.', + ); + requireValid( + Array.isArray(plan.pdps) && + plan.pdps.length === 2 && + isDeepStrictEqual(plan.pdps.map((row) => row.role).sort(), ['current', 'pinned']), + 'Reviewed PDP matrix must contain pinned and current identities.', + ); + const methods = new Set(expected.inventory.methods.map((row) => row.name)); + const operations = new Set(expected.inventory.operations.map(operationKey)); + requireValid(methods.size > 0 && operations.size > 0, 'Independent inventory cannot be empty.'); + requireValid( + isDeepStrictEqual(Object.keys(expected.methodLevels).sort(), [...methods].sort()) && + Object.values(expected.methodLevels).every(oneOf(['package', 'wire'])), + 'Independent method evidence requirements are incomplete.', + ); + for (const entry of plan.cases) { + record( + entry, + { + id: label, + level: oneOf(levels), + methodNames: names, + operationKeys: (v) => strings(v, text), + }, + 'reviewed case', + ); + requireValid( + entry.methodNames.every((name) => methods.has(name)) && + entry.operationKeys.every((key) => operations.has(key)), + 'Reviewed case references an unknown method or published operation.', + ); + requireValid( + !entry.operationKeys.length || entry.methodNames.length > 0, + 'Published-operation proof must identify a public SDK method.', + ); + requireValid( + !['api', 'pdp'].includes(entry.level) || + entry.operationKeys.every((key) => !key.startsWith('pdp-cloud ')), + 'Local service evidence cannot claim cloud PDP execution.', + ); + } + requireValid( + ids(plan.abCaseIds) && + plan.abCaseIds.length > 0 && + plan.abCaseIds.every((id) => plan.cases.some((entry) => entry.id === id)), + 'Every reviewed A/B ID must have an execution case.', + ); +} + +function validateBindings(evidence, expected) { + validateRequirements(expected); + equal( + evidence.artifact, + expected.artifact, + 'Candidate artifact or lockfile differs from supplied bytes.', + ); + equal( + evidence.ab.baseline, + expected.baseline, + 'Released baseline or lockfile differs from supplied bytes.', + ); + requireValid( + evidence.ab.candidateSha256 === evidence.artifact.sha256, + 'A/B candidate artifact differs.', + ); + requireValid( + evidence.sdk.tree === expected.tree, + 'SDK source tree differs from the clean checkout.', + ); + const inventory = canonicalReleaseInventory(evidence.inventory); + equal( + inventory, + canonicalReleaseInventory(expected.inventory), + 'Public inventory or decisions differ.', + ); + requireValid(evidence.sdk.inventorySha256 === digest(inventory), 'Inventory digest differs.'); + equal( + evidence.ab.intentionalDifferences, + expected.requirements.intentionalDifferences, + 'Intentional changes differ from the reviewed migration exclusions.', + ); + const cases = new Map(expected.requirements.cases.map((entry) => [entry.id, entry])); + requireValid( + cases.size > 0 && cases.size === expected.requirements.cases.length, + 'Reviewed case catalog is empty or contains duplicate IDs.', + ); + for (const row of evidence.inventory.methods) { + const links = [...cases.values()].filter((entry) => entry.methodNames.includes(row.name)); + equal( + [...row.caseIds].sort(), + links.map((entry) => entry.id).sort(), + `Case links differ: ${row.name}.`, + ); + } + for (const row of evidence.inventory.operations) { + const links = [...cases.values()].filter((entry) => + entry.operationKeys.includes(operationKey(row)), + ); + equal( + [...row.caseIds].sort(), + links.map((entry) => entry.id).sort(), + `Case links differ: ${operationKey(row)}.`, + ); + } + return cases; +} + +function validateRun(run, context) { + const { evidence, expected, cases, incomplete } = context; + requireValid(expected.requirements.runIds.includes(run.id), 'Unreviewed run ID.'); + requireValid( + run.phaseResults.every((phase) => expected.requirements.phaseIds.includes(phase.id)), + 'Unreviewed phase ID.', + ); + requireValid( + [evidence.artifact.sha256, evidence.ab.baseline.sha256].includes(run.artifactSha256), + `Unknown artifact in run ${run.id}.`, + ); + requireValid( + expected.requirements.nodes.includes(run.node), + `Unreviewed runtime in run ${run.id}.`, + ); + for (const role of run.pdp.roles) { + const required = expected.requirements.pdps.find((entry) => entry.role === role); + requireValid( + required && required.digest === run.pdp.digest && required.resolvedAt === run.pdp.resolvedAt, + `Unreviewed PDP in run ${run.id}.`, + ); + } + if ( + run.setupErrorCount || + run.cleanupErrorCount || + run.cleanup.registered !== run.cleanup.completed || + run.cleanup.completed !== run.cleanup.verified + ) + incomplete.push(`Run ${run.id}: setup or cleanup is incomplete.`); + requireValid(run.phaseResults.length > 0, `Run ${run.id}: no executed phase evidence.`); + const phases = new Map(run.phaseResults.map((entry) => [entry.id, entry])); + for (const phase of run.phaseResults) { + if (phase.status === 'PASSED') + requireValid(phase.assertions > 0, `Phase ${phase.id}: empty PASS.`); + const claimedAssertions = run.caseResults + .filter((entry) => entry.phaseId === phase.id) + .reduce((sum, entry) => sum + entry.assertions, 0); + requireValid( + Number.isSafeInteger(claimedAssertions) && claimedAssertions <= phase.assertions, + 'Case assertions exceed the containing phase.', + ); + if (['INVALID', 'NOT_RUN'].includes(phase.status)) + incomplete.push(`${run.id}/${phase.id}: ${phase.status}.`); + requireValid( + run.target === 'local' || !['api', 'pdp'].includes(phase.kind), + `Run ${run.id}: offline phase claims service proof.`, + ); + } + for (const entry of run.caseResults) { + const required = cases.get(entry.id); + requireValid(required, 'Unreviewed case ID.'); + equal(entry.methodNames, required.methodNames, `Case ${entry.id}: method links differ.`); + equal(entry.operationKeys, required.operationKeys, `Case ${entry.id}: operation links differ.`); + requireValid(entry.level === required.level, `Case ${entry.id}: evidence level differs.`); + const phase = phases.get(entry.phaseId); + requireValid( + phase && phase.kind === entry.level, + `Case ${entry.id}: missing/mismatched phase.`, + ); + if (entry.status === 'PASSED') + requireValid( + entry.assertions > 0 && phase.status === 'PASSED' && phase.assertions >= entry.assertions, + `Case ${entry.id}: PASS has no successful phase assertions.`, + ); + if (['INVALID', 'NOT_RUN'].includes(entry.status)) + incomplete.push(`${run.id}/${entry.id}: ${entry.status}.`); + } +} + +function validateMatrix(evidence, expected, incomplete) { + const { requirements } = expected; + const hasCase = (row, minimum) => + requirements.cases.some( + (entry) => + row.caseIds.includes(entry.id) && (minimum === 'package' || entry.level !== 'package'), + ); + for (const row of evidence.inventory.methods) + if (!hasCase(row, expected.methodLevels[row.name])) + incomplete.push(`No reviewed case for ${row.name}.`); + for (const row of evidence.inventory.operations) + if (['add', 'retain'].includes(row.decision) && !hasCase(row, 'wire')) + incomplete.push(`No reviewed case for ${operationKey(row)}.`); + for (const node of requirements.nodes) + for (const pdp of requirements.pdps) { + const cells = evidence.runs.filter( + (run) => + run.artifactSha256 === evidence.artifact.sha256 && + run.node === node && + run.target === 'local' && + run.pdp.digest === pdp.digest && + run.pdp.roles.includes(pdp.role), + ); + if (!cells.length) incomplete.push(`Missing local candidate cell: Node ${node}/${pdp.role}.`); + for (const id of requirements.phaseIds) + if (!cells.some((run) => run.phaseResults.some((phase) => phase.id === id))) + incomplete.push(`Missing phase ${id}: Node ${node}/${pdp.role}.`); + for (const entry of requirements.cases) + if (!cells.some((run) => run.caseResults.some((item) => item.id === entry.id))) + incomplete.push(`Missing case ${entry.id}: Node ${node}/${pdp.role}.`); + } +} + +function validateAb(evidence, expected, incomplete) { + const runs = new Map(evidence.runs.map((run) => [run.id, run])); + const requiredIds = expected.requirements.abCaseIds; + requireValid( + requiredIds.length > 0 && new Set(requiredIds).size === requiredIds.length, + 'Reviewed A/B catalog is empty or duplicated.', + ); + for (const entry of evidence.ab.cases) { + requireValid(requiredIds.includes(entry.id), 'Unreviewed A/B comparison ID.'); + const baseline = runs.get(entry.baselineRunId); + const candidate = runs.get(entry.candidateRunId); + requireValid( + baseline && + candidate && + baseline.artifactSha256 === evidence.ab.baseline.sha256 && + candidate.artifactSha256 === evidence.artifact.sha256 && + baseline.target === 'local' && + candidate.target === 'local' && + baseline.node === candidate.node && + isDeepStrictEqual(baseline.pdp, candidate.pdp), + `A/B ${entry.id}: missing or different artifact/runtime/PDP cells.`, + ); + for (const run of [baseline, candidate]) { + const result = run.caseResults.find((item) => item.id === entry.id); + requireValid(result, `A/B ${entry.id}: missing execution case.`); + if (entry.status === 'PASSED') + requireValid( + result.status === 'PASSED' && entry.assertions > 0, + `A/B ${entry.id}: PASS without successful execution and comparison assertions.`, + ); + } + if (['INVALID', 'NOT_RUN'].includes(entry.status)) + incomplete.push(`A/B ${entry.id}: ${entry.status}.`); + } + for (const node of expected.requirements.nodes) + for (const pdp of expected.requirements.pdps) + for (const id of requiredIds) + if ( + !evidence.ab.cases.some( + (entry) => + entry.id === id && + runs.get(entry.candidateRunId)?.node === node && + runs.get(entry.candidateRunId)?.pdp.roles.includes(pdp.role), + ) + ) + incomplete.push(`Missing A/B ${id}: Node ${node}/${pdp.role}.`); +} + +function reportedFailurePositions(evidence) { + const failures = []; + if (Array.isArray(evidence?.runs)) + evidence.runs.forEach((run, runIndex) => { + for (const kind of ['phaseResults', 'caseResults']) + if (Array.isArray(run?.[kind])) + run[kind].forEach((entry, index) => { + if (entry?.status === 'FAILED') failures.push(`runs[${runIndex}].${kind}[${index}]`); + }); + }); + if (Array.isArray(evidence?.ab?.cases)) + evidence.ab.cases.forEach((entry, index) => { + if (entry?.status === 'FAILED') failures.push(`ab.cases[${index}]`); + }); + return failures; +} + +/** + * Validates producer evidence against independently inspected inputs and a reviewed case catalog. + * Returns 0 for complete local evidence, 1 for failures, or 2 for invalid/incomplete proof. + * Integrity errors take precedence; producer-reported failure positions remain visible. + * This never approves release. + */ +export function validateReleaseEvidence(evidence, expected) { + const incomplete = []; + const failures = reportedFailurePositions(evidence); + try { + validateSchema(evidence); + const cases = validateBindings(evidence, expected); + for (const run of evidence.runs) validateRun(run, { evidence, expected, cases, incomplete }); + validateMatrix(evidence, expected, incomplete); + validateAb(evidence, expected, incomplete); + } catch (error) { + incomplete.push(error.message); + } + const exitCode = incomplete.length ? 2 : failures.length ? 1 : 0; + return { + schema: 1, + localEvidence: ['PASS', 'FAIL', 'INVALID'][exitCode], + exitCode, + releaseReady: false, + sharedTarget: { status: 'UNAVAILABLE', owner: 'PER-16345' }, + incomplete, + failures: [...new Set(failures)], + }; +} + +/** Hashes the bytes supplied by the caller; no filenames or private metadata enter the payload. */ +export const bytesSha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); diff --git a/scripts/release-evidence.test.mjs b/scripts/release-evidence.test.mjs new file mode 100644 index 00000000..0a3f9842 --- /dev/null +++ b/scripts/release-evidence.test.mjs @@ -0,0 +1,933 @@ +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; + +import { expect, test } from 'vitest'; + +import { digest } from '#scripts/api-contracts.mjs'; +import { + canonicalReleaseInventory, + expectedReleaseInventory, + validateReleaseEvidence, +} from '#scripts/release-evidence.mjs'; + +const candidateHash = 'a'.repeat(64); +const baselineHash = 'b'.repeat(64); +const pdpDigest = `sha256:${'c'.repeat(64)}`; +const sharedCase = { + id: 'ab.users.edge-values', + level: 'api', + methodNames: ['permit.api.users.create'], + operationKeys: ['control-plane POST /v2/facts/{proj_id}/{env_id}/users'], +}; + +function fixture(nodes = ['22.13.0', '24.0.0']) { + const inventory = { + methods: [{ name: 'permit.api.users.create', caseIds: [sharedCase.id] }], + operations: [ + { + source: 'control-plane', + method: 'POST', + path: '/v2/facts/{proj_id}/{env_id}/users', + decision: 'retain', + caseIds: [sharedCase.id], + }, + { + source: 'pdp-container', + method: 'GET', + path: '/deferred', + decision: 'defer', + caseIds: [], + }, + ], + }; + const artifact = { + name: 'permitio', + version: '3.0.0', + sha256: candidateHash, + fileCount: 440, + lockSha256: 'd'.repeat(64), + }; + const baseline = { + version: '2.7.5', + sha256: baselineHash, + fileCount: 999, + lockSha256: 'e'.repeat(64), + kind: 'released-npm', + integrity: `sha512-${'A'.repeat(86)}==`, + }; + const requirements = { + nodes, + runIds: nodes.flatMap((node) => [`baseline-${node}`, `candidate-${node}`]), + phaseIds: ['api.users'], + pdps: ['pinned', 'current'].map((role) => ({ + role, + digest: pdpDigest, + resolvedAt: '2026-09-30', + })), + cases: [sharedCase], + abCaseIds: [sharedCase.id], + intentionalDifferences: [{ id: 'migration.flat-facade', changeId: 'A1' }], + }; + const expected = { + artifact, + baseline, + inventory, + requirements, + tree: 'f'.repeat(40), + methodLevels: { 'permit.api.users.create': 'wire' }, + }; + const runs = requirements.nodes.flatMap((node) => + ['baseline', 'candidate'].map((role) => ({ + id: `${role}-${node}`, + artifactSha256: role === 'baseline' ? baselineHash : candidateHash, + nativeReportSha256: '1'.repeat(64), + node, + target: 'local', + pdp: { digest: pdpDigest, roles: ['pinned', 'current'], resolvedAt: '2026-09-30' }, + phaseResults: [{ id: 'api.users', kind: 'api', status: 'PASSED', assertions: 8 }], + caseResults: [{ ...sharedCase, phaseId: 'api.users', status: 'PASSED', assertions: 8 }], + cleanup: { registered: 1, completed: 1, verified: 1 }, + setupErrorCount: 0, + cleanupErrorCount: 0, + })), + ); + const evidence = { + schema: 1, + artifact, + sdk: { + tree: expected.tree, + inventorySha256: digest(canonicalReleaseInventory(inventory)), + }, + inventory, + runs, + ab: { + baseline, + candidateSha256: candidateHash, + cases: requirements.nodes.map((node) => ({ + id: sharedCase.id, + baselineRunId: `baseline-${node}`, + candidateRunId: `candidate-${node}`, + status: 'PASSED', + assertions: 1, + })), + intentionalDifferences: requirements.intentionalDifferences, + }, + gates: { sharedTarget: { status: 'UNAVAILABLE', owner: 'PER-16345' } }, + }; + return { evidence: structuredClone(evidence), expected: structuredClone(expected) }; +} + +function result(change) { + const { evidence, expected } = fixture(); + change?.(evidence, expected); + return validateReleaseEvidence(evidence, expected); +} + +test('accepts only the reviewed local scope and keeps release readiness blocked', () => { + expect(result()).toEqual({ + schema: 1, + localEvidence: 'PASS', + exitCode: 0, + releaseReady: false, + sharedTarget: { status: 'UNAVAILABLE', owner: 'PER-16345' }, + incomplete: [], + failures: [], + }); +}); + +test.each([ + ['root', (v) => v], + ['artifact', (v) => v.artifact], + ['sdk', (v) => v.sdk], + ['inventory', (v) => v.inventory], + ['method', (v) => v.inventory.methods[0]], + ['operation', (v) => v.inventory.operations[0]], + ['run', (v) => v.runs[0]], + ['PDP', (v) => v.runs[0].pdp], + ['phase', (v) => v.runs[0].phaseResults[0]], + ['case', (v) => v.runs[0].caseResults[0]], + ['cleanup', (v) => v.runs[0].cleanup], + ['A/B', (v) => v.ab], + ['baseline', (v) => v.ab.baseline], + ['comparison', (v) => v.ab.cases[0]], + ['difference', (v) => v.ab.intentionalDifferences[0]], + ['gates', (v) => v.gates], + ['shared target', (v) => v.gates.sharedTarget], +])('rejects undeclared private metadata at %s', (_name, pick) => { + const report = result((v) => { + pick(v).internalMetadata = 'must not be published'; + }); + expect(report.exitCode).toBe(2); + expect(JSON.stringify(report)).not.toContain('must not be published'); +}); + +test.each([ + [ + 'wrong archive', + (v) => { + v.artifact.sha256 = baselineHash; + }, + ], + [ + 'wrong file count', + (v) => { + v.artifact.fileCount++; + }, + ], + [ + 'wrong consumer lock', + (v) => { + v.artifact.lockSha256 = baselineHash; + }, + ], + [ + 'wrong source tree', + (v) => { + v.sdk.tree = '0'.repeat(40); + }, + ], + [ + 'wrong inventory hash', + (v) => { + v.sdk.inventorySha256 = baselineHash; + }, + ], + [ + 'same-version development baseline', + (v) => { + v.ab.baseline.sha256 = candidateHash; + }, + ], + [ + 'wrong baseline integrity', + (v) => { + v.ab.baseline.integrity = `sha512-${'B'.repeat(86)}==`; + }, + ], + [ + 'baseline used for candidate cell', + (v) => { + v.runs[1].artifactSha256 = baselineHash; + }, + ], + [ + 'unknown artifact', + (v) => { + v.runs[1].artifactSha256 = '2'.repeat(64); + }, + ], + [ + 'removed inventory method', + (v) => { + v.inventory.methods.pop(); + }, + ], + [ + 'removed deferred operation', + (v) => { + v.inventory.operations.pop(); + }, + ], + [ + 'changed source decision', + (v) => { + v.inventory.operations[0].decision = 'defer'; + }, + ], + [ + 'unreviewed case', + (v) => { + v.runs[1].caseResults[0].id = 'invented.case'; + }, + ], + [ + 'invented route credit', + (v) => { + v.runs[1].caseResults[0].operationKeys = []; + }, + ], + [ + 'invented method credit', + (v) => { + v.runs[1].caseResults[0].methodNames = []; + }, + ], + [ + 'weaker evidence level', + (v) => { + v.runs[1].caseResults[0].level = 'wire'; + }, + ], + [ + 'missing phase link', + (v) => { + v.runs[1].caseResults[0].phaseId = 'missing.phase'; + }, + ], + [ + 'missing case links', + (v) => { + v.inventory.methods[0].caseIds = []; + }, + ], + [ + 'invented adoption', + (v) => { + v.gates.sharedTarget.status = 'ADOPTED'; + }, + ], +])('returns INVALID for %s', (_name, change) => { + expect(result(change)).toMatchObject({ exitCode: 2, releaseReady: false }); +}); + +test.each([ + [ + 'missing floor', + (v) => { + v.runs.splice(2); + v.ab.cases.splice(1); + }, + ], + [ + 'missing current PDP', + (v) => { + v.runs.forEach((run) => { + run.pdp.roles = ['pinned']; + }); + }, + ], + [ + 'unreviewed current patch', + (v) => { + v.runs[0].node = '24.1.0'; + }, + ], + [ + 'wrong PDP bytes', + (v) => { + v.runs[0].pdp.digest = `sha256:${baselineHash}`; + }, + ], + [ + 'undated current image', + (v) => { + v.runs[0].pdp.resolvedAt = ''; + }, + ], + [ + 'invalid date', + (v) => { + v.runs[0].pdp.resolvedAt = '2026-02-30'; + }, + ], + [ + 'offline service evidence', + (v) => { + v.runs[0].target = 'offline'; + }, + ], + [ + 'missing execution', + (v) => { + v.runs[0].caseResults = []; + }, + ], + [ + 'phase counts alone', + (v) => { + v.runs.forEach((run) => { + run.caseResults = []; + }); + }, + ], + [ + 'zero-assertion case', + (v) => { + v.runs[0].caseResults[0].assertions = 0; + }, + ], + [ + 'zero-assertion phase', + (v) => { + v.runs[0].phaseResults[0].assertions = 0; + }, + ], + [ + 'zero-assertion comparison', + (v) => { + v.ab.cases[0].assertions = 0; + }, + ], + [ + 'missing A/B', + (v) => { + v.ab.cases = []; + }, + ], + [ + 'A/B runtime mismatch', + (v) => { + v.ab.cases[0].baselineRunId = 'baseline-24.0.0'; + }, + ], + [ + 'setup error', + (v) => { + v.runs[0].setupErrorCount++; + }, + ], + [ + 'cleanup error', + (v) => { + v.runs[0].cleanupErrorCount++; + }, + ], + [ + 'unverified cleanup', + (v) => { + v.runs[0].cleanup.verified--; + }, + ], + [ + 'unexecuted cleanup', + (v) => { + v.runs[0].cleanup.completed--; + }, + ], + [ + 'unreachable backend', + (v) => { + v.runs[0].phaseResults[0].status = 'INVALID'; + }, + ], + [ + 'not run', + (v) => { + v.runs[0].caseResults[0].status = 'NOT_RUN'; + }, + ], + [ + 'duplicate run', + (v) => { + v.runs.push(structuredClone(v.runs[0])); + }, + ], + [ + 'duplicate case', + (v) => { + v.runs[0].caseResults.push(structuredClone(v.runs[0].caseResults[0])); + }, + ], + [ + 'negative assertions', + (v) => { + v.runs[0].caseResults[0].assertions = -1; + }, + ], + [ + 'fractional assertions', + (v) => { + v.runs[0].caseResults[0].assertions = 1.2; + }, + ], + [ + 'unsafe integer', + (v) => { + v.runs[0].cleanup.registered = Number.MAX_SAFE_INTEGER + 1; + }, + ], +])('cannot pass with %s', (_name, change) => { + expect(result(change)).toMatchObject({ exitCode: 2, releaseReady: false }); +}); + +test('retains actual failures and gives incomplete cleanup precedence', () => { + const { evidence, expected } = fixture(); + evidence.runs[1].phaseResults[0].status = 'FAILED'; + evidence.runs[1].caseResults[0].status = 'FAILED'; + evidence.ab.cases[0].status = 'FAILED'; + expect(validateReleaseEvidence(evidence, expected)).toMatchObject({ + exitCode: 1, + localEvidence: 'FAIL', + failures: expect.arrayContaining(['ab.cases[0]']), + }); + evidence.runs[1].cleanup.verified = 0; + expect(validateReleaseEvidence(evidence, expected)).toMatchObject({ + exitCode: 2, + failures: expect.arrayContaining(['ab.cases[0]']), + }); +}); + +test('requires mapping for every method and retained operation without erasing gaps', () => { + const report = result((v, expected) => { + expected.methodLevels['permit.api.users.get'] = 'wire'; + for (const inventory of [v.inventory, expected.inventory]) { + inventory.methods.push({ name: 'permit.api.users.get', caseIds: [] }); + inventory.operations.push({ + source: 'pdp-container', + method: 'GET', + path: '/unproven', + decision: 'retain', + caseIds: [], + }); + } + v.sdk.inventorySha256 = digest(canonicalReleaseInventory(v.inventory)); + }); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toEqual( + expect.arrayContaining([ + 'No reviewed case for permit.api.users.get.', + 'No reviewed case for pdp-container GET /unproven.', + ]), + ); +}); + +test('extracts all actual SDK/source entries with case-independent hashing', async () => { + const result = await expectedReleaseInventory(resolve(import.meta.dirname, '..')); + expect(result.inventory.methods).toHaveLength(180); + expect( + result.inventory.methods.filter((method) => method.name.startsWith('permit.api.userInvites.')), + ).toHaveLength(6); + const attributes = result.inventory.methods.filter((method) => + method.name.startsWith('permit.api.userAttributes.'), + ); + const plan = JSON.parse( + readFileSync(resolve(import.meta.dirname, '../api-coverage/release-matrix.json'), 'utf8'), + ); + expect(attributes.map((method) => method.name)).toEqual( + ['create', 'delete', 'get', 'list', 'update'].map( + (method) => `permit.api.userAttributes.${method}`, + ), + ); + for (const method of attributes) { + const name = method.name.split('.').at(-1); + expect( + plan.cases + .filter((entry) => entry.methodNames.includes(method.name)) + .map((entry) => entry.id) + .sort(), + ).toEqual( + [ + `wire.api.userAttributes.${name}.esm`, + `wire.api.userAttributes.${name}.commonjs`, + `api.user-attributes.${name}`, + 'api.user-attributes.access', + ].sort(), + ); + } + const bulkName = 'permit.api.roles.bulkCreateOrReplace'; + expect(result.inventory.methods.filter((method) => method.name === bulkName)).toHaveLength(1); + const bulkCases = plan.cases.filter((entry) => entry.methodNames.includes(bulkName)); + expect(bulkCases.map((entry) => entry.id).sort()).toEqual([ + 'api.bulk-roles.create-replace', + 'api.bulk-roles.scope', + 'wire.api.roles.bulkCreateOrReplace.commonjs', + 'wire.api.roles.bulkCreateOrReplace.esm', + ]); + expect(bulkCases.map((entry) => entry.level).sort()).toEqual(['api', 'api', 'wire', 'wire']); + for (const entry of bulkCases) + expect(entry.operationKeys).toEqual([ + 'control-plane PUT /v2/schema/{proj_id}/{env_id}/bulk/roles', + ]); + const localName = 'permit.getLocalRoleAssignments'; + expect(result.inventory.methods.filter((method) => method.name === localName)).toHaveLength(1); + const localCases = plan.cases.filter((entry) => entry.methodNames.includes(localName)); + expect(localCases.map((entry) => entry.id).sort()).toEqual([ + 'commonjs.mock-pdp.local-role-assignments-errors', + 'commonjs.mock-pdp.local-role-assignments-invalid', + 'mock-pdp.local-role-assignments-errors', + 'mock-pdp.local-role-assignments-invalid', + 'pdp.local-role-assignments-filters-pagination', + 'pdp.local-role-assignments-removal', + 'wire.permit.getLocalRoleAssignments.commonjs', + 'wire.permit.getLocalRoleAssignments.esm', + ]); + expect(localCases.map((entry) => entry.level).sort()).toEqual([ + 'mock-pdp', + 'mock-pdp', + 'mock-pdp', + 'mock-pdp', + 'pdp', + 'pdp', + 'wire', + 'wire', + ]); + for (const entry of localCases) + expect(entry.operationKeys).toEqual(['pdp-container GET /local/role_assignments']); + expect(result.inventory.operations).toHaveLength(307); + expect(result.inventorySha256).toBe(digest(canonicalReleaseInventory(result.inventory))); + const changed = structuredClone(result.inventory); + changed.methods.reverse(); + changed.operations.reverse(); + changed.methods[0].caseIds = ['new.case']; + expect(digest(canonicalReleaseInventory(changed))).toBe(result.inventorySha256); +}, 20_000); + +test('retains later reported failures even when an earlier binding is invalid', () => { + const report = result((v) => { + v.artifact.sha256 = baselineHash; + v.runs[3].phaseResults[0].status = 'FAILED'; + v.runs[3].caseResults[0].status = 'FAILED'; + v.ab.cases[1].status = 'FAILED'; + }); + expect(report.exitCode).toBe(2); + expect(report.failures).toEqual([ + 'runs[3].phaseResults[0]', + 'runs[3].caseResults[0]', + 'ab.cases[1]', + ]); +}); + +test.each(['run', 'phase', 'case', 'ab'])('does not publish rejected %s labels', (kind) => { + const secret = 'private-secret-that-must-never-be-published'; + const report = result((v) => { + if (kind === 'run') v.runs[0].id = secret; + else if (kind === 'phase') v.runs[0].phaseResults[0].id = secret; + else if (kind === 'case') v.runs[0].caseResults[0].id = secret; + else v.ab.cases[0].id = secret; + }); + expect(report.exitCode).toBe(2); + expect(JSON.stringify(report)).not.toContain(secret); +}); + +test('does not turn a single phase assertion into several independently passing cases', () => { + const report = result((v, expected) => { + const extra = { ...sharedCase, id: 'api.another-observation' }; + expected.requirements.cases.push(extra); + for (const row of v.inventory.methods) row.caseIds.push(extra.id); + v.inventory.operations[0].caseIds.push(extra.id); + v.runs[1].caseResults.push({ ...extra, phaseId: 'api.users', status: 'PASSED', assertions: 8 }); + }); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toContain('Case assertions exceed the containing phase.'); +}); + +test('requires existing phase evidence even when newly mapped cases are present', () => { + const report = result((_v, expected) => { + expected.requirements.phaseIds.push('pdp.existing-control'); + }); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toContain('Missing phase pdp.existing-control: Node 22.13.0/pinned.'); +}); + +test('package presence assertions cannot replace HTTP behavior evidence', () => { + const report = result((v, expected) => { + expected.requirements.cases[0].level = 'package'; + for (const run of v.runs) { + run.caseResults[0].level = 'package'; + run.phaseResults[0].kind = 'package'; + } + }); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toContain('No reviewed case for permit.api.users.create.'); +}); + +test.each(['empty phases', 'empty runs', 'missing floor', 'unmapped AB'])( + 'does not accept an accidentally reduced reviewed policy: %s', + (change) => { + const report = result((_v, expected) => { + if (change === 'empty phases') expected.requirements.phaseIds = []; + else if (change === 'empty runs') expected.requirements.runIds = []; + else if (change === 'missing floor') expected.requirements.nodes = ['22.13.0']; + else expected.requirements.abCaseIds = ['missing.case']; + }); + expect(report.exitCode).toBe(2); + }, +); + +test('the committed plan preserves missing source-addition proof', async () => { + const root = resolve(import.meta.dirname, '..'); + const actual = await expectedReleaseInventory(root); + const plan = JSON.parse(readFileSync(resolve(root, 'api-coverage/release-matrix.json'), 'utf8')); + const { evidence, expected } = fixture(); + expected.inventory = actual.inventory; + expected.methodLevels = actual.methodLevels; + expected.requirements = plan; + evidence.inventory = structuredClone(actual.inventory); + for (const row of evidence.inventory.methods) + row.caseIds = plan.cases + .filter((entry) => entry.methodNames.includes(row.name)) + .map((entry) => entry.id); + for (const row of evidence.inventory.operations) { + const key = `${row.source} ${row.method} ${row.path}`; + row.caseIds = plan.cases + .filter((entry) => entry.operationKeys.includes(key)) + .map((entry) => entry.id); + } + evidence.sdk.inventorySha256 = actual.inventorySha256; + evidence.runs = []; + evidence.ab.cases = []; + evidence.ab.intentionalDifferences = plan.intentionalDifferences; + const report = validateReleaseEvidence(evidence, expected); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toContain( + 'Missing case api.async-copy.new-target: Node 22.13.0/pinned.', + ); + expect(report.incomplete).toContain('Missing local candidate cell: Node 24.21.0/current.'); + expect(report.incomplete.some((message) => message.startsWith('Missing case '))).toBe(true); + expect(evidence.inventory.methods).toHaveLength(180); + expect(evidence.inventory.operations).toHaveLength(307); +}, 20_000); + +test.each(['23.0.0', '25.0.0', '26.11.0', '27.0.0'])( + 'accepts complete reviewed evidence on supported later Node %s', + (node) => { + const { evidence, expected } = fixture(['22.13.0', '24.0.0', node]); + expect(validateReleaseEvidence(evidence, expected).exitCode).toBe(0); + }, +); + +test.each([ + '20.0.0', + '22.12.9', + '22.13.0-rc.1', + '26.11.0-rc.1', + '26.11.0+build', + '026.11.0', + '26.11', + '9007199254740993.0.0', +])('rejects unsupported or noncanonical Node identities: %s', (node) => { + const { evidence, expected } = fixture(['22.13.0', '24.0.0', node]); + expect(validateReleaseEvidence(evidence, expected).exitCode).toBe(2); + evidence.runs = evidence.runs.filter((run) => run.node !== node); + expect(validateReleaseEvidence(evidence, expected).exitCode).toBe(2); +}); + +test('requires complete execution evidence in the current Node 26 cell', () => { + const { evidence, expected } = fixture(['22.13.0', '24.0.0', '26.11.0']); + evidence.runs = evidence.runs.filter((run) => run.node !== '26.11.0'); + const report = validateReleaseEvidence(evidence, expected); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toContain('Missing local candidate cell: Node 26.11.0/current.'); +}); + +test('the real matrix accepts reviewed capability phases without granting fixture setup case credit', async () => { + const root = resolve(import.meta.dirname, '..'); + const actual = await expectedReleaseInventory(root); + const plan = JSON.parse(readFileSync(resolve(root, 'api-coverage/release-matrix.json'), 'utf8')); + const urlPhases = [ + ['api.url-check-owned-fixtures', 'api'], + ['mock-pdp.url-check-contract', 'mock-pdp'], + ['mock-pdp.url-check-inputs', 'mock-pdp'], + ['mock-pdp.url-check-errors', 'mock-pdp'], + ['commonjs.mock-pdp.url-check-contract', 'mock-pdp'], + ['commonjs.mock-pdp.url-check-inputs', 'mock-pdp'], + ['commonjs.mock-pdp.url-check-errors', 'mock-pdp'], + ['pdp.url-check-mapped-allow-and-deny', 'pdp'], + ['pdp.url-check-mapping-removal', 'pdp'], + ]; + expect( + plan.cases + .filter((entry) => entry.methodNames.includes('permit.checkUrl')) + .map((entry) => entry.id) + .sort(), + ).toEqual( + [ + 'wire.checkUrl.esm', + 'wire.checkUrl.commonjs', + ...urlPhases.filter(([, kind]) => kind !== 'api').map(([id]) => id), + ].sort(), + ); + const localRolePhases = [ + ['wire.local-role-assignments-contract', 'wire'], + ['mock-pdp.local-role-assignments-invalid', 'mock-pdp'], + ['mock-pdp.local-role-assignments-errors', 'mock-pdp'], + ['commonjs.wire.local-role-assignments-contract', 'wire'], + ['commonjs.mock-pdp.local-role-assignments-invalid', 'mock-pdp'], + ['commonjs.mock-pdp.local-role-assignments-errors', 'mock-pdp'], + ['api.local-role-assignments-owned-fixtures', 'api'], + ['pdp.local-role-assignments-filters-pagination', 'pdp'], + ['pdp.local-role-assignments-removal', 'pdp'], + ]; + expect( + plan.cases + .filter((entry) => entry.methodNames.includes('permit.getLocalRoleAssignments')) + .map((entry) => entry.id) + .sort(), + ).toEqual( + [ + 'wire.permit.getLocalRoleAssignments.esm', + 'wire.permit.getLocalRoleAssignments.commonjs', + ...localRolePhases + .filter(([, kind]) => kind === 'mock-pdp' || kind === 'pdp') + .map(([id]) => id), + ].sort(), + ); + const proxyPhases = [ + ['wire.proxy-configs.esm', 'wire'], + ['wire.proxy-configs.commonjs', 'wire'], + ['api.proxy-configs-owned-fixtures', 'api'], + ['api.proxy-configs-lifecycle', 'api'], + ]; + const apiKeyPhases = [ + ['wire.api-keys.esm', 'wire'], + ['wire.api-keys.commonjs', 'wire'], + ['api.api-keys-lifecycle', 'api'], + ]; + const auditPhases = [ + ['wire.audit-logs.esm', 'wire'], + ['wire.audit-logs.commonjs', 'wire'], + ['api.audit-logs-owned-fixtures', 'api'], + ['pdp.audit-logs-decisions', 'pdp'], + ['api.audit-logs-ingestion-list', 'api'], + ['api.audit-logs-ingestion-detail', 'api'], + ]; + const asyncPhases = [ + ['wire.async-copy.esm', 'wire'], + ['wire.async-copy.commonjs', 'wire'], + ['api.async-copy-owned-fixtures', 'api'], + ['api.async-copy.new-target', 'api'], + ['api.async-copy.existing-target', 'api'], + ]; + const capabilityPhases = [ + ...urlPhases, + ...localRolePhases, + ...proxyPhases, + ...apiKeyPhases, + ...auditPhases, + ...asyncPhases, + ]; + const phaseForWireCase = { + 'wire.api.environments.copyAsync.esm': 'wire.async-copy.esm', + 'wire.api.environments.copyAsync.commonjs': 'wire.async-copy.commonjs', + 'wire.api.environments.getCopyResult.esm': 'wire.async-copy.esm', + 'wire.api.environments.getCopyResult.commonjs': 'wire.async-copy.commonjs', + 'wire.checkUrl.esm': 'release.wire.enforcement.esm', + 'wire.checkUrl.commonjs': 'release.wire.enforcement.commonjs', + 'wire.permit.getLocalRoleAssignments.esm': 'wire.local-role-assignments-contract', + 'wire.permit.getLocalRoleAssignments.commonjs': 'commonjs.wire.local-role-assignments-contract', + }; + const phaseForLevel = { + package: 'release.package.clone-helpers', + wire: 'release.wire.observed.esm', + 'mock-pdp': 'mock-pdp.decisions-and-context', + api: 'api.core-roundtrip', + pdp: 'pdp.rbac-grant-and-tenant-boundary', + }; + const { evidence, expected } = fixture(); + expected.inventory = actual.inventory; + expected.methodLevels = actual.methodLevels; + expected.requirements = plan; + evidence.inventory = structuredClone(actual.inventory); + for (const row of evidence.inventory.methods) + row.caseIds = plan.cases + .filter((entry) => entry.methodNames.includes(row.name)) + .map((entry) => entry.id); + for (const row of evidence.inventory.operations) + row.caseIds = plan.cases + .filter((entry) => entry.operationKeys.includes(`${row.source} ${row.method} ${row.path}`)) + .map((entry) => entry.id); + evidence.sdk.inventorySha256 = actual.inventorySha256; + evidence.ab.intentionalDifferences = plan.intentionalDifferences; + evidence.runs = plan.nodes.flatMap((node) => + ['baseline', 'candidate'].map((role) => { + const caseResults = plan.cases + .filter((entry) => role === 'candidate' || plan.abCaseIds.includes(entry.id)) + .map((entry) => ({ + ...entry, + phaseId: capabilityPhases.some(([id]) => id === entry.id) + ? entry.id + : entry.id.startsWith('wire.api.auditLogs.') + ? `wire.audit-logs.${entry.id.endsWith('.commonjs') ? 'commonjs' : 'esm'}` + : entry.id.startsWith('api.audit-logs-') + ? entry.id + : entry.id.startsWith('wire.api.apiKeys.') + ? `wire.api-keys.${entry.id.endsWith('.commonjs') ? 'commonjs' : 'esm'}` + : entry.id.startsWith('api.api-keys.') + ? 'api.api-keys-lifecycle' + : entry.id.startsWith('wire.api.proxyConfigs.') + ? `wire.proxy-configs.${entry.id.endsWith('.commonjs') ? 'commonjs' : 'esm'}` + : entry.id.startsWith('api.proxy-configs.') + ? 'api.proxy-configs-lifecycle' + : (phaseForWireCase[entry.id] ?? phaseForLevel[entry.level]), + status: 'PASSED', + assertions: 1, + })); + const phaseIds = + role === 'candidate' + ? [...new Set([...plan.phaseIds, ...capabilityPhases.map(([id]) => id)])] + : [...new Set(caseResults.map((entry) => entry.phaseId))]; + return { + ...fixture().evidence.runs[0], + id: `${role}.local.node${node}`, + node, + artifactSha256: role === 'candidate' ? candidateHash : baselineHash, + pdp: { + digest: plan.pdps[0].digest, + resolvedAt: plan.pdps[0].resolvedAt, + roles: ['pinned', 'current'], + }, + phaseResults: phaseIds.map((id) => ({ + id, + kind: + capabilityPhases.find(([name]) => name === id)?.[1] ?? + caseResults.find((entry) => entry.phaseId === id)?.level ?? + 'package', + status: 'PASSED', + assertions: Math.max(1, caseResults.filter((entry) => entry.phaseId === id).length), + })), + caseResults, + }; + }), + ); + evidence.ab.cases = plan.nodes.flatMap((node) => + plan.abCaseIds.map((id) => ({ + id, + baselineRunId: `baseline.local.node${node}`, + candidateRunId: `candidate.local.node${node}`, + status: 'PASSED', + assertions: 1, + })), + ); + const report = validateReleaseEvidence(evidence, expected); + expect(report.exitCode).toBe(2); + expect(report.incomplete).toHaveLength(4); + expect(report.incomplete.every((message) => message.startsWith('No reviewed case for '))).toBe( + true, + ); + expect(report.failures).toEqual([]); + expect(report.releaseReady).toBe(false); + expect(plan.cases.some((entry) => entry.id === 'api.url-check-owned-fixtures')).toBe(false); + expect(plan.cases.some((entry) => entry.id === 'api.local-role-assignments-owned-fixtures')).toBe( + false, + ); + expect(plan.cases.some((entry) => entry.id === 'api.proxy-configs-owned-fixtures')).toBe(false); + expect(plan.cases.some((entry) => entry.id === 'api.audit-logs-owned-fixtures')).toBe(false); + expect(plan.cases.some((entry) => entry.id === 'pdp.audit-logs-decisions')).toBe(false); + expect(plan.cases.some((entry) => entry.id === 'api.async-copy-owned-fixtures')).toBe(false); + const fixtureOnly = structuredClone(evidence); + for (const run of fixtureOnly.runs) { + run.caseResults = run.caseResults.filter((entry) => !entry.id.startsWith('api.async-copy.')); + } + const fixtureReport = validateReleaseEvidence(fixtureOnly, expected); + expect(fixtureReport.exitCode).toBe(2); + expect(fixtureReport.incomplete).toContain( + 'Missing case api.async-copy.new-target: Node 22.13.0/pinned.', + ); + + for (const [id] of capabilityPhases) { + const unregistered = structuredClone(expected); + unregistered.requirements.phaseIds = plan.phaseIds.filter((name) => name !== id); + expect(validateReleaseEvidence(evidence, unregistered).incomplete).toEqual([ + 'Unreviewed phase ID.', + ]); + const unexecuted = structuredClone(evidence); + for (const run of unexecuted.runs) { + run.phaseResults = run.phaseResults.filter((phase) => phase.id !== id); + run.caseResults = run.caseResults.filter((entry) => entry.phaseId !== id); + } + const missing = validateReleaseEvidence(unexecuted, expected); + expect(missing.exitCode).toBe(2); + expect(missing.incomplete).toContain(`Missing phase ${id}: Node 22.13.0/pinned.`); + } + const unknown = structuredClone(evidence); + unknown.runs[0].phaseResults.push({ + id: 'api.unreviewed-url-phase', + kind: 'api', + status: 'PASSED', + assertions: 1, + }); + const rejected = validateReleaseEvidence(unknown, expected); + expect(rejected.exitCode).toBe(2); + expect(rejected.incomplete).toEqual(['Unreviewed phase ID.']); + expect(JSON.stringify(rejected)).not.toContain('api.unreviewed-url-phase'); +}, 20_000); diff --git a/scripts/release-gates.test.mjs b/scripts/release-gates.test.mjs new file mode 100644 index 00000000..b0c29eb3 --- /dev/null +++ b/scripts/release-gates.test.mjs @@ -0,0 +1,106 @@ +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { expect, onTestFinished, test } from 'vitest'; +import { checkGateResults } from '#scripts/check-release-gates.mjs'; +import { validateReviewedVersion } from '#scripts/check-release-tag.mjs'; +import { publicationBlockers } from '#scripts/check-publication-readiness.mjs'; + +const names = [ + 'lint', + 'types', + 'docs', + 'unit', + 'workflow-validation', + 'codegen-guard', + 'build-candidate', + 'packed-consumers', + 'dependency-security', +]; +const good = () => Object.fromEntries(names.map((name) => [name, { result: 'success' }])); + +test('actual candidate dependencies require docs before archive and aggregate success', () => { + const workflow = readFileSync('.github/workflows/release-candidate.yaml', 'utf8'); + const ready = workflow.slice(workflow.indexOf(' candidate-ready:')); + const dependencies = ready + .match(/needs:\s*\[([^\]]+)\]/)[1] + .split(',') + .map((name) => name.trim()) + .filter(Boolean); + const results = Object.fromEntries(dependencies.map((name) => [name, { result: 'success' }])); + expect(() => checkGateResults(results, 'candidate')).not.toThrow(); + results['docs'] = { result: 'skipped' }; + expect(() => checkGateResults(results, 'candidate')).toThrow('docs'); + const build = workflow.slice(workflow.indexOf(' build-candidate:')); + expect( + build + .match(/needs:\s*\[([^\]]+)\]/)[1] + .split(',') + .map((name) => name.trim()), + ).toContain('docs'); +}); + +test('quality can pass while publication acceptance remains unavailable', () => { + expect(() => checkGateResults(good(), 'candidate')).not.toThrow(); + expect(() => + checkGateResults( + { candidate: { result: 'success' }, 'publication-acceptance': { result: 'failure' } }, + 'publication', + ), + ).toThrow('did not succeed'); + expect(publicationBlockers().join(' ')).toContain('PER-16345'); + expect(publicationBlockers().join(' ')).toContain('PER-16574'); +}); + +for (const name of names) { + test.each(['failure', 'skipped', 'cancelled', undefined])('%s cannot pass ' + name, (result) => { + const results = good(); + results[name] = { result }; + expect(() => checkGateResults(results, 'candidate')).toThrow(name); + }); + test(`a missing ${name} cannot pass`, () => { + const results = good(); + delete results[name]; + expect(() => checkGateResults(results, 'candidate')).toThrow('Missing'); + }); +} + +test.each([null, [], {}, { unexpected: { result: 'success' } }])( + 'rejects malformed job evidence', + (value) => expect(() => checkGateResults(value, 'candidate')).toThrow(), +); + +test.each(['3.0.0', 'v3.0.0', 'v3.0.0+reviewed'])('permits reviewed tag %s', (tag) => { + expect(validateReviewedVersion({ version: '3.0.0', tag, prerelease: 'false' })).toBe('3.0.0'); +}); + +test.each(['v2.7.7', 'v3.0.1', 'minor', 'v3.0.0$(touch injected)', 'v3.0.0-rc.1'])( + 'rejects tag %s before any version mutation', + (tag) => { + expect(() => validateReviewedVersion({ version: '3.0.0', tag, prerelease: 'false' })).toThrow(); + }, +); + +test('prerelease flag must match the already reviewed version', () => { + expect(() => + validateReviewedVersion({ version: '3.0.0', tag: 'v3.0.0', prerelease: 'true' }), + ).toThrow('prerelease'); + expect(() => + validateReviewedVersion({ version: '3.0.0-rc.1', tag: 'v3.0.0-rc.1', prerelease: 'false' }), + ).toThrow('prerelease'); + expect( + validateReviewedVersion({ version: '3.0.0-rc.1', tag: 'v3.0.0-rc.1', prerelease: 'true' }), + ).toBe('3.0.0-rc.1'); + expect(validateReviewedVersion({ version: '3.0.0' })).toBe('3.0.0'); + expect(() => validateReviewedVersion({ version: 'v3.0.0' })).toThrow('normalized'); +}); + +test('changing an unavailable label cannot fabricate accepted publication evidence', () => { + const root = mkdtempSync(join(tmpdir(), 'permit-readiness-')); + onTestFinished(() => rmSync(root, { recursive: true, force: true })); + mkdirSync(join(root, 'api-coverage')); + const sources = JSON.parse(readFileSync('api-coverage/sources.json', 'utf8')); + sources.unmeasuredCapabilities.sharedTarget.status = 'ADOPTED'; + writeFileSync(join(root, 'api-coverage/sources.json'), JSON.stringify(sources)); + expect(publicationBlockers(root).join(' ')).toContain('reviewed acceptance contract'); +}); diff --git a/scripts/run-tests.mjs b/scripts/run-tests.mjs new file mode 100644 index 00000000..ac461528 --- /dev/null +++ b/scripts/run-tests.mjs @@ -0,0 +1,90 @@ +import { spawn } from 'node:child_process'; +import { mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { discoverTestFiles, evaluateTestReport } from '#scripts/test-report.mjs'; + +const root = dirname(dirname(fileURLToPath(import.meta.url))); +const selections = { + offline: ['unit', 'module-imports'], + verify: ['unit', 'module-imports', 'codegen'], + unit: ['unit'], + coverage: ['unit'], + 'module-imports': ['module-imports'], + codegen: ['codegen'], + integration: ['integration'], + e2e: ['e2e'], +}; +const selection = process.argv[2]; +const projects = Object.hasOwn(selections, selection) ? selections[selection] : undefined; +if (!projects || process.argv.length !== 3) { + throw new Error(`Usage: node scripts/run-tests.mjs ${Object.keys(selections).join('|')}`); +} +const output = join(root, '.test-results'); +mkdirSync(output, { recursive: true }); +const reportPath = join(output, `${selection}.json`); +const summaryPath = join(output, `${selection}-summary.json`); +for (const path of [reportPath, summaryPath]) { + try { + unlinkSync(path); + } catch (error) { + if (error.code !== 'ENOENT') throw error; + } +} + +function saveSummary(summary) { + writeFileSync(summaryPath, `${JSON.stringify(summary, null, 2)}\n`); + console.log(JSON.stringify(summary, null, 2)); +} + +if (projects.some((project) => ['integration', 'e2e'].includes(project))) { + if (!process.env['PDP_API_KEY']?.trim()) { + saveSummary({ + status: 'UNAVAILABLE', + executed: 0, + reason: 'PDP_API_KEY is not set; backend tests were not started', + }); + process.exitCode = 2; + } +} +if (!process.exitCode) { + const expectedFiles = discoverTestFiles(root, projects); + const child = spawn( + process.execPath, + [ + join(root, 'node_modules/vitest/vitest.mjs'), + 'run', + ...projects.flatMap((project) => ['--project', project]), + ...(selection === 'coverage' ? ['--coverage'] : []), + '--reporter=default', + '--reporter=json', + `--outputFile=${reportPath}`, + ], + { cwd: root, stdio: 'inherit' }, + ); + const exit = await new Promise((resolve, reject) => { + child.once('error', reject); + child.once('exit', (code, signal) => resolve({ code, signal })); + }); + let summary; + try { + summary = evaluateTestReport(JSON.parse(readFileSync(reportPath, 'utf8')), { + root, + expectedFiles, + env: process.env, + }); + } catch (error) { + summary = { + status: 'FAIL', + executed: 0, + errors: [`Native report unavailable: ${error.message}`], + }; + } + if (exit.code !== 0 || exit.signal) { + summary.status = 'FAIL'; + summary.errors.push(`Vitest exited with ${exit.signal ?? exit.code}`); + } + saveSummary(summary); + process.exitCode = summary.status === 'FAIL' ? 1 : 0; +} diff --git a/scripts/set-release-version.mjs b/scripts/set-release-version.mjs new file mode 100644 index 00000000..243e7cdb --- /dev/null +++ b/scripts/set-release-version.mjs @@ -0,0 +1,38 @@ +import { spawnSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; +import { isDeepStrictEqual } from 'node:util'; + +import semver from 'semver'; +import { validateReviewedVersion } from '#scripts/check-release-tag.mjs'; + +const tag = process.env['RELEASE_TAG']; +const version = semver.valid(tag); +if (!version) { + console.error('Release tag', JSON.stringify(tag), 'is not a valid semantic version'); + process.exitCode = 1; +} else { + const before = JSON.parse(readFileSync('package.json', 'utf8')); + validateReviewedVersion({ + version: before.version, + tag, + prerelease: process.env['IS_PRERELEASE'], + }); + const result = spawnSync( + 'npm', + ['version', tag, '--no-git-tag-version', '--allow-same-version', '--ignore-scripts'], + { stdio: 'inherit' }, + ); + if (result.error) throw new Error('Could not run npm version.', { cause: result.error }); + if (result.status !== 0) { + process.exitCode = result.status ?? 1; + } else { + const after = JSON.parse(readFileSync('package.json', 'utf8')); + if (after.version !== version) { + console.error('Version mismatch: expected', version, 'got', after.version); + process.exitCode = 1; + } else if (!isDeepStrictEqual(after, { ...before, version })) { + console.error('npm version changed package metadata beyond the release version.'); + process.exitCode = 1; + } + } +} diff --git a/scripts/test-report.mjs b/scripts/test-report.mjs new file mode 100644 index 00000000..4ecb39ee --- /dev/null +++ b/scripts/test-report.mjs @@ -0,0 +1,166 @@ +import { readdirSync } from 'node:fs'; +import { join, relative } from 'node:path'; + +const optionalScopes = [ + { + title: 'environment creation with org level api key', + variable: 'ORG_PDP_API_KEY', + level: 'ORGANIZATION_LEVEL_API_KEY', + }, + { + title: 'environment creation with project level api key', + variable: 'PROJECT_PDP_API_KEY', + level: 'PROJECT_LEVEL_API_KEY', + }, +]; + +/** Discovers the current configured suites without fixing their test counts. */ +export function discoverTestFiles(root, projects) { + const files = []; + function visit(directory) { + for (const entry of readdirSync(join(root, directory), { withFileTypes: true })) { + const path = `${directory}/${entry.name}`; + if (entry.isDirectory()) visit(path); + else files.push(path); + } + } + visit('src'); + visit('scripts'); + return Object.fromEntries( + projects.map((project) => [ + project, + files.filter((file) => { + switch (project) { + case 'unit': + return ( + (file.startsWith('src/tests/unit/') && file.endsWith('.spec.ts')) || + (file.startsWith('src/') && file.endsWith('.test.ts')) + ); + case 'module-imports': + return file.startsWith('src/tests/module-imports/') && file.endsWith('.spec.ts'); + case 'integration': + return file.startsWith('src/tests/endpoints/') && file.endsWith('.spec.ts'); + case 'e2e': + return file.startsWith('src/tests/e2e/') && file.endsWith('.spec.ts'); + case 'codegen': + return ( + file === 'scripts/check-codegen.spec.mjs' || /^scripts\/[^/]+\.test\.mjs$/.test(file) + ); + default: + throw new Error(`Unknown test project: ${project}`); + } + }), + ]), + ); +} + +function allowedSkip(file, test, env) { + if ( + test.fullName !== test.title || + !Array.isArray(test.ancestorTitles) || + test.ancestorTitles.length !== 0 + ) { + return undefined; + } + let reason; + let status = 'UNAVAILABLE'; + if (file === 'src/tests/endpoints/test-environments.spec.ts') { + const scope = optionalScopes.find((entry) => entry.title === test.title); + if (scope && !env[scope.variable]?.trim()) { + reason = `${scope.variable} is not set; ${scope.level} coverage unavailable`; + } + } + if ( + file === 'src/tests/e2e/condition-sets.e2e.spec.ts' && + test.title === 'ABAC decisions (pending PER-16553)' + ) { + reason = 'PER-16553: condition-set policy does not reliably reach the PDP'; + status = 'BLOCKED'; + } + if ( + file === 'src/tests/e2e/rbac.e2e.spec.ts' && + test.title === 'useOpa checks go to OPA directly (PERMIT_RUN_OPA_E2E=true)' && + env['PERMIT_RUN_OPA_E2E'] !== 'true' + ) { + reason = 'PERMIT_RUN_OPA_E2E is not true; direct OPA coverage unavailable'; + } + return reason && test.meta?.coverageUnavailable === reason + ? { file, test: test.title, status, reason } + : undefined; +} + +/** + * Checks a native Vitest JSON report for actual execution and explicitly named limitations. + * Missing files, empty reports, unexpected skips and inconsistent counts fail the gate. + */ +export function evaluateTestReport(report, { root, expectedFiles, env = {} }) { + const errors = []; + const limitations = []; + const executedByProject = Object.fromEntries(Object.keys(expectedFiles).map((name) => [name, 0])); + let executed = 0; + let total = 0; + let skipped = 0; + const seen = new Set(); + const approvedSkips = new Set(); + const required = new Set(Object.values(expectedFiles).flat()); + if (!report || report.success !== true || !Array.isArray(report.testResults)) { + errors.push('Missing or unsuccessful native Vitest report'); + } + for (const result of Array.isArray(report?.testResults) ? report.testResults : []) { + if (typeof result.name !== 'string' || !Array.isArray(result.assertionResults)) { + errors.push('Malformed test file result'); + continue; + } + const file = relative(root, result.name).replaceAll('\\', '/'); + if (!required.has(file) || seen.has(file)) + errors.push(`Unexpected or duplicate test file: ${file}`); + seen.add(file); + if (result.status !== 'passed') errors.push(`Test file did not pass: ${file}`); + if (result.assertionResults.length === 0) errors.push(`No tests collected in ${file}`); + const project = Object.keys(expectedFiles).find((name) => expectedFiles[name].includes(file)); + for (const test of result.assertionResults) { + total++; + if (test.status === 'passed') { + executed++; + if (project) executedByProject[project]++; + } else if (test.status === 'skipped') { + skipped++; + const limitation = allowedSkip(file, test, env); + const identity = `${file}: ${test.fullName}`; + if (!limitation) errors.push(`Unexpected or unreasoned skip: ${identity}`); + else if (approvedSkips.has(identity)) errors.push(`Duplicate approved skip: ${identity}`); + else { + approvedSkips.add(identity); + limitations.push(limitation); + } + } else { + errors.push(`Test did not execute successfully: ${file}: ${test.title} (${test.status})`); + } + } + } + for (const file of required) { + if (!seen.has(file)) errors.push(`Missing test file: ${file}`); + } + for (const [project, count] of Object.entries(executedByProject)) { + if (count === 0) errors.push(`No tests executed in ${project}`); + } + if (executed === 0) errors.push('No tests executed'); + if ( + report?.numTotalTests !== total || + report?.numPassedTests !== executed || + report?.numPendingTests !== skipped || + report?.numFailedTests !== 0 || + report?.numTodoTests !== 0 || + report?.numFailedTestSuites !== 0 || + report?.numPendingTestSuites !== 0 + ) { + errors.push('Native report counts are missing or inconsistent'); + } + return { + status: errors.length ? 'FAIL' : limitations.length ? 'PARTIAL' : 'PASS', + executed, + executedByProject, + limitations, + errors, + }; +} diff --git a/scripts/test-report.test.mjs b/scripts/test-report.test.mjs new file mode 100644 index 00000000..9da19481 --- /dev/null +++ b/scripts/test-report.test.mjs @@ -0,0 +1,279 @@ +import { spawnSync } from 'node:child_process'; +import { + mkdtempSync, + readFileSync, + rmdirSync, + symlinkSync, + unlinkSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { expect, onTestFinished, test } from 'vitest'; + +import { evaluateTestReport } from '#scripts/test-report.mjs'; + +const root = dirname(dirname(fileURLToPath(import.meta.url))); +const boundary = 'src/api/http-boundary.test.ts'; +const scopeFile = 'src/tests/endpoints/test-environments.spec.ts'; +const scopeTitle = 'environment creation with org level api key'; +const scopeReason = 'ORG_PDP_API_KEY is not set; ORGANIZATION_LEVEL_API_KEY coverage unavailable'; + +function result(file, assertions) { + return { + name: join(root, file), + status: 'passed', + assertionResults: assertions.map((assertion) => ({ + meta: {}, + ancestorTitles: [], + fullName: assertion.title, + ...assertion, + })), + }; +} + +function report(results) { + const tests = results.flatMap((entry) => entry.assertionResults); + return { + success: true, + numTotalTests: tests.length, + numPassedTests: tests.filter((entry) => entry.status === 'passed').length, + numFailedTests: tests.filter((entry) => entry.status === 'failed').length, + numPendingTests: tests.filter((entry) => entry.status === 'skipped').length, + numTodoTests: 0, + numFailedTestSuites: 0, + numPendingTestSuites: 0, + testResults: results, + }; +} + +function evaluate(raw, expectedFiles = { unit: [boundary] }, env = {}) { + return evaluateTestReport(raw, { root, expectedFiles, env }); +} + +test('accepts executed tests without fixing the total count', () => { + for (const count of [1, 7]) { + const raw = report([ + result( + boundary, + Array.from({ length: count }, (_, index) => ({ + title: `boundary ${index}`, + status: 'passed', + })), + ), + ]); + expect(evaluate(raw)).toMatchObject({ status: 'PASS', executed: count, errors: [] }); + } +}); + +test.each([ + ['missing', undefined], + ['empty', report([])], + ['unsuccessful', { ...report([]), success: false }], + ['no assertions', report([result(boundary, [])])], + ['missing counts', { success: true, testResults: [result(boundary, [])] }], +])('rejects %s native reports', (_name, raw) => { + expect(evaluate(raw).status).toBe('FAIL'); +}); + +test.each(['failed', 'pending', 'todo', 'disabled', 'skipped'])( + 'rejects unexpected %s tests', + (status) => { + const raw = report([result(boundary, [{ title: 'boundary', status }])]); + expect(evaluate(raw).status).toBe('FAIL'); + }, +); + +test('requires each selected project and its files to execute', () => { + const raw = report([result(boundary, [{ title: 'boundary', status: 'passed' }])]); + const expected = { unit: [boundary], 'module-imports': ['src/tests/module-imports/cjs.spec.ts'] }; + expect(evaluate(raw, expected).errors).toEqual( + expect.arrayContaining([ + 'Missing test file: src/tests/module-imports/cjs.spec.ts', + 'No tests executed in module-imports', + ]), + ); +}); + +test('rejects duplicate files and inconsistent native counts', () => { + const file = result(boundary, [{ title: 'boundary', status: 'passed' }]); + expect(evaluate(report([file, file])).status).toBe('FAIL'); + expect(evaluate({ ...report([file]), numPassedTests: 2 }).status).toBe('FAIL'); +}); + +test('reports an absent optional scope as UNAVAILABLE alongside actual execution', () => { + const raw = report([ + result(boundary, [{ title: 'boundary', status: 'passed' }]), + result(scopeFile, [ + { + title: scopeTitle, + status: 'skipped', + meta: { + coverageUnavailable: scopeReason, + }, + }, + ]), + ]); + const summary = evaluate(raw, { integration: [boundary, scopeFile] }); + expect(summary).toMatchObject({ status: 'PARTIAL', executed: 1, errors: [] }); + expect(summary.limitations).toStrictEqual([ + { file: scopeFile, test: scopeTitle, status: 'UNAVAILABLE', reason: scopeReason }, + ]); +}); + +test('rejects all-skipped projects even when every skip has a known reason', () => { + const raw = report([ + result(scopeFile, [ + { + title: scopeTitle, + status: 'skipped', + meta: { + coverageUnavailable: scopeReason, + }, + }, + ]), + ]); + expect(evaluate(raw, { integration: [scopeFile] }).status).toBe('FAIL'); +}); + +test.each([ + [ + 'nested suite', + { ancestorTitles: ['unapproved suite'], fullName: `unapproved suite ${scopeTitle}` }, + ], + ['missing ancestors', { ancestorTitles: undefined }], + ['missing full name', { fullName: undefined }], + ['inconsistent full name', { fullName: `another ${scopeTitle}` }], +])('rejects an approved leaf title with %s', (_name, qualification) => { + const raw = report([ + result(scopeFile, [ + { title: 'executed control', status: 'passed' }, + { + title: scopeTitle, + status: 'skipped', + meta: { coverageUnavailable: scopeReason }, + ...qualification, + }, + ]), + ]); + expect(evaluate(raw, { integration: [scopeFile] }).status).toBe('FAIL'); +}); + +test('rejects repeated approved omissions despite actual execution', () => { + const skip = { + title: scopeTitle, + status: 'skipped', + meta: { coverageUnavailable: scopeReason }, + }; + const raw = report([ + result(scopeFile, [{ title: 'executed control', status: 'passed' }, skip, skip]), + ]); + const summary = evaluate(raw, { integration: [scopeFile] }); + expect(summary.status).toBe('FAIL'); + expect(summary.errors).toContain(`Duplicate approved skip: ${scopeFile}: ${scopeTitle}`); + expect(summary.limitations).toHaveLength(1); +}); + +test.each([ + ['wrong file', boundary, scopeTitle, scopeReason, {}], + ['wrong title', scopeFile, 'another scope', scopeReason, {}], + ['missing reason', scopeFile, scopeTitle, undefined, {}], + ['wrong reason', scopeFile, scopeTitle, 'network failed', {}], + ['supplied key', scopeFile, scopeTitle, scopeReason, { ORG_PDP_API_KEY: 'supplied-key' }], +])('rejects optional skips with %s', (_name, file, title, reason, env) => { + const raw = report([ + result(boundary, [{ title: 'executed boundary', status: 'passed' }]), + result(file, [{ title, status: 'skipped', meta: { coverageUnavailable: reason } }]), + ]); + expect(evaluate(raw, { integration: [...new Set([boundary, file])] }, env).status).toBe('FAIL'); +}); + +test('keeps PER-16553 blocked and OPA availability distinct from passed coverage', () => { + const abac = 'src/tests/e2e/condition-sets.e2e.spec.ts'; + const rbac = 'src/tests/e2e/rbac.e2e.spec.ts'; + const raw = report([ + result(abac, [ + { title: 'condition set persistence', status: 'passed' }, + { + title: 'ABAC decisions (pending PER-16553)', + status: 'skipped', + meta: { + coverageUnavailable: 'PER-16553: condition-set policy does not reliably reach the PDP', + }, + }, + ]), + result(rbac, [ + { + title: 'useOpa checks go to OPA directly (PERMIT_RUN_OPA_E2E=true)', + status: 'skipped', + meta: { + coverageUnavailable: 'PERMIT_RUN_OPA_E2E is not true; direct OPA coverage unavailable', + }, + }, + ]), + ]); + const expected = { e2e: [abac, rbac] }; + expect(evaluate(raw, expected).limitations.map((entry) => entry.status)).toStrictEqual([ + 'BLOCKED', + 'UNAVAILABLE', + ]); + expect(evaluate(raw, expected, { PERMIT_RUN_OPA_E2E: 'true' }).status).toBe('FAIL'); +}); + +test('missing primary credentials exit nonzero without starting any backend tests', () => { + const env = { ...process.env }; + delete env['PDP_API_KEY']; + const run = spawnSync(process.execPath, ['scripts/run-tests.mjs', 'integration'], { + cwd: root, + env, + encoding: 'utf8', + timeout: 10_000, + }); + expect(run.status, run.stderr).toBe(2); + expect(JSON.parse(run.stdout)).toMatchObject({ status: 'UNAVAILABLE', executed: 0 }); + expect(run.stdout).not.toContain('RUN '); +}); + +test('uses the real pinned JSON reporter metadata and skip status', () => { + const directory = mkdtempSync(join(tmpdir(), 'permit-report-')); + onTestFinished(() => { + for (const file of ['node_modules', 'vitest.config.mjs', 'report.test.mjs', 'report.json']) { + unlinkSync(join(directory, file)); + } + rmdirSync(directory); + }); + symlinkSync(join(root, 'node_modules'), join(directory, 'node_modules'), 'dir'); + writeFileSync( + join(directory, 'vitest.config.mjs'), + "export default { test: { include: ['*.test.mjs'] } };\n", + ); + writeFileSync( + join(directory, 'report.test.mjs'), + ` +import { test, expect } from 'vitest'; +test('executed', () => expect(1).toBe(1)); +test.skip('known limitation', { meta: { coverageUnavailable: 'known reason' } }, () => {}); +`, + ); + const output = join(directory, 'report.json'); + const run = spawnSync( + process.execPath, + [ + join(root, 'node_modules/vitest/vitest.mjs'), + 'run', + '--reporter=json', + `--outputFile=${output}`, + '--maxWorkers=1', + ], + { cwd: directory, encoding: 'utf8', timeout: 15_000 }, + ); + expect(run.status, run.stderr).toBe(0); + const native = JSON.parse(readFileSync(output, 'utf8')); + expect(native).toMatchObject({ success: true, numPassedTests: 1, numPendingTests: 1 }); + expect(native.testResults[0].assertionResults[1]).toMatchObject({ + status: 'skipped', + meta: { coverageUnavailable: 'known reason' }, + }); +}); diff --git a/skills/permit-node-3-migration/.gitignore b/skills/permit-node-3-migration/.gitignore new file mode 100644 index 00000000..c07ea0f3 --- /dev/null +++ b/skills/permit-node-3-migration/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +pnpm-lock.yaml diff --git a/skills/permit-node-3-migration/SKILL.md b/skills/permit-node-3-migration/SKILL.md new file mode 100644 index 00000000..a99b1ce8 --- /dev/null +++ b/skills/permit-node-3-migration/SKILL.md @@ -0,0 +1,72 @@ +--- +name: permit-node-3-migration +description: >- + Migrate applications from Permit Node SDK 2.x to 3.0. Use for permitio major-version upgrades, + removed flat API calls, grouped return changes, constructor/error/OPA behavior, and migration + readiness reviews in JavaScript or TypeScript. Includes a read-only compiler-based scanner. +--- + +# Permit Node SDK 3.0 migration + +Read `references/changes.md` before editing. Its stable IDs identify required migrations, semantic +reviews, retained behavior and additions. The candidate package identifies itself as 3.0.0 and +remains unpublished; confirm the official release before changing production requirements. + +## Establish scope + +Inspect the customer's installed version, package/lock/runtime pins, Permit imports, constructor +options, grouped/flat calls, results, errors, transport hooks and authorization tests. Use Node +`>=22.13.0`, including later major versions. Keep CJS and ESM as appropriate. Follow the customer's +repository instructions and existing authorization. Use supported grouped APIs; do not introduce +compatibility shims or new public context APIs. + +## Install the scanner prerequisite + +The copied skill directory is self-contained. Its manifest/lock explicitly pin TypeScript 6.0.3 +for the JavaScript compiler API and semver 7.8.5 for runtime range validation. These are customer +tool dependencies, not Permit runtime dependencies. The scanner does not use the customer's +TypeScript, semver or the SDK workspace's compiler tools. Install only these locked prerequisites +with lifecycle scripts disabled. Installation needs registry access; scanning does not. The SDK +package includes this directory; copy it to your agent's skills directory first. +For Codex, use `$CODEX_HOME/skills/permit-node-3-migration` (usually `~/.codex/skills/...`). + +```bash +set -euo pipefail +PERMIT_MIGRATION_SKILL=/absolute/path/to/permit-node-3-migration +cp "$PERMIT_MIGRATION_SKILL/compiler-lock.yaml" "$PERMIT_MIGRATION_SKILL/pnpm-lock.yaml" +pnpm --dir "$PERMIT_MIGRATION_SKILL" audit --audit-level=moderate +pnpm --dir "$PERMIT_MIGRATION_SKILL" install --frozen-lockfile --ignore-scripts +node "$PERMIT_MIGRATION_SKILL/scripts/scan.mjs" /absolute/path/to/customer-project +``` + +The scanner prints JSON. Exit 0 means complete declared coverage with no recognized findings; +exit 1 means complete coverage with findings; exit 2 means incomplete coverage, even with findings. +These statuses do not certify semantic migration. A missing compiler is an installation failure, +not a clean scan. It never executes customer code, package scripts, configuration modules, target +dependencies, network calls or writes. Dependency/build/Git exclusions are listed; symlinks are not +followed. Unsupported Vue/Svelte/Astro sources, parse/read errors, escaped/broken links or zero +supported source files make coverage incomplete. See the report's limitations and excluded paths. + +The shipped `compiler-lock.yaml` is copied to pnpm's expected filename because package packing +omits pnpm-lock.yaml. These prerequisite writes happen inside the copied skill, not the target. + +## Migrate and validate + +1. Resolve INCOMPLETE inputs or document their uncovered scope explicitly. Trace imports and client + provenance; do not rename unrelated or shadowed objects merely because they have similar names. +2. Apply A1's 29 grouped replacements within the authorized migration. Preserve receiver binding + with closures. Review A3 results, T1 tenant/model data, and T2 bulk persistence expectations. +3. Review F1/F2 ownership, E1/E2 errors/logging, and W1–W6 policy, hooks, wire and + retry semantics. REVIEW_REQUIRED findings need source inspection and focused behavioral tests, + not guessed automated replacements. Clarify business intent only when it cannot be inferred. +4. Regenerate the application lock for the actual available release, compile its real CJS/ESM + consumer code, and test meaningful request/auth/query/body behavior. Use permitted test fixtures; + do not run a production write or publish a release as part of a migration scan. +5. Rerun the scanner and repository checks. Report applied IDs, tests, remaining review findings, + incomplete coverage and external/manual checks separately. A clean syntax scan alone is not + migration readiness. New N1–N3 capabilities are optional additions, not compulsory rewrites. + +The scanner recognizes supported source syntax, local aliases/destructuring and SDK-typed/direct +clients. Dynamic/reassigned/escaped values require review. External module indirection, environment +values, policy correctness, OPA transformations, live results and every downstream result consumer +remain manual review. Keep errors actionable and do not hide skipped or unavailable verification. diff --git a/skills/permit-node-3-migration/compiler-lock.yaml b/skills/permit-node-3-migration/compiler-lock.yaml new file mode 100644 index 00000000..4e6087a7 --- /dev/null +++ b/skills/permit-node-3-migration/compiler-lock.yaml @@ -0,0 +1,237 @@ +--- +lockfileVersion: '9.0' + +importers: + .: + configDependencies: {} + packageManagerDependencies: + pnpm: + specifier: 12.8.1 + version: 12.8.1 + +packages: + '@pnpm/exe.android-arm64@12.8.1': + resolution: + { + integrity: sha512-siDxcidfz5eM6L2tJfik+i2bbUEw8UC7MZ3Yl2HYdRmqbdhHGAOQACtOOu6QVW4Jul4/w5wVKm+wM8ACtgh1Pg==, + } + cpu: [arm64] + os: [android] + + '@pnpm/exe.android-x64@12.8.1': + resolution: + { + integrity: sha512-0F/uqPRc3aN4vLHsa0f+6fTtmsigFQ9/yxEU43fionF//pNHEd5e97b3w/nKIgqYMCUQCJphmBRMA9Q8/wlo9Q==, + } + cpu: [x64] + os: [android] + + '@pnpm/exe.darwin-arm64@12.8.1': + resolution: + { + integrity: sha512-/rwavvMQJsl2RIxOHBnDF+4Gk+fhQFAY4M3PQZoKskJOEnaJcygG9p1xby6wcQcbS4d9dIubv09CQhufTgfmpw==, + } + cpu: [arm64] + os: [darwin] + + '@pnpm/exe.darwin-x64@12.8.1': + resolution: + { + integrity: sha512-htYt2gN7zqJKLhC99Ft6EUiO7myjZAZXfmGCTJUL1v+o7vE9hZdE1+fAkk4Oj1ZHNRti6b2woOxEkRkAusi8OQ==, + } + cpu: [x64] + os: [darwin] + + '@pnpm/exe.freebsd-x64@12.8.1': + resolution: + { + integrity: sha512-PB5BULNgytxvExoOXUUeseS/DcpPENs+cg3iA6xHHeaLT4ctEGKSGXEbuj7USeqvo8JBpAx039hivnbzGqDwnA==, + } + cpu: [x64] + os: [freebsd] + + '@pnpm/exe.linux-arm64-musl@12.8.1': + resolution: + { + integrity: sha512-kKeyC/ArjrgdciQRBrOL0j9HtOI4gDRgoyP+eJ1CQKyadpKlf/DhDDyspXe07R3B9KagTVLUF2nlt6Dr5quFIg==, + } + cpu: [arm64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-arm64@12.8.1': + resolution: + { + integrity: sha512-q4s9a9X2O3N9aeUFooW24orNrxvu20+jyVUFR5RanPCqOKKPBrgs2iywMkBBx1aXkkzdWT54/mfz8Be8sJlWEw==, + } + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-ppc64@12.8.1': + resolution: + { + integrity: sha512-F7XSjKJthwCh/L6abZiMpAfo2Cm61SZIT3e4dfgiIjESndlWaXCnfLKngSgZ/SEMsdmHT6dud3+kWIB3tw0/xQ==, + } + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-riscv64@12.8.1': + resolution: + { + integrity: sha512-z1ecpIK/ZY08Unk69KWWE9867oaKUytGUjrHnBoGFAAhsK+q+0cfvBH+f5fWobJ7FX97leMlLO+gkJolddM45Q==, + } + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-s390x@12.8.1': + resolution: + { + integrity: sha512-KU6tnrBfu4uKXTq6N5qJwSm8FSrs9Wc8b5AUEsHK9bRXwNdsZ1/lRxG1++X29SKRW9OSNuDSjxASv5mAvGo1gA==, + } + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-x64-musl@12.8.1': + resolution: + { + integrity: sha512-eUE8BWJkDr2tJb/yrk0yVnszlmNqFarVxUlqiZ9BAkct28Nq/5g2H0tvMDmPA7fAQW3STNj+omJPPRVT+4s5sQ==, + } + cpu: [x64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-x64@12.8.1': + resolution: + { + integrity: sha512-8bDZ0lZlCdi2rvnFul7EYgcC7zKeWSe76y8JV2oXobaS8p9i9d6PSf6LgLtTM0fI7R9Oh4eLCbveXyNDMmvZ+g==, + } + cpu: [x64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.win32-arm64@12.8.1': + resolution: + { + integrity: sha512-MsT0dlrRxnCRCHCaosNbhWpEiAFnFuMEu3KuDJDU41BXgTwiINxU8goloUSUDejWZUqKaUqNC/qUTihl9nFtqg==, + } + cpu: [arm64] + os: [win32] + + '@pnpm/exe.win32-x64@12.8.1': + resolution: + { + integrity: sha512-SWtPe0PsbTTk//gJND10tMdOfCYjrkq5+qV49hzVhY7xz2iJ339Rc+xwASlcvbwTfrvH39YNqpKYibD+CRGLwA==, + } + cpu: [x64] + os: [win32] + + pnpm@12.8.1: + resolution: + { + integrity: sha512-9kupB1B/XOr+BsjTjmBS0BeURFgOwSed3Vv8EctIqoomRLZlmOB+dh2oSHKp/FfV+QK4f6SdAkGY1VhhKqu+RQ==, + } + engines: { node: '>=18.*' } + hasBin: true + +snapshots: + '@pnpm/exe.android-arm64@12.8.1': + optional: true + + '@pnpm/exe.android-x64@12.8.1': + optional: true + + '@pnpm/exe.darwin-arm64@12.8.1': + optional: true + + '@pnpm/exe.darwin-x64@12.8.1': + optional: true + + '@pnpm/exe.freebsd-x64@12.8.1': + optional: true + + '@pnpm/exe.linux-arm64-musl@12.8.1': + optional: true + + '@pnpm/exe.linux-arm64@12.8.1': + optional: true + + '@pnpm/exe.linux-ppc64@12.8.1': + optional: true + + '@pnpm/exe.linux-riscv64@12.8.1': + optional: true + + '@pnpm/exe.linux-s390x@12.8.1': + optional: true + + '@pnpm/exe.linux-x64-musl@12.8.1': + optional: true + + '@pnpm/exe.linux-x64@12.8.1': + optional: true + + '@pnpm/exe.win32-arm64@12.8.1': + optional: true + + '@pnpm/exe.win32-x64@12.8.1': + optional: true + + pnpm@12.8.1: + optionalDependencies: + '@pnpm/exe.android-arm64': 12.8.1 + '@pnpm/exe.android-x64': 12.8.1 + '@pnpm/exe.darwin-arm64': 12.8.1 + '@pnpm/exe.darwin-x64': 12.8.1 + '@pnpm/exe.freebsd-x64': 12.8.1 + '@pnpm/exe.linux-arm64': 12.8.1 + '@pnpm/exe.linux-arm64-musl': 12.8.1 + '@pnpm/exe.linux-ppc64': 12.8.1 + '@pnpm/exe.linux-riscv64': 12.8.1 + '@pnpm/exe.linux-s390x': 12.8.1 + '@pnpm/exe.linux-x64': 12.8.1 + '@pnpm/exe.linux-x64-musl': 12.8.1 + '@pnpm/exe.win32-arm64': 12.8.1 + '@pnpm/exe.win32-x64': 12.8.1 + +--- +lockfileVersion: '9.0' + +settings: + autoInstallPeers: false + excludeLinksFromLockfile: false + +importers: + .: + dependencies: + semver: + specifier: 7.8.5 + version: 7.8.5 + typescript: + specifier: 6.0.3 + version: 6.0.3 + +packages: + semver@7.8.5: + resolution: + { + integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==, + } + engines: { node: '>=10' } + hasBin: true + + typescript@6.0.3: + resolution: + { + integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==, + } + engines: { node: '>=14.17' } + hasBin: true + +snapshots: + semver@7.8.5: {} + + typescript@6.0.3: {} diff --git a/skills/permit-node-3-migration/package.json b/skills/permit-node-3-migration/package.json new file mode 100644 index 00000000..3c20985c --- /dev/null +++ b/skills/permit-node-3-migration/package.json @@ -0,0 +1,15 @@ +{ + "name": "permit-node-3-migration", + "version": "0.0.0", + "private": true, + "description": "Read-only Permit Node SDK migration scanner for customer agents", + "type": "module", + "dependencies": { + "semver": "7.8.5", + "typescript": "6.0.3" + }, + "engines": { + "node": ">=22.13.0" + }, + "packageManager": "pnpm@12.8.1" +} diff --git a/skills/permit-node-3-migration/pnpm-workspace.yaml b/skills/permit-node-3-migration/pnpm-workspace.yaml new file mode 100644 index 00000000..e8e99a97 --- /dev/null +++ b/skills/permit-node-3-migration/pnpm-workspace.yaml @@ -0,0 +1,6 @@ +packages: [] +engineStrict: true +ignoreScripts: true +minimumReleaseAge: 1440 +savePrefix: '' +autoInstallPeers: false diff --git a/skills/permit-node-3-migration/references/changes.md b/skills/permit-node-3-migration/references/changes.md new file mode 100644 index 00000000..c55522cf --- /dev/null +++ b/skills/permit-node-3-migration/references/changes.md @@ -0,0 +1,356 @@ +# Migrating to Permit Node SDK 3.0 + +This guide describes the upcoming 3.0 behavior. The reviewed candidate identifies itself as +3.0.0 and remains unpublished. Check the official release before +changing production requirements. Compare your actual installed 2.x version: some fixes were already +present in recent 2.x source. Stable IDs below are shared with the scanner and release notes. + +The inventory compares the official npm 2.7.5 package and the reviewed main source separately. +Published 2.7.5 already had root CJS/ESM exports and the 29 flat methods, but no SDK retry options. +Statements about retained retry or routing behavior refer to reviewed main, not every 2.x release. + +## Upgrade and compatibility + +### P1 — Dependency and lock + +After 3.0 is released, update the direct `permitio` requirement and regenerate the application lock +with your package manager. Check every workspace, deployment image and independent consumer. Review +transitive pins rather than assuming a successful install migrated application behavior. + +### C1 — Supported Node versions + +Use Node `>=22.13.0`, including later major versions. The former `>=10` requirement no longer +applies. Check CI, containers, deployment providers and local pins. Validation retains the 22.13.0 +and 24.0.0 floors and exercises current releases of Node 22, 24 and 26. + +### C2 — Imports and modules + +Both native CommonJS and ES modules remain supported; there is no forced module conversion. +Use `require('permitio')` or `import { Permit } from 'permitio'`. Both loaders expose named exports. +Root-only package exports already existed in 2.x. If you bypassed them with generated/internal file +paths, review those imports: generated files and the physical runtime layout changed. Do not replace +them with another internal path. The historical generated inventory lists removed declarations. + +`ResourceRelationsApi`, `ResourceRolesApi`, `ApiContextLevel` and `PermitContextChangeError` are +now named root exports. Use the grouped clients through `permit.api.resourceRelations` and +`permit.api.resourceRoles`, and use their exported classes for constructor identity checks. + +### C3 — Direct use of former transitive dependencies + +The SDK no longer brings in `@bitauth/libauth`, `path-to-regexp`, `require-in-the-middle` or +`url-parse`. If application code imports these packages, declare and review its own dependencies. +Do not add them back to Permit. Review dependency changes through the application lock and audit. + +## API migration + +### A1 — Flat methods are removed + +The 29 deprecated methods directly under `permit.api` are absent in 3.0. There are no compatibility +shims or warnings that keep them callable. Below, `api` means `permit.api`; supply the corresponding +typed arguments and await calls as before. Read A3 before adapting consumers of returned values. + +| Removed call | Grouped replacement | +| -------------------------------------------- | ------------------------------------------------- | +| `api.listUsers()` | `(await api.users.list()).data` | +| `api.listRoles()` | `api.roles.list()` | +| `api.listConditionSets(type, page, perPage)` | `api.conditionSets.list({ type, page, perPage })` | +| `api.listConditionSetsRules(page, perPage)` | `api.conditionSetRules.list({ page, perPage })` | +| `api.getUser(key)` | `api.users.get(key)` | +| `api.getTenant(key)` | `api.tenants.get(key)` | +| `api.listTenants(page)` | `api.tenants.list({ page })` | +| `api.getRole(key)` | `api.roles.get(key)` | +| `api.getAssignedRoles(user, tenant)` | `api.users.getAssignedRoles({ user, tenant })` | +| `api.createResource(data)` | `api.resources.create(data)` | +| `api.updateResource(key, data)` | `api.resources.update(key, data)` | +| `api.deleteResource(key)` | `api.resources.delete(key)` | +| `api.createUser(data)` | `api.users.create(data)` | +| `api.syncUser(data)` | `(await api.users.sync(data)).user` | +| `api.updateUser(key, data)` | `api.users.update(key, data)` | +| `api.deleteUser(key)` | `api.users.delete(key)` | +| `api.createTenant(data)` | `api.tenants.create(data)` | +| `api.updateTenant(key, data)` | `api.tenants.update(key, data)` | +| `api.deleteTenant(key)` | `api.tenants.delete(key)` | +| `api.createRole(data)` | `api.roles.create(data)` | +| `api.updateRole(key, data)` | `api.roles.update(key, data)` | +| `api.deleteRole(key)` | `api.roles.delete(key)` | +| `api.assignRole(data)` | `api.users.assignRole(data)` | +| `api.unassignRole(data)` | `api.users.unassignRole(data)` | +| `api.createConditionSet(data)` | `api.conditionSets.create(data)` | +| `api.updateConditionSet(key, data)` | `api.conditionSets.update(key, data)` | +| `api.deleteConditionSet(key)` | `api.conditionSets.delete(key)` | +| `api.assignConditionSetRule(data)` | `api.conditionSetRules.create(data)` | +| `api.unassignConditionSetRule(data)` | `api.conditionSetRules.delete(data)` | + +### A2 — Method bag, five legacy exports, and context alias + +Remove `api.getMethods()`. For callbacks keep the grouped method's receiver with a closure, such as +`const getUser = (key: string) => permit.api.users.get(key)`. + +| Removed export | Replacement | +| ---------------------- | ----------------------------------------------------- | +| `DeprecatedApiClient` | `permit.api`, or `ApiClient` for direct construction | +| `IDeprecatedPermitApi` | `IPermitApi` | +| `IDeprecatedReadApis` | The applicable grouped interface, such as `IUsersApi` | +| `IDeprecatedWriteApis` | The applicable grouped interface, such as `IUsersApi` | +| `ContextTransform` | Transform context in application code before the call | + +Use `permit.config.apiContext.permittedAccessLevel` instead of the removed `ApiContext.level`. +There was no public runtime transform registration API. Do not invent a global-context setter or +register an unused transform. Two additional removed root exports are covered under T1. + +### A3 — Returned values and runtime corrections + +- Flat `listUsers()` returned an array; grouped `users.list()` returns a page. Read `page.data`. +- Flat `syncUser()` returned the record; grouped `users.sync()` returns `{ user, created }`. +- Flat `assignConditionSetRule()` returned an array; grouped `conditionSetRules.create()` returns + one record. Existing grouped create already had this shape; it now rejects an empty success body + instead of returning `undefined`. +- Grouped deletes/unassignments are typed `Promise`: use completion, not response body, + status or headers. Only `users.unassignRole()` and `roleAssignments.unassign()` now explicitly + resolve `undefined`; they were declared void in 2.x but returned bodies. Other unchanged void + wrappers can expose empty Axios response text for HTTP 204; do not require identical empty + runtime values or treat them as substantive results. +- Ordinary condition-set, tenant, instance, tuple and resource-relation lists keep their declared + array result, unwrapping a server pagination envelope when required. Do not add `.data` to these + high-level array results. Generated-only clients can have different result unions. + +### A4 — Condition filters + +`conditionSets.list()` accepts optional `{ type, page, perPage }`; no type lists both kinds. +`conditionSetRules.list()` accepts omitted, empty or partial filters. Both default to page 1 and +100 records per page. `permissionKey: 'write'` filters by the action key/ID; rule create/read +permission is canonical `document:write`. The SDK forwards filters unchanged. Do not confuse a +permission's persisted representation with the GET action filter. Use full typed read records. + +## Configuration and errors + +### F1 — Effective constructor validation and logging defaults + +Use `IPermitOptions` for constructor input. Supply a nonempty token without whitespace/control +characters, after `PERMIT_API_KEY` fallback, and absolute HTTP(S) `pdp`/`apiUrl` URLs. Validate +deployment variables before construction. Base URLs cannot contain literal query (`?`) or +fragment (`#`) components, even empty trailing delimiters. Remove those components rather than +expecting the SDK to strip them. Existing path prefixes and encoded path characters such as +`%3F` and `%23` remain supported, including existing environment URL defaults. Logger levels, +booleans, timeout and retry values are checked. Invalid effective options throw `TypeError` +before HTTP, without echoing credentials. +Use complete instances from `axios.create()` and a genuine current-version `ApiContext`, rather +than partial mock objects. Explicit `undefined` is permitted for constructor options. + +Unset `PERMIT_LOG_JSON` now selects JSON lines. Explicit `log.json: false` produced JSON in 2.x +and now selects pretty output. Environment value `false` also selects pretty output; case and +surrounding whitespace are ignored. Update log parsers, or explicitly set `log.json: true`. +Pretty output writes synchronously on the calling thread; blocked stdout can delay the application. +The default JSON output keeps Pino's default destination and is preferred for production collection. +Logs omit raw configuration, credentials, full attributes, request bodies and private errors. + +### F2 — Configuration and API context ownership + +SDK-owned settings and nested log/tenancy/retry options are copied and frozen. Construct a new +client to change token, routes or these settings. The config reference is readonly; do not replace +`permit.config` to rotate settings. Caller Axios instances and callbacks stay live. + +A supplied initial `ApiContext` is validated and copied. Change selection afterward through +`permit.config.apiContext`, within the key's validated scope, once permissions are available. +Mutating the originally supplied context no longer changes this client. Current CJS/ESM contexts +interoperate; an old-version/plain context is not a supported substitute. Concurrent wrappers +share one scope lookup, and a failed lookup allows a later retry. + +### E1 — PDP errors and non-throwing results + +Catch `PermitPDPStatusError` before `PermitConnectionError`: the status class now extends the +connection class. HTTP failures and malformed successful PDP bodies retain the specific status +class with safe `statusCode`/`responseBody`; transport failures have safe cause/code metadata. +Stop matching raw/private error text or assuming raw request/body identity is retained. + +With `throwOnError: false`, check failure returns `false`, bulk failure returns one `false` per +input rather than `[]`, permissions return `{}`, and all-tenants return `[]`. These are denial +fallbacks, not proof a policy denied a healthy request. New discovery exceptions are covered in N3. + +### E2 — REST and scope error snapshots + +`PermitApiError` is named and non-generic. `originalError` is a detached bounded Axios snapshot, +not the caller's thrown object. `request` is `undefined`; response data and formatted error bodies +are `unknown`. Narrow them before reading fields. Use `status`, `code` and safe cause metadata. +Do not rely on sockets, hooks, raw headers/bodies, identity, stacks or private server messages. +Non-Axios adapter/hook failures are normalized too. Scope errors expose safe status/code/cause as +`PermitContextError`. Update log pipelines that relied on raw error or user/resource contents. + +## Wire and enforcement review + +### W1 — Literal and whole-result validation + +Authorization mocks and custom PDPs must return literal booleans. Bulk responses must contain +exactly one valid decision per input, including zero. One malformed member invalidates the whole +bulk, permissions or all-tenant result; no partial allow result is accepted. All-tenant entries +require `allow: true` and a string tenant key. Permission entries validate arrays/details, default +missing permissions/attributes, and omit nullable optional members. Legal own dictionary keys and +additive fields survive. Update truthy/incomplete fixtures and verify the live policy contract. +Sparse bulk slots reject before partial dispatch. `useOpa: true` on bulk/permission queries now +rejects through their configured throw/deny policy instead of being ignored; only check supports it. + +### W2 — OPA request hooks now receive JSON text + +The SDK serializes enforcement bodies before Axios merging to preserve legal `__proto__` and +`constructor` own keys. Supplied OPA interceptors/transforms receive a JSON string, including the +OPA input envelope. Parse/edit/stringify that text if a hook changes it; do not access it as a raw +object. Direct caller requests keep the caller's own shape. Circular/unsupported serialization +inputs produce safe `PermitError` before HTTP, or the operation's configured denial fallback. +Review custom adapters/hooks manually; the scanner cannot prove their transformations correct. + +### W3 — All-tenants requests + +`checkAllTenants(user, action, resource, context?, sdk?)` keeps its public call shape. Its request +sends actual normalized JSON input/context with SDK Authorization/language headers to +`allowed/all-tenants`; these are not misplaced body header/params objects. It parses +`allowed_tenants` and validates every grant. It does not inject the default resource tenant for +an all-tenant query. Update wire mocks and custom proxy expectations; keep authorization semantics. + +### W4 — Retries and shared timeout budget + +Retries are opt-in, as on reviewed main; published 2.7.5 had no SDK retry options. `maxRetries` +counts retries after the initial attempt. SDK REST POST/PATCH +writes are excluded even if listed; cancellation, invalid configuration and a non-boolean custom +predicate are not made safe by a retry condition. PDP/OPA authorization POST can retry when enabled. +Caller-owned retries/redirects remain the caller's responsibility. + +A positive timeout covers failed attempts plus delays; each retry receives the remaining Axios +timeout. Caller adapters must honor it; arbitrary hooks are not interrupted by a wall-clock timer. +Per-call timeout `0` disables that timeout instead of falling through to the configured value. +SDK timeout applies to PDP/OPA; REST/Elements use the caller transport's timeout defaults. + +### W5 — Injected Axios ownership + +REST/Elements use `axiosInstance`; PDP has an internal transport; OPA uses `opaAxiosInstance`. +The SDK no longer registers handlers or rewrites caller defaults. Direct caller requests get no +SDK retries/logging. Current adapters, transforms, interceptors and default headers stay live on +every SDK attempt, including both Axios module entries. Explicit SDK Bearer credentials/routes +prevail over default Basic auth, `baseURL` or `allowAbsoluteUrls: false`. Intentional caller hooks +can still rewrite requests. Review applications relying on old shared-client pollution or doubled +retry policies. Explicit SDK routing precedence is retained from reviewed main. + +### W6 — Context and snapshots + +Per-check context now overrides call context, which overrides existing internal global context. +Review policies or fixtures that depended on per-check context being ignored. Legal own context +keys survive; request inputs are normalized without mutating the caller's resource. Filtering +uses a synchronous object-array snapshot. No new public global context registration API is added. + +## Type review + +### T1 — Removed symbols and generated models + +Replace root `EnvironmentCopyConflictStrategyEnum` with `EnvironmentCopyConflictStrategy`. +Root `Statistics` is removed without a generic substitute. Together with A2, exactly seven root +names were removed from the reviewed main baseline. The generated derivation-settings name becomes +`PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings` and is available from `permitio` +alongside the resource-role method contracts. Other generated-only internal imports need review. +Resource-role and `granted_to` dictionaries use current named models. Review the historical +[generated inventory][inventory] and compile against the final package, not its old counts. + +Required fields include `ResourceInstanceCreate.tenant`, `ResourceInstanceRead.tenant/tenant_id`, +`RoleAssignmentRemove.tenant` and generated-only `UserRoleRemove.tenant`. Supply actual tenants in +typed fixtures. Role inheritance remains optional `string[]`; it is not a new stricter behavior. +Server-generated array/envelope unions and generated removals do not imply backend route removal. + +### T2 — Unspecified bulk results + +`users.bulkUserCreate`, `bulkUserDelete`, `bulkUserReplace`, +`relationshipTuples.bulkRelationshipTuples` and `bulkUnRelationshipTuples` return `object`. +Their old request-payload result types were incorrect. Do not read synthetic counts, operation +arrays or processing reports; verify persisted outcomes through readbacks when needed. + +### T3 — Strict consumer types + +Constructor input is `IPermitOptions`; effective config is readonly `IPermitConfig`. Narrow unknown +error data and shape unions. `roleAssignments.list()` correctly reflects literal, dynamic, optional +and correlated detail/count flags; its existing wire behavior is retained. Prefer `listDetailed()` +when a guaranteed detailed envelope is appropriate. With `exactOptionalPropertyTypes`, omit absent +generated properties instead of explicitly setting `undefined`; constructor options are different. +Downstream projects are not forced to adopt the SDK's compiler flags. Import `CheckConfig`, +`ICheckQuery`, `IUserPermissions` and the named pagination/list result contracts from `permitio` +for explicit call and result annotations. `FormattedAxiosError` describes sanitized REST +diagnostics; its `error` body remains unknown until narrowed. + +## Additions, not compulsory replacements + +### N1 — Groups + +Eight GA Groups wrappers preserve full envelopes and typed key/ID behavior. Group-to-group routes +remain deferred. Adopt these operations only when needed; they are not replacements for every role. + +### N2 — Membership, detailed reads and refresh + +`tenants.addUser()` creates a new user; an existing user is a duplicate error, not a generic +membership association. Three `listDetailed()` methods preserve their full detailed envelopes. +These operations always use the control plane even with facts proxying or waitForSync enabled. +`pdps.refresh({ reason })` is an environment refresh acknowledgement, not reload completion or an +individual-PDP refresh API. Do not treat acknowledgements as synchronization guarantees. + +### N3 — Permission context, discovery and filtering + +Permission context uses the fifth `getUserPermissions()` config argument. `getAuthorizedUsers()` +returns a validated full envelope for container/cloud PDP contracts. `getUserTenants()` is container +role-derived tenant discovery, not general membership or a cloud endpoint. An unavailable 404 always +rejects with actionable status, including non-throwing mode. New discovery/filter `useOpa` always +rejects. Other operational failures follow their documented error policy: normalized empty +authorized-user envelope, or empty tenant/filter arrays in non-throwing mode. + +`filterObjects()` evaluates one dense readonly array through bulk decisions, preserving original +identity, order and duplicates. Only known resource fields are dispatched. Object request context +overrides call context; extra application fields remain in returned objects only. Empty inputs do +not bypass unsupported-option validation. URL checks and AuthZEN remain deferred. + +## What scanning cannot certify + +The read-only scanner identifies supported syntax and local Permit binding provenance. A COMPLETE +report means traversal/parsing completed for declared supported inputs, not that an application is +semantically migrated. Always review constructor environment values, authorization policy/results, +OPA hooks, error/log consumers, returned values, generated types, timeouts and external code. +REVIEW_REQUIRED marks unresolved/dynamic/escaped SDK sites. INCOMPLETE records parse/read failures, +unsupported wrappers, escaped/broken symlinks or zero supported sources. Exclusions are listed. +The scanner never executes target code, scripts, configuration modules or target dependencies. + +[inventory]: https://github.com/permitio/permit-node/blob/90b49a1878f0/openapi/MIGRATION.md + +## Complete migrated consumer + +Both entry styles are supported. Validate the effective token; this example performs only a read. +The environment key selects its scope automatically. Broader keys need an allowed environment +selection through `permit.config.apiContext` after scope initialization. + +```ts +import { Permit, PermitApiError } from 'permitio'; + +async function listUsers() { + const token = process.env['PERMIT_API_KEY']; + if (!token || /[\s\p{Cc}]/u.test(token)) { + throw new Error('Set PERMIT_API_KEY to a nonempty whitespace-free API key.'); + } + const permit = new Permit({ token }); + try { + const page = await permit.api.users.list({ page: 1, perPage: 20 }); + return page.data; + } catch (error: unknown) { + if (error instanceof PermitApiError) { + console.error('Permit users read failed', { status: error.status, code: error.code }); + } + throw error; + } +} + +void listUsers(); +``` + +For CommonJS, use `const { Permit, PermitApiError } = require('permitio')` and the same grouped +calls. Strict CJS/ESM fixtures and private loopback tests validate the packed entries. + +## Migrate with an agent + +The package contains [the customer migration skill](../SKILL.md). +Copy the whole `skills/permit-node-3-migration` directory from the package into your agent's skill +directory. Install its locked compiler prerequisite with pnpm and lifecycle scripts disabled, +as described in SKILL.md; then run its read-only scanner against the application directory. +Review the stable IDs above alongside the scanner's findings and coverage limitations. The scanner +does not perform edits, network calls or execute application code. A clean scan does not replace +policy, transport, generated-type and real consumer verification. diff --git a/skills/permit-node-3-migration/scripts/scan.mjs b/skills/permit-node-3-migration/scripts/scan.mjs new file mode 100644 index 00000000..084b95be --- /dev/null +++ b/skills/permit-node-3-migration/scripts/scan.mjs @@ -0,0 +1,890 @@ +import { lstat, readdir, readFile, realpath } from 'node:fs/promises'; +import { dirname, extname, isAbsolute, join, relative, resolve, sep } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import ts from 'typescript'; +import { minVersion, satisfies, subset, valid, validRange } from 'semver'; + +const FLAT = { + listUsers: '(await api.users.list()).data', + listRoles: 'api.roles.list()', + listConditionSets: 'api.conditionSets.list({ type, page, perPage })', + listConditionSetsRules: 'api.conditionSetRules.list({ page, perPage })', + getUser: 'api.users.get(key)', + getTenant: 'api.tenants.get(key)', + listTenants: 'api.tenants.list({ page })', + getRole: 'api.roles.get(key)', + getAssignedRoles: 'api.users.getAssignedRoles({ user, tenant })', + createResource: 'api.resources.create(data)', + updateResource: 'api.resources.update(key, data)', + deleteResource: 'api.resources.delete(key)', + createUser: 'api.users.create(data)', + syncUser: '(await api.users.sync(data)).user', + updateUser: 'api.users.update(key, data)', + deleteUser: 'api.users.delete(key)', + createTenant: 'api.tenants.create(data)', + updateTenant: 'api.tenants.update(key, data)', + deleteTenant: 'api.tenants.delete(key)', + createRole: 'api.roles.create(data)', + updateRole: 'api.roles.update(key, data)', + deleteRole: 'api.roles.delete(key)', + assignRole: 'api.users.assignRole(data)', + unassignRole: 'api.users.unassignRole(data)', + createConditionSet: 'api.conditionSets.create(data)', + updateConditionSet: 'api.conditionSets.update(key, data)', + deleteConditionSet: 'api.conditionSets.delete(key)', + assignConditionSetRule: 'api.conditionSetRules.create(data)', + unassignConditionSetRule: 'api.conditionSetRules.delete(data)', +}; +const REMOVED = new Set([ + 'DeprecatedApiClient', + 'IDeprecatedPermitApi', + 'IDeprecatedReadApis', + 'IDeprecatedWriteApis', + 'ContextTransform', +]); +const GROUPS = new Set([ + 'users', + 'tenants', + 'roles', + 'resources', + 'conditionSets', + 'conditionSetRules', + 'roleAssignments', + 'resourceInstances', + 'relationshipTuples', + 'resourceRelations', + 'resourceActions', + 'actionGroups', + 'resourceAttributes', + 'resourceRoles', + 'groups', + 'pdps', + 'projects', + 'environments', +]); +const SOURCE = new Set(['.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs', '.mts', '.cts']); +const WRAPPERS = new Set(['.vue', '.svelte', '.astro']); +const EXCLUDED = new Set(['node_modules', '.git', 'build', 'dist', 'coverage', '.next']); +const RESULTS = { + 'users.list': 'page', + 'users.sync': 'sync', + 'users.unassignRole': 'void', + 'roleAssignments.unassign': 'void', + 'conditionSetRules.create': 'rule', + 'users.bulkUserCreate': 'bulk', + 'users.bulkUserDelete': 'bulk', + 'users.bulkUserReplace': 'bulk', + 'relationshipTuples.bulkRelationshipTuples': 'bulk', + 'relationshipTuples.bulkUnRelationshipTuples': 'bulk', +}; + +function sdkPath(path) { + return path === 'permitio' || path?.startsWith('permitio/'); +} + +function literal(node) { + return node && (ts.isStringLiteralLike(node) || ts.isNumericLiteral(node)) + ? node.text + : undefined; +} + +function member(node) { + if (ts.isPropertyAccessExpression(node)) return node.name.text; + if (ts.isElementAccessExpression(node)) return literal(node.argumentExpression); + return undefined; +} + +function imported(name) { + if (['Permit', 'default', 'IPermitClient'].includes(name)) return 'client-type'; + if (['ApiClient', 'DeprecatedApiClient', 'IPermitApi', ...REMOVED].includes(name)) { + return name === 'ContextTransform' ? 'removed-type' : 'api-type'; + } + if (name === 'ApiContext') return 'context-type'; + if (['IPermitConfig', 'IPermitOptions'].includes(name)) return 'config-type'; + if (['PermitApiError', 'PermitContextError', 'PermitConnectionError'].includes(name)) { + return 'error-type'; + } + return undefined; +} + +function property(origin, key) { + if (!origin) return undefined; + if (origin === 'module') return imported(key); + if (origin === 'client') { + if (key === 'api') return 'api'; + if (key === 'config') return 'config'; + return `client-method:${key}`; + } + if (origin === 'api') return GROUPS.has(key) ? `group:${key}` : `flat:${key}`; + if (origin === 'config' && key === 'apiContext') return 'context'; + if (origin === 'config' && ['log', 'multiTenancy', 'retry', 'pdpRetry'].includes(key)) { + return 'settings'; + } + if (origin === 'settings') return 'settings'; + if (origin.startsWith('group:')) return `method:${origin.slice(6)}.${key}`; + if ( + origin === 'error' && + ['response', 'originalError', 'request', 'formattedAxiosError'].includes(key) + ) + return 'error'; + return undefined; +} + +function sdkHandle(origin) { + return ( + ['module', 'client', 'api', 'ambiguous', 'client-type', 'api-type'].includes(origin) || + ['group:', 'method:', 'flat:', 'client-method:'].some((prefix) => origin?.startsWith(prefix)) + ); +} + +function unwrap(node) { + while ( + node && + (ts.isParenthesizedExpression(node) || + ts.isAsExpression(node) || + ts.isTypeAssertionExpression(node) || + ts.isNonNullExpression(node) || + ts.isAwaitExpression(node) || + ts.isSatisfiesExpression(node)) + ) + node = node.expression; + return node; +} + +function within(root, path) { + const name = relative(root, path); + return name === '' || (!isAbsolute(name) && name !== '..' && !name.startsWith(`..${sep}`)); +} + +/** + * Scans supported customer files without executing code or changing the project. + * + * @param {string} directory - Customer project directory. + * @returns {Promise} Findings and independent traversal/parser completeness information. + */ +export async function scan(directory) { + const report = { + status: 'COMPLETE', + findings: [], + failures: [], + scanned: [], + excluded: [], + limitations: [ + 'Syntax and local binding provenance do not prove business or authorization semantics.', + 'Dynamic SDK sites and escaped values require review; external modules are never executed.', + 'Runtime metadata supports package.json and literal Node pins, not arbitrary configuration.', + 'Exclusions are not inspected; unsupported source wrappers make the scan incomplete.', + ], + }; + let root; + try { + root = await realpath(resolve(directory)); + if (!(await lstat(root)).isDirectory()) throw new Error('Expected a project directory.'); + } catch (error) { + report.failures.push({ path: directory, reason: `Cannot read scan root: ${error.message}` }); + return finish(report); + } + const files = new Map(); + async function walk(path) { + let entries; + try { + entries = await readdir(path, { withFileTypes: true }); + } catch (error) { + report.failures.push({ path: relative(root, path), reason: `Cannot read: ${error.code}` }); + return; + } + for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) { + const full = join(path, entry.name); + const name = relative(root, full).split(sep).join('/'); + if (entry.isSymbolicLink()) { + try { + const target = await realpath(full); + report.excluded.push({ path: name, reason: 'Symlink is not followed.' }); + if (!within(root, target)) { + report.failures.push({ path: name, reason: 'Symlink escapes the scan root.' }); + } + } catch (error) { + report.failures.push({ path: name, reason: `Unresolvable symlink: ${error.code}` }); + } + continue; + } + if (entry.isDirectory()) { + if (EXCLUDED.has(entry.name)) { + report.excluded.push({ path: name, reason: 'Dependency, build or Git directory.' }); + } else await walk(full); + continue; + } + if (!entry.isFile()) { + report.excluded.push({ path: name, reason: 'Not a regular file.' }); + continue; + } + if (SOURCE.has(extname(name))) { + try { + files.set(full, await readFile(full, 'utf8')); + report.scanned.push(name); + } catch (error) { + report.failures.push({ path: name, reason: `Cannot read source: ${error.code}` }); + } + } else if (WRAPPERS.has(extname(name))) { + report.failures.push({ + path: name, + reason: 'Unsupported source wrapper; inspect manually.', + }); + } else if (entry.name === 'package.json') { + await metadata(full, name, report); + } else if (['.nvmrc', '.node-version', '.tool-versions', 'Dockerfile'].includes(entry.name)) { + await runtimePin(full, name, report); + } else { + report.excluded.push({ path: name, reason: 'Not a supported source or metadata file.' }); + } + } + } + await walk(root); + try { + analyze(files, root, report); + } catch (error) { + report.failures.push({ path: '.', reason: `Cannot finish source analysis: ${error.message}` }); + } + if (files.size === 0) { + report.failures.push({ path: '.', reason: 'No supported source files were scanned.' }); + } + return finish(report); +} + +function finish(report) { + report.status = report.failures.length === 0 ? 'COMPLETE' : 'INCOMPLETE'; + report.exitCode = report.failures.length > 0 ? 2 : report.findings.length > 0 ? 1 : 0; + return report; +} + +function finding(report, data) { + if ( + !report.findings.some( + (item) => + item.id === data.id && + item.path === data.path && + item.line === data.line && + item.column === data.column && + item.action === data.action, + ) + ) + report.findings.push(data); +} + +async function metadata(full, name, report) { + try { + const data = JSON.parse(await readFile(full, 'utf8')); + if (!data || typeof data !== 'object' || Array.isArray(data)) + throw new Error('Expected object'); + report.scanned.push(name); + for (const section of [ + 'dependencies', + 'devDependencies', + 'peerDependencies', + 'optionalDependencies', + ]) { + if ( + data[section] !== undefined && + (!data[section] || typeof data[section] !== 'object' || Array.isArray(data[section])) + ) + throw new Error(`Expected ${section} to be an object.`); + const version = data[section]?.permitio; + if (version === undefined) continue; + if (typeof version !== 'string' || !/^[~^]?3\.\d+\.\d+$/u.test(version)) { + finding(report, { + id: 'P1', + path: name, + line: 1, + column: 1, + classification: 'REVIEW_REQUIRED', + action: 'Update and verify the permitio 3.0 requirement.', + observed: version, + }); + } + } + if ( + data.engines !== undefined && + (!data.engines || typeof data.engines !== 'object' || Array.isArray(data.engines)) + ) + throw new Error('Expected engines to be an object.'); + const nodeRange = data.engines?.node; + if ( + nodeRange !== undefined && + (typeof nodeRange !== 'string' || + validRange(nodeRange) === null || + minVersion(nodeRange) === null || + !subset(nodeRange, '>=22.13.0')) + ) { + finding(report, { + id: 'C1', + path: name, + line: 1, + column: 1, + classification: 'REVIEW_REQUIRED', + action: 'Require Node >=22.13.0 or a supported subset of that range.', + observed: data.engines.node, + }); + } + } catch (error) { + report.failures.push({ + path: name, + reason: `Cannot parse/read package metadata: ${error.message}`, + }); + } +} + +async function runtimePin(full, name, report) { + try { + const value = (await readFile(full, 'utf8')).trim(); + report.scanned.push(name); + const pins = []; + if (name.endsWith('Dockerfile')) { + const aliases = new Set(); + for (const stage of value.matchAll(/^\s*FROM\s+([^\r\n]+)$/gimu)) { + let source = stage[1].trim(); + const platform = /^--platform=([^\s]+)\s+/u.exec(source); + if (platform) { + if (!/^[a-z][a-z0-9_]*\/[a-z0-9_]+(?:\/[a-z0-9_]+)?$/u.test(platform[1])) { + pins.push(source); + continue; + } + source = source.slice(platform[0].length); + } + const instruction = /^([^\s]+)(?:\s+AS\s+([A-Za-z0-9_.-]+))?(?:\s+#.*)?$/iu.exec(source); + const image = instruction?.[1]; + if (!image || image.startsWith('--') || /[$\\]/u.test(image)) { + pins.push(source); + continue; + } + const node = /^(?:docker\.io\/)?(?:library\/)?node(?::(.*)|@.*)?$/u.exec(image); + if (node && !aliases.has(image.toLowerCase())) pins.push(node[1] ?? image); + if (instruction[2]) aliases.add(instruction[2].toLowerCase()); + } + } else if (name.endsWith('.tool-versions')) { + for (const pin of value.matchAll(/^nodejs\s+([^\s]+)/gmu)) pins.push(pin[1]); + } else pins.push(value); + for (const pin of pins) { + const match = /^v?(\d+\.\d+\.\d+)([^@]*)(?:@(sha256:[a-f0-9]{64}))?$/u.exec(pin); + const dockerSuffix = + /^-(?:alpine(?:\d+(?:\.\d+)*)?|(?:bookworm|bullseye|trixie)(?:-slim)?|slim)$/u; + const allowedSuffix = + match && + (name.endsWith('Dockerfile') + ? match[2] === '' || dockerSuffix.test(match[2]) + : match[2] === '' && match[3] === undefined); + const allowed = allowedSuffix && valid(match[1]) !== null && satisfies(match[1], '>=22.13.0'); + if (!allowed) + finding(report, { + id: 'C1', + path: name, + line: 1, + column: 1, + classification: 'REVIEW_REQUIRED', + action: 'Verify this literal Node runtime pin.', + observed: pin, + }); + } + if (pins.length === 0) + finding(report, { + id: 'C1', + path: name, + line: 1, + column: 1, + classification: 'REVIEW_REQUIRED', + action: 'No literal Node pin recognized; inspect configuration.', + }); + } catch (error) { + report.failures.push({ path: name, reason: `Cannot read runtime metadata: ${error.code}` }); + } +} + +function analyze(files, root, report) { + const host = ts.createCompilerHost({}); + host.fileExists = (path) => files.has(path); + host.readFile = (path) => files.get(path); + host.getSourceFile = (path, version) => + files.has(path) ? ts.createSourceFile(path, files.get(path), version, true) : undefined; + host.writeFile = () => { + throw new Error('Read-only scanner cannot emit files.'); + }; + host.resolveModuleNames = (names) => names.map(() => undefined); + const program = ts.createProgram( + [...files.keys()], + { + allowJs: true, + noResolve: true, + noLib: true, + target: ts.ScriptTarget.Latest, + moduleDetection: ts.ModuleDetectionKind.Force, + }, + host, + ); + const checker = program.getTypeChecker(); + const symbols = new Map(); + const assignments = new Map(); + const patterns = new Map(); + const guards = new Map(); + const sources = program.getSourceFiles(); + const sdkFiles = new Set(); + const localImports = []; + const symbol = (node) => node && checker.getSymbolAtLocation(node); + const unshadowedRequire = (node) => + ts.isIdentifier(node) && node.text === 'require' && !symbol(node)?.declarations?.length; + function add(node, id, action, classification = 'REVIEW_REQUIRED') { + const source = node.getSourceFile(); + const at = source.getLineAndCharacterOfPosition(node.getStart(source)); + finding(report, { + id, + action, + classification, + path: relative(root, source.fileName).split(sep).join('/'), + line: at.line + 1, + column: at.character + 1, + }); + } + function bind(name, origin, initializer) { + if (ts.isIdentifier(name)) { + const key = symbol(name); + if (key && origin) symbols.set(key, origin); + if (key && initializer) patterns.set(key, initializer); + } + } + function visit(node, callback) { + callback(node); + ts.forEachChild(node, (child) => visit(child, callback)); + } + for (const source of sources) { + for (const error of source.parseDiagnostics) { + report.failures.push({ + path: relative(root, source.fileName), + reason: ts.flattenDiagnosticMessageText(error.messageText, ' '), + }); + } + visit(source, (node) => { + if ((ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) && node.moduleSpecifier) { + const path = literal(node.moduleSpecifier); + if (sdkPath(path)) sdkFiles.add(source.fileName); + if (path?.startsWith('.')) { + const base = resolve(dirname(source.fileName), path); + const candidates = [ + base, + ...[...SOURCE].map((extension) => base + extension), + ...[...SOURCE].map((extension) => base.replace(/\.[cm]?jsx?$/u, extension)), + join(base, 'index.ts'), + join(base, 'index.js'), + ]; + const target = candidates.find((candidate) => files.has(candidate)); + if (target) localImports.push({ node, source: source.fileName, target }); + } + } + if ( + ts.isCallExpression(node) && + sdkPath(literal(node.arguments[0])) && + (unshadowedRequire(node.expression) || node.expression.kind === ts.SyntaxKind.ImportKeyword) + ) + sdkFiles.add(source.fileName); + if ( + ts.isImportEqualsDeclaration(node) && + ts.isExternalModuleReference(node.moduleReference) && + sdkPath(literal(node.moduleReference.expression)) + ) { + bind(node.name, 'module'); + sdkFiles.add(source.fileName); + if (literal(node.moduleReference.expression) !== 'permitio') { + add(node, 'C2', 'Replace internal/deep imports with public root exports.'); + } + } + if (ts.isImportDeclaration(node) && sdkPath(literal(node.moduleSpecifier))) { + if (literal(node.moduleSpecifier) !== 'permitio') { + add(node, 'C2', 'Replace internal/deep imports with public root exports.'); + } + const clause = node.importClause; + if (clause?.name) bind(clause.name, 'client-type'); + if (clause?.namedBindings && ts.isNamespaceImport(clause.namedBindings)) { + bind(clause.namedBindings.name, 'module'); + } else + for (const item of clause?.namedBindings?.elements ?? []) { + const name = item.propertyName?.text ?? item.name.text; + bind(item.name, imported(name)); + if (REMOVED.has(name)) add(item, 'A2', `Replace removed export ${name}.`); + if (['EnvironmentCopyConflictStrategyEnum', 'Statistics'].includes(name)) { + add(item, 'T1', `Review removed/renamed generated symbol ${name}.`); + } + } + } + if (ts.isVariableDeclaration(node)) bind(node.name, undefined, node.initializer); + if (ts.isBinaryExpression(node) && node.operatorToken.kind === ts.SyntaxKind.EqualsToken) { + const target = symbol(node.left); + if (target) assignments.set(target, [...(assignments.get(target) ?? []), node.right]); + } + if ( + ts.isBinaryExpression(node) && + node.operatorToken.kind === ts.SyntaxKind.InstanceOfKeyword + ) { + if (symbols.get(symbol(node.right)) === 'error-type') + guards.set(symbol(node.left), 'error'); + } + }); + } + let changed = true; + while (changed) { + changed = false; + for (const item of localImports) { + if (sdkFiles.has(item.target) && !sdkFiles.has(item.source)) { + sdkFiles.add(item.source); + changed = true; + } + } + } + for (const item of localImports) { + if (sdkFiles.has(item.target)) { + add(item.node, 'A1', 'SDK-bearing local module crosses local analysis; review its bindings.'); + } + } + function typeOrigin(type, seen) { + if (!type) return undefined; + if (ts.isParenthesizedTypeNode(type)) return typeOrigin(type.type, seen); + if (ts.isImportTypeNode(type) && sdkPath(literal(type.argument?.literal))) { + return imported(type.qualifier?.getText())?.replace('-type', ''); + } + if (ts.isUnionTypeNode(type) || ts.isIntersectionTypeNode(type)) { + const members = type.types.filter( + (item) => + item.kind !== ts.SyntaxKind.UndefinedKeyword && + !(ts.isTypeReferenceNode(item) && item.typeName.getText() === 'undefined') && + !(ts.isLiteralTypeNode(item) && item.literal.kind === ts.SyntaxKind.NullKeyword), + ); + const origins = members.map((item) => typeOrigin(item, seen)); + const known = origins.find((origin) => origin !== undefined); + if (known && origins.some((origin) => origin !== known)) return 'ambiguous'; + return known; + } + if (!ts.isTypeReferenceNode(type)) return undefined; + return expression(type.typeName, seen)?.replace('-type', ''); + } + function bindingOwnerOrigin(node, seen = new Set()) { + const owner = node.parent.parent; + const origin = expression(owner.initializer, seen) ?? typeOrigin(owner.type, seen); + if (origin || !ts.isBindingElement(owner)) return origin; + const key = owner.propertyName + ? (literal(owner.propertyName) ?? owner.propertyName.text) + : ts.isIdentifier(owner.name) + ? owner.name.text + : undefined; + return property(bindingOwnerOrigin(owner, seen), key); + } + function declarationOrigin(key, seen) { + if (!key || seen.has(key)) return undefined; + const next = new Set([...seen, key]); + let origin = symbols.get(key) ?? guards.get(key); + const pattern = patterns.get(key); + if (pattern) origin ??= expression(pattern, next); + for (const declaration of key.declarations ?? []) { + if (declaration.type) origin ??= typeOrigin(declaration.type, next); + if (declaration.initializer) origin ??= expression(declaration.initializer, next); + if (ts.isBindingElement(declaration)) { + const name = declaration.propertyName + ? (literal(declaration.propertyName) ?? declaration.propertyName.text) + : declaration.name.text; + origin ??= property(bindingOwnerOrigin(declaration, next), name); + } + } + const assigned = (assignments.get(key) ?? []).map((value) => expression(value, next)); + origin ??= assigned.find((value) => value !== undefined); + if (origin && assigned.some((value) => value !== origin)) return 'ambiguous'; + return origin; + } + function expression(input, seen = new Set()) { + if ( + input && + (ts.isParenthesizedExpression(input) || + ts.isNonNullExpression(input) || + ts.isAwaitExpression(input) || + ts.isSatisfiesExpression(input)) + ) + return expression(input.expression, seen); + if ( + input && + (ts.isAsExpression(input) || ts.isTypeAssertionExpression(input)) && + typeOrigin(input.type, seen) + ) + return typeOrigin(input.type, seen); + const node = unwrap(input); + if (!node) return undefined; + if (ts.isIdentifier(node)) return declarationOrigin(symbol(node), seen); + if (ts.isQualifiedName(node)) return property(expression(node.left, seen), node.right.text); + if (ts.isConditionalExpression(node)) { + const left = expression(node.whenTrue, seen); + const right = expression(node.whenFalse, seen); + if (left === right) return left; + if (left || right) return 'ambiguous'; + return undefined; + } + if ( + ts.isBinaryExpression(node) && + [ + ts.SyntaxKind.BarBarToken, + ts.SyntaxKind.AmpersandAmpersandToken, + ts.SyntaxKind.QuestionQuestionToken, + ].includes(node.operatorToken.kind) + ) { + const left = expression(node.left, seen); + const right = expression(node.right, seen); + if (left === right) return left; + if (left || right) return 'ambiguous'; + return undefined; + } + if (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) { + const origin = expression(node.expression, seen); + const key = member(node); + if (origin && key === undefined) return 'ambiguous'; + return property(origin, key) ?? declarationOrigin(symbol(node.name), seen); + } + if (ts.isNewExpression(node)) return expression(node.expression, seen)?.replace('-type', ''); + if (ts.isCallExpression(node)) { + if ( + unshadowedRequire(node.expression) || + node.expression.kind === ts.SyntaxKind.ImportKeyword + ) { + if (sdkPath(literal(node.arguments[0]))) return 'module'; + } + const kind = expression(node.expression, seen); + if (kind === 'flat:getMethods') return 'api'; + if (kind?.startsWith('method:')) return `result:${RESULTS[kind.slice(7)] ?? 'record'}`; + } + return undefined; + } + function inspectMember(node, origin, key) { + if (origin === 'ambiguous' || (origin && key === undefined)) { + add(node, 'A1', 'Resolve this dynamic/reassigned Permit-derived access manually.'); + } else if (origin === 'api' && Object.hasOwn(FLAT, key)) { + add(node, 'A1', `Use ${FLAT[key]}; verify arguments and result shape.`, 'MECHANICAL'); + if ( + ['listUsers', 'syncUser', 'assignConditionSetRule'].includes(key) || + key.startsWith('delete') || + key.startsWith('unassign') + ) { + add(node, 'A3', 'Adapt the grouped result shape; inspect downstream result consumers.'); + } + } else if (origin === 'api' && key === 'getMethods') { + add(node, 'A2', 'Remove getMethods(); use receiver-preserving grouped closures.'); + } else if (origin === 'context' && key === 'level') { + add(node, 'A2', 'Use apiContext.permittedAccessLevel.'); + } else if (origin === 'module' && REMOVED.has(key)) { + add(node, 'A2', `Replace removed export ${key}.`); + } else if ( + origin === 'module' && + ['EnvironmentCopyConflictStrategyEnum', 'Statistics'].includes(key) + ) { + add(node, 'T1', `Review removed/renamed generated symbol ${key}.`); + } else if (origin === 'error' && ['request', 'originalError', 'data'].includes(key)) { + add(node, 'E2', 'Use safe error status/code; narrow unknown bounded response data.'); + } else if ( + origin === 'result:void' || + (origin === 'result:page' && key === 'length') || + (origin === 'result:sync' && !['user', 'created'].includes(key)) || + (origin === 'result:rule' && key === 'length') + ) { + add(node, 'A3', 'Review this member against the grouped result contract.'); + } else if (origin === 'result:bulk') { + add( + node, + 'T2', + 'Bulk result fields are unspecified; do not treat them as request operations.', + ); + } + } + for (const source of sources) + visit(source, (node) => { + if ( + ts.isBinaryExpression(node) && + node.operatorToken.kind >= ts.SyntaxKind.FirstAssignment && + node.operatorToken.kind <= ts.SyntaxKind.LastAssignment && + (!ts.isIdentifier(node.left) || node.operatorToken.kind !== ts.SyntaxKind.EqualsToken) && + sdkHandle(expression(node.right)) + ) { + add(node, 'A1', 'Permit-derived assignment escapes local bindings; review consumers.'); + } + if (ts.isPropertyDeclaration(node) && sdkHandle(expression(node.initializer))) { + add(node, 'A1', 'Permit-derived class field escapes local bindings; review consumers.'); + } + if ( + ts.isHeritageClause(node) && + node.types.some((type) => sdkHandle(expression(type.expression))) + ) { + add(node, 'A1', 'SDK-derived heritage requires review of inherited consumer bindings.'); + } + if (ts.isArrayTypeNode(node) && sdkHandle(typeOrigin(node.elementType))) { + add(node, 'A1', 'SDK-derived array type requires review of its consumer bindings.'); + } + if (ts.isIndexedAccessTypeNode(node) && sdkHandle(typeOrigin(node.objectType))) { + add(node, 'A1', 'SDK-derived indexed type requires review of its consumer bindings.'); + } + if ( + (ts.isThrowStatement(node) || ts.isYieldExpression(node)) && + sdkHandle(expression(node.expression)) + ) { + add(node, 'A1', 'Permit-derived throw/yield escapes local bindings; review consumers.'); + } + if ( + ts.isTypeReferenceNode(node) && + !expression(node.typeName) && + node.typeArguments?.some((type) => sdkHandle(typeOrigin(type))) + ) { + add(node, 'A1', 'SDK-derived utility type requires review of its consumer bindings.'); + } + if (ts.isTypeParameterDeclaration(node) && sdkHandle(typeOrigin(node.constraint))) { + add(node, 'A1', 'SDK-bound generic parameter requires review of its consumer bindings.'); + } + if (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) { + inspectMember(node, expression(node.expression), member(node)); + const parent = node.parent; + if ( + (['config', 'settings'].includes(expression(node.expression)) || + (expression(node.expression) === 'client' && member(node) === 'config')) && + ts.isBinaryExpression(parent) && + parent.left === node && + parent.operatorToken.kind >= ts.SyntaxKind.FirstAssignment && + parent.operatorToken.kind <= ts.SyntaxKind.LastAssignment + ) { + add( + node, + 'F2', + 'SDK settings are frozen; construct a new client to change these options.', + ); + } + } + if (ts.isBindingElement(node)) { + const origin = bindingOwnerOrigin(node); + const key = node.propertyName + ? (literal(node.propertyName) ?? node.propertyName.text) + : ts.isIdentifier(node.name) + ? node.name.text + : undefined; + if (node.dotDotDotToken && origin) { + add(node, 'A1', 'Permit-derived rest binding requires manual review.'); + } else inspectMember(node, origin, key); + } + if ( + ((ts.isPropertyAssignment(node) || ts.isShorthandPropertyAssignment(node)) && + sdkHandle(expression(node.initializer ?? node.name))) || + (ts.isSpreadAssignment(node) && sdkHandle(expression(node.expression))) || + (node.parent && ts.isArrayLiteralExpression(node.parent) && sdkHandle(expression(node))) + ) { + add(node, 'A1', 'Permit-derived value enters a container; review downstream consumers.'); + } + if (ts.isCallExpression(node)) { + if ( + node.expression.kind === ts.SyntaxKind.ImportKeyword && + sdkPath(literal(node.arguments[0])) + ) { + let parent = node.parent; + while (parent && ts.isParenthesizedExpression(parent)) parent = parent.parent; + if (!parent || !ts.isAwaitExpression(parent)) { + add(node, 'A1', 'SDK import promise escapes local bindings; review its consumers.'); + } + } + if (expression(node.expression) === 'client-method:checkAllTenants') { + add( + node, + 'W3', + 'Verify all-tenants JSON wire expectations and typed fail-closed results.', + ); + } + for (const argument of node.arguments) { + if (['config', 'settings'].includes(expression(argument))) { + add(argument, 'F2', 'SDK settings escape local analysis; review mutation consumers.'); + } + if (sdkHandle(expression(argument))) { + add( + argument, + 'A1', + 'Permit-derived value escapes local analysis; inspect its consumer.', + ); + } + } + if ( + (unshadowedRequire(node.expression) || + node.expression.kind === ts.SyntaxKind.ImportKeyword) && + literal(node.arguments[0])?.startsWith('permitio/') + ) { + add(node, 'C2', 'Replace internal/deep loading with public root exports.'); + } + } + if (ts.isNewExpression(node) && expression(node.expression) === 'client-type') { + const options = node.arguments?.[0]; + if (options && !ts.isObjectLiteralExpression(options)) { + add(options, 'F1', 'Review effective constructor options and environment values.'); + } else + for (const item of options?.properties ?? []) { + if (ts.isSpreadAssignment(item)) { + add(item, 'F1', 'Review spread constructor options and effective validation.'); + } else if (ts.isPropertyAssignment(item)) { + const key = literal(item.name) ?? item.name.getText(); + if (key === 'opaAxiosInstance') { + add(item, 'W2', 'Review OPA hooks/transforms: request data is JSON text.'); + } else if (['token', 'pdp', 'apiUrl'].includes(key)) { + const value = literal(item.initializer); + if (value === '' || (value !== undefined && /\s/u.test(value))) { + add(item, 'F1', 'Replace invalid empty/whitespace constructor values.'); + } + } + } + } + } + if ( + ts.isTypeReferenceNode(node) && + expression(node.typeName) === 'error-type' && + node.typeArguments?.length + ) { + add(node, 'T3', 'PermitApiError is no longer generic; narrow unknown response data.'); + } + if (ts.isExportAssignment(node) && expression(node.expression)) { + add(node, 'A1', 'Permit-derived export crosses local analysis; review importers.'); + } + if (ts.isReturnStatement(node) && sdkHandle(expression(node.expression))) { + add(node, 'A1', 'Permit-derived return crosses local analysis; review callers.'); + } + if (ts.isExportSpecifier(node)) { + const target = checker.getExportSpecifierLocalTargetSymbol(node); + if (sdkHandle(declarationOrigin(target, new Set()))) { + add(node, 'A1', 'Permit-derived export crosses local analysis; review importers.'); + } + } + if (ts.isExportDeclaration(node) && sdkPath(literal(node.moduleSpecifier))) { + add(node, 'A1', 'Permit re-export crosses local analysis; review importing consumers.'); + } + if ( + ts.isBinaryExpression(node) && + node.operatorToken.kind === ts.SyntaxKind.EqualsToken && + sdkHandle(expression(node.right)) && + ts.isPropertyAccessExpression(node.left) && + node.left.getText() === 'module.exports' && + !symbol(node.left.expression)?.declarations?.length + ) { + add(node, 'A1', 'Permit-derived CommonJS export crosses local analysis; review importers.'); + } + if ( + ts.isVariableDeclaration(node) && + expression(node.initializer) && + node.parent.parent.modifiers?.some((item) => item.kind === ts.SyntaxKind.ExportKeyword) + ) { + add(node, 'A1', 'Permit-derived export crosses local analysis; review importers.'); + } + }); +} + +const executable = process.argv[1] + ? await realpath(process.argv[1]).catch(() => undefined) + : undefined; +if (executable === fileURLToPath(import.meta.url)) { + const args = process.argv.slice(2); + if (args.length !== 1 || args[0] === '--help') { + process.stdout.write('Usage: node scripts/scan.mjs \n'); + process.exitCode = args[0] === '--help' ? 0 : 2; + } else { + const report = await scan(args[0]); + process.stdout.write(`${JSON.stringify(report, null, 2)}\n`); + process.exitCode = report.exitCode; + } +} diff --git a/src/api/additive-responses.test.ts b/src/api/additive-responses.test.ts new file mode 100644 index 00000000..bf974761 --- /dev/null +++ b/src/api/additive-responses.test.ts @@ -0,0 +1,34 @@ +import { expect, test } from 'vitest'; + +import { createMockPermit } from '#src/tests/helpers/mock-api'; + +test('preserves additive fields and unknown enum values on returned control-plane objects', async () => { + const { permit, rest } = createMockPermit(); + const response = { + key: 'document', + future_status: 'new-server-value', + attributes: { classification: { type: 'future-attribute-type', extra: { enabled: true } } }, + new_metadata: { values: [null, false, 0, ''] }, + }; + rest.resolveWith(response); + expect(await permit.api.resources.get('document')).toEqual(response); +}); + +for (const proxyFactsViaPdp of [false, true]) { + test(`preserves unknown user and envelope data with proxyFactsViaPdp=${proxyFactsViaPdp}`, async () => { + const { permit, rest } = createMockPermit({ proxyFactsViaPdp }); + const user = { key: 'alice', attributes: { nested: { added: true } }, future_flag: false }; + const response = { data: [user], total_count: 1, future_cursor: 'cursor' }; + rest.resolveWith(response); + expect(await permit.api.users.list()).toEqual(response); + rest.resolveWith(user); + expect(await permit.api.users.get('alice')).toEqual(user); + }); +} + +test('preserves additive row fields when a documented wrapper unwraps an envelope', async () => { + const { permit, rest } = createMockPermit(); + const rows = [{ key: 'owner', future_kind: 'future-relation', metadata: { nested: ['value'] } }]; + rest.resolveWith({ data: rows, page_count: 1, total_count: 1, future_cursor: 'cursor' }); + expect(await permit.api.resourceRelations.list({ resourceKey: 'document' })).toEqual(rows); +}); diff --git a/src/api/api-client.ts b/src/api/api-client.ts index 65376dc2..f7702245 100644 --- a/src/api/api-client.ts +++ b/src/api/api-client.ts @@ -1,27 +1,58 @@ -import { Logger } from 'pino'; - -import { IPermitConfig } from '../config'; - -import { ConditionSetRulesApi, IConditionSetRulesApi } from './condition-set-rules'; -import { ConditionSetsApi, IConditionSetsApi } from './condition-sets'; -import { ApiContextLevel, ApiKeyLevel } from './context'; -import { DeprecatedApiClient, IDeprecatedPermitApi } from './deprecated'; -import { EnvironmentsApi, IEnvironmentsApi } from './environments'; -import { IProjectsApi, ProjectsApi } from './projects'; -import { IRelationshipTuplesApi, RelationshipTuplesApi } from './relationship-tuples'; -import { IResourceActionGroupsApi, ResourceActionGroupsApi } from './resource-action-groups'; -import { IResourceActionsApi, ResourceActionsApi } from './resource-actions'; -import { IResourceAttributesApi, ResourceAttributesApi } from './resource-attributes'; -import { IResourceInstancesApi, ResourceInstancesApi } from './resource-instances'; -import { IResourceRelationsApi, ResourceRelationsApi } from './resource-relations'; -import { IResourceRolesApi, ResourceRolesApi } from './resource-roles'; -import { IResourcesApi, ResourcesApi } from './resources'; -import { IRoleAssignmentsApi, RoleAssignmentsApi } from './role-assignments'; -import { IRolesApi, RolesApi } from './roles'; -import { ITenantsApi, TenantsApi } from './tenants'; -import { IUsersApi, UsersApi } from './users'; - -export interface IPermitApi extends IDeprecatedPermitApi { +import { type Logger } from 'pino'; + +import { type IPermitConfig } from '#src/config'; + +import { ConditionSetRulesApi, type IConditionSetRulesApi } from '#src/api/condition-set-rules'; +import { ConditionSetsApi, type IConditionSetsApi } from '#src/api/condition-sets'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +import { BasePermitApi } from '#src/api/base'; +import { ApiKeysApi, type IApiKeysApi } from '#src/api/api-keys'; +import { EnvironmentsApi, type IEnvironmentsApi } from '#src/api/environments'; +import { GroupsApi, type IGroupsApi } from '#src/api/groups'; +import { type IPdpsApi, PdpsApi } from '#src/api/pdps'; +import { type IProjectsApi, ProjectsApi } from '#src/api/projects'; +import { type IRelationshipTuplesApi, RelationshipTuplesApi } from '#src/api/relationship-tuples'; +import { + type IResourceActionGroupsApi, + ResourceActionGroupsApi, +} from '#src/api/resource-action-groups'; +import { type IResourceActionsApi, ResourceActionsApi } from '#src/api/resource-actions'; +import { type IResourceAttributesApi, ResourceAttributesApi } from '#src/api/resource-attributes'; +import { type IResourceInstancesApi, ResourceInstancesApi } from '#src/api/resource-instances'; +import { type IResourceRelationsApi, ResourceRelationsApi } from '#src/api/resource-relations'; +import { type IResourceRolesApi, ResourceRolesApi } from '#src/api/resource-roles'; +import { type IResourcesApi, ResourcesApi } from '#src/api/resources'; +import { type IRoleAssignmentsApi, RoleAssignmentsApi } from '#src/api/role-assignments'; +import { type IRolesApi, RolesApi } from '#src/api/roles'; +import { type ITenantsApi, TenantsApi } from '#src/api/tenants'; +import { type IUsersApi, UsersApi } from '#src/api/users'; +import { type IUserInvitesApi, UserInvitesApi } from '#src/api/user-invites'; +import { type IUserAttributesApi, UserAttributesApi } from '#src/api/user-attributes'; +import { type IProxyConfigsApi, ProxyConfigsApi } from '#src/api/proxy-configs'; +import { AuditLogsApi, type IAuditLogsApi } from '#src/api/audit-logs'; + +export interface IPermitApi { + /** Direct API-key management and scope discovery; server authorization governs access. */ + apiKeys: IApiKeysApi; + + /** Reads complete authorization audit pages and detailed engine data. */ + auditLogs: IAuditLogsApi; + + /** Direct API for environment proxy configurations and complete URL mapping rules. */ + proxyConfigs: IProxyConfigsApi; + + /** API for user attribute definitions; individual user values belong to users. */ + userAttributes: IUserAttributesApi; + + /** Direct API for stored user invites and their approval; no mail delivery or PDP sync. */ + userInvites: IUserInvitesApi; + + /** API for managing groups, user membership, and resource role grants. */ + groups: IGroupsApi; + + /** API for requesting environment-wide PDP data refreshes. */ + pdps: IPdpsApi; + /** * API for managing condition set rules. * @see {@link https://api.permit.io/v2/redoc#tag/Condition-Set-Rules} @@ -134,7 +165,28 @@ export interface IPermitApi extends IDeprecatedPermitApi { ensureContext(requiredContext: ApiContextLevel): Promise; } -export class ApiClient extends DeprecatedApiClient implements IPermitApi { +export class ApiClient extends BasePermitApi implements IPermitApi { + /** Direct API-key management and scope discovery; server authorization governs access. */ + public readonly apiKeys: IApiKeysApi; + + /** Reads complete authorization audit pages and detailed engine data. */ + public readonly auditLogs: IAuditLogsApi; + + /** Direct API for environment proxy configurations and complete URL mapping rules. */ + public readonly proxyConfigs: IProxyConfigsApi; + + /** API for user attribute definitions; individual user values belong to users. */ + public readonly userAttributes: IUserAttributesApi; + + /** Direct API for stored user invites and their approval; no mail delivery or PDP sync. */ + public readonly userInvites: IUserInvitesApi; + + /** API for managing groups, user membership, and resource role grants. */ + public readonly groups: IGroupsApi; + + /** API for requesting environment-wide PDP data refreshes. */ + public readonly pdps: IPdpsApi; + /** * API for managing condition set rules. * @see {@link https://api.permit.io/v2/redoc#tag/Condition-Set-Rules} @@ -239,6 +291,14 @@ export class ApiClient extends DeprecatedApiClient implements IPermitApi { */ constructor(config: IPermitConfig, logger: Logger) { super(config, logger); + this.apiKeys = new ApiKeysApi(config, logger); + + this.auditLogs = new AuditLogsApi(config, logger); + this.proxyConfigs = new ProxyConfigsApi(config, logger); + this.userAttributes = new UserAttributesApi(config, logger); + this.userInvites = new UserInvitesApi(config, logger); + this.groups = new GroupsApi(config, logger); + this.pdps = new PdpsApi(config, logger); this.conditionSetRules = new ConditionSetRulesApi(config, logger); this.conditionSets = new ConditionSetsApi(config, logger); this.projects = new ProjectsApi(config, logger); diff --git a/src/api/api-keys.test.ts b/src/api/api-keys.test.ts new file mode 100644 index 00000000..020558a0 --- /dev/null +++ b/src/api/api-keys.test.ts @@ -0,0 +1,428 @@ +import assert from 'node:assert/strict'; +import { createServer, type IncomingHttpHeaders } from 'node:http'; +import { inspect } from 'node:util'; + +import axios, { AxiosError, AxiosHeaders } from 'axios'; +import pino from 'pino'; +import { onTestFinished, test, vi } from 'vitest'; + +import { PermitApiError } from '#src/api/base'; +import { ApiContextLevel } from '#src/api/context'; +import { ApiKeysApi, type APIKeyCreate, type IApiKeysApi } from '#src/api/api-keys'; +import { Permit } from '#src/index'; + +const body: APIKeyCreate = Object.freeze({ organization_id: 'explicit-organization' }); +const read = { + ...body, + owner_type: 'member', + id: 'record-id', + created_at: '2026-10-01T00:00:00Z', + secret: 'returned-secret', + created_by_member: { id: 'member-id', future: { preserved: [false, 0, null] } }, + project: { id: 'project-id', extra: true }, + env: { id: 'environment-id', extra: true }, + last_used_at: '2026-10-02T00:00:00Z', + future: true, +}; + +interface Request { + method: string | undefined; + path: string | undefined; + headers: IncomingHttpHeaders; + body: string; +} + +async function wire(proxyFactsViaPdp = true) { + const calls: Request[] = []; + const reply: { status: number; data: unknown } = { status: 200, data: read }; + const server = createServer(async (request, response) => { + const chunks: Buffer[] = []; + for await (const chunk of request) chunks.push(Buffer.from(chunk)); + calls.push({ + method: request.method, + path: request.url, + headers: request.headers, + body: Buffer.concat(chunks).toString(), + }); + response.writeHead(reply.status, { 'Content-Type': 'application/json' }); + response.end(reply.status === 204 ? undefined : JSON.stringify(reply.data)); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + server.closeAllConnections(); + }), + ); + const address = server.address(); + assert(address && typeof address !== 'string'); + const permit = new Permit({ + token: 'manager-credential', + apiUrl: `http://127.0.0.1:${address.port}`, + pdp: 'http://pdp.invalid', + proxyFactsViaPdp, + retry: { maxRetries: 2, retryDelay: 0, maxDelay: 0, retryMethods: ['POST'] }, + log: { level: 'silent' }, + }); + return { permit, calls, reply }; +} + +test.each([true, false])( + 'six exact control-plane operations work without context initialization (proxy %s)', + async (proxy) => { + const { permit, calls, reply } = await wire(proxy); + const api = permit.api.apiKeys; + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + expect(await api.create(body)).toEqual(read); + expect(await api.get('id /?#%')).toEqual(read); + reply.data = { data: [read], total_count: 9, page_count: 1, future: { retained: true } }; + expect(await api.list()).toEqual(reply.data); + reply.data = { ...read, id: 'new-record-id', secret: 'new-secret' }; + expect(await api.rotate('id /?#%')).toEqual(reply.data); + reply.data = { organization_id: 'org', project_id: 'project', future: true }; + expect(await api.getScope()).toEqual(reply.data); + reply.status = 204; + expect(await api.delete('id /?#%')).toBeUndefined(); + expect(calls.map(({ method, path, body: value }) => [method, path, value])).toEqual([ + ['POST', '/v2/api-key', JSON.stringify(body)], + ['GET', '/v2/api-key/id%20%2F%3F%23%25', ''], + ['GET', '/v2/api-key?page=1&per_page=100', ''], + ['POST', '/v2/api-key/id%20%2F%3F%23%25/rotate-secret', ''], + ['GET', '/v2/api-key/scope', ''], + ['DELETE', '/v2/api-key/id%20%2F%3F%23%25', ''], + ]); + for (const call of calls) { + expect(call.headers.authorization).toBe('Bearer manager-credential'); + expect(call.headers['x-wait-timeout']).toBeUndefined(); + expect(call.headers['x-timeout-policy']).toBeUndefined(); + } + expect(calls[0]?.headers['content-type']).toContain('application/json'); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + expect(permit.config.token).toBe('manager-credential'); + expect('waitForSync' in api).toBe(false); + expect('update' in api).toBe(false); + }, +); + +test('list snapshots filters and preserves empty/full pagination envelopes', async () => { + const { permit, calls, reply } = await wire(); + const params = { objectType: 'project' as const, projId: 'project / &east', page: 2, perPage: 3 }; + reply.data = { data: [read], total_count: 19, page_count: 1, future: true }; + const pending = permit.api.apiKeys.list(params); + params.projId = 'changed'; + params.page = 9; + expect(await pending).toEqual(reply.data); + const query = new URL(calls[0]?.path ?? '', 'http://fixture.invalid').searchParams; + expect(Object.fromEntries(query)).toEqual({ + object_type: 'project', + proj_id: 'project / &east', + page: '2', + per_page: '3', + }); + reply.data = { data: [], total_count: 0, page_count: 0 }; + expect(await permit.api.apiKeys.list({ projId: '', page: 1, perPage: 100 })).toEqual(reply.data); + expect(calls[1]?.path).toBe('/v2/api-key?proj_id=&page=1&per_page=100'); + reply.data = { data: [], total_count: 7 }; + expect(await permit.api.apiKeys.list({ perPage: 1 })).toEqual(reply.data); +}); + +test.each([ + { organization_id: 'org', object_type: 'org' as const }, + { organization_id: 'org', project_id: 'project', object_type: 'project' as const }, + { + organization_id: 'org', + project_id: 'project', + environment_id: 'env', + object_type: 'env' as const, + access_level: 'read' as const, + owner_type: 'member' as const, + name: '', + }, +])( + 'create preserves explicitly supplied scope without injecting selected scope: %j', + async (key) => { + const { permit, calls, reply } = await wire(); + permit.config.apiContext._saveApiKeyAccessibleScope('selected-org'); + permit.config.apiContext.setEnvironmentLevelContext( + 'selected-org', + 'selected-proj', + 'selected-env', + ); + const input = Object.freeze(key); + reply.data = { ...read, secret: 'response-only-secret' }; + expect(await permit.api.apiKeys.create(input)).toEqual(reply.data); + expect(JSON.parse(calls[0]?.body ?? '')).toEqual(input); + expect(calls).toHaveLength(1); + }, +); + +test('create snapshots input before generated authentication awaits and preserves absent secrets', async () => { + const { permit, calls, reply } = await wire(); + const input = { organization_id: 'original-org', name: 'original-name' }; + const { secret: _secret, ...withoutSecret } = read; + reply.data = withoutSecret; + const pending = permit.api.apiKeys.create(input); + input.organization_id = 'changed'; + input.name = 'changed'; + expect(await pending).toEqual(withoutSecret); + expect(JSON.parse(calls[0]?.body ?? '')).toEqual({ + organization_id: 'original-org', + name: 'original-name', + }); + expect('secret' in (await permit.api.apiKeys.get('id'))).toBe(false); + expect('secret' in (await permit.api.apiKeys.rotate('id'))).toBe(false); +}); + +test.each([ + { organization_id: 'org' }, + { organization_id: 'org', project_id: null, environment_id: null }, + { organization_id: 'org', project_id: 'project', environment_id: null }, + { organization_id: 'org', project_id: 'project' }, + { organization_id: 'org', project_id: 'project', environment_id: 'env' }, +])( + 'scope discovery returns its exact scope without recursively initializing: %j', + async (scope) => { + const { permit, calls, reply } = await wire(); + reply.data = scope; + expect(await permit.api.apiKeys.getScope()).toEqual(scope); + expect(calls.map((call) => call.path)).toEqual(['/v2/api-key/scope']); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + }, +); + +test('scope discovery preserves a selected context', async () => { + const { permit, calls, reply } = await wire(); + permit.config.apiContext._saveApiKeyAccessibleScope('selected-org'); + permit.config.apiContext.setEnvironmentLevelContext( + 'selected-org', + 'selected-project', + 'selected-environment', + ); + const selected = structuredClone(permit.config.apiContext.environmentContext); + reply.data = { organization_id: 'credential-org' }; + expect(await permit.api.apiKeys.getScope()).toEqual(reply.data); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.ENVIRONMENT); + expect(permit.config.apiContext.environmentContext).toEqual(selected); + expect(calls.map((call) => call.path)).toEqual(['/v2/api-key/scope']); +}); + +test.each(['cycle', 'bigint', 'function'] as const)( + 'unserializable %s creation input rejects before HTTP', + async (kind) => { + const { permit, calls } = await wire(); + const input: Record = { organization_id: 'explicit-org' }; + if (kind === 'cycle') input['unsupported'] = input; + if (kind === 'bigint') input['unsupported'] = 1n; + if (kind === 'function') input['unsupported'] = () => undefined; + await expect( + permit.api.apiKeys.create(input as unknown as APIKeyCreate), + ).rejects.toBeInstanceOf(PermitApiError); + expect(calls).toEqual([]); + }, +); + +const operations: Array<[string, (api: IApiKeysApi) => Promise]> = [ + ['list', (api) => api.list()], + ['get', (api) => api.get('record-id')], + ['create', (api) => api.create(body)], + ['delete', (api) => api.delete('record-id')], + ['rotate', (api) => api.rotate('record-id')], + ['getScope', (api) => api.getScope()], +]; + +test.each(operations)('%s preserves HTTP refusal without fallback', async (_, call) => { + const { permit, calls, reply } = await wire(); + for (const status of [401, 403, 404, 422, 503]) { + reply.status = status; + reply.data = { detail: 'API key operation refused', error_code: 'KEY_REFUSED' }; + const error: unknown = await call(permit.api.apiKeys).catch((e: unknown) => e); + assert(error instanceof PermitApiError); + expect(error.status).toBe(status); + expect(error.response?.status).toBe(status); + expect(error.message).toContain('API key operation refused'); + } + expect(calls).toHaveLength(5); +}); + +test.each(operations)('%s propagates detached transport failures', async (_, call) => { + const raw = new AxiosError('Connection failed', 'ECONNRESET'); + let calls = 0; + const permit = new Permit({ + token: 'manager-credential', + axiosInstance: axios.create({ + adapter: async () => { + calls++; + throw raw; + }, + }), + retry: false, + throwOnError: false, + log: { level: 'silent' }, + }); + const error: unknown = await call(permit.api.apiKeys).catch((e: unknown) => e); + assert(error instanceof PermitApiError); + expect(error.code).toBe('ECONNRESET'); + expect(error.originalError).not.toBe(raw); + expect(calls).toBe(1); +}); + +test.each(operations)( + '%s protects response-only secrets across errors and logs', + async (_, call) => { + const secret = 'RESPONSE_ONLY_KEY_SECRET'; + const lines: string[] = []; + const raw = new AxiosError(`Remote refusal ${secret}`, 'ERR_BAD_RESPONSE'); + raw.cause = new Error(secret); + const caller = axios.create({ + adapter: async (config) => { + raw.config = config; + raw.status = 422; + raw.response = { + data: { secret, detail: `Cannot use ${secret}`, metadata: { value: secret } }, + status: 422, + statusText: 'Refused', + headers: new AxiosHeaders({ 'content-type': 'application/json' }), + config, + }; + throw raw; + }, + }); + let callerSnapshot: string | undefined; + const request = caller.request.bind(caller); + vi.spyOn(caller, 'request').mockImplementation(async (config) => { + try { + return await request(config); + } catch (error) { + callerSnapshot = inspect(error, { depth: Infinity, showHidden: true }); + throw error; + } + }); + const permit = new Permit({ token: 'manager-credential', axiosInstance: caller, retry: false }); + const api = new ApiKeysApi( + permit.config, + pino({ level: 'debug' }, { write: (line: string) => lines.push(line) }), + ); + const error: unknown = await call(api).catch((e: unknown) => e); + assert(error instanceof PermitApiError); + expect(error.status).toBe(422); + expect(error.code).toBe('ERR_BAD_RESPONSE'); + for (const projection of [ + inspect(error, { depth: Infinity, showHidden: true }), + JSON.stringify(error), + JSON.stringify(error.formattedAxiosError), + JSON.stringify(error.cause), + lines.join('\n'), + ]) { + expect(projection).not.toContain(secret); + expect(projection).not.toContain('manager-credential'); + } + expect(inspect(raw, { depth: Infinity, showHidden: true })).toBe(callerSnapshot); + expect(raw.response?.data).toEqual({ + secret, + detail: `Cannot use ${secret}`, + metadata: { value: secret }, + }); + }, +); + +test.each(operations)( + '%s omits response-only custom codes and leaves caller data intact', + async (_, call) => { + for (const arrayProperty of [false, true]) { + const secret = 'API_KEY_RESPONSE_CREDENTIAL'; + const errors = [{ msg: 'Invalid key operation' }]; + if (arrayProperty) + Object.defineProperty(errors, 'secret', { value: secret, enumerable: true }); + const data = arrayProperty ? { errors } : { secret, detail: 'Key operation rejected' }; + const descriptor = Object.getOwnPropertyDescriptor(errors, 'secret'); + let raw: AxiosError | undefined; + const lines: string[] = []; + const permit = new Permit({ + token: 'manager-credential', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + raw = new AxiosError('Key operation rejected', secret, config, undefined, { + data, + status: 422, + statusText: 'Refused', + headers: new AxiosHeaders(), + config, + }); + throw raw; + }, + }), + }); + const api = new ApiKeysApi( + permit.config, + pino({ level: 'error' }, { write: (line: string) => lines.push(line) }), + ); + const error: unknown = await call(api).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + assert(raw); + expect(error.status).toBe(422); + expect(error.code).toBeUndefined(); + expect(raw.code).toBe(secret); + expect(raw.response?.data).toBe(data); + expect(Object.getOwnPropertyDescriptor(errors, 'secret')).toEqual(descriptor); + for (const value of [ + String(error), + JSON.stringify(error), + inspect(error, { depth: Infinity }), + ...lines, + ]) + expect(value).not.toContain(secret); + } + }, +); + +test.each(['create', 'rotate'] as const)( + '%s does not replay an ambiguous POST failure', + async (name) => { + const { permit, calls, reply } = await wire(); + reply.status = 503; + reply.data = { detail: 'Response lost after operation' }; + const pending = + name === 'create' ? permit.api.apiKeys.create(body) : permit.api.apiKeys.rotate('id'); + await expect(pending).rejects.toBeInstanceOf(PermitApiError); + expect(calls).toHaveLength(1); + expect(calls[0]?.method).toBe('POST'); + if (name === 'rotate') expect(calls[0]?.body).toBe(''); + }, +); + +test('record and pagination responses preserve explicit nullable output without secret recovery', async () => { + const { permit, calls, reply } = await wire(); + const record = { + organization_id: 'org', + owner_type: 'member', + id: 'nullable-key', + created_at: 'created', + project_id: null, + environment_id: null, + object_type: null, + access_level: null, + name: null, + secret: null, + created_by_member: null, + last_used_at: null, + env: null, + project: null, + additive: { preserved: true }, + }; + reply.data = record; + expect( + await permit.api.apiKeys.create({ organization_id: 'org', name: 'supplied-name' }), + ).toEqual(record); + expect(await permit.api.apiKeys.get(record.id)).toEqual(record); + expect(await permit.api.apiKeys.rotate(record.id)).toEqual(record); + reply.data = { data: [record], total_count: 1, page_count: null, additive: 'complete' }; + expect(await permit.api.apiKeys.list()).toEqual(reply.data); + expect(calls.map((call) => call.method)).toEqual(['POST', 'GET', 'POST', 'GET']); + expect(permit.config.token).toBe('manager-credential'); +}); diff --git a/src/api/api-keys.ts b/src/api/api-keys.ts new file mode 100644 index 00000000..c5e78d00 --- /dev/null +++ b/src/api/api-keys.ts @@ -0,0 +1,163 @@ +import type { Logger } from 'pino'; + +import type { IPermitConfig } from '#src/config'; +import { + APIKeysApi as AutogenAPIKeysApi, + type APIKeyCreate, + type APIKeyRead, + type APIKeyScopeRead, + type MemberAccessObj, + type PaginatedResultAPIKeyRead, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc resolves the named REST failure. +import type { PermitApiError } from '#src/api/base'; + +export type { + APIKeyCreate, + APIKeyRead, + APIKeyScopeRead, + PaginatedResultAPIKeyRead, +} from '#src/openapi/index'; + +/** Optional scope filters; project references accept a UUID or key. */ +export interface IListApiKeys extends IPagination { + /** Record scope to filter by: organization, project or environment. */ + objectType?: MemberAccessObj; + /** Project UUID or key to filter by; this does not select the client's context. */ + projId?: string; +} + +/** API-key management through the control plane; server authorization governs access. */ +export interface IApiKeysApi { + /** + * Lists API-key records with their complete pagination envelope. + * @param params - Optional scope filters; page defaults to 1 and perPage to 100. + * @returns The received page, including counts and any returned optional secrets. + * @throws {@link PermitApiError} If the API denies access or rejects the request. + */ + list(params?: IListApiKeys): Promise; + + /** + * Gets an API-key record by its ID. + * @param apiKeyId - API-key ID, not its name or secret. + * @returns The complete record; the server may omit its secret or return null. + * @throws {@link PermitApiError} If the record is absent or access is denied. + */ + get(apiKeyId: string): Promise; + + /** + * Creates an API key with the supplied scope without injecting the client's context. + * @param apiKey - Published creation body, including organization_id and optional scope. + * @returns The complete received record; retain its secret securely when present. + * @throws {@link PermitApiError} If the API rejects the body or denies creation. + */ + create(apiKey: APIKeyCreate): Promise; + + /** + * Deletes an API-key record and its related data. + * @param apiKeyId - API-key ID, not its name or secret. + * @returns A promise resolving to undefined after successful deletion. + * @throws {@link PermitApiError} If the record is absent or deletion is denied. + */ + delete(apiKeyId: string): Promise; + + /** + * Rotates a key's secret with a bodyless POST; the SDK does not replay this request. + * @param apiKeyId - API-key UUID to rotate; use a disposable key for lifecycle tests. + * @returns The complete response; no stable record ID or always-present secret is promised. + * Rotation does not replace this client's configured credential. + * @throws {@link PermitApiError} If the record is absent or rotation fails. + */ + rotate(apiKeyId: string): Promise; + + /** + * Discovers the configured credential's scope without initializing API context. + * @returns The received organization ID and optional, nullable project/environment IDs. + * @throws {@link PermitApiError} If the credential is invalid or discovery fails. + */ + getScope(): Promise; +} + +/** Direct control-plane client for the six published API-key operations. */ +export class ApiKeysApi extends BasePermitApi implements IApiKeysApi { + private readonly keys: AutogenAPIKeysApi; + + /** + * Creates the API-key management client. + * @param config - SDK configuration; management does not initialize selected scope. + * @param logger - SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.keys = new AutogenAPIKeysApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** {@inheritDoc IApiKeysApi.list} */ + public async list(params: IListApiKeys = {}): Promise { + const { objectType, projId, page = 1, perPage = 100 } = params; + try { + return ( + await this.keys.listApiKeys({ + ...(objectType !== undefined && { objectType }), + ...(projId !== undefined && { projId }), + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IApiKeysApi.get} */ + public async get(apiKeyId: string): Promise { + try { + return (await this.keys.getApiKey({ apiKeyId })).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IApiKeysApi.create} */ + public async create(apiKey: APIKeyCreate): Promise { + try { + const body = structuredClone(apiKey); + return (await this.keys.createApiKey({ aPIKeyCreate: body })).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IApiKeysApi.delete} */ + public async delete(apiKeyId: string): Promise { + try { + await this.keys.deleteApiKey({ apiKeyId }); + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IApiKeysApi.rotate} */ + public async rotate(apiKeyId: string): Promise { + try { + return (await this.keys.rotateApiKey({ apiKeyId })).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IApiKeysApi.getScope} */ + public async getScope(): Promise { + try { + return (await this.keys.getApiKeyScope()).data; + } catch (err) { + this.handleApiError(err); + } + } +} diff --git a/src/api/attribute-generics.test.ts b/src/api/attribute-generics.test.ts new file mode 100644 index 00000000..5d3cefa2 --- /dev/null +++ b/src/api/attribute-generics.test.ts @@ -0,0 +1,147 @@ +import { expectTypeOf } from 'vitest'; + +import { + type ICreateOrUpdateUserResult, + type PaginatedResultResourceInstanceDetailedRead, + type PaginatedResultUserRead, + type PaginatedResultTenantRead, + type ResourceInstanceDetailedRead, + type ResourceInstanceRead, + type TenantRead, + type UserRead, +} from '#src/api/index'; +import { + type PaginatedResultResourceInstanceDetailedRead as GeneratedDetailedPage, + type PaginatedResultUserRead as GeneratedUserPage, + type PaginatedResultTenantRead as GeneratedTenantPage, + type ResourceInstanceDetailedRead as GeneratedDetailed, + type ResourceInstanceRead as GeneratedInstance, + type TenantRead as GeneratedTenant, + type UserRead as GeneratedUser, +} from '#src/openapi/index'; +import { createMockPermit, MOCK_API_ORIGIN } from '#src/tests/helpers/mock-api'; + +type DefaultDetailedPage = PaginatedResultResourceInstanceDetailedRead; + +interface Attributes { + readonly category: 'research'; + note: string | null; + score?: number; +} + +it('default read models remain bidirectionally compatible with generated contracts', () => { + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf<{ + user: GeneratedUser; + created: boolean; + }>(); + expectTypeOf['attributes']>().toEqualTypeOf(); + expectTypeOf['attributes']>().toEqualTypeOf(); + expectTypeOf['attributes']>().toEqualTypeOf< + Attributes | undefined + >(); + expectTypeOf['attributes']>().toEqualTypeOf< + Attributes | undefined + >(); + expectTypeOf['data'][number]['attributes']>().toEqualTypeOf< + Attributes | undefined + >(); + expectTypeOf< + PaginatedResultResourceInstanceDetailedRead['data'][number]['attributes'] + >().toEqualTypeOf(); + expectTypeOf['data'][number]['attributes']>().toEqualTypeOf< + Attributes | undefined + >(); + expectTypeOf['user']['attributes']>().toEqualTypeOf< + Attributes | undefined + >(); +}); + +it('typed read selection preserves omitted attributes and additive server data', async () => { + const { permit, rest } = createMockPermit(); + const attributes = { category: 'research', note: null, score: 0, server_extra: ['retained'] }; + const user = { key: 'alice', attributes, associated_tenants: [], additive: { kept: true } }; + const tenant = { key: 'east', name: 'East', attributes }; + const instance = { key: 'report', resource: 'document', tenant: 'east', attributes }; + for (const [response, request] of [ + [user, () => permit.api.users.get('alice')], + [tenant, () => permit.api.tenants.get('east')], + [instance, () => permit.api.resourceInstances.get('document:report')], + ] as const) { + rest.resolveWith(response); + expect(await request()).toEqual(response); + } + const omitted = { key: 'alice' }; + rest.resolveWith(omitted); + expect(await permit.api.users.get('alice')).toEqual(omitted); + expect(rest.requests).toHaveLength(4); +}); + +it('typed sync and membership retain user attributes, envelopes and write payloads', async () => { + const { permit, rest } = createMockPermit({ proxyFactsViaPdp: true }); + const attributes: Attributes = { category: 'research', note: null }; + const payload = Object.freeze({ key: 'alice', attributes }); + const user = { ...payload, id: 'user-id' }; + const page = { data: [user], total_count: 13, page_count: 1, additive: ['retained'] }; + for (const [status, created] of [ + [201, true], + [200, false], + ] as const) { + rest.resolveWith(user, status); + expect(await permit.api.users.sync(payload)).toEqual({ user, created }); + expect(rest.last?.method).toBe('PUT'); + expect(rest.last?.data).toEqual(payload); + } + rest.resolveWith(user, 201); + expect(await permit.api.tenants.addUser('east', payload)).toEqual(user); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.path).toBe('/v2/facts/proj/env/tenants/east/users'); + expect(rest.last?.data).toEqual(payload); + rest.resolveWith(page); + expect(await permit.api.tenants.listTenantUsers({ tenantKey: 'east' })).toEqual(page); + rest.resolveWith(page); + expect(await permit.api.users.list({ includeResourceInstanceRoles: true })).toEqual( + page, + ); + expect(payload).toEqual({ key: 'alice', attributes }); + expect(rest.requests).toHaveLength(5); +}); + +it('typed detailed instances retain relationships, counts and extra fields', async () => { + const { permit, rest } = createMockPermit({ proxyFactsViaPdp: true }); + const instance = { + key: 'report', + resource: 'document', + tenant: 'east', + attributes: { category: 'research', note: null }, + relationships: [{ subject: 'folder:archive', relation: 'parent' }], + }; + const page = { data: [instance], total_count: 11, page_count: 1, additive: { kept: true } }; + rest.resolveWith(page); + const result = await permit.api.resourceInstances.listDetailed({ tenant: 'east' }); + expect(result).toEqual(page); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.path).toBe('/v2/facts/proj/env/resource_instances/detailed'); + expect(rest.last?.params).toEqual({ tenant: 'east', page: '1', per_page: '100' }); + expect(rest.requests).toHaveLength(1); +}); + +it('attribute selection leaves the public HTTP failure policy unchanged', async () => { + const { permit, rest } = createMockPermit(); + const requests = [ + () => permit.api.users.get('alice'), + () => permit.api.tenants.addUser('east', { key: 'alice' }), + () => permit.api.resourceInstances.listDetailed(), + ]; + for (const request of requests) { + rest.rejectWith(422, { detail: 'invalid input' }); + await expect(request()).rejects.toMatchObject({ name: 'PermitApiError', status: 422 }); + } + expect(rest.requests).toHaveLength(3); +}); diff --git a/src/api/audit-logs.test.ts b/src/api/audit-logs.test.ts new file mode 100644 index 00000000..8b31ffea --- /dev/null +++ b/src/api/audit-logs.test.ts @@ -0,0 +1,473 @@ +import assert from 'node:assert/strict'; +import { inspect } from 'node:util'; + +import axios, { AxiosError, AxiosHeaders, type InternalAxiosRequestConfig } from 'axios'; +import pino from 'pino'; + +import { AuditLogsApi, type IListAuditLogs } from '#src/api/audit-logs'; +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { + AuditLogQueryType, + AuditLogSortKey, + Permit, + type DetailedAuditLogModel, + type RawData1, +} from '#src/index'; + +const prefix = 'https://control.example/v2/pdps/project%2Fone/environment%20east/audit_logs'; +const logId = 'log/a?b+c=%é'; +const encodedId = 'log%2Fa%3Fb%2Bc%3D%25%C3%A9'; +const row: DetailedAuditLogModel = { + id: 'log-id', + timestamp: '2026-10-08T00:00:00Z', + org_id: 'org', + project_id: 'project', + env_id: 'environment', + raw_data: {}, +}; +interface Request { + method: string | undefined; + url: string; + body: unknown; + headers: AxiosHeaders; +} +function response(config: InternalAxiosRequestConfig, data: unknown, status: number) { + return { data, status, statusText: 'Fixture response', headers: new AxiosHeaders(), config }; +} +function wire(proxyFactsViaPdp = true) { + const calls: Request[] = []; + const reply: { status: number; data: unknown; error?: string } = { + status: 200, + data: { data: [], total_count: 0, pagination_count: 0 }, + }; + const permit = new Permit({ + token: 'audit-fixture', + apiUrl: 'https://control.example', + pdp: 'https://pdp.invalid', + proxyFactsViaPdp, + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + calls.push({ + method: config.method, + url: axios.getUri(config), + body: config.data, + headers: new AxiosHeaders(config.headers), + }); + if (reply.error) throw new AxiosError('Fixture transport failed', reply.error, config); + const result = response(config, reply.data, reply.status); + if (reply.status >= 400) { + throw new AxiosError( + 'Audit read rejected', + 'ERR_BAD_RESPONSE', + config, + undefined, + result, + ); + } + return result; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project/one', 'environment east'); + return { permit, calls, reply }; +} + +test.each([true, false])('both reads use selected API scope with facts proxy %s', async (proxy) => { + const { permit, calls, reply } = wire(proxy); + expect(await permit.api.auditLogs.list()).toEqual(reply.data); + reply.data = { ...row, additive: { nullish: null, count: 0, permitted: false } }; + expect(await permit.api.auditLogs.get(logId)).toEqual(reply.data); + expect(calls.map(({ method, url, body }) => [method, url, body])).toEqual([ + ['get', `${prefix}?page=1&per_page=100`, undefined], + ['get', `${prefix}/${encodedId}`, undefined], + ]); + for (const request of calls) { + expect(request.headers.get('authorization')).toBe('Bearer audit-fixture'); + expect(request.headers.get('accept')).toContain('application/json'); + expect(request.headers.has('x-wait-timeout')).toBe(false); + expect(request.headers.has('x-timeout-policy')).toBe(false); + } + expect('waitForSync' in permit.api.auditLogs).toBe(false); + expect('replay' in permit.api.auditLogs).toBe(false); + expect('delete' in permit.api.auditLogs).toBe(false); +}); + +test('all twelve filters preserve repeated entries, false, zero, empty and enum spelling', async () => { + const { permit, calls } = wire(); + const params = Object.freeze({ + page: 0, + perPage: 0, + pdpId: '', + users: Object.freeze(['a,b', '', 'é /', 'a,b']), + decision: false, + resources: Object.freeze(['doc:one', '', 'doc:one']), + tenant: '', + action: '', + timestampFrom: 0, + timestampTo: 17, + sortBy: AuditLogSortKey.None, + query: AuditLogQueryType.None, + }); + await permit.api.auditLogs.list(params); + const url = new URL(calls[0]!.url); + expect(url.origin + url.pathname).toBe(prefix); + expect([...url.searchParams]).toEqual([ + ['pdp_id', ''], + ['users', 'a,b'], + ['users', ''], + ['users', 'é /'], + ['users', 'a,b'], + ['decision', 'false'], + ['resources', 'doc:one'], + ['resources', ''], + ['resources', 'doc:one'], + ['tenant', ''], + ['action', ''], + ['timestamp_from', '0'], + ['timestamp_to', '17'], + ['sort_by', 'None'], + ['query', 'none'], + ['page', '0'], + ['per_page', '0'], + ]); + expect(params.users).toEqual(['a,b', '', 'é /', 'a,b']); +}); + +test('empty arrays omit entries and unspecified query/sort remain service defaults', async () => { + const { permit, calls } = wire(); + await permit.api.auditLogs.list({ users: [], resources: [], page: 2, perPage: 3 }); + expect(calls[0]?.url).toBe(`${prefix}?page=2&per_page=3`); + await permit.api.auditLogs.list(undefined); + expect(calls[1]?.url).toBe(`${prefix}?page=1&per_page=100`); +}); + +test('snapshots filters before context discovery and excludes forged scope or unknown fields', async () => { + const { permit, calls } = wire(); + const users = ['before'], + resources = ['document']; + const params = { + users, + resources, + decision: false, + timestampFrom: 0, + page: 2, + perPage: 3, + projId: 'forged', + envId: 'forged', + includeTotalCount: true, + }; + const pending = permit.api.auditLogs.list(params); + users[0] = 'after'; + resources.push('other'); + params.decision = true; + params.timestampFrom = 19; + params.page = 9; + params.perPage = 10; + await pending; + const query = new URL(calls[0]!.url).searchParams; + expect([...query]).toEqual([ + ['users', 'before'], + ['decision', 'false'], + ['resources', 'document'], + ['timestamp_from', '0'], + ['page', '2'], + ['per_page', '3'], + ]); + expect(calls[0]?.url.startsWith(prefix)).toBe(true); +}); + +test('a filter snapshot failure rejects before scope discovery or traffic', async () => { + const { permit, calls } = wire(); + const params: IListAuditLogs = { + get users(): readonly string[] { + throw new Error('Cannot read caller array'); + }, + }; + await expect(permit.api.auditLogs.list(params)).rejects.toBeInstanceOf(PermitApiError); + expect(calls).toEqual([]); +}); + +const rawBranches: RawData1[] = [ + { + engine: 'OPA', + decision_id: 'decision', + labels: { id: 'opa', version: '1' }, + timestamp: row.timestamp, + path: 'permit/allow', + metrics: { timer_rego_query_eval_ns: 0 }, + input: { user: 'alice' }, + result: false, + }, + { + engine: 'AVP', + timestamp: row.timestamp, + tenant: 'east', + process_time_ms: 0, + input: { principal: 'alice' }, + result: { decision: false }, + }, + { + engine: 'GENERIC', + timestamp: row.timestamp, + decision: false, + input: { user: 'alice' }, + result: null, + context: { custom: ['value'] }, + }, + { engine: 'OPA' }, + {}, +]; +test.each(rawBranches)( + 'list and detail preserve complete received raw-data branch %#', + async (raw) => { + const { permit, reply } = wire(); + const detail = { + ...row, + raw_data: raw, + decision: false, + user_key: '', + reason: '', + input: null, + result: { allowed: false }, + context: { amount: 0 }, + objects: { id: 'objects', user_object: { key: 'alice' } }, + additive: [null, false, 0], + }; + reply.data = detail; + expect(await permit.api.auditLogs.get('log-id')).toEqual(detail); + reply.data = { + data: [detail, { ...row, raw_data: undefined }], + total_count: 0, + pagination_count: 0, + page_count: 0, + additional: { nested: true }, + }; + expect(await permit.api.auditLogs.list()).toEqual(reply.data); + }, +); + +test('list and detail retain nullable optional audit output through nested engine and objects', async () => { + const { permit, reply } = wire(); + const detail: DetailedAuditLogModel = { + ...row, + decision: null, + user_key: null, + user_email: null, + pdp_config_id: null, + objects: { + id: null, + action_object: null, + user_object: { + id: 'user', + key: 'alice', + created_at: row.timestamp, + updated_at: row.timestamp, + email: null, + first_name: null, + attributes: null, + roles: null, + assigned_roles: null, + }, + }, + raw_data: { + engine: null, + decision_id: 'decision', + labels: { id: 'opa', version: '1' }, + timestamp: row.timestamp, + path: 'permit/allow', + metrics: { timer_rego_query_eval_ns: null }, + }, + }; + reply.data = detail; + expect(await permit.api.auditLogs.get('log-id')).toEqual(detail); + reply.data = { + data: [detail, { ...row, raw_data: null }], + total_count: 2, + pagination_count: 2, + page_count: null, + }; + expect(await permit.api.auditLogs.list()).toEqual(reply.data); + reply.data = { ...detail, objects: null }; + expect(await permit.api.auditLogs.get('log-id')).toEqual(reply.data); +}); + +test.each(['list', 'get'] as const)( + '%s initializes missing scope through the API', + async (method) => { + const urls: string[] = []; + const permit = new Permit({ + token: 'scope-fixture', + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + urls.push(axios.getUri(config)); + return response( + config, + config.url?.endsWith('/v2/api-key/scope') + ? { + organization_id: 'org', + project_id: 'project/one', + environment_id: 'environment east', + } + : method === 'list' + ? { data: [], total_count: 0, pagination_count: 0 } + : row, + 200, + ); + }, + }), + }); + await (method === 'list' ? permit.api.auditLogs.list() : permit.api.auditLogs.get(logId)); + expect(urls).toEqual([ + 'https://control.example/v2/api-key/scope', + method === 'list' ? `${prefix}?page=1&per_page=100` : `${prefix}/${encodedId}`, + ]); + }, +); + +test.each(['list', 'get'] as const)( + '%s rejects missing environment without traffic', + async (method) => { + const { permit, calls } = wire(); + permit.config.apiContext.setProjectLevelContext('org', 'project'); + await expect( + method === 'list' ? permit.api.auditLogs.list() : permit.api.auditLogs.get('id'), + ).rejects.toBeInstanceOf(PermitContextError); + expect(calls).toEqual([]); + }, +); + +test.each(['list', 'get'] as const)( + '%s context lookup failures reject and can recover', + async (method) => { + let status = 503, + traffic = 0; + const permit = new Permit({ + token: 'scope-fixture', + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + traffic += 1; + const data = config.url?.endsWith('/v2/api-key/scope') + ? { organization_id: 'org', project_id: 'project', environment_id: 'environment' } + : row; + const result = response(config, data, status); + if (status >= 400) + throw new AxiosError( + 'Scope unavailable', + 'ERR_BAD_RESPONSE', + config, + undefined, + result, + ); + return result; + }, + }), + }); + const call = () => + method === 'list' ? permit.api.auditLogs.list() : permit.api.auditLogs.get('id'); + await expect(call()).rejects.toBeInstanceOf(PermitContextError); + expect(traffic).toBe(1); + status = 200; + await call(); + expect(traffic).toBe(3); + }, +); + +for (const method of ['list', 'get'] as const) { + test.each([400, 401, 403, 404, 422, 429, 500, 503])( + `${method} propagates HTTP %s without fallback`, + async (status) => { + const { permit, reply } = wire(); + reply.status = status; + reply.data = { detail: 'Rejected' }; + const error: unknown = await ( + method === 'list' ? permit.api.auditLogs.list() : permit.api.auditLogs.get('id') + ).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.status).toBe(status); + expect(error.originalError.response?.status).toBe(status); + }, + ); + test.each(['ECONNREFUSED', 'ETIMEDOUT', 'ECONNRESET'])( + `${method} propagates %s`, + async (code) => { + const { permit, reply } = wire(); + reply.error = code; + const error: unknown = await ( + method === 'list' ? permit.api.auditLogs.list() : permit.api.auditLogs.get('id') + ).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.code).toBe(code); + }, + ); +} + +test.each( + (['list', 'get'] as const).flatMap((method) => + (['raw_data', 'input', 'context', 'user_email'] as const).map((field) => ({ method, field })), + ), +)( + '$method response-only $field remains private across code, cause, projections and logs', + async ({ method, field }) => { + const secret = 'AUDIT_RESPONSE_PRIVATE_CANARY', + logs: string[] = [], + rawErrors: AxiosError[] = []; + const logger = pino( + { level: 'error' }, + { + write(value: string) { + logs.push(value); + }, + }, + ); + const data = { detail: `Rejected ${secret}`, [field]: { nested: secret } }; + const permit = new Permit({ + token: 'audit-fixture', + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const raw = new AxiosError( + `Failed ${secret}`, + secret, + config, + undefined, + response(config, data, 422), + ); + rawErrors.push(raw); + throw raw; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const api = new AuditLogsApi(permit.config, logger); + const error: unknown = await (method === 'list' ? api.list() : api.get('log-id')).catch( + (caught: unknown) => caught, + ); + assert(error instanceof PermitApiError); + const projections = [ + error.message, + error.code, + JSON.stringify(error), + inspect(error, { showHidden: true, depth: 8 }), + inspect(error, { showHidden: true, customInspect: false, depth: 12 }), + ...logs, + ].join(' '); + expect(projections).not.toContain(secret); + expect(error.status).toBe(422); + expect(error.originalError.config?.data).toBeUndefined(); + expect(rawErrors[0]?.code).toBe(secret); + expect(rawErrors[0]?.response?.data).toBe(data); + expect(data[field]).toEqual({ nested: secret }); + }, +); diff --git a/src/api/audit-logs.ts b/src/api/audit-logs.ts new file mode 100644 index 00000000..8fb4a7a3 --- /dev/null +++ b/src/api/audit-logs.ts @@ -0,0 +1,161 @@ +import type { Logger } from 'pino'; + +import type { IPermitConfig } from '#src/config'; +import { + AuditLogsApi as AutogenAuditLogsApi, + type AuditLogQueryType, + type AuditLogSortKey, + type AuditLogsApiListAuditLogsRequest, + type DetailedAuditLogModel, + type LimitedPaginatedResultAuditLogModel, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc names the REST failure. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc names the context failure. +import type { PermitContextError } from '#src/api/context'; + +export { + AuditLogQueryType, + AuditLogSortKey, + type AuditLogModel, + type AuditLogObjectsModel, + type DetailedAuditLogModel, + type LimitedPaginatedResultAuditLogModel, + type RawData, + type RawData1, + type OPAEngineDecisionLog, + type AVPEngineDecisionLog, + type GenericEngineDecisionLog, + type DummyEngineModel, +} from '#src/openapi/index'; + +/** Published audit-log filters; arrays are sent as repeated query parameters. */ +export interface IListAuditLogs extends IPagination { + /** PDP configuration UUID. */ + readonly pdpId?: string; + /** User keys or emails; the API limits each item to 500 characters. */ + readonly users?: readonly string[]; + readonly decision?: boolean; + readonly resources?: readonly string[]; + readonly tenant?: string; + readonly action?: string; + /** Numeric timestamp boundary, forwarded unchanged; units are not specified by the contract. */ + readonly timestampFrom?: number; + /** Numeric timestamp boundary, forwarded unchanged; units are not specified by the contract. */ + readonly timestampTo?: number; + readonly sortBy?: AuditLogSortKey; + /** `none` includes all published query types. */ + readonly query?: AuditLogQueryType; +} + +/** Reads authorization audit logs through the selected environment's control-plane API. */ +export interface IAuditLogsApi { + /** + * Lists audit logs with the complete paginated envelope and received decision data. + * @param params - Published filters and pagination; SDK defaults are page 1 and perPage 100. + * @returns The complete page, including total_count, pagination_count and optional page_count. + * @throws {@link PermitApiError} If filters cannot be copied or the API rejects the request. + * @throws {@link PermitContextError} If the environment or API-key scope is insufficient. + */ + list(params?: IListAuditLogs): Promise; + + /** + * Gets the complete audit log and its raw engine data. + * @param logId - The audit-log UUID; the service determines record availability and retention. + * @returns The complete detailed log, retaining all published raw-data union branches. + * @throws {@link PermitApiError} If the log is unavailable or the API rejects the request. + * @throws {@link PermitContextError} If the environment or API-key scope is insufficient. + */ + get(logId: string): Promise; +} + +/** Direct API transport for the two published authorization audit-log read operations. */ +export class AuditLogsApi extends BasePermitApi implements IAuditLogsApi { + private readonly auditLogs: AutogenAuditLogsApi; + + /** + * Creates the audit-log client. + * @param config - The SDK configuration and selected API context. + * @param logger - The SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.auditLogs = new AutogenAuditLogsApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** {@inheritDoc IAuditLogsApi.list} */ + public async list(params: IListAuditLogs = {}): Promise { + let filters: Omit; + try { + const { + page = 1, + perPage = 100, + pdpId, + users, + decision, + resources, + tenant, + action, + timestampFrom, + timestampTo, + sortBy, + query, + } = params; + filters = { + page, + perPage, + ...(pdpId === undefined ? {} : { pdpId }), + ...(users === undefined ? {} : { users: [...users] }), + ...(decision === undefined ? {} : { decision }), + ...(resources === undefined ? {} : { resources: [...resources] }), + ...(tenant === undefined ? {} : { tenant }), + ...(action === undefined ? {} : { action }), + ...(timestampFrom === undefined ? {} : { timestampFrom }), + ...(timestampTo === undefined ? {} : { timestampTo }), + ...(sortBy === undefined ? {} : { sortBy }), + ...(query === undefined ? {} : { query }), + }; + } catch (cause) { + this.handleApiError( + new Error('Cannot copy audit-log filters. Supply the published scalar and array fields.', { + cause, + }), + ); + } + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.auditLogs.listAuditLogs({ + ...filters, + ...this.config.apiContext.environmentContext, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IAuditLogsApi.get} */ + public async get(logId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.auditLogs.getDetailedAuditLog({ + ...this.config.apiContext.environmentContext, + logId, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } +} diff --git a/src/api/base.ts b/src/api/base.ts index 569acd18..8de2115f 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -1,37 +1,72 @@ -import axios, { AxiosError, AxiosResponse } from 'axios'; -import { Logger } from 'pino'; +import axios, { type AxiosError, type AxiosResponse } from 'axios'; +import { type Logger } from 'pino'; -import { FactsSyncTimeoutPolicy, IPermitConfig } from '../config'; -import { APIKeysApi, Configuration } from '../openapi'; -import { BASE_PATH } from '../openapi/base'; +import { type FactsSyncTimeoutPolicy, type IPermitConfig } from '#src/config'; +import { APIKeysApi, Configuration } from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { API_ACCESS_LEVELS, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; +import { + diagnosticAxiosError, + diagnosticCause, + diagnosticErrorSecrets, + diagnosticMessage, + diagnosticMetadata, + diagnosticRequestSecrets, + diagnosticText, +} from '#src/utils/diagnostics'; -interface FormattedAxiosError { - code?: string; +import { + API_ACCESS_LEVELS, + ApiContextLevel, + ApiKeyLevel, + initializeApiContext, + PermitContextError, +} from '#src/api/context'; + +export interface FormattedAxiosError { + code?: string | undefined; message: string; - error?: T; - status?: number; + error?: unknown; + status?: number | undefined; } -export class PermitApiError extends Error { - constructor(message: string, public originalError: AxiosError) { - super(message); +export class PermitApiError extends Error { + public readonly originalError: AxiosError; + public readonly status: number | undefined; + public readonly code: string | undefined; + + /** + * Creates a named REST failure from a detached, bounded request-error snapshot. + * + * @param message - Description of the failure, sanitized against request credentials and data. + * @param originalError - Failed Axios request. Its raw response body is not retained after redaction. + */ + constructor(message: string, originalError: AxiosError) { + const snapshot = diagnosticAxiosError(originalError); + super(diagnosticText(message || snapshot.message, diagnosticRequestSecrets(originalError)), { + cause: diagnosticCause(snapshot), + }); + this.name = 'PermitApiError'; + this.originalError = snapshot; + this.status = snapshot.status; + this.code = snapshot.code; } - public get formattedAxiosError(): FormattedAxiosError { + public get formattedAxiosError(): FormattedAxiosError { return { - code: this.originalError.code, + code: this.code, message: this.message, error: this.originalError.response?.data, - status: this.originalError.status, + status: this.status, }; } - public get request(): any { - return this.originalError.request; + /** Underlying socket/request objects are never retained on public errors. */ + public get request(): undefined { + return undefined; } - public get response(): AxiosResponse | undefined { + /** Bounded response diagnostics; private fields are omitted and the resulting body is unknown. */ + public get response(): AxiosResponse | undefined { return this.originalError.response; } } @@ -75,8 +110,11 @@ export abstract class BasePermitApi { protected openapiClientConfig: Configuration; private scopeApi: APIKeysApi; - constructor(protected config: IPermitConfig, protected logger: Logger) { - const version = process.env.npm_package_version ?? 'unknown'; + constructor( + protected config: IPermitConfig, + protected logger: Logger, + ) { + const version = process.env['npm_package_version'] ?? 'unknown'; this.openapiClientConfig = new Configuration({ basePath: `${this.config.apiUrl}`, accessToken: this.config.token, @@ -93,57 +131,26 @@ export abstract class BasePermitApi { * Sets the API context and permitted access level based on the API key scope. */ private async setContextFromApiKey(): Promise { - try { - this.logger.debug('Fetching api key scope'); - const response = await this.scopeApi.getApiKeyScope(); - - if (response.data.organization_id !== undefined && response.data.organization_id !== null) { - this.config.apiContext._saveApiKeyAccessibleScope( - response.data.organization_id, - response.data.project_id, - response.data.environment_id, + return initializeApiContext(this.config.apiContext, async () => { + try { + this.logger.debug('Fetching api key scope'); + const response = await this.scopeApi.getApiKeyScope(); + return response.data; + } catch (error) { + const cause = axios.isAxiosError(error) + ? diagnosticAxiosError(error, [this.config.token]) + : diagnosticCause(error, [this.config.token]); + const failure = new PermitContextError( + `Could not fetch the API key scope: ${cause.message} Check connectivity and API key access.`, + { cause }, ); - - if (response.data.project_id !== undefined && response.data.project_id !== null) { - if (response.data.environment_id !== undefined && response.data.environment_id !== null) { - // set environment level context - this.logger.debug(`setting: environment-level api context`); - this.config.apiContext.setEnvironmentLevelContext( - response.data.organization_id, - response.data.project_id, - response.data.environment_id, - ); - return; - } - - // set project level context - this.logger.debug(`setting: project-level api context`); - this.config.apiContext.setProjectLevelContext( - response.data.organization_id, - response.data.project_id, - ); - return; - } - - // set org level context - this.logger.debug(`setting: organization-level api context`); - this.config.apiContext.setOrganizationLevelContext(response.data.organization_id); - return; - } - - throw new PermitContextError('could not set api context level'); - } catch (err) { - if (axios.isAxiosError(err)) { this.logger.error( - `[${err?.response?.status}] permit.api.getApiKeyScope(), err: ${JSON.stringify( - err?.response?.data, - )}`, + { err: failure, operation: 'getApiKeyScope' }, + 'permit.api.getApiKeyScope() failed', ); + throw failure; } - throw new PermitContextError( - 'could not fetch the api key scope in order to set the api context level', - ); - } + }); } /** @@ -202,20 +209,15 @@ export abstract class BasePermitApi { } protected handleApiError(err: unknown): never { - if (axios.isAxiosError(err)) { - // this is an http response with an error status code - const logMessage = `Got error status code: ${err.response?.status}, err: ${JSON.stringify( - err?.response?.data, - )}`; - const apiMessage = err.response?.data.message; - // log this to the SDK logger - this.logger.error(logMessage); - // and throw a permit error exception - throw new PermitApiError(apiMessage, err); - } else { - // unexpected error, just throw - throw err; - } + const privacy = diagnosticErrorSecrets(err, [this.config.token]); + const metadata = diagnosticMetadata(err, privacy); + const snapshot = axios.isAxiosError(err) + ? diagnosticAxiosError(err, [this.config.token]) + : new axios.AxiosError(diagnosticMessage(err, privacy), metadata.code); + if (metadata.status !== undefined) snapshot.status = metadata.status; + const failure = new PermitApiError(snapshot.message, snapshot); + this.logger.error({ err: failure, operation: 'REST' }, 'Permit REST API request failed'); + throw failure; } } @@ -232,7 +234,10 @@ export interface IWaitForSync { } export abstract class BaseFactsPermitAPI extends BasePermitApi implements IWaitForSync { - constructor(protected config: IPermitConfig, protected logger: Logger) { + constructor( + protected override config: IPermitConfig, + protected override logger: Logger, + ) { super(config, logger); if (config.proxyFactsViaPdp) { this.openapiClientConfig = new Configuration({ diff --git a/src/api/condition-set-rules.ts b/src/api/condition-set-rules.ts index 8591b189..4b0bcb06 100644 --- a/src/api/condition-set-rules.ts +++ b/src/api/condition-set-rules.ts @@ -1,33 +1,41 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ConditionSetRulesApi as AutogenConditionSetRulesApi, - ConditionSetRuleCreate, - ConditionSetRuleRead, - ConditionSetRuleRemove, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type ConditionSetRuleCreate, + type ConditionSetRuleRead, + type ConditionSetRuleRemove, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; -export { ConditionSetRuleCreate, ConditionSetRuleRead, ConditionSetRuleRemove } from '../openapi'; +export { + type ConditionSetRuleCreate, + type ConditionSetRuleRead, + type ConditionSetRuleRemove, +} from '#src/openapi/index'; export interface IListConditionSetRules extends IPagination { /** * the key of the userset, if used only rules matching that userset will be fetched. */ - userSetKey: string; + userSetKey?: string; /** - * the key of the permission, formatted as :. - * if used only rules granting that permission will be fetched. + * The action key or ID used to filter rule permissions, for example `write`. + * Rule create/read permissions use `resource:action`; this GET filter uses the action. */ - permissionKey: string; + permissionKey?: string; /** * the key of the resourceset, if used only rules matching that resourceset will be fetched. */ - resourceSetKey: string; + resourceSetKey?: string; } /** @@ -42,7 +50,7 @@ export interface IConditionSetRulesApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - list(params: IListConditionSetRules): Promise; + list(params?: IListConditionSetRules): Promise; /** * Creates a new condition set rule. @@ -90,17 +98,17 @@ export class ConditionSetRulesApi extends BasePermitApi implements IConditionSet * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async list(params: IListConditionSetRules): Promise { + public async list(params?: IListConditionSetRules): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); - const { userSetKey, permissionKey, resourceSetKey, page = 1, perPage = 100 } = params; + const { userSetKey, permissionKey, resourceSetKey, page = 1, perPage = 100 } = params ?? {}; try { return ( await this.setRules.listSetPermissions({ ...this.config.apiContext.environmentContext, - userSet: userSetKey, - permission: permissionKey, - resourceSet: resourceSetKey, + ...(userSetKey !== undefined && { userSet: userSetKey }), + ...(permissionKey !== undefined && { permission: permissionKey }), + ...(resourceSetKey !== undefined && { resourceSet: resourceSetKey }), page, perPage, }) @@ -122,12 +130,18 @@ export class ConditionSetRulesApi extends BasePermitApi implements IConditionSet await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( + const created = ( await this.setRules.assignSetPermissions({ ...this.config.apiContext.environmentContext, conditionSetRuleCreate: rule, }) ).data[0]; + if (created === undefined) { + throw new Error( + 'Creating a condition set rule returned no rule; inspect the API response.', + ); + } + return created; } catch (err) { this.handleApiError(err); } diff --git a/src/api/condition-sets.ts b/src/api/condition-sets.ts index 5037a1ed..09bae9ea 100644 --- a/src/api/condition-sets.ts +++ b/src/api/condition-sets.ts @@ -1,29 +1,44 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ConditionSetsApi as AutogenConditionSetsApi, - ConditionSetCreate, - ConditionSetRead, - ConditionSetUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type ConditionSetCreate, + type ConditionSetRead, + type ConditionSetUpdate, + type ConditionSetType, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; -export { ConditionSetCreate, ConditionSetRead, ConditionSetUpdate } from '../openapi'; +export { + type ConditionSetCreate, + type ConditionSetRead, + type ConditionSetUpdate, +} from '#src/openapi/index'; + +/** Filters and pagination for condition-set listing. */ +export interface IListConditionSets extends IPagination { + /** Return only user sets or resource sets; omitted means both kinds. */ + type?: ConditionSetType; +} export interface IConditionSetsApi { /** * Retrieves a list of condition sets. * - * @param pagination The pagination options, @see {@link IPagination} + * @param params - Optional type filter and pagination, @see {@link IListConditionSets} * @returns A promise that resolves to an array of condition sets. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - list(pagination?: IPagination): Promise; + list(params?: IListConditionSets): Promise; /** * Retrieves a condition set by its key. @@ -112,23 +127,25 @@ export class ConditionSetsApi extends BasePermitApi implements IConditionSetsApi /** * Retrieves a list of condition sets. * - * @param pagination The pagination options, @see {@link IPagination} + * @param params - Optional type filter and pagination, @see {@link IListConditionSets} * @returns A promise that resolves to an array of condition sets. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async list(pagination?: IPagination): Promise { - const { page = 1, perPage = 100 } = pagination ?? {}; + public async list(params?: IListConditionSets): Promise { + const { type, page = 1, perPage = 100 } = params ?? {}; await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( + const response = ( await this.conditionSets.listConditionSets({ ...this.config.apiContext.environmentContext, + ...(type !== undefined && { type }), page, perPage, }) ).data; + return Array.isArray(response) ? response : response.data; } catch (err) { this.handleApiError(err); } diff --git a/src/api/context.test.ts b/src/api/context.test.ts new file mode 100644 index 00000000..f86e77bf --- /dev/null +++ b/src/api/context.test.ts @@ -0,0 +1,288 @@ +import axios, { AxiosError, type InternalAxiosRequestConfig } from 'axios'; +import pino from 'pino'; +import { expect, test, vi } from 'vitest'; + +import { + ApiContext, + ApiContextLevel, + ApiKeyLevel, + PermitContextChangeError, + PermitContextError, +} from '#src/api/context'; +import { Permit } from '#src/index'; +import { UsersApi } from '#src/api/users'; + +const environmentScope = { + organization_id: 'org', + project_id: 'project', + environment_id: 'environment', +}; + +function deferred() { + let resolve!: (value: T) => void; + let reject!: (reason: unknown) => void; + const promise = new Promise((accept, decline) => { + resolve = accept; + reject = decline; + }); + return { promise, resolve, reject }; +} + +function response(config: InternalAxiosRequestConfig, data: unknown) { + return { data, config, status: 200, statusText: 'OK', headers: {} }; +} + +function firstCalls(permit: Permit): Array> { + return [ + permit.api.users.get('alice'), + permit.api.roles.get('reader'), + permit.api.resources.get('document'), + ]; +} + +function client(load: (config: InternalAxiosRequestConfig) => Promise, options = {}) { + const requests: InternalAxiosRequestConfig[] = []; + const caller = axios.create(); + caller.defaults.adapter = async (config) => { + requests.push(config); + return response( + config, + config.url?.endsWith('/api-key/scope') ? await load(config) : { key: 'fixture' }, + ); + }; + const permit = new Permit({ + token: 'test-token', + axiosInstance: caller, + log: { level: 'silent' }, + ...options, + }); + return { permit, requests, caller }; +} + +test('parallel API wrappers publish one complete scope before dispatching dependent requests', async () => { + const pending = deferred(); + const load = vi.fn(() => pending.promise); + const { permit, requests } = client(load); + const calls = firstCalls(permit); + await vi.waitFor(() => expect(load).toHaveBeenCalledTimes(1)); + expect(requests).toHaveLength(1); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.WAIT_FOR_INIT); + pending.resolve(environmentScope); + expect(await Promise.all(calls)).toHaveLength(3); + expect(load).toHaveBeenCalledTimes(1); + expect(requests).toHaveLength(4); + expect(permit.config.apiContext.environmentContext).toEqual({ + projId: 'project', + envId: 'environment', + }); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await permit.api.users.get('bob'); + expect(load).toHaveBeenCalledTimes(1); +}); + +test('all waiters share a failed lookup and a later parallel wave recovers with one lookup', async () => { + const pending = deferred(); + const load = vi.fn(() => pending.promise); + const { permit, requests } = client(load); + const failed = Promise.allSettled(firstCalls(permit)); + await vi.waitFor(() => expect(load).toHaveBeenCalledTimes(1)); + const cause = new AxiosError('network fixture', 'ECONNRESET'); + pending.reject(cause); + const settled = await failed; + const errors = settled.map((result) => (result.status === 'rejected' ? result.reason : null)); + expect(errors[0]).toBeInstanceOf(PermitContextError); + expect(errors[1]).toBe(errors[0]); + expect(errors[2]).toBe(errors[0]); + expect(errors[0]).toHaveProperty('cause'); + expect(requests).toHaveLength(1); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.WAIT_FOR_INIT); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + load.mockResolvedValue(environmentScope); + await Promise.all(firstCalls(permit)); + expect(load).toHaveBeenCalledTimes(2); + expect(requests).toHaveLength(5); +}); + +const malformedScopes: Array<[string, unknown]> = [ + ['null', null], + ['array', []], + ['missing organization', {}], + ['numeric organization', { organization_id: 123 }], + ['blank organization', { organization_id: ' \t' }], + ['blank project', { organization_id: 'org', project_id: '' }], + ['numeric project', { organization_id: 'org', project_id: 123 }], + ['blank environment', { organization_id: 'org', project_id: 'project', environment_id: ' ' }], + ['numeric environment', { organization_id: 'org', project_id: 'project', environment_id: 123 }], + ['environment without project', { organization_id: 'org', environment_id: 'environment' }], + [ + 'environment with null project', + { organization_id: 'org', project_id: null, environment_id: 'environment' }, + ], +]; + +test.each(malformedScopes)( + 'rejects %s scope atomically and retries on the same SDK', + async (_name, value) => { + const load = vi.fn().mockResolvedValueOnce(value).mockResolvedValue(environmentScope); + const { permit, requests } = client(load); + await expect(permit.api.users.get('alice')).rejects.toBeInstanceOf(PermitContextError); + const context = permit.config.apiContext; + expect([context.organization, context.project, context.environment]).toEqual([ + null, + null, + null, + ]); + expect(context.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + expect(context.permittedAccessLevel).toBe(ApiKeyLevel.WAIT_FOR_INIT); + expect(requests).toHaveLength(1); + await Promise.all(firstCalls(permit)); + expect(load).toHaveBeenCalledTimes(2); + expect(context.environmentContext).toEqual({ projId: 'project', envId: 'environment' }); + }, +); + +test('late scope success preserves explicitly updated permissions and context', async () => { + const pending = deferred(); + const load = vi.fn(() => pending.promise); + const { permit, requests } = client(load); + const calls = firstCalls(permit); + await vi.waitFor(() => expect(load).toHaveBeenCalledTimes(1)); + const context = permit.config.apiContext; + context._saveApiKeyAccessibleScope('org'); + context.setEnvironmentLevelContext('org', 'chosen-project', 'chosen-environment'); + pending.resolve(environmentScope); + await Promise.all(calls); + expect(context.permittedAccessLevel).toBe(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); + expect(context.environmentContext).toEqual({ + projId: 'chosen-project', + envId: 'chosen-environment', + }); + expect( + requests + .slice(1) + .every((request) => request.url?.includes('/chosen-project/chosen-environment/')), + ).toBe(true); +}); + +test.each(['network failure', 'malformed scope'] as const)( + 'late %s rejects existing waiters while preserving selected context for later calls', + async (outcome) => { + const pending = deferred(); + const load = vi.fn(() => pending.promise); + const { permit, requests } = client(load); + const failed = Promise.allSettled(firstCalls(permit)); + await vi.waitFor(() => expect(load).toHaveBeenCalledTimes(1)); + const context = permit.config.apiContext; + context._saveApiKeyAccessibleScope('chosen-org'); + context.setEnvironmentLevelContext('chosen-org', 'chosen-project', 'chosen-environment'); + if (outcome === 'network failure') + pending.reject(new AxiosError('network fixture', 'ECONNRESET')); + else pending.resolve({ organization_id: 123 }); + const settled = await failed; + expect(settled.every((result) => result.status === 'rejected')).toBe(true); + expect(context.organization).toBe('chosen-org'); + expect(context.permittedAccessLevel).toBe(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); + expect(context.environmentContext).toEqual({ + projId: 'chosen-project', + envId: 'chosen-environment', + }); + await permit.api.users.get('alice'); + expect(load).toHaveBeenCalledTimes(1); + expect(requests).toHaveLength(2); + expect(requests[1]?.url).toContain('/chosen-project/chosen-environment/'); + }, +); + +test('shared uninitialized context never shares a lookup or permissions between SDK tokens', async () => { + const supplied = new ApiContext(); + const firstScope = deferred(); + const secondScope = deferred(); + const firstLoad = vi.fn(() => firstScope.promise); + const secondLoad = vi.fn(() => secondScope.promise); + const first = client(firstLoad, { token: 'first', apiContext: supplied }); + const second = client(secondLoad, { token: 'second', apiContext: supplied }); + const calls = [...firstCalls(first.permit), ...firstCalls(second.permit)]; + await vi.waitFor(() => { + expect(firstLoad).toHaveBeenCalledTimes(1); + expect(secondLoad).toHaveBeenCalledTimes(1); + }); + firstScope.resolve(environmentScope); + secondScope.resolve({ + organization_id: 'other-org', + project_id: 'other-project', + environment_id: 'other-environment', + }); + await Promise.all(calls); + expect(first.permit.config.apiContext.environment).toBe('environment'); + expect(second.permit.config.apiContext.environment).toBe('other-environment'); + expect(supplied.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + expect( + first.requests.every((request) => request.headers.get('Authorization') === 'Bearer first'), + ).toBe(true); + expect( + second.requests.every((request) => request.headers.get('Authorization') === 'Bearer second'), + ).toBe(true); +}); + +test.each([ + [ + ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY, + { organization_id: 'org' }, + ApiContextLevel.ORGANIZATION, + ], + [ + ApiKeyLevel.PROJECT_LEVEL_API_KEY, + { organization_id: 'org', project_id: 'project' }, + ApiContextLevel.PROJECT, + ], + [ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY, environmentScope, ApiContextLevel.ENVIRONMENT], +] as const)( + 'initializes valid %s scope with its matching routing level', + async (access, scope, level) => { + const { permit, requests } = client(async () => scope); + const api = new UsersApi(permit.config, pino({ level: 'silent' })); + await api.ensureAccessLevel(access); + expect(permit.config.apiContext.permittedAccessLevel).toBe(access); + expect(permit.config.apiContext.contextLevel).toBe(level); + await api.ensureContext(level); + expect(requests).toHaveLength(1); + }, +); + +test('an initial permission scope without a selection initializes locally', async () => { + const supplied = new ApiContext(); + supplied._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const load = vi.fn(async () => environmentScope); + const { permit, requests } = client(load, { apiContext: supplied }); + await Promise.all(firstCalls(permit)); + expect(load).not.toHaveBeenCalled(); + expect(requests).toHaveLength(3); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.ENVIRONMENT); + expect(supplied.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); +}); + +test('context setters enforce permissions and keep the previous selection on rejection', () => { + const context = new ApiContext(); + expect(() => context.setOrganizationLevelContext('org')).toThrow(PermitContextChangeError); + expect(() => context.environmentContext).toThrow(PermitContextError); + context._saveApiKeyAccessibleScope('org', 'project', 'environment'); + context.setEnvironmentLevelContext('org', 'project', 'environment'); + expect(() => context.setOrganizationLevelContext('other-org')).toThrow(PermitContextChangeError); + expect(() => context.setProjectLevelContext('org', 'other-project')).toThrow( + PermitContextChangeError, + ); + expect(() => context.setEnvironmentLevelContext('org', 'project', 'other-environment')).toThrow( + PermitContextChangeError, + ); + expect(() => context.setEnvironmentLevelContext('org', 'project', '')).toThrow( + PermitContextError, + ); + expect(() => context._saveApiKeyAccessibleScope('other-org')).toThrow(PermitContextChangeError); + expect(context.environmentContext).toEqual({ projId: 'project', envId: 'environment' }); + context.setProjectLevelContext('org', 'project'); + expect(context.environment).toBeNull(); + context.setOrganizationLevelContext('org'); + expect(context.project).toBeNull(); + expect(context.permittedAccessLevel).toBe(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); +}); diff --git a/src/api/context.ts b/src/api/context.ts index da274e70..6f79ae98 100644 --- a/src/api/context.ts +++ b/src/api/context.ts @@ -1,3 +1,10 @@ +import { + diagnosticCause, + diagnosticErrorSecrets, + diagnosticMetadata, + diagnosticText, +} from '#src/utils/diagnostics'; + /** * The `ApiKeyLevel` enum represents the access level of a Permit API Key. */ @@ -65,8 +72,17 @@ export enum ApiContextLevel { * If the context is missing some data required for a method - the API call will fail. */ export class PermitContextError extends Error { - constructor(message: string) { - super(message); + public readonly status: number | undefined; + public readonly code: string | undefined; + + constructor(message: string, options?: ErrorOptions) { + const privacy = diagnosticErrorSecrets(options?.cause); + const cause = options?.cause === undefined ? undefined : diagnosticCause(options.cause); + super(diagnosticText(message, privacy), cause === undefined ? undefined : { cause }); + this.name = 'PermitContextError'; + const metadata = diagnosticMetadata(cause); + this.status = metadata.status; + this.code = metadata.code; } } @@ -76,204 +92,430 @@ export class PermitContextError extends Error { * such API calls will result in 401). Instead, the SDK throws this exception. */ export class PermitContextChangeError extends Error { - constructor(message: string) { - super(message); + public readonly status: number | undefined; + public readonly code: string | undefined; + + constructor(message: string, options?: ErrorOptions) { + const privacy = diagnosticErrorSecrets(options?.cause); + const cause = options?.cause === undefined ? undefined : diagnosticCause(options.cause); + super(diagnosticText(message, privacy), cause === undefined ? undefined : { cause }); + this.name = 'PermitContextChangeError'; + const metadata = diagnosticMetadata(cause); + this.status = metadata.status; + this.code = metadata.code; } } -/** - * The `ApiContext` class represents the required known context for an API method. - * Since the Permit API hierarchy is deeply nested, it is less convenient to specify - * the full object hierarchy in every request. - * For example, in order to list roles, the user needs to specify the (id or key) of the: - * - the org - * - the project - * - then environment - * in which the roles are located under. - * Instead, the SDK can "remember" the current context and "auto-complete" the details - * from that context. - * We then get this kind of experience: - * ``` - * await permit.api.roles.list() - * ``` - * We can only run this function if the current context already knows the org, project, - * and environments that we want to run under, and that is why this method assumes - * we are running under a `ApiContextLevel.ENVIRONMENT` context. - */ -export class ApiContext { - private _level: ApiKeyLevel; - // org, project and environment the API Key is allowed to access - private _permittedOrganization: string | null; - private _permittedProject: string | null; - private _permittedEnvironment: string | null; - - // current known context - private _contextLevel: ApiContextLevel; - private _organization: string | null; - private _project: string | null; - private _environment: string | null; +type Scope = + | { + level: ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY; + organization: string; + project: null; + environment: null; + } + | { + level: ApiKeyLevel.PROJECT_LEVEL_API_KEY; + organization: string; + project: string; + environment: null; + } + | { + level: ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY; + organization: string; + project: string; + environment: string; + }; - constructor() { - this._level = ApiKeyLevel.WAIT_FOR_INIT; - this._permittedOrganization = null; - this._permittedProject = null; - this._permittedEnvironment = null; - - this._contextLevel = ApiContextLevel.WAIT_FOR_INIT; - this._organization = null; - this._project = null; - this._environment = null; +type Selection = + | { level: ApiContextLevel.WAIT_FOR_INIT; organization: null; project: null; environment: null } + | { level: ApiContextLevel.ORGANIZATION; organization: string; project: null; environment: null } + | { level: ApiContextLevel.PROJECT; organization: string; project: string; environment: null } + | { + level: ApiContextLevel.ENVIRONMENT; + organization: string; + project: string; + environment: string; + }; + +interface ContextState { + scope: Scope | null; + selection: Selection; + revision: number; + initialization: Promise | undefined; +} + +interface ContextSnapshot { + readonly scope: Scope | null; + readonly selection: Selection; +} + +const contextStates = new WeakMap(); +const contextSnapshotKey = Symbol.for('permitio.ApiContext.snapshot'); + +function stateOf(context: ApiContext): ContextState { + const state = contextStates.get(context); + if (state === undefined) { + throw new PermitContextError('Invalid API context: use an ApiContext instance.'); } + return state; +} - /** - * Do not call this method directly! - */ - public _saveApiKeyAccessibleScope(org: string, project?: string, environment?: string): void { - this._permittedOrganization = org; // cannot be null - - if (project && environment) { - this._permittedProject = project; - this._permittedEnvironment = environment; - this._level = ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY; - } else if (project) { - this._permittedProject = project; - this._permittedEnvironment = null; - this._level = ApiKeyLevel.PROJECT_LEVEL_API_KEY; - } else { - this._permittedProject = null; - this._permittedEnvironment = null; - this._level = ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY; +function identifier(value: unknown, field: string): string { + if (typeof value !== 'string' || value.trim().length === 0) { + throw new PermitContextError(`Invalid API scope ${field}: expected a nonempty string.`); + } + return value; +} + +function parseScope(value: unknown): Scope { + if (value === null || typeof value !== 'object' || Array.isArray(value)) { + throw new PermitContextError('Invalid API scope response: expected an object.'); + } + const organization = identifier(Reflect.get(value, 'organization_id'), 'organization_id'); + const projectValue: unknown = Reflect.get(value, 'project_id'); + const environmentValue: unknown = Reflect.get(value, 'environment_id'); + const project = projectValue == null ? null : identifier(projectValue, 'project_id'); + const environment = + environmentValue == null ? null : identifier(environmentValue, 'environment_id'); + if (environment !== null && project === null) { + throw new PermitContextError('Invalid API scope response: environment_id requires project_id.'); + } + if (project !== null && environment !== null) { + return { level: ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY, organization, project, environment }; + } + if (project !== null) { + return { level: ApiKeyLevel.PROJECT_LEVEL_API_KEY, organization, project, environment: null }; + } + return { + level: ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY, + organization, + project: null, + environment: null, + }; +} + +function defaultSelection(scope: Scope): Selection { + switch (scope.level) { + case ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY: + return { ...scope, level: ApiContextLevel.ORGANIZATION }; + case ApiKeyLevel.PROJECT_LEVEL_API_KEY: + return { ...scope, level: ApiContextLevel.PROJECT }; + case ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY: + return { ...scope, level: ApiContextLevel.ENVIRONMENT }; + } +} + +function verifySelection(scope: Scope | null, selection: Selection): void { + if (selection.level === ApiContextLevel.WAIT_FOR_INIT) return; + if ( + !scope || + selection.organization !== scope.organization || + (selection.project !== null && scope.project !== null && selection.project !== scope.project) || + (selection.environment !== null && + scope.environment !== null && + selection.environment !== scope.environment) + ) { + throw new PermitContextChangeError( + 'Cannot select an API context outside the API key permissions.', + ); + } +} + +function readApiContextSnapshot(this: ApiContext): ContextSnapshot { + const state = stateOf(this); + return { + scope: state.scope === null ? null : { ...state.scope }, + selection: { ...state.selection }, + }; +} + +function parseSelection(value: unknown): Selection { + if (value === null || typeof value !== 'object' || Array.isArray(value)) { + throw new PermitContextError('Invalid API context snapshot selection.'); + } + const level: unknown = Reflect.get(value, 'level'); + const organization: unknown = Reflect.get(value, 'organization'); + const project: unknown = Reflect.get(value, 'project'); + const environment: unknown = Reflect.get(value, 'environment'); + switch (level) { + case ApiContextLevel.WAIT_FOR_INIT: + if (organization === null && project === null && environment === null) { + return { level, organization, project, environment }; + } + break; + case ApiContextLevel.ORGANIZATION: + if (project === null && environment === null) { + return { + level, + organization: identifier(organization, 'organization'), + project, + environment, + }; + } + break; + case ApiContextLevel.PROJECT: + if (environment === null) { + return { + level, + organization: identifier(organization, 'organization'), + project: identifier(project, 'project'), + environment, + }; + } + break; + case ApiContextLevel.ENVIRONMENT: + return { + level, + organization: identifier(organization, 'organization'), + project: identifier(project, 'project'), + environment: identifier(environment, 'environment'), + }; + } + throw new PermitContextError('Invalid API context snapshot selection hierarchy.'); +} + +function parseContextSnapshot(value: unknown): ContextSnapshot { + if (value === null || typeof value !== 'object' || Array.isArray(value)) { + throw new PermitContextError('Invalid API context snapshot.'); + } + const permissions: unknown = Reflect.get(value, 'scope'); + let scope: Scope | null = null; + if (permissions !== null) { + if (typeof permissions !== 'object' || Array.isArray(permissions)) { + throw new PermitContextError('Invalid API context snapshot permissions.'); + } + const project: unknown = Reflect.get(permissions, 'project'); + const environment: unknown = Reflect.get(permissions, 'environment'); + if ( + (project !== null && typeof project !== 'string') || + (environment !== null && typeof environment !== 'string') + ) { + throw new PermitContextError('Invalid API context snapshot permission hierarchy.'); + } + scope = parseScope({ + organization_id: Reflect.get(permissions, 'organization'), + project_id: project, + environment_id: environment, + }); + if (Reflect.get(permissions, 'level') !== scope.level) { + throw new PermitContextError('Invalid API context snapshot permission level.'); } } + const selection = parseSelection(Reflect.get(value, 'selection')); + verifySelection(scope, selection); + return { scope, selection }; +} - /** - * Get the current API key access level. - */ - public get permittedAccessLevel(): ApiKeyLevel { - return this._level; +/** Stores checked API-key permissions and the mutable routing selection for API methods. */ +export class ApiContext { + constructor() { + contextStates.set(this, { + scope: null, + selection: { + level: ApiContextLevel.WAIT_FOR_INIT, + organization: null, + project: null, + environment: null, + }, + revision: 0, + initialization: undefined, + }); + Object.defineProperty(this, contextSnapshotKey, { value: readApiContextSnapshot }); } /** - * Get the current API key level. - * @deprecated replaced with permit.config.apiContext.permittedAccessLevel + * Records validated API-key permissions for internal SDK use. + * + * @param org - Accessible organization key or ID. + * @param project - Accessible project key or ID, if restricted to a project. + * @param environment - Accessible environment key or ID, requiring a project. + * @throws PermitContextError When scope identifiers or hierarchy are invalid. + * @throws PermitContextChangeError When new permissions exclude the existing selection. */ - public get level(): ApiKeyLevel { - return this._level; + public _saveApiKeyAccessibleScope(org: string, project?: string, environment?: string): void { + const scope = parseScope({ + organization_id: org, + project_id: project, + environment_id: environment, + }); + const state = stateOf(this); + verifySelection(scope, state.selection); + state.scope = scope; + state.revision += 1; } - /** - * Get the current SDK context level. - */ + /** Returns the API key's permission level. */ + public get permittedAccessLevel(): ApiKeyLevel { + return stateOf(this).scope?.level ?? ApiKeyLevel.WAIT_FOR_INIT; + } + + /** Returns the current context level. */ public get contextLevel(): ApiContextLevel { - return this._contextLevel; + return stateOf(this).selection.level; } - /** - * Get the current organization in the context. - */ + /** Returns the selected organization, or null before initialization. */ public get organization(): string | null { - return this._organization; + return stateOf(this).selection.organization; } - /** - * Get the current project in the context. - */ + /** Returns the selected project, or null outside project/environment context. */ public get project(): string | null { - return this._project; + return stateOf(this).selection.project; } - /** - * Get the current environment in the context. - */ + /** Returns the selected environment, or null outside environment context. */ public get environment(): string | null { - return this._environment; + return stateOf(this).selection.environment; } - private verifyCanAccessOrg(org: string): void { - if (org !== this._permittedOrganization) { - throw new PermitContextChangeError( - `You cannot set an SDK context with org '${org}' due to insufficient API Key permissions`, - ); - } - } - - private verifyCanAccessProject(org: string, project: string): void { - this.verifyCanAccessOrg(org); - if (this._permittedProject !== null && project !== this._permittedProject) { - throw new PermitContextChangeError( - `You cannot set an SDK context with project '${project}' due to insufficient API Key permissions`, - ); - } - } - - private verifyCanAccessEnvironment(org: string, project: string, environment: string): void { - this.verifyCanAccessProject(org, project); - if (this._permittedEnvironment !== null && environment !== this._permittedEnvironment) { - throw new PermitContextChangeError( - `You cannot set an SDK context with environment '${environment}' due to insufficient API Key permissions`, - ); - } + private select(selection: Selection): void { + const state = stateOf(this); + verifySelection(state.scope, selection); + state.selection = selection; + state.revision += 1; } /** - * Set the context to organization level. - * @param org The organization key. + * Selects an organization allowed by the API key, clearing project and environment. + * + * @param org - Organization key or ID. + * @throws PermitContextError When the identifier is invalid. + * @throws PermitContextChangeError When permissions have not loaded or exclude the organization. */ - public setOrganizationLevelContext(org: string) { - this.verifyCanAccessOrg(org); - this._contextLevel = ApiContextLevel.ORGANIZATION; - this._organization = org; - this._project = null; - this._environment = null; + public setOrganizationLevelContext(org: string): void { + this.select({ + level: ApiContextLevel.ORGANIZATION, + organization: identifier(org, 'organization'), + project: null, + environment: null, + }); } /** - * Set the context to project level. - * @param org The organization key. - * @param project The project key. + * Selects an allowed project, clearing the environment. + * + * @param org - Organization key or ID. + * @param project - Project key or ID. + * @throws PermitContextError When an identifier is invalid. + * @throws PermitContextChangeError When permissions have not loaded or exclude the project. */ - public setProjectLevelContext(org: string, project: string) { - this.verifyCanAccessProject(org, project); - this._contextLevel = ApiContextLevel.PROJECT; - this._organization = org; - this._project = project; - this._environment = null; + public setProjectLevelContext(org: string, project: string): void { + this.select({ + level: ApiContextLevel.PROJECT, + organization: identifier(org, 'organization'), + project: identifier(project, 'project'), + environment: null, + }); } /** - * Set the context to environment level. - * @param org The organization key. - * @param project The project key. - * @param environment The environment key. + * Selects an environment allowed by the API key. + * + * @param org - Organization key or ID. + * @param project - Project key or ID. + * @param environment - Environment key or ID. + * @throws PermitContextError When an identifier is invalid. + * @throws PermitContextChangeError When permissions have not loaded or exclude the environment. */ - public setEnvironmentLevelContext(org: string, project: string, environment: string) { - this.verifyCanAccessEnvironment(org, project, environment); - this._contextLevel = ApiContextLevel.ENVIRONMENT; - this._organization = org; - this._project = project; - this._environment = environment; + public setEnvironmentLevelContext(org: string, project: string, environment: string): void { + this.select({ + level: ApiContextLevel.ENVIRONMENT, + organization: identifier(org, 'organization'), + project: identifier(project, 'project'), + environment: identifier(environment, 'environment'), + }); } - /** - * Get the API project and environment parameters from an environment-level context. - * @returns An object containing the project and environment IDs. - * @throws {@link PermitContextError} If the API context is not set to environment level or the project or environment is null. - */ + /** Returns routing parameters for the selected environment; throws when none is selected. */ public get environmentContext(): { projId: string; envId: string } { - if ( - this._contextLevel !== ApiContextLevel.ENVIRONMENT || - this._project === null || - this._environment === null - ) { + const selected = stateOf(this).selection; + if (selected.level !== ApiContextLevel.ENVIRONMENT) { throw new PermitContextError( - `You cannot get environment context, current api context is: ${ - ApiContextLevel[this._contextLevel] - }`, + `Cannot get environment context at level ${ApiContextLevel[selected.level]}.`, ); } - return { - projId: this._project, - envId: this._environment, - }; + return { projId: selected.project, envId: selected.environment }; } } + +/** + * Copies validated initial state without sharing mutable selection or an in-flight lookup. + * + * @internal + * @param source - Context whose initial permissions and selection should be preserved. + * @returns An independent context for one SDK instance. + * @throws TypeError When source lacks a checked snapshot bridge or its snapshot is invalid. + */ +export function snapshotApiContext(source: ApiContext): ApiContext { + let snapshot: ContextSnapshot; + try { + if (source === null || typeof source !== 'object' || Array.isArray(source)) { + throw new TypeError(); + } + const methods = [ + '_saveApiKeyAccessibleScope', + 'setOrganizationLevelContext', + 'setProjectLevelContext', + 'setEnvironmentLevelContext', + ]; + if (methods.some((method) => typeof Reflect.get(source, method) !== 'function')) { + throw new TypeError(); + } + const properties = [ + 'permittedAccessLevel', + 'contextLevel', + 'organization', + 'project', + 'environment', + 'environmentContext', + ]; + if (properties.some((property) => !(property in source))) throw new TypeError(); + const bridge: unknown = Reflect.get(source, contextSnapshotKey); + if (typeof bridge !== 'function') throw new TypeError(); + snapshot = parseContextSnapshot(Reflect.apply(bridge, source, [])); + } catch { + throw new TypeError( + 'Invalid apiContext: expected an ApiContext with valid permissions and selection.', + ); + } + const target = new ApiContext(); + const copy = stateOf(target); + copy.scope = snapshot.scope; + copy.selection = snapshot.selection; + return target; +} + +/** + * Shares one scope lookup among wrappers, publishing complete state only while it is current. + * + * @internal + * @param context - The SDK-owned context shared by this SDK's wrappers. + * @param load - Fetches the API key scope without committing it. + * @returns Completion of the shared lookup; rejected lookups permit a later retry. + * @throws PermitContextError When the scope response is malformed. + */ +export function initializeApiContext( + context: ApiContext, + load: () => Promise, +): Promise { + const state = stateOf(context); + if (state.scope !== null && state.selection.level !== ApiContextLevel.WAIT_FOR_INIT) + return Promise.resolve(); + if (state.initialization) return state.initialization; + const revision = state.revision; + const pending = Promise.resolve() + .then(async () => { + const scope = state.scope ?? parseScope(await load()); + if (state.revision !== revision) return; + const selection = defaultSelection(scope); + state.scope = scope; + state.selection = selection; + state.revision += 1; + }) + .finally(() => { + if (state.initialization === pending) state.initialization = undefined; + }); + state.initialization = pending; + return pending; +} diff --git a/src/api/deprecated.ts b/src/api/deprecated.ts deleted file mode 100644 index 87346126..00000000 --- a/src/api/deprecated.ts +++ /dev/null @@ -1,1114 +0,0 @@ -import axios, { AxiosResponse } from 'axios'; -import { Logger } from 'pino'; - -import { IPermitConfig } from '../config'; -import { - ConditionSetCreate, - ConditionSetRead, - ConditionSetRuleCreate, - ConditionSetRuleRead, - ConditionSetRuleRemove, - ConditionSetRulesApi, - ConditionSetsApi, - ConditionSetType, - ConditionSetUpdate, - ResourceCreate, - ResourceRead, - ResourcesApi, - ResourceUpdate, - RoleAssignmentCreate, - RoleAssignmentRead, - RoleAssignmentRemove, - RoleAssignmentsApi, - RoleCreate, - RoleRead, - RolesApi, - RoleUpdate, - TenantCreate, - TenantRead, - TenantsApi, - TenantUpdate, - UserCreate, - UserRead, - UsersApi, - UserUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; - -import { BasePermitApi, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars - -/** - * This interface contains *read actions* that goes outside - * of your local network and queries permit.io cloud api. - * You should be aware that these actions incur some cross-cloud latency. - * @see {@link DeprecatedApiClient} for implementation and docs. - */ -export interface IDeprecatedReadApis { - listUsers(): Promise; - listRoles(): Promise; - getUser(userId: string): Promise; - getTenant(tenantId: string): Promise; - getRole(roleId: string): Promise; - getAssignedRoles(user: string, tenant?: string): Promise; - listConditionSets(type: string, page: number, per_page: number): Promise; - listConditionSetsRules(page: number, per_page: number): Promise; -} - -/** - * This interface contains *write actions* (or mutations) that manipulate remote - * state by calling the permit.io api. These api calls goes *outside* your local network. - * You should be aware that these actions incur some cross-cloud latency. - * @see {@link DeprecatedApiClient} for implementation and docs. - */ -export interface IDeprecatedWriteApis { - createUser(user: UserCreate): Promise; - updateUser(userId: string, user: UserUpdate): Promise; - syncUser(user: UserCreate): Promise; - deleteUser(userId: string): Promise>; - createTenant(tenant: TenantCreate): Promise; - updateTenant(tenantId: string, tenant: TenantUpdate): Promise; - deleteTenant(tenantId: string): Promise>; - listTenants(page?: number): Promise; - createRole(role: RoleCreate): Promise; - updateRole(roleId: string, role: RoleUpdate): Promise; - deleteRole(roleId: string): Promise>; - assignRole(assignedRole: RoleAssignmentCreate): Promise; - unassignRole(removedRole: RoleAssignmentRemove): Promise>; - createResource(resource: ResourceCreate): Promise; - updateResource(resourceId: string, resource: ResourceUpdate): Promise; - deleteResource(resourceId: string): Promise>; - createConditionSet(conditionSet: ConditionSetCreate): Promise; - updateConditionSet( - conditionSetId: string, - conditionSet: ConditionSetUpdate, - ): Promise; - deleteConditionSet(conditionSetId: string): Promise>; - assignConditionSetRule(conditionSetRule: ConditionSetRuleCreate): Promise; - unassignConditionSetRule(conditionSetRule: ConditionSetRuleRemove): Promise>; -} - -export interface IDeprecatedPermitApi extends IDeprecatedReadApis, IDeprecatedWriteApis {} - -/** - * Contains all the deprecated `permit.api.` methods in one place. - * The SDK now replaced all `permit.api.createRole()` with `permit.api.roles.create()` - * due to the large number of API endpoints, trying to allow more user-friendly code - * autocomplete behavior. - */ -export class DeprecatedApiClient extends BasePermitApi implements IDeprecatedPermitApi { - private _users: UsersApi; - private _tenants: TenantsApi; - private _roles: RolesApi; - private _conditionSets: ConditionSetsApi; - private _conditionSetRules: ConditionSetRulesApi; - private _roleAssignments: RoleAssignmentsApi; - private _resources: ResourcesApi; - - /** - * Creates an instance of DeprecatedApiClient. - * @param config - The configuration object for the Permit SDK. - * @param logger - The logger object for logging. - */ - constructor(config: IPermitConfig, logger: Logger) { - super(config, logger); - this._users = new UsersApi(this.openapiClientConfig, BASE_PATH, this.config.axiosInstance); - this._tenants = new TenantsApi(this.openapiClientConfig, BASE_PATH, this.config.axiosInstance); - this._roles = new RolesApi(this.openapiClientConfig, BASE_PATH, this.config.axiosInstance); - this._conditionSets = new ConditionSetsApi( - this.openapiClientConfig, - BASE_PATH, - this.config.axiosInstance, - ); - this._conditionSetRules = new ConditionSetRulesApi( - this.openapiClientConfig, - BASE_PATH, - this.config.axiosInstance, - ); - this._roleAssignments = new RoleAssignmentsApi( - this.openapiClientConfig, - BASE_PATH, - this.config.axiosInstance, - ); - this._resources = new ResourcesApi( - this.openapiClientConfig, - BASE_PATH, - this.config.axiosInstance, - ); - } - - /** - * Retrieves a list of users. - * @returns A promise that resolves to an array of UserRead objects representing the users. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.list() - */ - public async listUsers(): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - - try { - const response = await this._users.listUsers({ - ...this.config.apiContext.environmentContext, - }); - - this.logger.debug(`[${response.status}] permit.api.listUsers()`); - return response.data.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.getUser(), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a list of roles. - * @returns A promise that resolves to an array of RoleRead objects representing the roles. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.roles.list() - */ - public async listRoles(): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - - try { - const response = (await this._roles.listRoles({ - ...this.config.apiContext.environmentContext, - })) as AxiosResponse; - - this.logger.debug(`[${response.status}] permit.api.listRoles()`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.listRoles(), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a list of condition sets. - * @param type - The type of the condition set, either `userset` or `resourceset`. - * @param page - The page number. - * @param perPage - The number of items per page. - * @returns A promise that resolves to an array of ConditionSetRead objects representing the condition sets. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSets.list() - */ - public async listConditionSets( - type: ConditionSetType, - page: number, - perPage: number, - ): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - - try { - const response = await this._conditionSets.listConditionSets({ - ...this.config.apiContext.environmentContext, - type: type, - page: page, - perPage: perPage, - }); - - this.logger.debug(`[${response.status}] permit.api.listRoles()`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.listRoles(), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a list of condition set rules. - * @param page - The page number. - * @param perPage - The number of items per page. - * @returns A promise that resolves to an array of ConditionSetRuleRead objects representing the condition set rules. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSetRules.list() - */ - public async listConditionSetsRules( - page: number, - perPage: number, - ): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - - try { - const response = await this._conditionSetRules.listSetPermissions({ - ...this.config.apiContext.environmentContext, - page: page, - perPage: perPage, - }); - - this.logger.debug(`[${response.status}] permit.api.listRoles()`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.listRoles(), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a user by ID or key - * @param userId - The ID or the key of the user. - * @returns A promise that resolves to a UserRead object representing the user. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.get() - */ - public async getUser(userId: string): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._users.getUser({ - ...this.config.apiContext.environmentContext, - userId: userId, - }); - this.logger.debug(`[${response.status}] permit.api.getUser(${userId})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.getUser(${userId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a tenant by ID or key. - * @param tenantId - The ID or the key of the tenant. - * @returns A promise that resolves to a TenantRead object representing the tenant. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.tenants.get() - */ - public async getTenant(tenantId: string): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._tenants.getTenant({ - ...this.config.apiContext.environmentContext, - tenantId: tenantId, - }); - this.logger.debug(`[${response.status}] permit.api.getTenant(${tenantId})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.getTenant(${tenantId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a list of tenants. - * @param page - The page number. - * @returns A promise that resolves to an array of TenantRead objects representing the tenants. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.tenants.list() - */ - public async listTenants(page?: number): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._tenants.listTenants({ - ...this.config.apiContext.environmentContext, - page: page, - }); - this.logger.debug(`[${response.status}] permit.api.listTenants(${page ?? ''})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.listTenants(${page ?? ''}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves a role by ID or key. - * @param roleId - The ID or the key of the role. - * @returns A promise that resolves to a RoleRead object representing the role. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.roles.get() - */ - public async getRole(roleId: string): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roles.getRole({ - ...this.config.apiContext.environmentContext, - roleId: roleId, - }); - this.logger.debug(`[${response.status}] permit.api.getRole(${roleId})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.getRole(${roleId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Retrieves the assigned roles for a user (either in a single tenant or in all tenants). - * @param user - The ID or key of the user. - * @param tenant - The ID or key of the tenant, optional. If provided, only roles assigned within this tenant will be returned. - * @returns A promise that resolves to an array of RoleAssignmentRead objects representing the assigned roles. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.getAssignedRoles() - */ - public async getAssignedRoles(user: string, tenant?: string): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roleAssignments.listRoleAssignments({ - ...this.config.apiContext.environmentContext, - user: user, - tenant: tenant, - }); - this.logger.debug( - `[${response.status}] permit.api.getAssignedRoles(${user}, ${tenant ?? 'all tenants'})`, - ); - return response.data as RoleAssignmentRead[]; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.getAssignedRoles(${user}, ${ - tenant ?? 'all tenants' - }), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Creates a new resource. - * @param resource - The resource to create. - * @returns A promise that resolves to a ResourceRead object representing the created resource. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.resources.create() - */ - public async createResource(resource: ResourceCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._resources.createResource({ - ...this.config.apiContext.environmentContext, - resourceCreate: resource, - }); - this.logger.debug( - `[${response.status}] permit.api.createResource(${JSON.stringify(resource)})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.createResource(${JSON.stringify( - resource, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Updates an existing resource. - * @param resourceId - The ID or key of the resource to update. - * @param resource - The updated resource data. - * @returns A promise that resolves to a ResourceRead object representing the updated resource. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.resources.update() - */ - public async updateResource(resourceId: string, resource: ResourceUpdate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._resources.updateResource({ - ...this.config.apiContext.environmentContext, - resourceId: resourceId, - resourceUpdate: resource, - }); - this.logger.debug( - `[${response.status}] permit.api.updateResource(${resourceId}, ${JSON.stringify( - resource, - )})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.updateResource(${resourceId}, ${JSON.stringify( - resource, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Deletes a resource. - * @param resourceId - The ID or key of the resource to delete. - * @returns A promise that resolves when the resource is deleted. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.resources.delete() - */ - public async deleteResource(resourceId: string): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._resources.deleteResource({ - ...this.config.apiContext.environmentContext, - resourceId: resourceId, - }); - this.logger.debug(`[${response.status}] permit.api.deleteResource(${resourceId})`); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${ - err?.response?.status - }] permit.api.deleteResource(${resourceId}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Creates a new user. - * @param user - The user to create. - * @returns A promise that resolves to a UserRead object representing the created user. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.create() - */ - public async createUser(user: UserCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._users.createUser({ - ...this.config.apiContext.environmentContext, - userCreate: user, - }); - this.logger.debug(`[${response.status}] permit.api.createUser(${JSON.stringify(user)})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.createUser(${JSON.stringify( - user, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Creates or Updates in place a user. - * @param user - The user to create or update. - * @returns A promise that resolves to a UserRead object representing the synced user. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.sync() - */ - public async syncUser(user: UserCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._users.replaceUser({ - ...this.config.apiContext.environmentContext, - userId: user.key, - userCreate: user, - }); - this.logger.debug(`[${response.status}] permit.api.syncUser(${JSON.stringify(user)})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.syncUser(${JSON.stringify( - user, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Updates an existing user. - * @param userId - The ID or key of the user to update. - * @param user - The updated user data. - * @returns A promise that resolves to a UserRead object representing the updated user. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.update() - */ - public async updateUser(userId: string, user: UserUpdate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._users.updateUser({ - ...this.config.apiContext.environmentContext, - userId, - userUpdate: user, - }); - this.logger.debug(`[${response.status}] permit.api.updateUser(${JSON.stringify(user)})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.updateUser(${JSON.stringify( - user, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Deletes a user. - * @param userId - The ID or key of the user to delete. - * @returns A promise that resolves when the user is deleted. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.delete() - */ - public async deleteUser(userId: string): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._users.deleteUser({ - ...this.config.apiContext.environmentContext, - userId: userId, // user id or key - }); - this.logger.debug(`[${response.status}] permit.api.deleteUser(${userId})`); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.deleteUser(${userId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Creates a new tenant. - * @param tenant - The tenant to create. - * @returns A promise that resolves to a TenantRead object representing the created tenant. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.tenants.create() - */ - public async createTenant(tenant: TenantCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._tenants.createTenant({ - ...this.config.apiContext.environmentContext, - tenantCreate: tenant, - }); - this.logger.debug(`[${response.status}] permit.api.createTenant(${JSON.stringify(tenant)})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.createTenant(${JSON.stringify( - tenant, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Updates an existing tenant. - * @param tenantId - The ID or key of the tenant to update. - * @param tenant - The updated tenant data. - * @returns A promise that resolves to a TenantRead object representing the updated tenant. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.tenants.update() - */ - public async updateTenant(tenantId: string, tenant: TenantUpdate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._tenants.updateTenant({ - ...this.config.apiContext.environmentContext, - tenantId: tenantId, - tenantUpdate: tenant, - }); - this.logger.debug( - `[${response.status}] permit.api.updateTenant(${tenantId}, ${JSON.stringify(tenant)})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.updateTenant(${tenantId}, ${JSON.stringify( - tenant, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Deletes a tenant. - * @param tenantId - The ID or key of the tenant to delete. - * @returns A promise that resolves when the tenant is deleted. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.tenants.delete() - */ - public async deleteTenant(tenantId: string): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._tenants.deleteTenant({ - ...this.config.apiContext.environmentContext, - tenantId: tenantId, - }); - this.logger.debug(`[${response.status}] permit.api.deleteTenant(${tenantId})`); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.deleteTenant(${tenantId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Creates a new role. - * @param role - The role to create. - * @returns A promise that resolves to a RoleRead object representing the created role. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.roles.create() - */ - public async createRole(role: RoleCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roles.createRole({ - ...this.config.apiContext.environmentContext, - roleCreate: role, - }); - this.logger.debug(`[${response.status}] permit.api.createRole(${JSON.stringify(role)})`); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.createRole(${JSON.stringify( - role, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Updates an existing role. - * @param roleId - The ID or key of the role to update. - * @param role - The updated role data. - * @returns A promise that resolves to a RoleRead object representing the updated role. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.roles.update() - */ - public async updateRole(roleId: string, role: RoleUpdate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roles.updateRole({ - ...this.config.apiContext.environmentContext, - roleId: roleId, - roleUpdate: role, - }); - this.logger.debug( - `[${response.status}] permit.api.updateRole(${roleId}, ${JSON.stringify(role)})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.updateRole(${roleId}, ${JSON.stringify( - role, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Deletes a role. - * @param roleId - The ID or key of the role to delete. - * @returns A promise that resolves when the role is deleted. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.roles.delete() - */ - public async deleteRole(roleId: string): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roles.deleteRole({ - ...this.config.apiContext.environmentContext, - roleId: roleId, - }); - this.logger.debug(`[${response.status}] permit.api.deleteRole(${roleId})`); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.deleteRole(${roleId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Assigns a role to a user. - * @param assignedRole - The role assignment data. - * @returns A promise that resolves to a RoleAssignmentRead object representing the assigned role. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.assignRole() - */ - public async assignRole(assignedRole: RoleAssignmentCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roleAssignments.assignRole({ - ...this.config.apiContext.environmentContext, - roleAssignmentCreate: assignedRole, - }); - this.logger.debug( - `[${response.status}] permit.api.assignRole(${JSON.stringify(assignedRole)})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.assignRole(${JSON.stringify( - assignedRole, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Unassigns a role from a user. - * @param removedRole - The role unassignment data. - * @returns A promise that resolves when the role is unassigned. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.users.unassignRole() - */ - public async unassignRole(removedRole: RoleAssignmentRemove): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._roleAssignments.unassignRole({ - ...this.config.apiContext.environmentContext, - roleAssignmentRemove: removedRole, - }); - this.logger.debug( - `[${response.status}] permit.api.unassignRole(${JSON.stringify(removedRole)})`, - ); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.unassignRole(${JSON.stringify( - removedRole, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Creates a new condition set. - * @param conditionSet - The condition set to create. - * @returns A promise that resolves to a ConditionSetRead object representing the created condition set. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSets.create() - */ - public async createConditionSet(conditionSet: ConditionSetCreate): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._conditionSets.createConditionSet({ - ...this.config.apiContext.environmentContext, - conditionSetCreate: conditionSet, - }); - this.logger.debug( - `[${response.status}] permit.api.createConditionSet(${JSON.stringify(conditionSet)})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.createConditionSet(${JSON.stringify( - conditionSet, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Updates an existing condition set. - * @param conditionSetId - The ID or key of the condition set to update. - * @param conditionSet - The updated condition set data. - * @returns A promise that resolves to a ConditionSetRead object representing the updated condition set. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSets.update() - */ - public async updateConditionSet( - conditionSetId: string, - conditionSet: ConditionSetUpdate, - ): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._conditionSets.updateConditionSet({ - ...this.config.apiContext.environmentContext, - conditionSetId: conditionSetId, - conditionSetUpdate: conditionSet, - }); - this.logger.debug( - `[${response.status}] permit.api.updateConditionSet(${conditionSetId}, ${JSON.stringify( - conditionSet, - )})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${ - err?.response?.status - }] permit.api.updateConditionSet(${conditionSetId}, ${JSON.stringify( - conditionSet, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Deletes a condition set. - * @param conditionSetId - The ID or key of the condition set to delete. - * @returns A promise that resolves when the condition set is deleted. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSets.delete() - */ - public async deleteConditionSet(conditionSetId: string): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._conditionSets.deleteConditionSet({ - ...this.config.apiContext.environmentContext, - conditionSetId: conditionSetId, - }); - this.logger.debug(`[${response.status}] permit.api.deleteConditionSet(${conditionSetId})`); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${ - err?.response?.status - }] permit.api.deleteConditionSet(${conditionSetId}), err: ${JSON.stringify( - err?.response?.data, - )}`, - ); - } - throw err; - } - } - - /** - * Creates a condition set rule (i.e: grants permission to a userset to act on a resourceset). - * @param conditionSetRule - The condition set rule data. - * @returns A promise that resolves to a ConditionSetRuleRead object representing the assigned condition set rule. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSetRules.create() - */ - public async assignConditionSetRule( - conditionSetRule: ConditionSetRuleCreate, - ): Promise { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._conditionSetRules.assignSetPermissions({ - ...this.config.apiContext.environmentContext, - conditionSetRuleCreate: conditionSetRule, - }); - this.logger.debug( - `[${response.status}] permit.api.createConditionSetRule(${JSON.stringify( - conditionSetRule, - )})`, - ); - return response.data; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.createConditionSetRule(${JSON.stringify( - conditionSetRule, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - /** - * Removes a condition set rule (i.e: unassigns permission from a userset to act on a resourceset). - * @param conditionSetRuleId - The ID or key of the condition set rule to remove. - * @returns A promise that resolves when the condition set rule is deleted. - * @throws {@link PermitApiError} If the API returns an error HTTP status code. - * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. - * @deprecated replaced with permit.api.conditionSetRules.delete() - */ - public async unassignConditionSetRule( - conditionSetRule: ConditionSetRuleRemove, - ): Promise> { - await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); - await this.ensureContext(ApiContextLevel.ENVIRONMENT); - try { - const response = await this._conditionSetRules.unassignSetPermissions({ - ...this.config.apiContext.environmentContext, - conditionSetRuleRemove: conditionSetRule, - }); - this.logger.debug( - `[${response.status}] permit.api.deleteConditionSetRule(${JSON.stringify( - conditionSetRule, - )})`, - ); - return response; - } catch (err) { - if (axios.isAxiosError(err)) { - this.logger.error( - `[${err?.response?.status}] permit.api.deleteConditionSetRule(${JSON.stringify( - conditionSetRule, - )}), err: ${JSON.stringify(err?.response?.data)}`, - ); - } - throw err; - } - } - - public getMethods(): IDeprecatedPermitApi { - return { - listUsers: this.listUsers.bind(this), - listRoles: this.listRoles.bind(this), - listConditionSets: this.listConditionSets.bind(this), - listConditionSetsRules: this.listConditionSetsRules.bind(this), - updateUser: this.updateUser.bind(this), - getUser: this.getUser.bind(this), - getTenant: this.getTenant.bind(this), - getRole: this.getRole.bind(this), - getAssignedRoles: this.getAssignedRoles.bind(this), - createResource: this.createResource.bind(this), - updateResource: this.updateResource.bind(this), - deleteResource: this.deleteResource.bind(this), - createUser: this.createUser.bind(this), - syncUser: this.syncUser.bind(this), - deleteUser: this.deleteUser.bind(this), - createTenant: this.createTenant.bind(this), - updateTenant: this.updateTenant.bind(this), - deleteTenant: this.deleteTenant.bind(this), - listTenants: this.listTenants.bind(this), - createRole: this.createRole.bind(this), - updateRole: this.updateRole.bind(this), - deleteRole: this.deleteRole.bind(this), - assignRole: this.assignRole.bind(this), - unassignRole: this.unassignRole.bind(this), - createConditionSet: this.createConditionSet.bind(this), - updateConditionSet: this.updateConditionSet.bind(this), - deleteConditionSet: this.deleteConditionSet.bind(this), - assignConditionSetRule: this.assignConditionSetRule.bind(this), - unassignConditionSetRule: this.unassignConditionSetRule.bind(this), - }; - } -} diff --git a/src/api/detailed-lists.test.ts b/src/api/detailed-lists.test.ts new file mode 100644 index 00000000..fa834215 --- /dev/null +++ b/src/api/detailed-lists.test.ts @@ -0,0 +1,272 @@ +import { expect, test } from 'vitest'; + +import { PermitContextError } from '#src/api/context'; +import { type Permit } from '#src/index'; +import { createMockPermit, MOCK_API_ORIGIN } from '#src/tests/helpers/mock-api'; + +const emptyPage = { data: [], total_count: 0, page_count: 0 }; + +const cases = [ + { + name: 'relationship tuples', + route: 'relationship_tuples', + call: (permit: Permit) => permit.api.relationshipTuples.listDetailed(), + filtered: (permit: Permit) => + permit.api.relationshipTuples.listDetailed({ + tenant: 'east / west', + subject: 'user:alice', + relation: 'owner', + object: 'doc:report', + objectType: 'doc', + subjectType: 'user', + page: 2, + perPage: 3, + }), + query: { + tenant: 'east / west', + subject: 'user:alice', + relation: 'owner', + object: 'doc:report', + object_type: 'doc', + subject_type: 'user', + page: '2', + per_page: '3', + }, + item: { + subject_details: { attributes: null }, + object_details: null, + relation_details: { key: 'owner' }, + tenant_details: { key: 'east' }, + }, + }, + { + name: 'resource instances', + route: 'resource_instances', + call: (permit: Permit) => permit.api.resourceInstances.listDetailed(), + filtered: (permit: Permit) => + permit.api.resourceInstances.listDetailed({ + tenant: 'east / west', + resource: 'doc', + search: ['report'], + page: 2, + perPage: 3, + }), + query: { tenant: 'east / west', resource: 'doc', search: 'report', page: '2', per_page: '3' }, + item: { + relationships: [{ subject: 'user:alice', relation: 'owner', object: 'doc:report' }], + attributes: null, + }, + }, + { + name: 'role assignments', + route: 'role_assignments', + call: (permit: Permit) => permit.api.roleAssignments.listDetailed(), + filtered: (permit: Permit) => + permit.api.roleAssignments.listDetailed({ + tenant: 'east / west', + user: 'alice', + role: 'reader', + resource: 'doc', + resourceInstance: 'doc:report', + page: 2, + perPage: 3, + }), + query: { + tenant: 'east / west', + user: 'alice', + role: 'reader', + resource: 'doc', + resource_instance: 'doc:report', + page: '2', + per_page: '3', + }, + item: { + role: { key: 'reader' }, + user: { key: 'alice', attributes: null }, + tenant: { key: 'east' }, + resource_instance: null, + }, + }, +]; + +for (const { name, route, call, filtered, query, item } of cases) { + test(`${name} use the dedicated route with defaults and preserve all nested details`, async () => { + const { permit, rest } = createMockPermit({ + project: 'project / east', + environment: 'environment east', + }); + const result = { + data: [{ id: 'row-id', ...item, future_detail: null }], + total_count: 7, + page_count: 3, + future_envelope: 'retained', + }; + rest.resolveWith(result); + expect(await call(permit)).toEqual(result); + expect(rest.last).toMatchObject({ + method: 'GET', + origin: MOCK_API_ORIGIN, + path: `/v2/facts/project%20%2F%20east/environment%20east/${route}/detailed`, + params: { page: '1', per_page: '100' }, + }); + expect(rest.last?.data).toBeUndefined(); + expect(rest.last?.headers.get('Authorization')).toBe('Bearer test-token'); + expect(rest.last?.params).not.toHaveProperty('detailed'); + expect(rest.last?.params).not.toHaveProperty('include_total_count'); + }); + + test(`${name} forward every filter and preserve empty/count-only envelopes`, async () => { + const { permit, rest } = createMockPermit(); + const result = { data: [], total_count: 7 }; + rest.resolveWith(result); + expect(await filtered(permit)).toEqual(result); + expect(rest.last?.params).toEqual(query); + rest.resolveWith({ data: [], total_count: 0, page_count: 0 }); + expect(await call(permit)).toEqual({ data: [], total_count: 0, page_count: 0 }); + }); + + test(`${name} stay on the control plane when facts proxying is enabled`, async () => { + const { permit, rest } = createMockPermit({ proxyFactsViaPdp: true }); + rest.resolveWith(emptyPage); + expect(await call(permit)).toEqual(emptyPage); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.headers.has('X-Wait-Timeout')).toBe(false); + expect(rest.last?.headers.has('X-Timeout-Policy')).toBe(false); + expect(rest.last?.path).toBe(`/v2/facts/proj/env/${route}/detailed`); + }); + + test(`${name} require environment context before dispatch`, async () => { + const { permit, rest } = createMockPermit({ contextLevel: 'project' }); + await expect(call(permit)).rejects.toBeInstanceOf(PermitContextError); + expect(rest.requests).toHaveLength(0); + }); + + test(`${name} normalize a backend rejection instead of returning an empty page`, async () => { + const { permit, rest } = createMockPermit(); + rest.rejectWith(404, { message: 'missing filter target' }); + await expect(filtered(permit)).rejects.toMatchObject({ name: 'PermitApiError', status: 404 }); + expect(rest.requests).toHaveLength(1); + }); +} + +test('detailed resource-instance search uses repeated terms rather than a joined scalar', async () => { + const { permit, rest } = createMockPermit({ proxyFactsViaPdp: true }); + rest.resolveWith(emptyPage); + await permit.api.resourceInstances.listDetailed({ search: ['report & annual', 'budget/east'] }); + const query = new URL(rest.last?.url ?? '', 'http://fixture.invalid').searchParams; + expect(query.getAll('search')).toEqual(['report & annual', 'budget/east']); +}); + +test('detailed filters retain empty strings and explicit numeric pagination', async () => { + const { permit, rest } = createMockPermit(); + rest.resolveWith(emptyPage); + await permit.api.relationshipTuples.listDetailed({ + tenant: '', + subject: '', + object: '', + relation: '', + objectType: '', + subjectType: '', + page: 0, + perPage: 0, + }); + expect(rest.last?.params).toEqual({ + tenant: '', + subject: '', + object: '', + relation: '', + object_type: '', + subject_type: '', + page: '0', + per_page: '0', + }); + rest.resolveWith(emptyPage); + await permit.api.resourceInstances.listDetailed({ + tenant: '', + resource: '', + search: [''], + page: 0, + perPage: 0, + }); + expect(rest.last?.params).toEqual({ + tenant: '', + resource: '', + search: '', + page: '0', + per_page: '0', + }); + rest.resolveWith(emptyPage); + await permit.api.roleAssignments.listDetailed({ + tenant: '', + user: '', + role: '', + resource: '', + resourceInstance: '', + page: 0, + perPage: 0, + }); + expect(rest.last?.params).toEqual({ + tenant: '', + user: '', + role: '', + resource: '', + resource_instance: '', + page: '0', + per_page: '0', + }); +}); + +test('existing role list keeps each legacy flag combination and runtime response form', async () => { + const { permit, rest } = createMockPermit(); + for (const detailed of [false, true]) { + for (const includeTotalCount of [false, true]) { + const row = detailed + ? { role: { key: 'reader' }, user: { key: 'alice' }, tenant: { key: 'east' } } + : { role: 'reader', user: 'alice', tenant: 'east' }; + const response = includeTotalCount ? { data: [row], total_count: 1, page_count: 1 } : [row]; + rest.resolveWith(response); + expect(await permit.api.roleAssignments.list({ detailed, includeTotalCount })).toEqual( + response, + ); + expect(rest.last?.path).toBe('/v2/facts/proj/env/role_assignments'); + expect(rest.last?.params).toEqual({ + detailed: String(detailed), + include_total_count: String(includeTotalCount), + page: '1', + per_page: '100', + }); + } + } +}); + +test('new detailed reads honor selected scope and ignore synchronization headers on cloned clients', async () => { + const { permit, rest } = createMockPermit({ + proxyFactsViaPdp: true, + contextLevel: 'organization', + }); + permit.config.apiContext.setEnvironmentLevelContext( + 'org', + 'selected / project', + 'selected environment', + ); + rest.resolveWith(emptyPage); + await permit.api.relationshipTuples.waitForSync(null, 'fail').listDetailed(); + rest.resolveWith(emptyPage); + await permit.api.resourceInstances + .waitForSync(7, 'fail') + .listDetailed({ search: ['annual report', 'east/budget'] }); + rest.resolveWith(emptyPage); + await permit.api.roleAssignments.waitForSync(7, 'ignore').listDetailed(); + expect(rest.requests.map((request) => request.path)).toEqual([ + '/v2/facts/selected%20%2F%20project/selected%20environment/relationship_tuples/detailed', + '/v2/facts/selected%20%2F%20project/selected%20environment/resource_instances/detailed', + '/v2/facts/selected%20%2F%20project/selected%20environment/role_assignments/detailed', + ]); + for (const request of rest.requests) { + expect(request.origin).toBe(MOCK_API_ORIGIN); + expect(request.headers.has('X-Wait-Timeout')).toBe(false); + expect(request.headers.has('X-Timeout-Policy')).toBe(false); + } + const query = new URL(rest.requests[1]?.url ?? '', 'http://fixture.invalid').searchParams; + expect(query.getAll('search')).toEqual(['annual report', 'east/budget']); +}); diff --git a/src/api/elements.ts b/src/api/elements.ts index 04fe95c5..186de278 100644 --- a/src/api/elements.ts +++ b/src/api/elements.ts @@ -1,10 +1,10 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; -import { AuthenticationApi, EmbeddedLoginRequestOutput } from '../openapi'; -import { BASE_PATH } from '../openapi/base'; +import { type IPermitConfig } from '#src/config'; +import { AuthenticationApi, type EmbeddedLoginRequestOutput } from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi } from './base'; +import { BasePermitApi } from '#src/api/base'; /** * Represents the response returned by the `loginAs` method of the `ElementsClient` class, with additional content. diff --git a/src/api/environments-async.test.ts b/src/api/environments-async.test.ts new file mode 100644 index 00000000..a9841ebb --- /dev/null +++ b/src/api/environments-async.test.ts @@ -0,0 +1,415 @@ +import assert from 'node:assert/strict'; +import { PassThrough } from 'node:stream'; + +import axios, { AxiosError, AxiosHeaders, type InternalAxiosRequestConfig } from 'axios'; +import pino from 'pino'; + +import { EnvironmentsApi } from '#src/api/environments'; +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { + Permit, + TaskStatus, + type EnvironmentCopy, + type EnvironmentRead, + type IRetryConfig, + type TaskResultEnvironmentRead, +} from '#src/index'; + +const project = 'project/one?é'; +const source = 'source east/#'; +const taskId = 'task/a?b+c=%é'; +const prefix = + 'https://control.example/v2/projects/project%2Fone%3F%C3%A9/envs/source%20east%2F%23'; +const resultPath = `${prefix}/copy/async/task%2Fa%3Fb%2Bc%3D%25%C3%A9/result`; +const body: EnvironmentCopy = { + target_env: { + new: { + key: 'target', + name: 'Target', + description: '', + custom_branch_name: 'branch', + jwks: { url: 'https://keys.example/jwks' }, + settings: { custom: { count: 0, enabled: false, value: null } }, + }, + existing: 'published target fields are forwarded', + }, + conflict_strategy: 'overwrite', + scope: { + resources: { include: ['doc', 'doc'], exclude: [] }, + roles: { include: [], exclude: ['other'] }, + user_sets: { include: ['active'] }, + resource_sets: { exclude: ['archived'] }, + custom_policies: { include: ['policy'], exclude: [] }, + }, +}; +const environment: EnvironmentRead = { + key: 'target', + name: 'Target', + id: 'environment-id', + organization_id: 'org', + project_id: 'project-id', + created_at: '2026-10-08T00:00:00Z', + updated_at: '2026-10-08T00:01:00Z', + description: '', + custom_branch_name: 'branch', + avp_policy_store_id: 'store', + jwks: { url: 'https://keys.example/jwks' }, + settings: { count: 0, enabled: false, value: null }, +}; +const processing: TaskResultEnvironmentRead = { + task_id: taskId, + status: TaskStatus.Processing, + result: null, + error: null, +}; +interface Request { + method: string | undefined; + url: string; + body: unknown; + timeout: number | undefined; + headers: AxiosHeaders; +} +function response(config: InternalAxiosRequestConfig, data: unknown, status: number) { + return { data, status, statusText: 'Fixture response', headers: new AxiosHeaders(), config }; +} +function wire( + options: { + proxy?: boolean; + seed?: boolean; + retry?: IRetryConfig | false; + } = {}, +) { + const calls: Request[] = []; + const reply: { data: unknown; status: number; code?: string } = { data: processing, status: 202 }; + const permit = new Permit({ + token: 'async-copy-fixture', + apiUrl: 'https://control.example', + pdp: 'https://pdp.invalid', + proxyFactsViaPdp: options.proxy ?? true, + retry: options.retry ?? false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + timeout: 4711, + adapter: async (config) => { + calls.push({ + method: config.method, + url: axios.getUri(config), + body: config.data, + timeout: config.timeout, + headers: new AxiosHeaders(config.headers), + }); + if (reply.code) throw new AxiosError('Transport unavailable', reply.code, config); + const result = response(config, reply.data, reply.status); + if (reply.status >= 400) + throw new AxiosError('Request rejected', 'ERR_BAD_RESPONSE', config, undefined, result); + return result; + }, + }), + }); + if (options.seed !== false) permit.config.apiContext._saveApiKeyAccessibleScope('org'); + return { permit, calls, reply }; +} + +test.each([true, false])( + 'uses explicit source/task API paths with facts proxy %s', + async (proxy) => { + const { permit, calls, reply } = wire({ proxy }); + permit.config.apiContext.setEnvironmentLevelContext('org', 'selected-project', 'selected-env'); + expect(await permit.api.environments.copyAsync(project, source, body)).toEqual(processing); + reply.status = 200; + expect(await permit.api.environments.getCopyResult(project, source, taskId)).toEqual( + processing, + ); + expect(calls.map(({ method, url, body: sent }) => [method, url, sent])).toEqual([ + ['post', `${prefix}/copy/async`, JSON.stringify(body)], + ['get', resultPath, undefined], + ]); + expect(calls).toHaveLength(2); + for (const request of calls) { + expect(request.headers.get('authorization')).toBe('Bearer async-copy-fixture'); + expect(request.headers.has('x-wait-timeout')).toBe(false); + expect(request.headers.has('x-timeout-policy')).toBe(false); + expect(request.timeout).toBeGreaterThan(0); + expect(request.timeout).toBeLessThanOrEqual(4711); + } + }, +); + +test.each([undefined, 0, 0.25, 60])('forwards wait %s on both routes', async (wait) => { + const { permit, calls } = wire(); + await permit.api.environments.copyAsync(project, source, body, wait); + await permit.api.environments.getCopyResult(project, source, taskId, wait); + expect(calls.map(({ url }) => [...new URL(url).searchParams])).toEqual([ + wait === undefined ? [] : [['wait', String(wait)]], + wait === undefined ? [] : [['wait', String(wait)]], + ]); +}); + +test.each([null, '0', true, false, NaN, Infinity, -Infinity, -1, 60.01, {}, []])( + 'rejects invalid wait %s before discovery or traffic', + async (wait) => { + const { permit, calls } = wire({ seed: false }); + const submit = Reflect.apply(permit.api.environments.copyAsync, permit.api.environments, [ + project, + source, + body, + wait, + ]); + await expect(submit).rejects.toBeInstanceOf(RangeError); + const read = Reflect.apply(permit.api.environments.getCopyResult, permit.api.environments, [ + project, + source, + taskId, + wait, + ]); + await expect(read).rejects.toBeInstanceOf(RangeError); + expect(calls).toEqual([]); + }, +); + +test.each([ + processing, + { task_id: taskId, status: TaskStatus.Success, result: environment, error: null }, + { + task_id: taskId, + status: TaskStatus.Failure, + result: null, + error: { + id: 'error-id', + title: 'Copy failed', + error_code: 'conflict', + message: '', + support_link: 'https://support.example', + additional_info: { retry: false, count: 0 }, + }, + }, + { task_id: taskId, status: TaskStatus.Cancelled }, + { task_id: taskId, status: TaskStatus.Processing, additive: { count: 0, enabled: false } }, +])('preserves the entire received task object %# without successful polling', async (data) => { + const { permit, calls, reply } = wire({ retry: { enabled: true, maxRetries: 2, retryDelay: 1 } }); + reply.data = data; + expect(await permit.api.environments.copyAsync(project, source, body)).toEqual(data); + reply.status = 200; + expect(await permit.api.environments.getCopyResult(project, source, taskId)).toEqual(data); + expect(calls).toHaveLength(2); +}); + +test('snapshots nested inputs before delayed scope discovery and preserves explicit paths', async () => { + let release: (() => void) | undefined; + let announce: (() => void) | undefined; + const started = new Promise((resolve) => { + announce = resolve; + }); + const gate = new Promise((resolve) => { + release = resolve; + }); + const sent: Request[] = []; + const permit = new Permit({ + token: 'fixture', + apiUrl: 'https://control.example', + log: { level: 'silent' }, + retry: false, + axiosInstance: axios.create({ + adapter: async (config) => { + const url = axios.getUri(config); + if (url.includes('/api-key/scope')) { + announce?.(); + await gate; + return response(config, { organization_id: 'org' }, 200); + } + sent.push({ + url, + body: config.data, + method: config.method, + timeout: config.timeout, + headers: new AxiosHeaders(config.headers), + }); + return response(config, processing, 202); + }, + }), + }); + const caller = structuredClone(body); + const expected = structuredClone(caller); + const pending = permit.api.environments.copyAsync(project, source, caller, 0); + await started; + assert(caller.target_env.new && caller.scope?.resources?.include); + caller.target_env.new.name = 'Mutated'; + caller.scope.resources.include.push('mutated'); + caller.conflict_strategy = 'fail'; + release?.(); + expect(await pending).toEqual(processing); + permit.config.apiContext.setEnvironmentLevelContext('org', 'other', 'selected-target'); + await permit.api.environments.getCopyResult(project, source, taskId); + expect(sent.map(({ url }) => url)).toEqual([`${prefix}/copy/async?wait=0`, resultPath]); + expect(JSON.parse(String(sent[0]?.body))).toEqual(expected); +}); + +test('snapshot serialization failure is named and precedes discovery', async () => { + const { permit, calls } = wire({ seed: false }); + const invalid = { ...body, scope: { resources: { include: [() => 'bad'] } } }; + await expect( + Reflect.apply(permit.api.environments.copyAsync, permit.api.environments, [ + project, + source, + invalid, + ]), + ).rejects.toBeInstanceOf(PermitApiError); + expect(calls).toEqual([]); +}); + +test.each(['organization', 'project', 'environment'] as const)( + 'submit and result apply their existing preflight gates for %s keys', + async (level) => { + const { permit, calls } = wire(); + const context = permit.config.apiContext; + if (level === 'project') context._saveApiKeyAccessibleScope('org', 'selected'); + if (level === 'environment') context._saveApiKeyAccessibleScope('org', 'selected', 'env'); + if (level === 'environment') { + await expect(permit.api.environments.copyAsync(project, source, body)).rejects.toBeInstanceOf( + PermitContextError, + ); + expect(calls).toEqual([]); + } else + expect(await permit.api.environments.copyAsync(project, source, body)).toEqual(processing); + expect(await permit.api.environments.getCopyResult(project, source, taskId)).toEqual( + processing, + ); + }, +); + +test.each([401, 403, 404, 422, 500, 503])( + 'both routes preserve HTTP %s failures', + async (status) => { + const { permit, reply, calls } = wire(); + reply.status = status; + reply.data = { detail: { request: 'COPY_RESPONSE_PRIVATE_CANARY' } }; + for (const pending of [ + permit.api.environments.copyAsync(project, source, body), + permit.api.environments.getCopyResult(project, source, taskId), + ]) { + const failure: unknown = await pending.catch((error: unknown) => error); + expect(failure).toBeInstanceOf(PermitApiError); + expect(failure).toMatchObject({ name: 'PermitApiError', status }); + expect(JSON.stringify(failure)).not.toContain('COPY_RESPONSE_PRIVATE_CANARY'); + } + expect(calls).toHaveLength(2); + }, +); + +test.each(['ERR_NETWORK', 'ECONNABORTED', 'ERR_CANCELED'])( + 'both routes preserve %s transport failure', + async (code) => { + const { permit, reply } = wire(); + reply.code = code; + await expect(permit.api.environments.copyAsync(project, source, body)).rejects.toMatchObject({ + name: 'PermitApiError', + code, + }); + await expect( + permit.api.environments.getCopyResult(project, source, taskId), + ).rejects.toMatchObject({ name: 'PermitApiError', code }); + }, +); + +test('submission remains one attempt even when callers opt into POST retries', async () => { + const { permit, reply, calls } = wire({ + retry: { + enabled: true, + maxRetries: 2, + retryDelay: 1, + retryMethods: ['GET', 'POST'], + }, + }); + reply.status = 503; + await expect(permit.api.environments.copyAsync(project, source, body)).rejects.toMatchObject({ + name: 'PermitApiError', + status: 503, + }); + expect(calls).toHaveLength(1); +}); + +test('result keeps opt-in safe GET retries within the caller REST timeout budget', async () => { + const timeouts: number[] = []; + let attempts = 0; + const permit = new Permit({ + token: 'fixture', + log: { level: 'silent' }, + retry: { enabled: true, maxRetries: 2, retryDelay: 1 }, + axiosInstance: axios.create({ + timeout: 1000, + adapter: async (config) => { + timeouts.push(config.timeout ?? 0); + attempts++; + if (attempts < 3) + throw new AxiosError( + 'Read unavailable', + 'ERR_BAD_RESPONSE', + config, + undefined, + response(config, {}, 503), + ); + return response(config, processing, 200); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + expect(await permit.api.environments.getCopyResult(project, source, taskId, 60)).toEqual( + processing, + ); + expect(attempts).toBe(3); + expect(timeouts.every((value) => value > 0 && value <= 1000)).toBe(true); + expect(timeouts[2]).toBeLessThan(timeouts[0]!); +}); + +test('task data is complete for the caller and absent from debug logs', async () => { + const { permit, reply } = wire(); + const output = new PassThrough(); + const chunks: string[] = []; + output.on('data', (value: Buffer) => chunks.push(value.toString())); + const api = new EnvironmentsApi(permit.config, pino({ level: 'debug' }, output)); + reply.data = { + task_id: taskId, + status: 'failure', + result: null, + error: { + id: 'id', + title: 'COPY_TASK_PRIVATE_CANARY', + error_code: 'conflict', + additional_info: { arbitrary: 'COPY_TASK_PRIVATE_CANARY' }, + }, + }; + expect(await api.copyAsync(project, source, body)).toEqual(reply.data); + expect(await api.getCopyResult(project, source, taskId)).toEqual(reply.data); + expect(chunks.join('')).not.toContain('COPY_TASK_PRIVATE_CANARY'); +}); + +test('scope discovery failures remain named without issuing a copy request', async () => { + const { permit, calls, reply } = wire({ seed: false }); + reply.status = 401; + reply.data = { detail: 'Scope unavailable' }; + await expect(permit.api.environments.copyAsync(project, source, body)).rejects.toMatchObject({ + name: 'PermitContextError', + status: 401, + }); + expect(calls).toHaveLength(1); + expect(calls[0]?.url).toContain('/api-key/scope'); +}); + +test('malformed organization scope fails before a result request', async () => { + const { permit, calls, reply } = wire({ seed: false }); + reply.status = 200; + reply.data = { project_id: 'project' }; + await expect( + permit.api.environments.getCopyResult(project, source, taskId), + ).rejects.toBeInstanceOf(PermitContextError); + expect(calls).toHaveLength(1); +}); + +test('the existing synchronous copy still returns its received environment with HTTP 201', async () => { + const { permit, reply, calls } = wire(); + reply.status = 201; + reply.data = environment; + expect(await permit.api.environments.copy(project, source, body)).toEqual(environment); + expect(calls.map(({ method, url }) => [method, url])).toEqual([['post', `${prefix}/copy`]]); +}); diff --git a/src/api/environments.ts b/src/api/environments.ts index 2ef713b3..1940bcb3 100644 --- a/src/api/environments.ts +++ b/src/api/environments.ts @@ -1,29 +1,37 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { - APIKeyRead, + type APIKeyRead, APIKeysApi as AutogenAPIKeysApi, EnvironmentsApi as AutogenEnvironmentsApi, - EnvironmentCopy, - EnvironmentCreate, - EnvironmentRead, - EnvironmentStats, - EnvironmentUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type EnvironmentCopy, + type EnvironmentCreate, + type EnvironmentRead, + type EnvironmentStats, + type EnvironmentUpdate, + type TaskResultEnvironmentRead, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; export { - APIKeyRead, - EnvironmentCopy, - EnvironmentCreate, - EnvironmentRead, - EnvironmentStats, - EnvironmentUpdate, -} from '../openapi'; + type APIKeyRead, + type EnvironmentCopy, + type EnvironmentCreate, + type EnvironmentRead, + type EnvironmentStats, + type EnvironmentUpdate, + type ErrorDetails, + type TaskResultEnvironmentRead, + TaskStatus, +} from '#src/openapi/index'; export interface IListEnvironments extends IPagination { /** @@ -149,6 +157,46 @@ export interface IEnvironmentsApi { copyParams: EnvironmentCopy, ): Promise; + /** + * Submits a background copy from the explicit source environment in the same project. + * The SDK requires a project or organization API key and does not replay submission or poll. + * + * @param projectKey - The source project key or ID. + * @param environmentKey - The source environment key or ID, not the target environment. + * @param copyParams - Complete target, conflict strategy and optional copy scope. + * @param wait - Optional finite server wait in seconds, from 0 through 60, including fractions. + * @returns The complete task response; processing, failure and cancelled statuses remain data. + * @throws {@link PermitApiError} If serialization, HTTP or transport fails. + * @throws {@link PermitContextError} If organization context or API key scope is insufficient. + * @throws RangeError If wait is outside its supported range or is not a finite number. + */ + copyAsync( + projectKey: string, + environmentKey: string, + copyParams: EnvironmentCopy, + wait?: number, + ): Promise; + + /** + * Reads one acknowledged copy task using its explicit source project and environment. + * The SDK returns once, including a processing response; it does not poll or cancel the task. + * + * @param projectKey - The source project key or ID. + * @param environmentKey - The source environment key or ID. + * @param taskId - The acknowledged task ID. + * @param wait - Optional finite server wait in seconds, from 0 through 60, including fractions. + * @returns The complete task response, preserving nullable result and error data. + * @throws {@link PermitApiError} If the API rejects the request or transport fails. + * @throws {@link PermitContextError} If organization context or API key scope is insufficient. + * @throws RangeError If wait is outside its supported range or is not a finite number. + */ + getCopyResult( + projectKey: string, + environmentKey: string, + taskId: string, + wait?: number, + ): Promise; + /** * Deletes an environment. * @@ -405,6 +453,76 @@ export class EnvironmentsApi extends BasePermitApi implements IEnvironmentsApi { } } + /** {@inheritDoc IEnvironmentsApi.copyAsync} */ + public async copyAsync( + projectKey: string, + environmentKey: string, + copyParams: EnvironmentCopy, + wait?: number, + ): Promise { + this.validateCopyWait(wait); + let body: EnvironmentCopy; + try { + body = structuredClone(copyParams); + JSON.stringify(body); + } catch (cause) { + this.handleApiError( + new Error('Cannot serialize environment copy body. Supply JSON-compatible fields.', { + cause, + }), + ); + } + await this.ensureAccessLevel(ApiKeyLevel.PROJECT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ORGANIZATION); + try { + return ( + await this.environments.copyEnvironmentAsync({ + projId: projectKey, + envId: environmentKey, + environmentCopy: body, + ...(wait === undefined ? {} : { wait }), + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IEnvironmentsApi.getCopyResult} */ + public async getCopyResult( + projectKey: string, + environmentKey: string, + taskId: string, + wait?: number, + ): Promise { + this.validateCopyWait(wait); + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ORGANIZATION); + try { + return ( + await this.environments.getCopyEnvironmentAsyncResult({ + projId: projectKey, + envId: environmentKey, + taskId, + ...(wait === undefined ? {} : { wait }), + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + private validateCopyWait(wait: number | undefined): void { + if ( + wait !== undefined && + (typeof wait !== 'number' || !Number.isFinite(wait) || wait < 0 || wait > 60) + ) { + throw new RangeError( + 'Environment copy wait must be a finite number from 0 through 60 seconds.', + ); + } + } + /** * Deletes an environment. * diff --git a/src/api/groups.test.ts b/src/api/groups.test.ts new file mode 100644 index 00000000..9611e3c9 --- /dev/null +++ b/src/api/groups.test.ts @@ -0,0 +1,208 @@ +import { createServer, type IncomingHttpHeaders } from 'node:http'; + +import axios from 'axios'; +import { expect, onTestFinished, test } from 'vitest'; + +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { type IGroupsApi } from '#src/api/groups'; +import { Permit } from '#src/index'; + +const group = { + group_resource_type_key: 'team', + group_instance_key: 'team:support / east', + group_tenant: 'tenant-east', +}; +const membership = { tenant: 'tenant-east' }; +const role = { + role: 'reader', + resource: 'document', + resource_instance: 'report:quarter / 1', + tenant: 'tenant-east', +}; +const read = { ...group, assigned_roles: ['reader'], users: ['alice'] }; +const direct = { ...group, id: '7605610c-7c96-4798-b3ec-17bd2a8d2f91' }; +const prefix = '/v2/schema/project%2Fone/environment%20east/groups'; +const encodedGroup = 'team%3Asupport%20%2F%20east'; + +interface WireRequest { + method: string | undefined; + path: string | undefined; + headers: IncomingHttpHeaders; + body: string; +} + +async function wire() { + const calls: WireRequest[] = []; + const reply: { status: number; data: unknown } = { status: 200, data: read }; + const server = createServer(async (request, response) => { + const chunks: Buffer[] = []; + for await (const chunk of request) chunks.push(Buffer.from(chunk)); + calls.push({ + method: request.method, + path: request.url, + headers: request.headers, + body: Buffer.concat(chunks).toString(), + }); + response.writeHead(reply.status, { 'Content-Type': 'application/json' }); + response.end(reply.status === 204 ? undefined : JSON.stringify(reply.data)); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + server.closeAllConnections(); + }), + ); + const address = server.address(); + assert(address && typeof address !== 'string'); + const permit = new Permit({ + token: 'groups-fixture', + apiUrl: `http://127.0.0.1:${address.port}`, + pdp: 'http://pdp.invalid', + proxyFactsViaPdp: true, + retry: false, + log: { level: 'silent' }, + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project/one', 'environment east'); + return { permit, calls, reply }; +} + +test('all eight operations send the selected schema context, encoded keys and exact JSON bodies', async () => { + const { permit, calls, reply } = await wire(); + const api = permit.api.groups; + expect(await api.create(group)).toEqual(read); + reply.data = direct; + expect(await api.get(group.group_instance_key)).toEqual(direct); + expect(await api.get(direct.id)).toEqual(direct); + reply.data = { data: [direct], total_count: 8, page_count: 4 }; + expect(await api.list()).toEqual(reply.data); + reply.data = read; + expect(await api.assignUser(group.group_instance_key, 'alice / east', membership)).toEqual(read); + expect(await api.assignRole(direct.id, role)).toEqual(read); + reply.status = 204; + expect(await api.removeUser(direct.id, 'alice / east', membership)).toBeUndefined(); + expect(await api.removeRole(group.group_instance_key, role)).toBeUndefined(); + expect(await api.delete(group.group_instance_key)).toBeUndefined(); + expect(await api.delete(direct.id)).toBeUndefined(); + expect(calls.map(({ method, path, body }) => [method, path, body])).toEqual([ + ['POST', prefix, JSON.stringify(group)], + ['GET', `${prefix}/direct/${encodedGroup}`, ''], + ['GET', `${prefix}/direct/${direct.id}`, ''], + ['GET', `${prefix}/direct?page=1&per_page=100`, ''], + ['PUT', `${prefix}/${encodedGroup}/users/alice%20%2F%20east`, JSON.stringify(membership)], + ['POST', `${prefix}/${direct.id}/roles`, JSON.stringify(role)], + ['DELETE', `${prefix}/${direct.id}/users/alice%20%2F%20east`, JSON.stringify(membership)], + ['DELETE', `${prefix}/${encodedGroup}/roles`, JSON.stringify(role)], + ['DELETE', `${prefix}/${encodedGroup}`, ''], + ['DELETE', `${prefix}/${direct.id}`, ''], + ]); + expect(calls.every(({ headers }) => headers.authorization === 'Bearer groups-fixture')).toBe( + true, + ); + for (const call of calls.filter(({ body }) => body !== '')) { + expect(call.headers['content-type']).toContain('application/json'); + expect(Number(call.headers['content-length'])).toBe(Buffer.byteLength(call.body)); + } +}); + +test('direct pagination preserves counts, extra response fields and empty pages', async () => { + const { permit, calls, reply } = await wire(); + reply.data = { + data: [{ ...direct, future_field: 'preserved' }], + total_count: 17, + page_count: 9, + future_envelope: true, + }; + expect( + await permit.api.groups.list({ + tenant: 'tenant / east', + resource: 'team:regional', + search: 'support & sales', + page: 2, + perPage: 2, + }), + ).toEqual(reply.data); + const query = new URL(calls[0]?.path ?? '', 'http://fixture.invalid').searchParams; + expect(Object.fromEntries(query)).toEqual({ + tenant: 'tenant / east', + resource: 'team:regional', + page: '2', + per_page: '2', + search: 'support & sales', + }); + reply.data = { data: [], total_count: 17 }; + expect(await permit.api.groups.list({ page: 10, perPage: 2 })).toEqual(reply.data); + expect(calls[1]?.path).toBe(`${prefix}/direct?page=10&per_page=2`); + reply.data = { data: [], total_count: 0, page_count: 0 }; + expect(await permit.api.groups.list({ tenant: '', resource: '', search: '' })).toEqual( + reply.data, + ); + expect(calls[2]?.path).toBe(`${prefix}/direct?tenant=&resource=&page=1&per_page=100&search=`); +}); + +const operations: Array<[string, (api: IGroupsApi) => Promise]> = [ + ['create', (api) => api.create(group)], + ['delete', (api) => api.delete(group.group_instance_key)], + ['list', (api) => api.list()], + ['get', (api) => api.get(group.group_instance_key)], + ['assignUser', (api) => api.assignUser(group.group_instance_key, 'alice', membership)], + ['removeUser', (api) => api.removeUser(group.group_instance_key, 'alice', membership)], + ['assignRole', (api) => api.assignRole(group.group_instance_key, role)], + ['removeRole', (api) => api.removeRole(group.group_instance_key, role)], +]; + +test.each(operations)( + '%s propagates rejected HTTP requests as PermitApiError', + async (_name, call) => { + const { permit, calls, reply } = await wire(); + reply.status = 422; + reply.data = { message: 'Group request rejected', error_code: 'INVALID_GROUP' }; + const error: unknown = await call(permit.api.groups).catch((caught: unknown) => caught); + expect(error).toBeInstanceOf(PermitApiError); + assert(error instanceof PermitApiError); + expect(error.message).toContain('Group request rejected'); + expect(error.response?.status).toBe(422); + expect(calls).toHaveLength(1); + }, +); + +test.each(operations)('%s rejects a missing environment before transport', async (_name, call) => { + let calls = 0; + const caller = axios.create({ + adapter: async () => { + calls++; + throw new Error('Unexpected transport'); + }, + }); + const permit = new Permit({ + token: 'groups-fixture', + axiosInstance: caller, + log: { level: 'silent' }, + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project'); + permit.config.apiContext.setProjectLevelContext('org', 'project'); + await expect(call(permit.api.groups)).rejects.toBeInstanceOf(PermitContextError); + expect(calls).toBe(0); +}); + +test('unexpected transport failures remain visible to Groups callers', async () => { + const failure = new Error('Adapter failed'); + const permit = new Permit({ + token: 'groups-fixture', + axiosInstance: axios.create({ + adapter: async () => { + throw failure; + }, + }), + log: { level: 'silent' }, + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project', 'environment'); + await expect(permit.api.groups.get('team:missing')).rejects.toThrow('Adapter failed'); +}); diff --git a/src/api/groups.ts b/src/api/groups.ts new file mode 100644 index 00000000..d362713b --- /dev/null +++ b/src/api/groups.ts @@ -0,0 +1,284 @@ +import { type Logger } from 'pino'; + +import { type IPermitConfig } from '#src/config'; +import { + GroupsApi as AutogenGroupsApi, + type GroupAddRole, + type GroupAssignUser, + type GroupCreate, + type GroupRead, + type GroupReadSchema, + type PaginatedResultGroupReadSchema, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; + +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error links. +import type { PermitContextError } from '#src/api/context'; + +export { + type GroupAddRole, + type GroupAssignUser, + type GroupCreate, + type GroupRead, + type GroupReadSchema, + type PaginatedResultGroupReadSchema, +} from '#src/openapi/index'; + +/** Filters and pagination for the direct Groups list. */ +export interface IListGroups extends IPagination { + /** Tenant key or ID to filter by. */ + tenant?: string; + /** Resource type key or ID to filter by. */ + resource?: string; + /** Text to search for in the group name or key. */ + search?: string; +} + +/** Manages groups, their user membership, and resource role grants. */ +export interface IGroupsApi { + /** + * Creates a group resource instance. + * @param group - The group instance key, tenant, and optional resource type. + * @returns The created group and its membership; this response does not contain an ID. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + create(group: GroupCreate): Promise; + + /** + * Deletes a group resource instance. + * @param groupKeyOrId - The qualified resource:instance key or internal instance ID. + * @returns A promise that resolves when the group is deleted. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + delete(groupKeyOrId: string): Promise; + + /** + * Lists groups through the direct endpoint. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + list(params?: IListGroups): Promise; + + /** + * Gets a group through the direct endpoint. + * @param groupKeyOrId - The qualified resource:instance key or internal instance ID. + * @returns The group instance, including its internal ID. + * @throws {@link PermitApiError} If the API rejects the request, including a missing group. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + get(groupKeyOrId: string): Promise; + + /** + * Adds a user to a group so the user can inherit the group's resource roles through ReBAC. + * @param groupKeyOrId - The qualified resource:instance key or internal instance ID. + * @param userKeyOrId - The user key or ID. + * @param assignment - The required tenant body for the membership request. + * @returns The updated group and its membership. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + assignUser( + groupKeyOrId: string, + userKeyOrId: string, + assignment: GroupAssignUser, + ): Promise; + + /** + * Removes a user's membership from a group. + * @param groupKeyOrId - The qualified resource:instance key or internal instance ID. + * @param userKeyOrId - The user key or ID. + * @param assignment - The required tenant body, also sent for this DELETE request. + * @returns A promise that resolves when the membership is removed. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + removeUser(groupKeyOrId: string, userKeyOrId: string, assignment: GroupAssignUser): Promise; + + /** + * Grants a group a resource role using relationships and role derivation through ReBAC. + * @param groupKeyOrId - The qualified resource:instance key or internal instance ID. + * @param assignment - The role, resource type, resource instance, and tenant identifiers. + * @returns The updated group and its role membership. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + assignRole(groupKeyOrId: string, assignment: GroupAddRole): Promise; + + /** + * Revokes a group's resource role grant. + * @param groupKeyOrId - The qualified resource:instance key or internal instance ID. + * @param assignment - The role, resource type, resource instance, and tenant identifiers. + * @returns A promise that resolves when the role grant is removed. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the API key or selected context is insufficient. + */ + removeRole(groupKeyOrId: string, assignment: GroupAddRole): Promise; +} + +/** API client for the GA core Groups operations. */ +export class GroupsApi extends BasePermitApi implements IGroupsApi { + private readonly groupsApi: AutogenGroupsApi; + + /** + * Creates the Groups API wrapper. + * @param config - The SDK configuration. + * @param logger - The SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.groupsApi = new AutogenGroupsApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** {@inheritDoc IGroupsApi.create} */ + public async create(group: GroupCreate): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.groupsApi.createGroup({ + ...this.config.apiContext.environmentContext, + groupCreate: group, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.delete} */ + public async delete(groupKeyOrId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + await this.groupsApi.deleteGroup({ + ...this.config.apiContext.environmentContext, + groupInstanceKey: groupKeyOrId, + }); + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.list} */ + public async list(params: IListGroups = {}): Promise { + const { tenant, resource, search, page = 1, perPage = 100 } = params; + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.groupsApi.listDirectGroup({ + ...this.config.apiContext.environmentContext, + ...(tenant !== undefined && { tenant }), + ...(resource !== undefined && { resource }), + ...(search !== undefined && { search }), + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.get} */ + public async get(groupKeyOrId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.groupsApi.getDirectGroup({ + ...this.config.apiContext.environmentContext, + groupInstanceKey: groupKeyOrId, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.assignUser} */ + public async assignUser( + groupKeyOrId: string, + userKeyOrId: string, + assignment: GroupAssignUser, + ): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.groupsApi.assignUserToGroup({ + ...this.config.apiContext.environmentContext, + groupInstanceKey: groupKeyOrId, + userId: userKeyOrId, + groupAssignUser: assignment, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.removeUser} */ + public async removeUser( + groupKeyOrId: string, + userKeyOrId: string, + assignment: GroupAssignUser, + ): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + await this.groupsApi.removeUserFromGroup({ + ...this.config.apiContext.environmentContext, + groupInstanceKey: groupKeyOrId, + userId: userKeyOrId, + groupAssignUser: assignment, + }); + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.assignRole} */ + public async assignRole(groupKeyOrId: string, assignment: GroupAddRole): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.groupsApi.assignRoleToGroup({ + ...this.config.apiContext.environmentContext, + groupInstanceKey: groupKeyOrId, + groupAddRole: assignment, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IGroupsApi.removeRole} */ + public async removeRole(groupKeyOrId: string, assignment: GroupAddRole): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + await this.groupsApi.removeRoleFromGroup({ + ...this.config.apiContext.environmentContext, + groupInstanceKey: groupKeyOrId, + groupAddRole: assignment, + }); + } catch (err) { + this.handleApiError(err); + } + } +} diff --git a/src/api/http-boundary.test.ts b/src/api/http-boundary.test.ts new file mode 100644 index 00000000..56ea037c --- /dev/null +++ b/src/api/http-boundary.test.ts @@ -0,0 +1,201 @@ +import axios from 'axios'; +import { expect, test, vi } from 'vitest'; + +import { ApiContextLevel, ApiKeyLevel, PermitContextError } from '#src/api/context'; +import { Permit, PermitApiError } from '#src/index'; +import { startApi } from '#src/tests/helpers/api-test-server'; + +const TOKEN = 'loopback-api-test-token'; +const SCOPE_PATH = '/v2/api-key/scope'; +const scope = { organization_id: 'org', project_id: 'proj', environment_id: 'env' }; +const USERS = '/v2/facts/proj/env/users'; + +function client(url: string, caller = axios.create({ proxy: false })) { + return new Permit({ + token: TOKEN, + apiUrl: url, + axiosInstance: caller, + retry: false, + log: { level: 'silent' }, + }); +} + +function pendingReply() { + let resolve!: (value: { body: unknown }) => void; + const promise = new Promise<{ body: unknown }>((accept) => { + resolve = accept; + }); + return { promise, resolve }; +} + +test('authored APIs discover scope once over HTTP before concurrent dependent requests', async () => { + const api = await startApi(); + const pending = pendingReply(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, pending.promise); + api.enqueue({ method: 'GET', path: `${USERS}/alice` }, { body: { key: 'alice' } }); + api.enqueue({ method: 'GET', path: `${USERS}/alice` }, { body: { key: 'alice' } }); + const permit = client(api.url); + const calls = [permit.api.users.get('alice'), permit.api.users.get('alice')]; + await vi.waitFor(() => expect(api.requests).toHaveLength(1)); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + pending.resolve({ body: scope }); + expect(await Promise.all(calls)).toStrictEqual([{ key: 'alice' }, { key: 'alice' }]); + expect(api.requests).toHaveLength(3); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + for (const request of api.requests) { + expect(request.headers.authorization).toBe(`Bearer ${TOKEN}`); + expect(request.headers['x-permit-sdk-version']).toBe( + `node:${process.env['npm_package_version'] ?? 'unknown'}`, + ); + expect(request.headers.accept).toBe('application/json'); + } +}); + +for (const [name, body, status] of [ + ['null', null, 200], + ['broken hierarchy', { organization_id: 'org', environment_id: 'env' }, 200], + ['authentication failure', { message: 'scope denied' }, 401], +] as const) { + test(`scope ${name} fails without dispatching facts and a later lookup recovers`, async () => { + const api = await startApi(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body, status }); + const permit = client(api.url); + await expect(permit.api.users.get('alice')).rejects.toBeInstanceOf(PermitContextError); + expect(api.requests).toHaveLength(1); + expect(permit.config.apiContext.organization).toBeNull(); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.WAIT_FOR_INIT); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body: scope }); + api.enqueue({ method: 'GET', path: `${USERS}/alice` }, { body: { key: 'alice' } }); + expect(await permit.api.users.get('alice')).toStrictEqual({ key: 'alice' }); + expect(api.requests).toHaveLength(3); + }); +} + +test('scope cancellation stops dependent traffic and a fresh caller signal can recover', async () => { + const api = await startApi(); + const pending = pendingReply(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, pending.promise); + const controller = new AbortController(); + const caller = axios.create({ proxy: false, signal: controller.signal }); + const permit = client(api.url, caller); + const failed = expect(permit.api.users.get('alice')).rejects.toBeInstanceOf(PermitContextError); + await vi.waitFor(() => expect(api.requests).toHaveLength(1)); + controller.abort(); + await failed; + pending.resolve({ body: scope }); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.WAIT_FOR_INIT); + delete caller.defaults.signal; + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body: scope }); + api.enqueue({ method: 'GET', path: `${USERS}/alice` }, { body: { key: 'alice' } }); + expect(await permit.api.users.get('alice')).toStrictEqual({ key: 'alice' }); + expect(api.requests).toHaveLength(3); +}); + +test('CRUD preserves encoded paths, JSON null values, omitted fields and actual statuses', async () => { + const api = await startApi(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body: scope }); + const key = 'identity / #?'; + const path = `${USERS}/identity%20%2F%20%23%3F`; + const payload = { key, attributes: { retained: null, omitted: undefined } }; + const wire = { key, attributes: { retained: null } }; + api.enqueue({ method: 'POST', path: USERS, body: wire }, { status: 201, body: wire }); + api.enqueue({ method: 'PUT', path, body: wire }, { status: 201, body: wire }); + api.enqueue({ method: 'PATCH', path, body: { attributes: { retained: null } } }, { body: wire }); + api.enqueue({ method: 'GET', path }, { body: null }); + api.enqueue({ method: 'DELETE', path }, { status: 204, body: undefined }); + const permit = client(api.url); + expect(await permit.api.users.create(payload)).toStrictEqual(wire); + expect(await permit.api.users.sync(payload)).toStrictEqual({ user: wire, created: true }); + expect(await permit.api.users.update(key, { attributes: payload.attributes })).toStrictEqual( + wire, + ); + expect(await permit.api.users.get(key)).toBeNull(); + await permit.api.users.delete(key); + expect(api.requests).toHaveLength(6); + for (const request of api.requests.slice(1, 4)) { + expect(request.headers['content-type']).toBe('application/json'); + expect(request.headers.authorization).toBe(`Bearer ${TOKEN}`); + } + expect(payload.attributes).toHaveProperty('omitted', undefined); +}); + +test('detailed pagination preserves repeated search terms and full envelopes without extra requests', async () => { + const api = await startApi(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body: scope }); + const page = { data: [{ key: 'report', relationships: [] }], total_count: 5, page_count: 3 }; + api.enqueue( + { + method: 'GET', + path: '/v2/facts/proj/env/resource_instances/detailed', + query: [ + ['tenant', 'east / west'], + ['search', 'one & two'], + ['search', 'three'], + ['page', '2'], + ['per_page', '2'], + ], + }, + { body: page }, + ); + const permit = client(api.url); + expect( + await permit.api.resourceInstances.listDetailed({ + tenant: 'east / west', + search: ['one & two', 'three'], + page: 2, + perPage: 2, + }), + ).toStrictEqual(page); + expect(api.requests).toHaveLength(2); +}); + +for (const status of [400, 401, 403, 404, 409, 500]) { + test(`authored API preserves HTTP ${status} errors without retrying or fabricating data`, async () => { + const api = await startApi(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body: scope }); + api.enqueue( + { method: 'GET', path: `${USERS}/missing` }, + { status, body: { message: 'rejected' } }, + ); + const permit = client(api.url); + const result = await Promise.allSettled([permit.api.users.get('missing')]); + expect(result[0]?.status).toBe('rejected'); + if (result[0]?.status !== 'rejected') throw new Error('Expected the HTTP request to fail'); + expect(result[0].reason).toBeInstanceOf(PermitApiError); + expect(result[0].reason).toHaveProperty('status', status); + expect(api.requests).toHaveLength(2); + }); +} + +test('bulk create, replace and tuple calls dispatch every operation in one request each', async () => { + const api = await startApi(); + api.enqueue({ method: 'GET', path: SCOPE_PATH }, { body: scope }); + const users = [ + { key: 'alice', first_name: 'Before' }, + { key: 'bob', attributes: { tag: null } }, + ]; + const tuples = [ + { subject: 'folder:one', relation: 'parent', object: 'doc:two', tenant: 'default' }, + ]; + api.enqueue( + { method: 'POST', path: '/v2/facts/proj/env/bulk/users', body: { operations: users } }, + { body: {} }, + ); + api.enqueue( + { method: 'PUT', path: '/v2/facts/proj/env/bulk/users', body: { operations: users } }, + { body: {} }, + ); + api.enqueue( + { + method: 'POST', + path: '/v2/facts/proj/env/relationship_tuples/bulk', + body: { operations: tuples }, + }, + { body: {} }, + ); + const permit = client(api.url); + expect(await permit.api.users.bulkUserCreate(users)).toStrictEqual({}); + expect(await permit.api.users.bulkUserReplace(users)).toStrictEqual({}); + expect(await permit.api.relationshipTuples.bulkRelationshipTuples(tuples)).toStrictEqual({}); + expect(api.requests).toHaveLength(4); +}); diff --git a/src/api/index.ts b/src/api/index.ts index a9cf5e36..7006a8d9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,39 +1,52 @@ -export { IPagination } from './base'; -export * from './condition-set-rules'; -export * from './condition-sets'; -export * from './deprecated'; -export * from './environments'; -export * from './projects'; -export * from './resource-action-groups'; -export * from './resource-actions'; -export * from './resource-attributes'; -export * from './resources'; -export * from './role-assignments'; -export * from './roles'; -export * from './tenants'; -export * from './users'; -export * from './api-client'; -export * from './elements'; +export { + type IPagination, + type IPaginationExtended, + type ReturnPaginationType, +} from '#src/api/base'; +export * from '#src/api/condition-set-rules'; +export * from '#src/api/api-keys'; +export * from '#src/api/condition-sets'; +export * from '#src/api/environments'; +export * from '#src/api/groups'; +export * from '#src/api/pdps'; +export * from '#src/api/proxy-configs'; +export * from '#src/api/audit-logs'; +export * from '#src/api/relationship-tuples'; +export * from '#src/api/resource-instances'; +export * from '#src/api/projects'; +export * from '#src/api/resource-action-groups'; +export * from '#src/api/resource-actions'; +export * from '#src/api/resource-attributes'; +export * from '#src/api/resource-relations'; +export * from '#src/api/resource-roles'; +export * from '#src/api/resources'; +export * from '#src/api/role-assignments'; +export * from '#src/api/roles'; +export * from '#src/api/tenants'; +export * from '#src/api/users'; +export * from '#src/api/user-invites'; +export * from '#src/api/user-attributes'; +export * from '#src/api/api-client'; +export * from '#src/api/elements'; // referenced by other exports export { MemberAccessLevel, - OrgMemberRead, + type OrgMemberRead, MemberAccessObj, APIKeyOwnerType, - ParentId, - ResourceId, + type ParentId, + type ResourceId, ConditionSetType, - EnvironmentCopyConflictStrategyEnum, - EnvironmentCopyScope, - EnvironmentCopyScopeFilters, - EnvironmentCopyTarget, - Statistics, + EnvironmentCopyConflictStrategy, + type EnvironmentCopyScope, + type EnvironmentCopyScopeFilters, + type EnvironmentCopyTarget, AttributeType, - UserInTenant, - UserRole, - ActionBlockEditable, - AttributeBlockEditable, - ActionBlockRead, - AttributeBlockRead, -} from '../openapi/types'; + type UserInTenant, + type UserRole, + type ActionBlockEditable, + type AttributeBlockEditable, + type ActionBlockRead, + type AttributeBlockRead, +} from '#src/openapi/types/index'; diff --git a/src/api/legacy-replacements.test.ts b/src/api/legacy-replacements.test.ts new file mode 100644 index 00000000..f1b71ce5 --- /dev/null +++ b/src/api/legacy-replacements.test.ts @@ -0,0 +1,80 @@ +import { ApiContext } from '#src/api/context'; +import { ConditionSetType, Permit } from '#src/index'; +import { startApi } from '#src/tests/helpers/api-test-server'; + +function client(apiUrl: string): Permit { + const apiContext = new ApiContext(); + apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + apiContext.setEnvironmentLevelContext('org', 'project', 'environment'); + return new Permit({ token: 'fixture', apiUrl, apiContext, log: { level: 'silent' } }); +} + +test('grouped condition sets retain the legacy type filter and pagination over HTTP', async () => { + const api = await startApi(); + const sets = [{ key: 'team', type: 'userset' }]; + api.enqueue( + { + method: 'GET', + path: '/v2/schema/project/environment/condition_sets', + query: [ + ['type', 'userset'], + ['page', '2'], + ['per_page', '10'], + ], + }, + { body: { data: sets } }, + ); + const result = await client(api.url).api.conditionSets.list({ + type: ConditionSetType.Userset, + page: 2, + perPage: 10, + }); + expect(result).toEqual(sets); +}); + +test('grouped rule listing preserves unfiltered default pagination', async () => { + const api = await startApi(); + const rules = [{ user_set: 'team', resource_set: 'documents', permission: 'document:read' }]; + api.enqueue( + { + method: 'GET', + path: '/v2/facts/project/environment/set_rules', + query: [ + ['page', '1'], + ['per_page', '100'], + ], + }, + { body: rules }, + ); + expect(await client(api.url).api.conditionSetRules.list()).toEqual(rules); +}); + +test.each([ + ['userSetKey', 'user_set'], + ['permissionKey', 'permission'], + ['resourceSetKey', 'resource_set'], +] as const)( + 'grouped rule filter %s remains independent and retains encoded values', + async (filter, query) => { + const api = await startApi(); + api.enqueue( + { + method: 'GET', + path: '/v2/facts/project/environment/set_rules', + query: [ + [query, 'team /ops'], + ['page', '2'], + ['per_page', '10'], + ], + }, + { body: [] }, + ); + expect( + await client(api.url).api.conditionSetRules.list({ + [filter]: 'team /ops', + page: 2, + perPage: 10, + }), + ).toEqual([]); + }, +); diff --git a/src/api/monthly-usage.test.ts b/src/api/monthly-usage.test.ts new file mode 100644 index 00000000..aec8dcfd --- /dev/null +++ b/src/api/monthly-usage.test.ts @@ -0,0 +1,71 @@ +import axios from 'axios'; +import { expect, expectTypeOf, test } from 'vitest'; + +import { OrganizationsApi } from '#src/openapi/api/organizations-api'; +import { Configuration } from '#src/openapi/configuration'; +import type { HistoricalUsage } from '#src/openapi/types/historical-usage'; +import type { MonthlyUsage } from '#src/openapi/types/monthly-usage'; +import type { OrganizationStats } from '#src/openapi/types/organization-stats'; + +const tenantIds = ['b258e124-d46c-4aa1-8f8d-efce374e8bd0', '5cd1f42c-28d3-4a7d-8fb3-bbf34e45a984']; + +test('generated usage declarations describe optional arrays through nested statistics', () => { + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + const usage: MonthlyUsage = { monthly_tenants: tenantIds }; + expect(usage.monthly_tenants?.includes(tenantIds[0] ?? '')).toBe(true); +}); + +test.each([{ tenants: tenantIds }, { tenants: [] }])( + 'source-generated Axios statistics preserve JSON arrays without Set conversion: %j', + async ({ tenants }) => { + const requests: Array<{ method: string | undefined; url: string; auth: unknown }> = []; + const body: OrganizationStats = { + key: 'organization', + id: 'fcfbd383-de5f-46bc-aa02-bc3bde32032f', + name: 'Organization', + is_enterprise: false, + created_at: '2026-01-01T00:00:00Z', + updated_at: '2026-01-01T00:00:00Z', + stats: { projects: 1, environments: 1, users: 2 }, + historical_usage: { current_month: { monthly_tenants: tenants, month: 1, year: 2026 } }, + }; + const client = axios.create({ + adapter: async (config) => { + requests.push({ + method: config.method, + url: client.getUri(config), + auth: config.headers.get('Authorization'), + }); + return { + data: JSON.stringify(body), + status: 200, + statusText: 'OK', + headers: { 'content-type': 'application/json' }, + config, + }; + }, + }); + const api = new OrganizationsApi( + new Configuration({ basePath: 'https://api.invalid', accessToken: 'test-token' }), + undefined, + client, + ); + const response = await api.statsOrganization({ orgId: 'org/id' }); + expect(requests).toEqual([ + { + method: 'get', + url: 'https://api.invalid/v2/orgs/org%2Fid/stats', + auth: 'Bearer test-token', + }, + ]); + expect(response.data).toEqual(body); + const actual = response.data.historical_usage.current_month?.monthly_tenants; + expect(Array.isArray(actual)).toBe(true); + expect(actual).toEqual(tenants); + expect(actual).not.toBeInstanceOf(Set); + expect(actual?.map((id) => id)).toEqual(tenants); + expect(actual?.includes(tenantIds[0] ?? '')).toBe(tenants.length > 0); + }, +); diff --git a/src/api/openapi-contracts.test.ts b/src/api/openapi-contracts.test.ts new file mode 100644 index 00000000..cff90386 --- /dev/null +++ b/src/api/openapi-contracts.test.ts @@ -0,0 +1,133 @@ +import axios from 'axios'; +import { expect, expectTypeOf, test } from 'vitest'; + +import { + type BulkOperationsApi, + type CallbacksInner, + type GroupsApi, + type OPALHttpFetcherConfig, + type PaginatedResultRoleRead, + type PolicyDecisionPointsApi, + type ResourceInstanceCreate, + type RoleAssignmentRemove, + type RoleRead, + type Secret, + type ResponseListRolesV2SchemaProjIdEnvIdRolesGet, + type TenantsApi, + RoleAssignmentsApiAxiosParamCreator, +} from '#src/openapi/index'; +import { + type RelationshipTupleCreateBulkOperation, + type RelationshipTupleDeleteBulkOperation, +} from '#src/api/relationship-tuples'; +import { Permit } from '#src/index'; +import { createMockPermit } from '#src/tests/helpers/mock-api'; + +test('preserves reviewed unions, tuples, required tenants and unspecified bulk results', () => { + expectTypeOf().toHaveProperty('operations'); + expectTypeOf().toHaveProperty('idents'); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf< + RoleRead[] | PaginatedResultRoleRead + >(); + expectTypeOf>().toEqualTypeOf<{ tenant: string }>(); + expectTypeOf>().toEqualTypeOf<{ tenant: string }>(); + expectTypeOf< + Awaited>['data'] + >().toEqualTypeOf(); + expectTypeOf().toBeFunction(); + expectTypeOf().toBeFunction(); + expectTypeOf().toBeFunction(); + expectTypeOf().toBeFunction(); +}); + +for (const name of [ + 'conditionSets', + 'resourceInstances', + 'relationshipTuples', + 'tenants', +] as const) { + test(`${name}.list returns arrays for both published response variants`, async () => { + const { permit, rest } = createMockPermit(); + for (const rows of [[], [{ key: 'one' }]]) { + for (const response of [rows, { data: rows, total_count: rows.length, page_count: 1 }]) { + rest.resolveWith(response); + const result = await permit.api[name].list({ page: 2, perPage: 7 }); + expect(result).toEqual(rows); + expect(rest.last?.params).toMatchObject({ page: '2', per_page: '7' }); + } + } + }); +} + +test('serializes singleton role filters exactly once under unbracketed keys', async () => { + const { permit, rest } = createMockPermit(); + const filters = { user: 'user/a?b+c=é', tenant: 'tenant+one&two', role: 'reader/one' }; + const response = { data: [], total_count: 0 }; + rest.resolveWith(response); + expect(await permit.api.roleAssignments.list({ ...filters, includeTotalCount: true })).toEqual( + response, + ); + const url = new URL(rest.last?.url ?? 'http://missing.invalid'); + for (const [key, value] of Object.entries(filters)) { + expect(url.searchParams.getAll(key)).toEqual([value]); + expect(url.searchParams.has(`${key}[]`)).toBe(false); + } + rest.resolveWith([]); + await permit.api.users.getAssignedRoles({ user: filters.user, tenant: filters.tenant }); + expect(rest.last?.params).toMatchObject({ user: filters.user, tenant: filters.tenant }); +}); + +test('raw role filters repeat array keys and omit missing filters', async () => { + const creator = RoleAssignmentsApiAxiosParamCreator(); + const request = await creator.listRoleAssignments('project', 'environment', ['a+b', 'c/d']); + const url = new URL(request.url, 'http://localhost'); + expect(url.searchParams.getAll('user')).toEqual(['a+b', 'c/d']); + expect(url.searchParams.has('user[]')).toBe(false); + expect(url.searchParams.has('tenant')).toBe(false); + expect(url.searchParams.has('role')).toBe(false); +}); + +test('high-level unassign methods retain their void contract despite response bodies', async () => { + const { permit, rest } = createMockPermit(); + const assignment = { user: 'user', role: 'reader', tenant: 'tenant' }; + rest.resolveWith(assignment); + expect(await permit.api.roleAssignments.unassign(assignment)).toBeUndefined(); + rest.resolveWith(assignment); + expect(await permit.api.users.unassignRole(assignment)).toBeUndefined(); +}); + +for (const proxyFactsViaPdp of [false, true]) { + test(`configured routing overrides injected Axios baseURL with proxyFactsViaPdp=${proxyFactsViaPdp}`, async () => { + const requests: string[] = []; + const client = axios.create({ baseURL: 'https://custom.invalid' }); + client.defaults.adapter = async (config) => { + const url = new URL(config.url ?? '', config.baseURL); + requests.push(url.href); + return { + status: 200, + statusText: 'OK', + headers: {}, + config, + data: + url.pathname === '/v2/api-key/scope' + ? { organization_id: 'org', project_id: 'proj', environment_id: 'env' } + : { data: [], total_count: 0 }, + }; + }; + const permit = new Permit({ + token: 'test', + apiUrl: 'https://permit.invalid', + pdp: 'http://localhost:7766', + proxyFactsViaPdp, + axiosInstance: client, + log: { level: 'silent' }, + }); + await permit.api.users.list({ page: 1, perPage: 100 }); + expect(requests).toEqual([ + 'https://permit.invalid/v2/api-key/scope', + `${proxyFactsViaPdp ? 'http://localhost:7766' : 'https://permit.invalid'}/v2/facts/proj/env/users?page=1&per_page=100`, + ]); + }); +} diff --git a/src/api/pdps.test.ts b/src/api/pdps.test.ts new file mode 100644 index 00000000..0de014bc --- /dev/null +++ b/src/api/pdps.test.ts @@ -0,0 +1,71 @@ +import { expect, test } from 'vitest'; + +import { PermitContextError } from '#src/api/context'; +import { createMockPermit, MOCK_API_ORIGIN } from '#src/tests/helpers/mock-api'; + +const acknowledgement = { update_id: 'update-id', pdp_ids: ['pdp-one', 'pdp-two'] }; + +test.each([false, true])( + 'environment refresh returns its acknowledgement on control-plane transport (proxy=%s)', + async (proxyFactsViaPdp) => { + const { permit, rest } = createMockPermit({ + proxyFactsViaPdp, + project: 'project / east', + environment: 'environment east', + }); + const result = { ...acknowledgement, future_field: null }; + const request = { reason: 'Reload external data / east' }; + rest.resolveWith(result); + expect(await permit.api.pdps.refresh(request)).toEqual(result); + expect(rest.last).toMatchObject({ + method: 'POST', + origin: MOCK_API_ORIGIN, + path: '/v2/pdps/project%20%2F%20east/environment%20east/configs/refresh', + data: request, + params: {}, + }); + expect(rest.last?.headers.get('Content-Type')).toBe('application/json'); + expect(rest.last?.headers.get('Authorization')).toBe('Bearer test-token'); + expect(rest.last?.headers.has('X-Wait-Timeout')).toBe(false); + expect(rest.last?.headers.has('X-Timeout-Policy')).toBe(false); + expect(rest.requests).toHaveLength(1); + }, +); + +test('refresh allows the optional body to be omitted and preserves an empty reason', async () => { + const { permit, rest } = createMockPermit(); + rest.resolveWith(acknowledgement); + expect(await permit.api.pdps.refresh()).toEqual(acknowledgement); + expect(rest.last?.data).toEqual({}); + rest.resolveWith(acknowledgement); + expect(await permit.api.pdps.refresh({ reason: '' })).toEqual(acknowledgement); + expect(rest.last?.data).toEqual({ reason: '' }); + expect(rest.requests).toHaveLength(2); +}); + +test('refresh follows the selected environment under an organization key', async () => { + const { permit, rest } = createMockPermit({ contextLevel: 'organization' }); + permit.config.apiContext.setEnvironmentLevelContext('org', 'selected-project', 'selected-env'); + rest.resolveWith(acknowledgement); + expect(await permit.api.pdps.refresh()).toEqual(acknowledgement); + expect(rest.last?.path).toBe('/v2/pdps/selected-project/selected-env/configs/refresh'); +}); + +test('refresh requires environment context before dispatch', async () => { + const { permit, rest } = createMockPermit({ contextLevel: 'project' }); + await expect(permit.api.pdps.refresh()).rejects.toBeInstanceOf(PermitContextError); + expect(rest.requests).toHaveLength(0); +}); + +test.each([403, 404, 422, 503])( + 'environment refresh surfaces write/scope/limit/server errors (%s)', + async (status) => { + const { permit, rest } = createMockPermit(); + rest.rejectWith(status, { message: 'refresh rejected' }); + await expect(permit.api.pdps.refresh({ reason: 'fixture' })).rejects.toMatchObject({ + name: 'PermitApiError', + status, + }); + expect(rest.requests).toHaveLength(1); + }, +); diff --git a/src/api/pdps.ts b/src/api/pdps.ts new file mode 100644 index 00000000..5cb58b11 --- /dev/null +++ b/src/api/pdps.ts @@ -0,0 +1,78 @@ +import { type Logger } from 'pino'; + +import { type IPermitConfig } from '#src/config'; +import { + PolicyDecisionPointsApi as AutogenPolicyDecisionPointsApi, + type PDPDataRefreshRequest, + type PDPDataRefreshResponse, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; + +import { BasePermitApi } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error links. +import type { PermitContextError } from '#src/api/context'; + +export { type PDPDataRefreshResponse } from '#src/openapi/index'; + +/** Environment-wide refresh accepts a reason; shard targeting is a per-PDP operation. */ +export type IEnvironmentPdpDataRefreshRequest = Pick; + +/** Manages environment-wide PDP data refresh requests through the control plane. */ +export interface IPdpsApi { + /** + * Requests a data refresh for all PDP configurations in the selected environment. + * Requires an API key with write access to those configurations. + * @param request - An optional human-readable reason. Environment refresh does not accept a shard. + * @returns The update ID and targeted PDP IDs. This acknowledges the request, not completion. + * @throws {@link PermitApiError} If no PDP configurations exist or the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + refresh(request?: IEnvironmentPdpDataRefreshRequest): Promise; +} + +/** Control-plane client for environment-wide PDP refresh. */ +export class PdpsApi extends BasePermitApi implements IPdpsApi { + private pdps: AutogenPolicyDecisionPointsApi; + + /** + * Creates a PDP management client. + * @param config - The SDK configuration and selected API context. + * @param logger - The SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.pdps = new AutogenPolicyDecisionPointsApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** + * Requests a data refresh for all PDP configurations in the selected environment. + * Requires an API key with write access to those configurations. + * @param request - An optional human-readable reason. Environment refresh does not accept a shard. + * @returns The update ID and targeted PDP IDs. This acknowledges the request, not completion. + * @throws {@link PermitApiError} If no PDP configurations exist or the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + public async refresh( + request?: IEnvironmentPdpDataRefreshRequest, + ): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.pdps.refreshEnvironmentPdpData({ + ...this.config.apiContext.environmentContext, + ...(request !== undefined && { pDPDataRefreshRequest: request }), + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } +} diff --git a/src/api/projects.ts b/src/api/projects.ts index 0da6e1f6..29421b0a 100644 --- a/src/api/projects.ts +++ b/src/api/projects.ts @@ -1,18 +1,18 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ProjectsApi as AutogenProjectsApi, - ProjectCreate, - ProjectRead, - ProjectUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type ProjectCreate, + type ProjectRead, + type ProjectUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BasePermitApi, type IPagination } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; -export { ProjectCreate, ProjectRead, ProjectUpdate } from '../openapi'; +export { type ProjectCreate, type ProjectRead, type ProjectUpdate } from '#src/openapi/index'; export interface IProjectsApi { /** diff --git a/src/api/proxy-configs.test.ts b/src/api/proxy-configs.test.ts new file mode 100644 index 00000000..6cdc7ef3 --- /dev/null +++ b/src/api/proxy-configs.test.ts @@ -0,0 +1,782 @@ +import assert from 'node:assert/strict'; +import { inspect } from 'node:util'; + +import axios, { AxiosError, AxiosHeaders, type InternalAxiosRequestConfig } from 'axios'; +import pino from 'pino'; + +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { ProxyConfigsApi, type IProxyConfigsApi } from '#src/api/proxy-configs'; +import { + AuthMechanism, + MappingRuleUrlTypeEnum, + Methods, + Permit, + type ProxyConfigCreate, + type ProxyConfigRead, + type ProxyConfigUpdate, +} from '#src/index'; + +const input: ProxyConfigCreate = { + key: 'payments', + name: 'Payments example', + secret: 'inert-bearer-secret', + auth_mechanism: AuthMechanism.Bearer, + mapping_rules: [ + { + url: '^https://service.example.test/items/[0-9]+$', + url_type: MappingRuleUrlTypeEnum.Regex, + http_method: Methods.Get, + resource: 'document', + action: 'read', + priority: 0, + headers: { 'X-Tenant': 'east' }, + }, + ], +}; +const stored: ProxyConfigRead = { + ...input, + id: 'proxy-id', + organization_id: 'org', + project_id: 'project', + environment_id: 'environment', + created_at: '2026-10-08T00:00:00Z', + updated_at: '2026-10-08T00:00:00Z', + secret: 'received-mask', +}; +const key = 'payments/a?b+c=%é'; +const encodedKey = 'payments%2Fa%3Fb%2Bc%3D%25%C3%A9'; +const prefix = 'https://control.example/v2/facts/project%2Fone/environment%20east/proxy_configs'; +interface Request { + method: string | undefined; + url: string; + body: unknown; + headers: AxiosHeaders; +} +function response(config: InternalAxiosRequestConfig, data: unknown, status: number) { + return { data, status, statusText: 'Fixture response', headers: new AxiosHeaders(), config }; +} +function wire(proxyFactsViaPdp = true) { + const calls: Request[] = []; + const reply: { status: number; data: unknown; error?: string } = { status: 200, data: stored }; + const permit = new Permit({ + token: 'proxy-fixture', + apiUrl: 'https://control.example', + pdp: 'https://pdp.invalid', + proxyFactsViaPdp, + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + calls.push({ + method: config.method, + url: axios.getUri(config), + body: config.data, + headers: new AxiosHeaders(config.headers), + }); + const result = response(config, reply.data, reply.status); + if (reply.error) throw new AxiosError('Fixture transport failed', reply.error, config); + if (reply.status >= 400) + throw new AxiosError( + 'Proxy configuration rejected', + 'ERR_BAD_RESPONSE', + config, + undefined, + result, + ); + return result; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project/one', 'environment east'); + return { permit, calls, reply }; +} + +test.each([true, false])( + 'all five routes stay on the control plane with facts proxy %s', + async (proxy) => { + const { permit, calls, reply } = wire(proxy); + const api = permit.api.proxyConfigs; + reply.data = { ...stored, additive: { nullable: null, enabled: false, count: 0 } }; + const update = { + name: 'Updated', + secret: { 'X-Authorization': 'inert-header-secret' }, + auth_mechanism: AuthMechanism.Headers, + mapping_rules: [{ ...input.mapping_rules![0]!, should_delete: false }], + }; + expect(await api.create(Object.freeze(structuredClone(input)))).toEqual(reply.data); + expect(await api.get(key)).toEqual(reply.data); + expect(await api.update(key, Object.freeze(update))).toEqual(reply.data); + reply.data = [reply.data, reply.data]; + expect(await api.list()).toEqual(reply.data); + reply.status = 204; + reply.data = undefined; + expect(await api.delete(key)).toBeUndefined(); + expect(calls.map(({ method, url, body }) => [method, url, body])).toEqual([ + ['post', prefix, JSON.stringify(input)], + ['get', `${prefix}/${encodedKey}`, undefined], + ['patch', `${prefix}/${encodedKey}`, JSON.stringify(update)], + ['get', `${prefix}?page=1&per_page=100`, undefined], + ['delete', `${prefix}/${encodedKey}`, undefined], + ]); + for (const request of calls) { + expect(request.headers.get('authorization')).toBe('Bearer proxy-fixture'); + expect(request.headers.has('x-wait-timeout')).toBe(false); + expect(request.headers.has('x-timeout-policy')).toBe(false); + if (request.body) expect(request.headers.get('content-type')).toContain('application/json'); + } + expect('waitForSync' in api).toBe(false); + expect(input.secret).toBe('inert-bearer-secret'); + expect(update.secret).toEqual({ 'X-Authorization': 'inert-header-secret' }); + }, +); + +test.each([200, 201])( + 'POST preserves an existing or newly-created response at HTTP %s', + async (status) => { + const { permit, reply } = wire(); + reply.status = status; + reply.data = { + ...stored, + name: 'Returned name', + secret: { 'X-Authorization': 'received-header-mask' }, + mapping_rules: [], + future: false, + }; + const result = await permit.api.proxyConfigs.create(input); + expect(result).toEqual(reply.data); + expect(result.secret).not.toEqual(input.secret); + }, +); + +test.each([AuthMechanism.Bearer, AuthMechanism.Basic, AuthMechanism.Headers])( + '%s supports its published secret union without rewriting the returned mask', + async (mechanism) => { + const { permit, calls, reply } = wire(); + const secret = + mechanism === AuthMechanism.Headers ? { 'X-Secret': 'dummy-header' } : 'dummy:credential'; + const body = { ...input, auth_mechanism: mechanism, secret }; + reply.data = { ...stored, auth_mechanism: mechanism, secret: 'server-mask' }; + expect((await permit.api.proxyConfigs.create(body)).secret).toBe('server-mask'); + expect(JSON.parse(String(calls[0]?.body))).toEqual(body); + reply.data = { + ...stored, + auth_mechanism: mechanism, + secret: { 'X-Secret': 'masked' }, + mapping_rules: [], + }; + expect( + await permit.api.proxyConfigs.update(key, { + secret, + auth_mechanism: mechanism, + mapping_rules: [], + }), + ).toEqual(reply.data); + expect(await permit.api.proxyConfigs.get(key)).toEqual(reply.data); + }, +); + +test('snapshots nested write bodies and pagination before asynchronous scope checks', async () => { + const { permit, calls, reply } = wire(); + const body = structuredClone(input); + const pending = permit.api.proxyConfigs.create(body); + body.name = 'Changed'; + body.secret = 'changed-secret'; + body.mapping_rules![0]!.headers!['X-Tenant'] = 'changed'; + body.mapping_rules!.push({ ...body.mapping_rules![0]!, resource: 'changed' }); + await pending; + expect(JSON.parse(String(calls[0]?.body))).toEqual(input); + const patch: ProxyConfigUpdate = { + secret: { 'X-Secret': 'before' }, + mapping_rules: [ + { + url: 'https://service.example.test/plain', + http_method: Methods.Post, + resource: 'document', + priority: 0, + headers: {}, + should_delete: false, + }, + ], + }; + const expected = structuredClone(patch), + update = permit.api.proxyConfigs.update(key, patch); + assert(typeof patch.secret === 'object'); + patch.secret['X-Secret'] = 'after'; + patch.mapping_rules![0]!.should_delete = true; + await update; + expect(JSON.parse(String(calls[1]?.body))).toEqual(expected); + reply.data = []; + const params = { page: 2, perPage: 3 }, + list = permit.api.proxyConfigs.list(params); + params.page = 9; + params.perPage = 10; + expect(await list).toEqual([]); + expect(calls[2]?.url).toBe(`${prefix}?page=2&per_page=3`); + await permit.api.proxyConfigs.list({ page: 0, perPage: 0 }); + expect(calls[3]?.url).toBe(`${prefix}?page=0&per_page=0`); + await permit.api.proxyConfigs.list(undefined); + expect(calls[4]?.url).toBe(`${prefix}?page=1&per_page=100`); +}); + +test('partial update preserves empty, false, zero and rule removal values exactly', async () => { + const { permit, calls } = wire(); + for (const body of [ + {}, + { name: '', secret: {} }, + { mapping_rules: [] }, + { + mapping_rules: [ + { + url: 'https://service.example.test/plain', + http_method: Methods.Delete, + resource: 'document', + headers: {}, + action: '', + priority: 0, + should_delete: true, + }, + ], + }, + ]) { + await permit.api.proxyConfigs.update(key, body); + expect(JSON.parse(String(calls.at(-1)?.body))).toEqual(body); + } +}); + +const operations: Array<[string, (api: IProxyConfigsApi) => Promise]> = [ + ['list', (api) => api.list()], + ['get', (api) => api.get(key)], + ['create', (api) => api.create(input)], + ['update', (api) => api.update(key, { name: 'Changed' })], + ['delete', (api) => api.delete(key)], +]; +test.each(operations)( + '%s refuses missing environment before operation traffic', + async (_, call) => { + for (const project of [undefined, 'project']) { + let requests = 0; + const permit = new Permit({ + token: 'proxy-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async () => { + requests++; + throw new Error('Unexpected traffic'); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', project); + await expect(call(permit.api.proxyConfigs)).rejects.toBeInstanceOf(PermitContextError); + expect(requests).toBe(0); + } + }, +); +test.each(operations)( + '%s propagates HTTP errors and never credits a failed deletion', + async (_, call) => { + const { permit, calls, reply } = wire(); + for (const status of [400, 401, 403, 404, 422, 503]) { + reply.status = status; + reply.data = { detail: 'Proxy configuration operation denied' }; + const error: unknown = await call(permit.api.proxyConfigs).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.status).toBe(status); + expect(error.response?.status).toBe(status); + expect(error.code).toBe('ERR_BAD_RESPONSE'); + expect(error.message).toContain('Proxy configuration operation denied'); + } + expect(calls).toHaveLength(6); + }, +); +test.each(operations)( + '%s keeps network and timeout failures visible without a fallback', + async (_, call) => { + const { permit, calls, reply } = wire(); + for (const code of ['ERR_NETWORK', 'ECONNABORTED']) { + reply.error = code; + const error: unknown = await call(permit.api.proxyConfigs).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.code).toBe(code); + expect(error.status).toBeUndefined(); + expect(error.message).toContain('Fixture transport failed'); + } + expect(calls).toHaveLength(2); + }, +); + +test.each(['create', 'update'] as const)( + '%s rejects cycles and bigint before scope or write traffic', + async (method) => { + const { permit, calls } = wire(); + const cyclic: Record = { ...input }; + cyclic['secret'] = cyclic; + for (const value of [cyclic, { ...input, secret: 1n }, { ...input, secret: () => undefined }]) { + const error: unknown = await ( + method === 'create' + ? permit.api.proxyConfigs.create(value as unknown as ProxyConfigCreate) + : permit.api.proxyConfigs.update(key, value as ProxyConfigUpdate) + ).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.message).toContain('Cannot serialize proxy configuration'); + } + expect(calls).toHaveLength(0); + }, +); + +test('discovers environment once and leaves scope failures named', async () => { + const urls: string[] = []; + const permit = new Permit({ + token: 'proxy-fixture', + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const url = axios.getUri(config); + urls.push(url); + return response( + config, + url.endsWith('/v2/api-key/scope') + ? { organization_id: 'org', project_id: 'project', environment_id: 'environment' } + : [], + 200, + ); + }, + }), + }); + expect(await permit.api.proxyConfigs.list()).toEqual([]); + expect(await permit.api.proxyConfigs.list()).toEqual([]); + expect(urls).toEqual([ + 'https://control.example/v2/api-key/scope', + 'https://control.example/v2/facts/project/environment/proxy_configs?page=1&per_page=100', + 'https://control.example/v2/facts/project/environment/proxy_configs?page=1&per_page=100', + ]); + const failing = new Permit({ + token: 'proxy-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async () => { + throw new Error('Scope unavailable'); + }, + }), + }); + await expect(failing.api.proxyConfigs.list()).rejects.toBeInstanceOf(PermitContextError); +}); + +test.each(['create', 'update'] as const)( + '%s cannot leak input secrets through errors, logs or cause', + async (method) => { + const token = 'inert-proxy-token-canary', + basic = 'inert-basic-canary:password', + header = 'inert-header-secret-canary', + mapping = 'inert-mapping-header-canary'; + const body = { + ...input, + secret: { 'X-Authorization': header, 'X-Basic': basic }, + mapping_rules: [ + { + ...input.mapping_rules![0]!, + headers: { 'X-Custom': mapping }, + }, + ], + }; + const logs: string[] = [], + callerErrors: AxiosError[] = []; + const logger = pino( + { level: 'error' }, + { + write(value: string) { + logs.push(value); + }, + }, + ); + const permit = new Permit({ + token, + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const raw = new AxiosError( + `Denied ${token} ${basic} ${header} ${mapping}`, + 'ERR_BAD_RESPONSE', + config, + undefined, + response(config, { detail: `Rejected ${basic} ${header} ${mapping}` }, 422), + ); + callerErrors.push(raw); + throw raw; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const api = new ProxyConfigsApi(permit.config, logger); + const error: unknown = await ( + method === 'create' ? api.create(body) : api.update(key, body) + ).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.status).toBe(422); + const diagnostics = [ + error.message, + JSON.stringify(error), + inspect(error, { showHidden: true, depth: 8 }), + ...logs, + ].join(' '); + for (const secret of [token, basic, header, mapping]) expect(diagnostics).not.toContain(secret); + expect(callerErrors[0]?.message).toContain(header); + expect(body.secret['X-Authorization']).toBe(header); + expect(error.originalError.config?.data).toBeUndefined(); + }, +); + +test.each(['string', 'headers', 'nested', 'response header'] as const)( + 'response-only %s secrets stay out of every failure projection', + async (location) => { + const secret = 'RESPONSE_ONLY_PROXY_CANARY'; + const body = { + detail: 'Proxy configuration denied', + ...(location === 'string' ? { secret } : {}), + ...(location === 'headers' ? { secret: { 'X-Proxy-Credential': secret } } : {}), + ...(location === 'nested' ? { errors: [{ msg: 'Invalid proxy', input: { secret } }] } : {}), + }; + const logs: string[] = []; + let callerError: AxiosError | undefined; + const logger = pino({ level: 'error' }, { write: (line: string) => logs.push(line) }); + const permit = new Permit({ + token: 'proxy-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const reply = response(config, body, 422); + if (location === 'response header') reply.headers.set('X-Proxy-Credential', secret); + callerError = new AxiosError(`Denied ${secret}`, secret, config, undefined, reply); + throw callerError; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const error: unknown = await new ProxyConfigsApi(permit.config, logger) + .get('payments') + .catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + assert(callerError); + const directCause = new PermitContextError('Proxy context unavailable', { cause: callerError }); + expect(error.status).toBe(422); + expect(error.code).toBeUndefined(); + expect(error.message).toBe('Proxy configuration denied'); + if (location === 'nested') + expect(error.response?.data).toMatchObject({ errors: [{ msg: 'Invalid proxy' }] }); + expect(directCause.code).toBeUndefined(); + for (const failure of [error, directCause]) { + for (const value of [ + String(failure), + JSON.stringify(failure), + inspect(failure, { showHidden: true, depth: Infinity }), + ...logs, + ]) + expect(value).not.toContain(secret); + } + expect(callerError.code).toBe(secret); + expect(callerError.message).toContain(secret); + expect(callerError.response?.data).toBe(body); + }, +); + +test.each(['ERR_BAD_RESPONSE', 'ECONNRESET', 'CUSTOM_PROXY_FAILURE'])( + 'retains unrelated transport code %s with private response fields', + async (code) => { + const { permit, reply } = wire(); + reply.status = 422; + reply.data = { detail: 'Proxy configuration denied', secret: 'RESPONSE_ONLY_PROXY_CANARY' }; + const caller = axios.create({ + adapter: async (config) => { + throw new AxiosError( + 'Proxy denied', + code, + config, + undefined, + response(config, reply.data, 422), + ); + }, + }); + const client = new Permit({ + ...permit.config, + axiosInstance: caller, + retry: false, + log: { level: 'silent' }, + }); + const error: unknown = await client.api.proxyConfigs + .get('payments') + .catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.code).toBe(code); + expect(error.status).toBe(422); + expect(error.message).toBe('Proxy configuration denied'); + expect(error.originalError.config?.url).toContain('/proxy_configs/payments'); + expect(JSON.stringify(error)).not.toContain('RESPONSE_ONLY_PROXY_CANARY'); + }, +); + +test.each(['accessor', 'field limit', 'array limit', 'depth limit'] as const)( + 'incomplete response privacy at the %s fails closed before metadata projection', + async (boundary) => { + let getterCalls = 0; + const data: Record = { detail: 'Proxy configuration denied' }; + if (boundary === 'accessor') + Object.defineProperty(data, 'secret', { + enumerable: true, + get() { + getterCalls++; + return 'RESPONSE_ONLY_PROXY_CANARY'; + }, + }); + if (boundary === 'field limit') + for (let index = 0; index < 65; index++) + data[`private${index}`] = 'RESPONSE_ONLY_PROXY_CANARY'; + if (boundary === 'array limit') + data['errors'] = Array.from({ length: 9 }, () => ({ secret: 'RESPONSE_ONLY_PROXY_CANARY' })); + if (boundary === 'depth limit') + data['errors'] = [{ errors: [{ secret: 'RESPONSE_ONLY_PROXY_CANARY' }] }]; + const permit = new Permit({ + token: 'proxy-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + throw new AxiosError( + 'Denied RESPONSE_ONLY_PROXY_CANARY', + 'RESPONSE_ONLY_PROXY_CANARY', + config, + undefined, + response(config, data, 422), + ); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const error: unknown = await permit.api.proxyConfigs + .get('payments') + .catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.status).toBe(422); + expect(error.code).toBeUndefined(); + expect(error.message).toBe('Permit API request failed with HTTP 422.'); + expect(getterCalls).toBe(0); + for (const value of [JSON.stringify(error), inspect(error, { depth: Infinity })]) + expect(value).not.toContain('RESPONSE_ONLY_PROXY_CANARY'); + }, +); + +test.each(['numeric accessor', 'sparse index', 'custom slice'] as const)( + 'response arrays with a %s never execute accessors during diagnostics', + (boundary) => { + let getterCalls = 0; + const secret = 'RESPONSE_ONLY_PROXY_CANARY'; + const errors: unknown[] = [{ msg: 'Invalid proxy', input: { secret } }]; + if (boundary === 'numeric accessor') + Object.defineProperty(errors, '0', { + enumerable: true, + get() { + getterCalls++; + return { msg: `Rejected ${secret}`, secret }; + }, + }); + if (boundary === 'sparse index') delete errors[0]; + if (boundary === 'custom slice') + Object.defineProperty(errors, 'slice', { + get() { + getterCalls++; + throw new Error('Diagnostic traversal invoked an accessor'); + }, + }); + const data = { detail: 'Proxy configuration denied', errors }; + const config = { headers: new AxiosHeaders(), url: 'https://control.example/proxy_configs' }; + const raw = new AxiosError( + 'Proxy denied', + secret, + config, + undefined, + response(config, data, 422), + ); + const error = new PermitApiError('Proxy denied', raw); + expect(getterCalls).toBe(0); + expect(error.status).toBe(422); + expect(error.code).toBeUndefined(); + expect(raw.code).toBe(secret); + expect(raw.response?.data).toBe(data); + for (const value of [String(error), JSON.stringify(error), inspect(error, { depth: Infinity })]) + expect(value).not.toContain(secret); + }, +); + +test.each(['secret', '01', '4294967295', 'accessor'] as const)( + 'enumerable non-index array property %s cannot leak through transport metadata', + async (property) => { + const secret = 'ARRAY_PROPERTY_PRIVATE_CANARY'; + const errors = [{ msg: 'Invalid proxy' }]; + let getterCalls = 0; + if (property === 'accessor') + Object.defineProperty(errors, 'secret', { + enumerable: true, + get() { + getterCalls++; + return secret; + }, + }); + else Object.defineProperty(errors, property, { value: secret, enumerable: true }); + const descriptor = Object.getOwnPropertyDescriptor( + errors, + property === 'accessor' ? 'secret' : property, + ); + const body = { detail: 'Proxy denied', errors }; + let raw: AxiosError | undefined; + const logs: string[] = []; + const logger = pino({ level: 'error' }, { write: (line: string) => logs.push(line) }); + const permit = new Permit({ + token: 'proxy-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + raw = new AxiosError( + 'Proxy denied', + secret, + config, + undefined, + response(config, body, 422), + ); + throw raw; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const failure: unknown = await new ProxyConfigsApi(permit.config, logger) + .get('payments') + .catch((caught: unknown) => caught); + assert(failure instanceof PermitApiError); + assert(raw); + expect(failure.code).toBeUndefined(); + expect(failure.status).toBe(422); + expect(failure.message).toBe('Permit API request failed with HTTP 422.'); + expect(getterCalls).toBe(0); + expect(raw.code).toBe(secret); + expect(raw.response?.data).toBe(body); + expect(body.errors).toBe(errors); + expect( + Object.getOwnPropertyDescriptor(errors, property === 'accessor' ? 'secret' : property), + ).toEqual(descriptor); + for (const value of [ + String(failure), + JSON.stringify(failure), + inspect(failure, { depth: Infinity }), + ...logs, + ]) + expect(value).not.toContain(secret); + }, +); + +test('repeated projections stay bounded and incomplete prior response privacy stays conservative', () => { + let getterCalls = 0; + const config = { headers: new AxiosHeaders(), url: 'https://control.example/proxy_configs' }; + const raw = new AxiosError( + 'Proxy denied', + 'CUSTOM_PROXY_FAILURE', + config, + undefined, + response(config, { detail: 'Proxy denied', secret: 'RESPONSE_ONLY_PROXY_CANARY' }, 422), + ); + for (let index = 0; index < 128; index++) { + const error = new PermitApiError('Proxy denied', raw); + expect(error.code).toBe('CUSTOM_PROXY_FAILURE'); + expect(error.originalError.config?.url).toBe(config.url); + expect(error.status).toBe(422); + } + const incomplete = Object.defineProperty({ detail: 'Proxy denied' }, 'secret', { + enumerable: true, + get() { + getterCalls++; + return 'RESPONSE_ONLY_PROXY_CANARY'; + }, + }); + assert(raw.response); + raw.response.data = incomplete; + expect(new PermitApiError('Proxy denied', raw).code).toBeUndefined(); + raw.response.data = { detail: 'Small safe response' }; + const later = new PermitApiError('Proxy denied', raw); + expect(later.code).toBeUndefined(); + expect(later.status).toBe(422); + expect(later.originalError.config?.url).toBe('[REDACTED]'); + expect(raw.code).toBe('CUSTOM_PROXY_FAILURE'); + expect(raw.response.data).toEqual({ detail: 'Small safe response' }); + expect(getterCalls).toBe(0); +}); + +test.each(['create', 'update'] as const)( + '%s remains a single attempt even when callers opt into unsafe retry methods', + async (method) => { + const attempts: string[] = []; + const permit = new Permit({ + token: 'proxy-fixture', + log: { level: 'silent' }, + retry: { + enabled: true, + maxRetries: 2, + retryDelay: 1, + retryMethods: ['GET', 'POST', 'PATCH'], + }, + axiosInstance: axios.create({ + adapter: async (config) => { + attempts.push(String(config.method)); + throw new AxiosError( + 'Write reply unavailable', + 'ERR_BAD_RESPONSE', + config, + undefined, + response(config, { detail: 'Write unavailable' }, 503), + ); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + await expect( + method === 'create' + ? permit.api.proxyConfigs.create(input) + : permit.api.proxyConfigs.update(key, { name: 'Changed' }), + ).rejects.toMatchObject({ + name: 'PermitApiError', + status: 503, + }); + expect(attempts).toEqual([method === 'create' ? 'post' : 'patch']); + }, +); + +test('GET keeps the existing opt-in safe retry behavior', async () => { + let requests = 0; + const permit = new Permit({ + token: 'proxy-fixture', + log: { level: 'silent' }, + retry: { enabled: true, maxRetries: 2, retryDelay: 1 }, + axiosInstance: axios.create({ + adapter: async (config) => { + requests++; + if (requests < 3) + throw new AxiosError( + 'Read unavailable', + 'ERR_BAD_RESPONSE', + config, + undefined, + response(config, { detail: 'Read unavailable' }, 503), + ); + return response(config, [stored], 200); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + expect(await permit.api.proxyConfigs.list()).toEqual([stored]); + expect(requests).toBe(3); +}); diff --git a/src/api/proxy-configs.ts b/src/api/proxy-configs.ts new file mode 100644 index 00000000..9f2a8457 --- /dev/null +++ b/src/api/proxy-configs.ts @@ -0,0 +1,209 @@ +import type { Logger } from 'pino'; + +import type { IPermitConfig } from '#src/config'; +import { + ProxyConfigApi as AutogenProxyConfigApi, + type ProxyConfigCreate, + type ProxyConfigRead, + type ProxyConfigUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc resolves the named REST failure. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc resolves the named context failure. +import type { PermitContextError } from '#src/api/context'; + +export { + AuthMechanism, + Methods, + MappingRuleUrlTypeEnum, + MappingRuleUpdateUrlTypeEnum, + type MappingRule, + type MappingRuleUpdate, + type ProxyConfigCreate, + type ProxyConfigRead, + type ProxyConfigUpdate, + type Secret, +} from '#src/openapi/index'; + +/** Manages environment proxy configurations and their complete URL mapping rules. */ +export interface IProxyConfigsApi { + /** + * Lists proxy configurations in the selected environment. + * @param params - Pagination; page defaults to 1 and perPage to 100. + * @returns Complete stored rows in a plain array, including the received secret values. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + list(params?: IPagination): Promise; + + /** + * Gets a proxy configuration by its key or UUID. + * @param proxyConfigKeyOrId - The proxy configuration key or UUID. + * @returns The complete stored configuration; any returned secret mask is preserved. + * @throws {@link PermitApiError} If the configuration is absent or the API rejects the request. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + get(proxyConfigKeyOrId: string): Promise; + + /** + * Creates a proxy configuration; an existing key may return the existing configuration. + * @param proxyConfig - The key, name, secret and optional authentication/mapping rules. + * @returns The complete API response, preserving its secret without merging submitted values. + * @throws {@link PermitApiError} If input cannot be JSON-serialized or the API rejects it. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + create(proxyConfig: ProxyConfigCreate): Promise; + + /** + * Partially updates the supplied fields; mapping rules may use should_delete for removal. + * @param proxyConfigKeyOrId - The proxy configuration key or UUID. + * @param proxyConfig - The name, secret, authentication mechanism and/or mapping rule updates. + * @returns The complete API response, preserving its secret without merging submitted values. + * @throws {@link PermitApiError} If input cannot be JSON-serialized or the API rejects it. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + update(proxyConfigKeyOrId: string, proxyConfig: ProxyConfigUpdate): Promise; + + /** + * Deletes a proxy configuration by its key or UUID. + * @param proxyConfigKeyOrId - The proxy configuration key or UUID. + * @returns A promise that resolves to undefined after successful deletion. + * @throws {@link PermitApiError} If the configuration is absent or the API denies deletion. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + delete(proxyConfigKeyOrId: string): Promise; +} + +/** Direct control-plane client for the five published proxy configuration operations. */ +export class ProxyConfigsApi extends BasePermitApi implements IProxyConfigsApi { + private readonly proxyConfigs: AutogenProxyConfigApi; + + /** + * Creates the proxy configuration client. + * @param config - The SDK configuration and selected API context. + * @param logger - The SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.proxyConfigs = new AutogenProxyConfigApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** {@inheritDoc IProxyConfigsApi.list} */ + public async list(params: IPagination = {}): Promise { + const { page = 1, perPage = 100 } = params; + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.proxyConfigs.listProxyConfigs({ + ...this.config.apiContext.environmentContext, + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IProxyConfigsApi.get} */ + public async get(proxyConfigKeyOrId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.proxyConfigs.getProxyConfig({ + ...this.config.apiContext.environmentContext, + proxyConfigId: proxyConfigKeyOrId, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IProxyConfigsApi.create} */ + public async create(proxyConfig: ProxyConfigCreate): Promise { + let body: ProxyConfigCreate; + try { + body = structuredClone(proxyConfig); + JSON.stringify(body); + } catch (cause) { + this.handleApiError( + new Error( + 'Cannot serialize proxy configuration create body. Supply JSON-compatible fields.', + { + cause, + }, + ), + ); + } + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.proxyConfigs.createProxyConfig({ + ...this.config.apiContext.environmentContext, + proxyConfigCreate: body, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IProxyConfigsApi.update} */ + public async update( + proxyConfigKeyOrId: string, + proxyConfig: ProxyConfigUpdate, + ): Promise { + let body: ProxyConfigUpdate; + try { + body = structuredClone(proxyConfig); + JSON.stringify(body); + } catch (cause) { + this.handleApiError( + new Error( + 'Cannot serialize proxy configuration update body. Supply JSON-compatible fields.', + { + cause, + }, + ), + ); + } + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.proxyConfigs.updateProxyConfig({ + ...this.config.apiContext.environmentContext, + proxyConfigId: proxyConfigKeyOrId, + proxyConfigUpdate: body, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IProxyConfigsApi.delete} */ + public async delete(proxyConfigKeyOrId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + await this.proxyConfigs.deleteProxyConfig({ + ...this.config.apiContext.environmentContext, + proxyConfigId: proxyConfigKeyOrId, + }); + } catch (err) { + this.handleApiError(err); + } + } +} diff --git a/src/api/relationship-tuples.ts b/src/api/relationship-tuples.ts index 22d0da4e..0cadb8dc 100644 --- a/src/api/relationship-tuples.ts +++ b/src/api/relationship-tuples.ts @@ -1,26 +1,28 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { RelationshipTuplesApi as AutogenRelationshipTuplesApi, - RelationshipTupleCreate, - RelationshipTupleCreateBulkOperation, - RelationshipTupleDelete, - RelationshipTupleDeleteBulkOperation, - RelationshipTupleRead, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + Configuration, + type RelationshipTupleCreate, + type RelationshipTupleDelete, + type RelationshipTupleRead, + type PaginatedResultRelationshipTupleDetailedRead, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BaseFactsPermitAPI, IPagination, IWaitForSync } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BaseFactsPermitAPI, type IPagination, type IWaitForSync } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; export { - RelationshipTupleCreate, - RelationshipTupleDelete, - RelationshipTupleRead, - RelationshipTupleCreateBulkOperation, - RelationshipTupleDeleteBulkOperation, -} from '../openapi'; + type RelationshipTupleCreate, + type RelationshipTupleDelete, + type RelationshipTupleRead, + type RelationshipTupleDetailedRead, + type PaginatedResultRelationshipTupleDetailedRead, + type RelationshipTupleCreateBulkOperation, + type RelationshipTupleDeleteBulkOperation, +} from '#src/openapi/index'; /** * Represents the parameters for listing role createments. @@ -68,6 +70,18 @@ export interface IRelationshipTuplesApi extends IWaitForSync { */ list(params: IListRelationshipTuples): Promise; + /** + * Lists relationship tuples with nested details through the dedicated endpoint. + * Uses the control plane even when facts proxying or waitForSync is enabled. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete detailed envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + listDetailed( + params?: IListRelationshipTuples, + ): Promise; + /** * Creates a new relationship tuple, that states that a relationship (of type: relation) * exists between two resource instances: the subject and the object. @@ -98,22 +112,18 @@ export interface IRelationshipTuplesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - bulkRelationshipTuples( - tuples: RelationshipTupleCreate[], - ): Promise; + bulkRelationshipTuples(tuples: RelationshipTupleCreate[]): Promise; /** * Deletes multiple relationship tuples at once using the provided tuple data. * Each tuple object is of type RelationshipTupleDelete and is essentially a tuple of (subject, relation, object). * * @param tuples - he relationship tuples to delete. - * @returns A promise that resolves with the bulk un relationship tuples report. + * @returns The response object. Its fields are unspecified by the current API schema. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - bulkUnRelationshipTuples( - tuples: RelationshipTupleDelete[], - ): Promise; + bulkUnRelationshipTuples(tuples: RelationshipTupleDelete[]): Promise; } /** @@ -121,6 +131,7 @@ export interface IRelationshipTuplesApi extends IWaitForSync { */ export class RelationshipTuplesApi extends BaseFactsPermitAPI implements IRelationshipTuplesApi { private relationshipTuples: AutogenRelationshipTuplesApi; + private detailedRelationshipTuples: AutogenRelationshipTuplesApi; /** * Creates an instance of the RelationshipTuplesApi. @@ -129,6 +140,20 @@ export class RelationshipTuplesApi extends BaseFactsPermitAPI implements IRelati */ constructor(config: IPermitConfig, logger: Logger) { super(config, logger); + this.detailedRelationshipTuples = new AutogenRelationshipTuplesApi( + new Configuration({ + basePath: this.config.apiUrl, + accessToken: this.config.token, + baseOptions: { + headers: { + 'X-Permit-SDK-Version': + this.openapiClientConfig.baseOptions.headers['X-Permit-SDK-Version'], + }, + }, + }), + BASE_PATH, + this.config.axiosInstance, + ); this.relationshipTuples = new AutogenRelationshipTuplesApi( this.openapiClientConfig, BASE_PATH, @@ -136,6 +161,35 @@ export class RelationshipTuplesApi extends BaseFactsPermitAPI implements IRelati ); } + /** + * Lists relationship tuples with nested details through the dedicated endpoint. + * Uses the control plane even when facts proxying or waitForSync is enabled. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete detailed envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + public async listDetailed({ + page = 1, + perPage = 100, + ...params + }: IListRelationshipTuples = {}): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.detailedRelationshipTuples.listRelationshipTuplesDetailed({ + ...params, + ...this.config.apiContext.environmentContext, + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + /** * Retrieves a list of role createments based on the specified filters. * @@ -148,12 +202,13 @@ export class RelationshipTuplesApi extends BaseFactsPermitAPI implements IRelati await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( + const response = ( await this.relationshipTuples.listRelationshipTuples({ ...params, ...this.config.apiContext.environmentContext, }) ).data; + return Array.isArray(response) ? response : response.data; } catch (err) { this.handleApiError(err); } @@ -210,14 +265,12 @@ export class RelationshipTuplesApi extends BaseFactsPermitAPI implements IRelati * Creates a new relationship tuple, that states that a relationship (of type: relation) * exists between two resource instances: the subject and the object. * - * @returns A promise that resolves to the created relationship tuple. + * @returns The response object. Its fields are unspecified by the current API schema. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. * @param tuples */ - public async bulkRelationshipTuples( - tuples: RelationshipTupleCreate[], - ): Promise { + public async bulkRelationshipTuples(tuples: RelationshipTupleCreate[]): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -239,13 +292,11 @@ export class RelationshipTuplesApi extends BaseFactsPermitAPI implements IRelati * Each tuple object is of type RelationshipTupleDelete and is essentially a tuple of (subject, relation, object). * * @param tuples - he relationship tuples to delete. - * @returns A promise that resolves with the bulk un relationship tuples report. + * @returns The response object. Its fields are unspecified by the current API schema. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async bulkUnRelationshipTuples( - tuples: RelationshipTupleDelete[], - ): Promise { + public async bulkUnRelationshipTuples(tuples: RelationshipTupleDelete[]): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { diff --git a/src/api/resource-action-groups.ts b/src/api/resource-action-groups.ts index 30293d08..4eb51c80 100644 --- a/src/api/resource-action-groups.ts +++ b/src/api/resource-action-groups.ts @@ -1,18 +1,26 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourceActionGroupsApi as AutogenResourceActionGroupsApi, - ResourceActionGroupCreate, - ResourceActionGroupRead, - ResourceActionGroupUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type ResourceActionGroupCreate, + type ResourceActionGroupRead, + type ResourceActionGroupUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; -export { ResourceActionGroupCreate, ResourceActionGroupRead } from '../openapi'; +export { + type ResourceActionGroupCreate, + type ResourceActionGroupRead, + type ResourceActionGroupUpdate, +} from '#src/openapi/index'; export interface IListActionGroups extends IPagination { resourceKey: string; diff --git a/src/api/resource-actions.ts b/src/api/resource-actions.ts index 221888ab..8dc5c6c7 100644 --- a/src/api/resource-actions.ts +++ b/src/api/resource-actions.ts @@ -1,18 +1,26 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourceActionsApi as AutogenResourceActionsApi, - ResourceActionCreate, - ResourceActionRead, - ResourceActionUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type ResourceActionCreate, + type ResourceActionRead, + type ResourceActionUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; -export { ResourceActionCreate, ResourceActionRead, ResourceActionUpdate } from '../openapi'; +export { + type ResourceActionCreate, + type ResourceActionRead, + type ResourceActionUpdate, +} from '#src/openapi/index'; export interface IListActions extends IPagination { resourceKey: string; diff --git a/src/api/resource-attributes.ts b/src/api/resource-attributes.ts index 9f33c02e..d9b2651d 100644 --- a/src/api/resource-attributes.ts +++ b/src/api/resource-attributes.ts @@ -1,22 +1,26 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourceAttributesApi as AutogenResourceAttributesApi, - ResourceAttributeCreate, - ResourceAttributeRead, - ResourceAttributeUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type ResourceAttributeCreate, + type ResourceAttributeRead, + type ResourceAttributeUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; export { - ResourceAttributeCreate, - ResourceAttributeRead, - ResourceAttributeUpdate, -} from '../openapi'; + type ResourceAttributeCreate, + type ResourceAttributeRead, + type ResourceAttributeUpdate, +} from '#src/openapi/index'; export interface IListAttributes extends IPagination { resourceKey: string; diff --git a/src/api/resource-instances.ts b/src/api/resource-instances.ts index 654a5815..1f25e769 100644 --- a/src/api/resource-instances.ts +++ b/src/api/resource-instances.ts @@ -1,18 +1,44 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourceInstancesApi as AutogenResourceInstancesApi, - ResourceInstanceCreate, - ResourceInstanceRead, - ResourceInstanceUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + Configuration, + type ResourceInstanceCreate, + type ResourceInstanceRead as GeneratedResourceInstanceRead, + type PaginatedResultResourceInstanceDetailedRead as GeneratedDetailedPage, + type ResourceInstanceDetailedRead as GeneratedResourceInstanceDetailedRead, + type ResourceInstanceUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BaseFactsPermitAPI, IPagination, IWaitForSync } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BaseFactsPermitAPI, type IPagination, type IWaitForSync } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; -export { ResourceInstanceCreate, ResourceInstanceRead, ResourceInstanceUpdate } from '../openapi'; +export { type ResourceInstanceCreate, type ResourceInstanceUpdate } from '#src/openapi/index'; + +/** An instance response with an optional caller-declared attribute shape; no runtime validation. */ +export interface ResourceInstanceRead< + Attributes extends object = object, +> extends GeneratedResourceInstanceRead { + /** Attribute values retain the caller's declared shape when present. */ + attributes?: Attributes; +} + +/** A detailed instance retains its required relationships and caller-declared attributes. */ +export interface ResourceInstanceDetailedRead< + Attributes extends object = object, +> extends GeneratedResourceInstanceDetailedRead { + /** Attribute values retain the caller's declared shape when present. */ + attributes?: Attributes; +} + +/** The full detailed page with the same attribute shape on each returned instance. */ +export interface PaginatedResultResourceInstanceDetailedRead< + Attributes extends object = object, +> extends GeneratedDetailedPage { + data: ResourceInstanceDetailedRead[]; +} export interface IListResourceInstanceUsers extends IPagination { instanceKey: string; @@ -23,6 +49,12 @@ export interface IListResourceInstanceParams extends IPagination { resource?: string; } +/** Filters for the dedicated resource-instance detailed list. */ +export interface IListResourceInstanceDetailedParams extends IListResourceInstanceParams { + /** Search terms to match against the instance key. */ + search?: string[]; +} + export interface IResourceInstancesApi extends IWaitForSync { /** * Retrieves a list of resource instances. @@ -32,7 +64,21 @@ export interface IResourceInstancesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - list(params?: IListResourceInstanceParams): Promise; + list( + params?: IListResourceInstanceParams, + ): Promise[]>; + + /** + * Lists resource instances with nested details through the dedicated endpoint. + * Uses the control plane even when facts proxying or waitForSync is enabled. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete detailed envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + listDetailed( + params?: IListResourceInstanceDetailedParams, + ): Promise>; /** * Retrieves a instance by its key. @@ -42,7 +88,9 @@ export interface IResourceInstancesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - get(instanceKey: string): Promise; + get( + instanceKey: string, + ): Promise>; /** * Retrieves a instance by its key. @@ -53,7 +101,9 @@ export interface IResourceInstancesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - getByKey(instanceKey: string): Promise; + getByKey( + instanceKey: string, + ): Promise>; /** * Retrieves a resource instance by its ID. @@ -64,7 +114,9 @@ export interface IResourceInstancesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - getById(instanceId: string): Promise; + getById( + instanceId: string, + ): Promise>; /** * Creates a new instance. @@ -74,7 +126,9 @@ export interface IResourceInstancesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - create(instanceData: ResourceInstanceCreate): Promise; + create( + instanceData: ResourceInstanceCreate, + ): Promise>; /** * Updates a instance. @@ -85,7 +139,10 @@ export interface IResourceInstancesApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - update(instanceKey: string, instanceData: ResourceInstanceUpdate): Promise; + update( + instanceKey: string, + instanceData: ResourceInstanceUpdate, + ): Promise>; /** * Deletes a instance. @@ -103,6 +160,7 @@ export interface IResourceInstancesApi extends IWaitForSync { */ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourceInstancesApi { private instances: AutogenResourceInstancesApi; + private detailedInstances: AutogenResourceInstancesApi; /** * Creates an instance of the ResourceInstancesApi. @@ -111,6 +169,20 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc */ constructor(config: IPermitConfig, logger: Logger) { super(config, logger); + this.detailedInstances = new AutogenResourceInstancesApi( + new Configuration({ + basePath: this.config.apiUrl, + accessToken: this.config.token, + baseOptions: { + headers: { + 'X-Permit-SDK-Version': + this.openapiClientConfig.baseOptions.headers['X-Permit-SDK-Version'], + }, + }, + }), + BASE_PATH, + this.config.axiosInstance, + ); this.instances = new AutogenResourceInstancesApi( this.openapiClientConfig, BASE_PATH, @@ -118,6 +190,34 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc ); } + /** + * Lists resource instances with nested details through the dedicated endpoint. + * Uses the control plane even when facts proxying or waitForSync is enabled. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete detailed envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + public async listDetailed( + params: IListResourceInstanceDetailedParams = {}, + ): Promise> { + const { page = 1, perPage = 100, ...filters } = params; + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.detailedInstances.listResourceInstancesDetailed({ + ...filters, + ...this.config.apiContext.environmentContext, + page, + perPage, + }) + ).data as PaginatedResultResourceInstanceDetailedRead; + } catch (err) { + this.handleApiError(err); + } + } + /** * Retrieves a list of resource instances. * @@ -126,16 +226,21 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async list(params?: IListResourceInstanceParams): Promise { + public async list( + params?: IListResourceInstanceParams, + ): Promise[]> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( + const response = ( await this.instances.listResourceInstances({ ...params, ...this.config.apiContext.environmentContext, }) ).data; + return ( + Array.isArray(response) ? response : response.data + ) as ResourceInstanceRead[]; } catch (err) { this.handleApiError(err); } @@ -149,7 +254,9 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async get(instanceKey: string): Promise { + public async get( + instanceKey: string, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -158,7 +265,7 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc ...this.config.apiContext.environmentContext, instanceId: instanceKey, }) - ).data; + ).data as ResourceInstanceRead; } catch (err) { this.handleApiError(err); } @@ -173,8 +280,10 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async getByKey(instanceKey: string): Promise { - return await this.get(instanceKey); + public async getByKey( + instanceKey: string, + ): Promise> { + return await this.get(instanceKey); } /** @@ -186,8 +295,10 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async getById(instanceId: string): Promise { - return await this.get(instanceId); + public async getById( + instanceId: string, + ): Promise> { + return await this.get(instanceId); } /** @@ -198,7 +309,9 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async create(instanceData: ResourceInstanceCreate): Promise { + public async create( + instanceData: ResourceInstanceCreate, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -207,7 +320,7 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc ...this.config.apiContext.environmentContext, resourceInstanceCreate: instanceData, }) - ).data; + ).data as ResourceInstanceRead; } catch (err) { this.handleApiError(err); } @@ -222,10 +335,10 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async update( + public async update( instanceKey: string, instanceData: ResourceInstanceUpdate, - ): Promise { + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -235,7 +348,7 @@ export class ResourceInstancesApi extends BaseFactsPermitAPI implements IResourc instanceId: instanceKey, resourceInstanceUpdate: instanceData, }) - ).data; + ).data as ResourceInstanceRead; } catch (err) { this.handleApiError(err); } diff --git a/src/api/resource-relations.ts b/src/api/resource-relations.ts index 211e632d..2940eace 100644 --- a/src/api/resource-relations.ts +++ b/src/api/resource-relations.ts @@ -1,17 +1,21 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourceRelationsApi as AutogenResourceRelationsApi, - RelationCreate, - RelationRead, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type RelationCreate, + type RelationRead, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination, PermitApiError } from './base'; // eslint-disable-line @typescript-eslint/no-unused-vars -import { ApiContext, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Type imports resolve public TSDoc error/context links. +import type { ApiContext, PermitContextError } from '#src/api/context'; -export { RelationCreate, RelationRead } from '../openapi'; +export { type RelationCreate, type RelationRead } from '#src/openapi/index'; export interface IListRelations extends IPagination { resourceKey: string; @@ -126,7 +130,7 @@ export class ResourceRelationsApi extends BasePermitApi implements IResourceRela page, perPage, }) - ).data; + ).data.data; } catch (err) { this.handleApiError(err); } diff --git a/src/api/resource-roles.ts b/src/api/resource-roles.ts index d518e651..6aff09ac 100644 --- a/src/api/resource-roles.ts +++ b/src/api/resource-roles.ts @@ -1,23 +1,31 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourceRolesApi as AutogenResourceRolesApi, ImplicitGrantsApi as AutogenRoleDerivationsApi, - DerivedRoleRuleCreate, - DerivedRoleRuleDelete, - DerivedRoleRuleRead, - PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, - ResourceRoleCreate, - ResourceRoleRead, - ResourceRoleUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type DerivedRoleRuleCreate, + type DerivedRoleRuleDelete, + type DerivedRoleRuleRead, + type PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, + type ResourceRoleCreate, + type ResourceRoleRead, + type ResourceRoleUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPagination } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BasePermitApi, type IPagination } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; -export { ResourceRoleCreate, ResourceRoleRead, ResourceRoleUpdate } from '../openapi'; +export { + type DerivedRoleRuleCreate, + type DerivedRoleRuleDelete, + type DerivedRoleRuleRead, + type PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, + type ResourceRoleCreate, + type ResourceRoleRead, + type ResourceRoleUpdate, +} from '#src/openapi/index'; export interface IListResourceRoles extends IPagination { resourceKey: string; @@ -177,15 +185,15 @@ export interface IResourceRolesApi { * @param resourceKey The key of the resource. * @param roleKey - The key of the role. * @param conditions - An array of conditions to be assigned to the role. - * @returns A promise that resolves to a PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings object representing the derived role settings. + * @returns A promise that resolves to a PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings object representing the derived role settings. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ updateRoleDerivationConditions( resourceKey: string, roleKey: string, - conditions: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, - ): Promise; + conditions: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, + ): Promise; } /** @@ -510,15 +518,15 @@ export class ResourceRolesApi extends BasePermitApi implements IResourceRolesApi * @param resourceKey - The key of the resource the role belongs to. * @param roleKey - The key of the role. * @param conditions - The conditions object. - * @returns The updated PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings. + * @returns The updated PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings. * @throws PermitApiError - If the API returns an error HTTP status code. * @throws PermitContextError - If the configured ApiContext does not match the required endpoint context. */ async updateRoleDerivationConditions( resourceKey: string, roleKey: string, - conditions: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, - ): Promise { + conditions: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, + ): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -527,7 +535,7 @@ export class ResourceRolesApi extends BasePermitApi implements IResourceRolesApi ...this.config.apiContext.environmentContext, resourceId: resourceKey, roleId: roleKey, - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings: conditions, + permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings: conditions, }) ).data; } catch (err) { diff --git a/src/api/resources.ts b/src/api/resources.ts index a2272746..fe54c284 100644 --- a/src/api/resources.ts +++ b/src/api/resources.ts @@ -1,32 +1,32 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { ResourcesApi as AutogenResourcesApi, - PaginatedResultResourceRead, - ResourceCreate, - ResourceRead, - ResourceReplace, - ResourceUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + type PaginatedResultResourceRead, + type ResourceCreate, + type ResourceRead, + type ResourceReplace, + type ResourceUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPaginationExtended, ReturnPaginationType } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BasePermitApi, type IPaginationExtended, type ReturnPaginationType } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; export { - ResourceCreate, - ResourceRead, - ResourceReplace, - ResourceUpdate, - PaginatedResultResourceRead, -} from '../openapi'; + type ResourceCreate, + type ResourceRead, + type ResourceReplace, + type ResourceUpdate, + type PaginatedResultResourceRead, +} from '#src/openapi/index'; export interface IResourcesApi { /** * Retrieves a list of resources. * - * @param pagination The pagination options, @see {@link IPaginationExtended} + * Accepts optional pagination settings; see {@link IPaginationExtended}. * @returns A promise that resolves to an array of resources. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. @@ -134,7 +134,7 @@ export class ResourcesApi extends BasePermitApi implements IResourcesApi { /** * Retrieves a list of resources. * - * @param pagination The pagination options, @see {@link IPaginationExtended} + * Accepts optional pagination settings; see {@link IPaginationExtended}. * @returns A promise that resolves to an array of resources. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. @@ -155,7 +155,7 @@ export class ResourcesApi extends BasePermitApi implements IResourcesApi { ...this.config.apiContext.environmentContext, page, perPage, - includeTotalCount, + ...(includeTotalCount !== undefined && { includeTotalCount }), }) ).data; } catch (err) { diff --git a/src/api/role-assignments.ts b/src/api/role-assignments.ts index af4c62e1..76c8d693 100644 --- a/src/api/role-assignments.ts +++ b/src/api/role-assignments.ts @@ -1,32 +1,33 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { RoleAssignmentsApi as AutogenRoleAssignmentsApi, - BulkRoleAssignmentReport, - BulkRoleUnAssignmentReport, - PaginatedResultRoleAssignmentDetailedRead, - PaginatedResultRoleAssignmentRead, - RoleAssignmentCreate, - RoleAssignmentDetailedRead, - RoleAssignmentRead, - RoleAssignmentRemove, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + Configuration, + type BulkRoleAssignmentReport, + type BulkRoleUnAssignmentReport, + type PaginatedResultRoleAssignmentDetailedRead, + type PaginatedResultRoleAssignmentRead, + type RoleAssignmentCreate, + type RoleAssignmentDetailedRead, + type RoleAssignmentRead, + type RoleAssignmentRemove, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BaseFactsPermitAPI, IBasePaginationExtended, IWaitForSync } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BaseFactsPermitAPI, type IBasePaginationExtended, type IWaitForSync } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; export { - BulkRoleAssignmentReport, - BulkRoleUnAssignmentReport, - PaginatedResultRoleAssignmentDetailedRead, - PaginatedResultRoleAssignmentRead, - RoleAssignmentCreate, - RoleAssignmentRead, - RoleAssignmentDetailedRead, - RoleAssignmentRemove, -} from '../openapi'; + type BulkRoleAssignmentReport, + type BulkRoleUnAssignmentReport, + type PaginatedResultRoleAssignmentDetailedRead, + type PaginatedResultRoleAssignmentRead, + type RoleAssignmentCreate, + type RoleAssignmentRead, + type RoleAssignmentDetailedRead, + type RoleAssignmentRemove, +} from '#src/openapi/index'; /** * Represents the parameters for listing role assignments. @@ -58,26 +59,32 @@ export interface IBaseListRoleAssignments extends IBasePaginationExtended { detailed?: boolean; } -type IListRoleAssignmentsIncludeTotalCount = IBaseListRoleAssignments & { includeTotalCount: true }; +export type IListRoleAssignments = IBaseListRoleAssignments; -type IListRoleAssignmentsDetailed = IBaseListRoleAssignments & { detailed: true }; +/** Filters for the dedicated detailed endpoint, which always includes total counts. */ +export type IListRoleAssignmentsDetailed = Omit< + IBaseListRoleAssignments, + 'detailed' | 'includeTotalCount' +> & { + /** Resource type key or ID to filter by. */ + resource?: string; +}; -export type IListRoleAssignments = - | IBaseListRoleAssignments - | IListRoleAssignmentsIncludeTotalCount - | IListRoleAssignmentsDetailed; - -type ReturnListRoleAssignments = - T extends IListRoleAssignmentsIncludeTotalCount - ? // with total count - T extends IListRoleAssignmentsDetailed - ? PaginatedResultRoleAssignmentDetailedRead - : PaginatedResultRoleAssignmentRead - : // without total count - T extends IListRoleAssignmentsDetailed - ? RoleAssignmentDetailedRead[] +type RoleAssignmentListResult = Details extends true + ? Counts extends true + ? PaginatedResultRoleAssignmentDetailedRead + : RoleAssignmentDetailedRead[] + : Counts extends true + ? PaginatedResultRoleAssignmentRead : RoleAssignmentRead[]; +export type ReturnListRoleAssignments = T extends unknown + ? RoleAssignmentListResult< + 'detailed' extends keyof T ? T['detailed'] : false, + 'includeTotalCount' extends keyof T ? T['includeTotalCount'] : false + > + : never; + /** * API client for managing role assignments. */ @@ -92,6 +99,18 @@ export interface IRoleAssignmentsApi extends IWaitForSync { */ list(params: T): Promise>; + /** + * Lists role assignments with nested details through the dedicated endpoint. + * Uses the control plane even when facts proxying or waitForSync is enabled. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete detailed envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + listDetailed( + params?: IListRoleAssignmentsDetailed, + ): Promise; + /** * Assigns a role to a user in the scope of a given tenant. * @@ -140,6 +159,7 @@ export interface IRoleAssignmentsApi extends IWaitForSync { */ export class RoleAssignmentsApi extends BaseFactsPermitAPI implements IRoleAssignmentsApi { private roleAssignments: AutogenRoleAssignmentsApi; + private detailedRoleAssignments: AutogenRoleAssignmentsApi; /** * Creates an instance of the RoleAssignmentsApi. @@ -148,6 +168,20 @@ export class RoleAssignmentsApi extends BaseFactsPermitAPI implements IRoleAssig */ constructor(config: IPermitConfig, logger: Logger) { super(config, logger); + this.detailedRoleAssignments = new AutogenRoleAssignmentsApi( + new Configuration({ + basePath: this.config.apiUrl, + accessToken: this.config.token, + baseOptions: { + headers: { + 'X-Permit-SDK-Version': + this.openapiClientConfig.baseOptions.headers['X-Permit-SDK-Version'], + }, + }, + }), + BASE_PATH, + this.config.axiosInstance, + ); this.roleAssignments = new AutogenRoleAssignmentsApi( this.openapiClientConfig, BASE_PATH, @@ -155,6 +189,43 @@ export class RoleAssignmentsApi extends BaseFactsPermitAPI implements IRoleAssig ); } + /** + * Lists role assignments with nested details through the dedicated endpoint. + * Uses the control plane even when facts proxying or waitForSync is enabled. + * @param params - Filters and pagination. Pages start at 1; perPage defaults to 100. + * @returns The complete detailed envelope, including data, total_count, and optional page_count. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + public async listDetailed({ + user, + tenant, + role, + resource, + resourceInstance, + page = 1, + perPage = 100, + }: IListRoleAssignmentsDetailed = {}): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.detailedRoleAssignments.listRoleAssignmentsDetailed({ + ...this.config.apiContext.environmentContext, + ...(user !== undefined && { user: [user] }), + ...(tenant !== undefined && { tenant: [tenant] }), + ...(role !== undefined && { role: [role] }), + ...(resource !== undefined && { resource }), + ...(resourceInstance !== undefined && { resourceInstance }), + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + /** * Retrieves a list of role assignments based on the specified filters. * @@ -190,14 +261,14 @@ export class RoleAssignmentsApi extends BaseFactsPermitAPI implements IRoleAssig return ( await this.roleAssignments.listRoleAssignments({ ...this.config.apiContext.environmentContext, - user, - tenant, - role, - resourceInstance, - detailed, + ...(user !== undefined && { user: [user] }), + ...(tenant !== undefined && { tenant: [tenant] }), + ...(role !== undefined && { role: [role] }), + ...(resourceInstance !== undefined && { resourceInstance }), + ...(detailed !== undefined && { detailed }), page, perPage, - includeTotalCount, + ...(includeTotalCount !== undefined && { includeTotalCount }), }) ).data; } catch (err) { @@ -240,12 +311,10 @@ export class RoleAssignmentsApi extends BaseFactsPermitAPI implements IRoleAssig await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( - await this.roleAssignments.unassignRole({ - ...this.config.apiContext.environmentContext, - roleAssignmentRemove: unassignment, - }) - ).data; + await this.roleAssignments.unassignRole({ + ...this.config.apiContext.environmentContext, + roleAssignmentRemove: unassignment, + }); } catch (err) { this.handleApiError(err); } diff --git a/src/api/roles.test.ts b/src/api/roles.test.ts new file mode 100644 index 00000000..3a85a4b1 --- /dev/null +++ b/src/api/roles.test.ts @@ -0,0 +1,231 @@ +import assert from 'node:assert/strict'; + +import axios, { AxiosError, AxiosHeaders, type InternalAxiosRequestConfig } from 'axios'; +import { test } from 'vitest'; + +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { Permit, type RoleCreateBulk } from '#src/index'; + +const roles: RoleCreateBulk[] = [ + { + key: 'reader', + name: 'Reader', + permissions: ['document:read'], + attributes: { enabled: false, limit: 0, note: null }, + }, + { + key: 'editor', + name: 'Editor', + resource: 'document/a?b+c=%é', + description: '', + permissions: ['read', 'write'], + extends: ['reader'], + granted_to: { + users_with_role: [{ role: 'owner', on_resource: 'folder', linked_by_relation: 'parent' }], + when: { no_direct_roles_on_object: false }, + }, + v1compat_settings: { retained: false }, + v1compat_attributes: { nullable: null }, + }, +]; +for (const role of roles) Object.freeze(role); +Object.freeze(roles); +const path = 'https://control.example/v2/schema/project%2Fone/environment%20east/bulk/roles'; + +interface Request { + method: string | undefined; + url: string; + data: unknown; + headers: AxiosHeaders; +} +function response(config: InternalAxiosRequestConfig, data: unknown, status = 200) { + return { data, status, statusText: 'Fixture response', headers: new AxiosHeaders(), config }; +} +function wire(proxyFactsViaPdp = true) { + const calls: Request[] = []; + const reply: { data: unknown; status: number } = { + data: { created: ['reader'], updated: ['document#editor'] }, + status: 200, + }; + const permit = new Permit({ + token: 'bulk-role-fixture', + apiUrl: 'https://control.example', + pdp: 'https://pdp.invalid', + proxyFactsViaPdp, + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + calls.push({ + method: config.method, + url: axios.getUri(config), + data: config.data, + headers: new AxiosHeaders(config.headers), + }); + const result = response(config, reply.data, reply.status); + if (reply.status >= 400) + throw new AxiosError( + 'Bulk role request rejected', + 'ERR_BAD_RESPONSE', + config, + undefined, + result, + ); + return result; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project/one', 'environment east'); + return { permit, calls, reply }; +} + +test.each([true, false])( + 'bulk roles use the exact direct schema contract (proxy %s)', + async (proxy) => { + const { permit, calls, reply } = wire(proxy); + const original = JSON.stringify(roles); + reply.data = { + created: ['one', 'two', 'one'], + updated: ['three', 'four'], + future: { nullable: null }, + }; + expect(await permit.api.roles.bulkCreateOrReplace(roles)).toEqual(reply.data); + expect(calls).toHaveLength(1); + expect(calls[0]?.method).toBe('put'); + expect(calls[0]?.url).toBe(path); + expect(calls[0]?.data).toBe(JSON.stringify({ operations: roles })); + expect(calls[0]?.headers.get('authorization')).toBe('Bearer bulk-role-fixture'); + expect(calls[0]?.headers.get('content-type')).toContain('application/json'); + expect(calls[0]?.headers.has('x-wait-timeout')).toBe(false); + expect(calls[0]?.headers.has('x-timeout-policy')).toBe(false); + expect(JSON.stringify(roles)).toBe(original); + expect('waitForSync' in permit.api.roles).toBe(false); + }, +); + +test('empty bulk operations dispatch and retain both empty result arrays', async () => { + const { permit, calls, reply } = wire(); + reply.data = { created: [], updated: [] }; + expect(await permit.api.roles.bulkCreateOrReplace([])).toEqual(reply.data); + expect(calls[0]?.data).toBe('{"operations":[]}'); + expect(calls).toHaveLength(1); +}); + +test('duplicate role operations remain intact for server validation', async () => { + const { permit, calls, reply } = wire(); + reply.status = 422; + reply.data = { detail: 'Duplicate role keys' }; + const duplicates = [ + { key: 'reader', name: 'First' }, + { key: 'reader', name: 'Second' }, + ]; + await assert.rejects(() => permit.api.roles.bulkCreateOrReplace(duplicates), { + name: 'PermitApiError', + status: 422, + }); + expect(calls[0]?.data).toBe(JSON.stringify({ operations: duplicates })); +}); + +test.each([401, 403, 404, 409, 422, 500, 503])( + 'HTTP %s preserves named bulk failure', + async (status) => { + const { permit, calls, reply } = wire(); + reply.status = status; + reply.data = { detail: 'Rejected batch', trace: 'public-fixture' }; + try { + await permit.api.roles.bulkCreateOrReplace(roles); + assert.fail('HTTP rejection was swallowed'); + } catch (error) { + expect(error).toBeInstanceOf(PermitApiError); + if (!(error instanceof PermitApiError)) throw error; + expect(error.status).toBe(status); + expect(error.code).toBe('ERR_BAD_RESPONSE'); + expect(error.formattedAxiosError.error).toEqual({ detail: 'Rejected batch' }); + expect(JSON.stringify(error)).not.toContain('public-fixture'); + } + expect(calls).toHaveLength(1); + }, +); + +test.each(['organization', 'project'])( + 'bulk write refuses unselected environment: %s', + async (level) => { + const { permit, calls } = wire(); + if (level === 'organization') permit.config.apiContext.setOrganizationLevelContext('org'); + else permit.config.apiContext.setProjectLevelContext('org', 'project/one'); + await expect(permit.api.roles.bulkCreateOrReplace(roles)).rejects.toBeInstanceOf( + PermitContextError, + ); + expect(calls).toEqual([]); + }, +); + +test('ordinary transport failures propagate without fabricated arrays or a fallback route', async () => { + const { permit, calls } = wire(); + permit.config.axiosInstance.defaults.adapter = async (config) => { + calls.push({ + method: config.method, + url: axios.getUri(config), + data: config.data, + headers: new AxiosHeaders(config.headers), + }); + throw new Error('Connection unavailable'); + }; + await expect(permit.api.roles.bulkCreateOrReplace(roles)).rejects.toBeInstanceOf(PermitApiError); + expect(calls).toHaveLength(1); + expect(calls[0]?.url).toBe(path); +}); + +test('scope initialization is shared and precedes the selected-environment bulk requests', async () => { + const calls: string[] = []; + const permit = new Permit({ + token: 'scope-fixture', + apiUrl: 'https://control.example', + proxyFactsViaPdp: true, + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const url = axios.getUri(config); + calls.push(url); + return response( + config, + url.endsWith('/scope') + ? { + organization_id: 'org', + project_id: 'project/one', + environment_id: 'environment east', + } + : { created: [], updated: [] }, + ); + }, + }), + }); + await Promise.all([ + permit.api.roles.bulkCreateOrReplace([]), + permit.api.roles.bulkCreateOrReplace([]), + ]); + expect(calls).toEqual(['https://control.example/v2/api-key/scope', path, path]); +}); + +test('failed scope discovery refuses the bulk operation without dispatch', async () => { + const calls: string[] = []; + const permit = new Permit({ + token: 'scope-fixture', + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + calls.push(axios.getUri(config)); + throw new Error('Scope service unavailable'); + }, + }), + }); + await expect(permit.api.roles.bulkCreateOrReplace(roles)).rejects.toBeInstanceOf( + PermitContextError, + ); + expect(calls).toEqual(['https://control.example/v2/api-key/scope']); +}); diff --git a/src/api/roles.ts b/src/api/roles.ts index fcb32f2f..67246df6 100644 --- a/src/api/roles.ts +++ b/src/api/roles.ts @@ -1,25 +1,35 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { RolesApi as AutogenRolesApi, - PaginatedResultRoleRead, - RoleCreate, - RoleRead, - RoleUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + BulkOperationsApi, + type PaginatedResultRoleRead, + type RoleCreate, + type RoleCreateBulk, + type RoleCreateBulkOperationResult, + type RoleRead, + type RoleUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; -import { BasePermitApi, IPaginationExtended, ReturnPaginationType } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BasePermitApi, type IPaginationExtended, type ReturnPaginationType } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; -export { RoleCreate, RoleRead, RoleUpdate, PaginatedResultRoleRead } from '../openapi'; +export { + type RoleCreate, + type RoleCreateBulk, + type RoleCreateBulkOperationResult, + type RoleRead, + type RoleUpdate, + type PaginatedResultRoleRead, +} from '#src/openapi/index'; export interface IRolesApi { /** * Retrieves a list of roles. * - * @param pagination The pagination options, @see {@link IPaginationExtended} + * Accepts optional pagination settings; see {@link IPaginationExtended}. * @returns A promise that resolves to an array of roles. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. @@ -71,6 +81,15 @@ export interface IRolesApi { */ create(roleData: RoleCreate): Promise; + /** + * Creates or replaces tenant and resource roles in the selected environment. + * @param roles - Role definitions; omit resource for a tenant role, or supply its resource key. + * @returns The complete published result containing created and updated string arrays. + * @throws {@link PermitApiError} If the API rejects the definitions or denies write access. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + bulkCreateOrReplace(roles: RoleCreateBulk[]): Promise; + /** * Updates a role. * @@ -118,6 +137,7 @@ export interface IRolesApi { */ export class RolesApi extends BasePermitApi implements IRolesApi { private roles: AutogenRolesApi; + private readonly bulkOperationsApi: BulkOperationsApi; /** * Creates an instance of the RolesApi. @@ -131,12 +151,17 @@ export class RolesApi extends BasePermitApi implements IRolesApi { BASE_PATH, this.config.axiosInstance, ); + this.bulkOperationsApi = new BulkOperationsApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); } /** * Retrieves a list of roles. * - * @param pagination The pagination options, @see {@link IPaginationExtended} + * Accepts optional pagination settings; see {@link IPaginationExtended}. * @returns A promise that resolves to an array of roles. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. @@ -157,7 +182,7 @@ export class RolesApi extends BasePermitApi implements IRolesApi { ...this.config.apiContext.environmentContext, page, perPage, - includeTotalCount, + ...(includeTotalCount !== undefined && { includeTotalCount }), }) ).data; } catch (err) { @@ -237,6 +262,24 @@ export class RolesApi extends BasePermitApi implements IRolesApi { } } + /** {@inheritDoc IRolesApi.bulkCreateOrReplace} */ + public async bulkCreateOrReplace( + roles: RoleCreateBulk[], + ): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.bulkOperationsApi.bulkCreateOrReplaceRoles({ + ...this.config.apiContext.environmentContext, + roleCreateBulkOperation: { operations: roles }, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + /** * Updates a role. * diff --git a/src/api/tenants.test.ts b/src/api/tenants.test.ts new file mode 100644 index 00000000..572de7b0 --- /dev/null +++ b/src/api/tenants.test.ts @@ -0,0 +1,92 @@ +import { AxiosError } from 'axios'; +import { expect, test } from 'vitest'; + +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { createMockPermit, MOCK_API_ORIGIN } from '#src/tests/helpers/mock-api'; + +test.each([false, true])( + 'new-user tenant membership stays on the control plane (proxy=%s)', + async (proxyFactsViaPdp) => { + const { permit, rest } = createMockPermit({ + proxyFactsViaPdp, + project: 'project / east', + environment: 'environment east', + }); + const user = { key: 'alice', attributes: { region: null, nested: { active: true } } }; + const result = { ...user, id: 'user-id', tenants: ['east'], future_field: null }; + rest.resolveWith(result); + expect(await permit.api.tenants.addUser('tenant / east', user)).toEqual(result); + expect(rest.last).toMatchObject({ + method: 'POST', + origin: MOCK_API_ORIGIN, + path: '/v2/facts/project%20%2F%20east/environment%20east/tenants/tenant%20%2F%20east/users', + params: {}, + data: user, + }); + expect(rest.last?.data).not.toHaveProperty('role_assignments'); + expect(rest.last?.headers.get('Content-Type')).toBe('application/json'); + expect(rest.last?.headers.get('Authorization')).toBe('Bearer test-token'); + expect(rest.last?.headers.has('X-Wait-Timeout')).toBe(false); + expect(rest.last?.headers.has('X-Timeout-Policy')).toBe(false); + }, +); + +test('tenant waitForSync clones cannot imply waiting for unsynchronized membership', async () => { + const { permit, rest } = createMockPermit({ proxyFactsViaPdp: true }); + const user = { key: 'alice', role_assignments: [{ role: 'reader', tenant: 'east' }] }; + rest.resolveWith(user); + expect(await permit.api.tenants.waitForSync(null, 'fail').addUser('tenant-id', user)).toEqual( + user, + ); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.path).toBe('/v2/facts/proj/env/tenants/tenant-id/users'); + expect(rest.last?.data).toEqual(user); + expect(rest.last?.headers.has('X-Wait-Timeout')).toBe(false); + expect(rest.last?.headers.has('X-Timeout-Policy')).toBe(false); +}); + +test('new-user membership follows the selected environment after changing context', async () => { + const { permit, rest } = createMockPermit({ contextLevel: 'organization' }); + permit.config.apiContext.setEnvironmentLevelContext('org', 'selected-project', 'selected-env'); + const result = { key: 'alice', id: 'user-id', tenants: ['east'] }; + rest.resolveWith(result); + expect(await permit.api.tenants.addUser('east', { key: 'alice' })).toEqual(result); + expect(rest.last?.path).toBe('/v2/facts/selected-project/selected-env/tenants/east/users'); +}); + +test('membership requires environment context before dispatch', async () => { + const { permit, rest } = createMockPermit({ contextLevel: 'project' }); + await expect(permit.api.tenants.addUser('east', { key: 'alice' })).rejects.toBeInstanceOf( + PermitContextError, + ); + expect(rest.requests).toHaveLength(0); +}); + +test.each([404, 409, 422, 503])( + 'tenant membership preserves named HTTP failures (%s)', + async (status) => { + const { permit, rest } = createMockPermit(); + rest.rejectWith(status, { message: 'membership rejected', detail: 'private attributes' }); + await expect(permit.api.tenants.addUser('east', { key: 'alice' })).rejects.toMatchObject({ + name: 'PermitApiError', + status, + }); + expect(rest.requests).toHaveLength(1); + }, +); + +test('membership normalizes a transport rejection without retaining caller errors', async () => { + const { permit } = createMockPermit(); + const original = new AxiosError('connection unavailable', 'ECONNREFUSED'); + permit.config.axiosInstance.defaults.adapter = async () => { + throw original; + }; + const error = await permit.api.tenants + .addUser('east', { key: 'alice' }) + .catch((failure: unknown) => failure); + expect(error).toBeInstanceOf(PermitApiError); + expect(error).toMatchObject({ code: 'ECONNREFUSED' }); + expect(error).not.toBe(original); + expect(original.message).toBe('connection unavailable'); +}); diff --git a/src/api/tenants.ts b/src/api/tenants.ts index 2907087d..17f04005 100644 --- a/src/api/tenants.ts +++ b/src/api/tenants.ts @@ -1,19 +1,37 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { TenantsApi as AutogenTenantsApi, - PaginatedResultUserRead, - TenantCreate, - TenantRead, - TenantUpdate, -} from '../openapi'; -import { BASE_PATH } from '../openapi/base'; + Configuration, + type UserCreate, + type TenantCreate, + type TenantRead as GeneratedTenantRead, + type PaginatedResultTenantRead as GeneratedPaginatedResultTenantRead, + type TenantUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; +import type { UserRead, PaginatedResultUserRead } from '#src/api/users'; -import { BaseFactsPermitAPI, IPagination, IWaitForSync } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; +import { BaseFactsPermitAPI, type IPagination, type IWaitForSync } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; -export { PaginatedResultUserRead, TenantCreate, TenantRead, TenantUpdate } from '../openapi'; +export { type TenantCreate, type TenantUpdate } from '#src/openapi/index'; + +export type { PaginatedResultUserRead } from '#src/api/users'; + +/** A tenant response with an optional caller-declared attribute shape; no runtime validation. */ +export interface TenantRead extends GeneratedTenantRead { + /** Attribute values retain the caller's declared shape when present. */ + attributes?: Attributes; +} + +/** The full tenant page with the selected attribute shape on every returned tenant. */ +export interface PaginatedResultTenantRead< + Attributes extends object = object, +> extends GeneratedPaginatedResultTenantRead { + data: TenantRead[]; +} export interface IListTenantUsers extends IPagination { tenantKey: string; @@ -23,6 +41,11 @@ export interface IListTenantUsers extends IPagination { export interface IListTenantsParams extends IPagination { search?: string; + /** + * Returns the full page with total_count when true; otherwise returns tenant rows. + * Omission preserves the API's false default and the SDK's array result. + */ + includeTotalCount?: boolean; } export interface ITenantsApi extends IWaitForSync { @@ -30,11 +53,20 @@ export interface ITenantsApi extends IWaitForSync { * Retrieves a list of tenants. * * @param params Filtering and pagination options, @see {@link IListTenantsParams} - * @returns A promise that resolves to an array of tenants. + * @returns Tenant rows by default, or the complete page when includeTotalCount is true. + * Dynamic or optional boolean flags retain the union of both result shapes. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - list(params?: IListTenantsParams): Promise; + list( + params: IListTenantsParams & { includeTotalCount: true }, + ): Promise>; + list( + params?: IListTenantsParams & { includeTotalCount?: false }, + ): Promise[]>; + list( + params?: IListTenantsParams, + ): Promise[] | PaginatedResultTenantRead>; /** * Retrieves a list of users for a given tenant. @@ -44,7 +76,25 @@ export interface ITenantsApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - listTenantUsers(params: IListTenantUsers): Promise; + listTenantUsers( + params: IListTenantUsers, + ): Promise>; + + /** + * Creates a new user and associates it with a tenant, without requiring a role assignment. + * Uses the control-plane API even when facts proxying or waitForSync is enabled. + * The acknowledgement does not guarantee that the PDP has synchronized the membership. + * @param tenantKey - The existing tenant key or ID. + * @param userData - New user data; role_assignments is optional. + * @returns The created user, including its tenant membership. + * @throws {@link PermitApiError} If the user already exists, the tenant is missing, + * or the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + addUser( + tenantKey: string, + userData: UserCreate, + ): Promise>; /** * Retrieves a tenant by its key. @@ -54,7 +104,7 @@ export interface ITenantsApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - get(tenantKey: string): Promise; + get(tenantKey: string): Promise>; /** * Retrieves a tenant by its key. @@ -65,7 +115,7 @@ export interface ITenantsApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - getByKey(tenantKey: string): Promise; + getByKey(tenantKey: string): Promise>; /** * Retrieves a tenant by its ID. @@ -76,7 +126,7 @@ export interface ITenantsApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - getById(tenantId: string): Promise; + getById(tenantId: string): Promise>; /** * Creates a new tenant. @@ -86,7 +136,9 @@ export interface ITenantsApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - create(tenantData: TenantCreate): Promise; + create( + tenantData: TenantCreate, + ): Promise>; /** * Updates a tenant. @@ -97,7 +149,10 @@ export interface ITenantsApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - update(tenantKey: string, tenantData: TenantUpdate): Promise; + update( + tenantKey: string, + tenantData: TenantUpdate, + ): Promise>; /** * Deletes a tenant. @@ -126,6 +181,7 @@ export interface ITenantsApi extends IWaitForSync { */ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { private tenants: AutogenTenantsApi; + private membership: AutogenTenantsApi; /** * Creates an instance of the TenantsApi. @@ -134,6 +190,20 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { */ constructor(config: IPermitConfig, logger: Logger) { super(config, logger); + this.membership = new AutogenTenantsApi( + new Configuration({ + basePath: this.config.apiUrl, + accessToken: this.config.token, + baseOptions: { + headers: { + 'X-Permit-SDK-Version': + this.openapiClientConfig.baseOptions.headers['X-Permit-SDK-Version'], + }, + }, + }), + BASE_PATH, + this.config.axiosInstance, + ); this.tenants = new AutogenTenantsApi( this.openapiClientConfig, BASE_PATH, @@ -145,20 +215,67 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { * Retrieves a list of tenants. * * @param params Filtering and pagination options, @see {@link IListTenantsParams} - * @returns A promise that resolves to an array of tenants. + * @returns Tenant rows by default, or the complete page when includeTotalCount is true. + * Dynamic or optional boolean flags retain the union of both result shapes. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async list(params?: IListTenantsParams): Promise { + public list( + params: IListTenantsParams & { includeTotalCount: true }, + ): Promise>; + public list( + params?: IListTenantsParams & { includeTotalCount?: false }, + ): Promise[]>; + public list( + params?: IListTenantsParams, + ): Promise[] | PaginatedResultTenantRead>; + public async list( + params?: IListTenantsParams, + ): Promise[] | PaginatedResultTenantRead> { + const options = { ...params }; await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( + const response = ( await this.tenants.listTenants({ - ...params, + ...options, ...this.config.apiContext.environmentContext, }) ).data; + if (options.includeTotalCount === true) { + return response as PaginatedResultTenantRead; + } + return (Array.isArray(response) ? response : response.data) as TenantRead[]; + } catch (err) { + this.handleApiError(err); + } + } + + /** + * Creates a new user and associates it with a tenant, without requiring a role assignment. + * Uses the control-plane API even when facts proxying or waitForSync is enabled. + * The acknowledgement does not guarantee that the PDP has synchronized the membership. + * @param tenantKey - The existing tenant key or ID. + * @param userData - New user data; role_assignments is optional. + * @returns The created user, including its tenant membership. + * @throws {@link PermitApiError} If the user already exists, the tenant is missing, + * or the API rejects the request. + * @throws {@link PermitContextError} If the environment context or API key is insufficient. + */ + public async addUser( + tenantKey: string, + userData: UserCreate, + ): Promise> { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.membership.addUserToTenant({ + ...this.config.apiContext.environmentContext, + tenantId: tenantKey, + userCreate: userData, + }) + ).data as UserRead; } catch (err) { this.handleApiError(err); } @@ -167,16 +284,15 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { /** * Retrieves a list of users for a given tenant. * - * @param tenantKey - The key of the tenant for which to list users. - * @param params - pagination and filtering params. + * @param __namedParameters - Tenant key, pagination, and filtering options. * @returns A promise that resolves to a PaginatedResultUserRead object containing the list of tenant users. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async listTenantUsers({ + public async listTenantUsers({ tenantKey, ...params - }: IListTenantUsers): Promise { + }: IListTenantUsers): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -186,7 +302,7 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { ...this.config.apiContext.environmentContext, tenantId: tenantKey, }) - ).data; + ).data as PaginatedResultUserRead; } catch (err) { this.handleApiError(err); } @@ -200,7 +316,9 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async get(tenantKey: string): Promise { + public async get( + tenantKey: string, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -209,7 +327,7 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { ...this.config.apiContext.environmentContext, tenantId: tenantKey, }) - ).data; + ).data as TenantRead; } catch (err) { this.handleApiError(err); } @@ -224,8 +342,10 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async getByKey(tenantKey: string): Promise { - return await this.get(tenantKey); + public async getByKey( + tenantKey: string, + ): Promise> { + return await this.get(tenantKey); } /** @@ -237,8 +357,10 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async getById(tenantId: string): Promise { - return await this.get(tenantId); + public async getById( + tenantId: string, + ): Promise> { + return await this.get(tenantId); } /** @@ -249,7 +371,9 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async create(tenantData: TenantCreate): Promise { + public async create( + tenantData: TenantCreate, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -258,7 +382,7 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { ...this.config.apiContext.environmentContext, tenantCreate: tenantData, }) - ).data; + ).data as TenantRead; } catch (err) { this.handleApiError(err); } @@ -273,7 +397,10 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async update(tenantKey: string, tenantData: TenantUpdate): Promise { + public async update( + tenantKey: string, + tenantData: TenantUpdate, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -283,7 +410,7 @@ export class TenantsApi extends BaseFactsPermitAPI implements ITenantsApi { tenantId: tenantKey, tenantUpdate: tenantData, }) - ).data; + ).data as TenantRead; } catch (err) { this.handleApiError(err); } diff --git a/src/api/user-attributes.test.ts b/src/api/user-attributes.test.ts new file mode 100644 index 00000000..5654e1b8 --- /dev/null +++ b/src/api/user-attributes.test.ts @@ -0,0 +1,308 @@ +import assert from 'node:assert/strict'; + +import axios, { AxiosError, AxiosHeaders, type InternalAxiosRequestConfig } from 'axios'; +import { test } from 'vitest'; + +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import type { IUserAttributesApi } from '#src/api/user-attributes'; +import { AttributeType, Permit, type ResourceAttributeRead } from '#src/index'; + +const attribute = Object.freeze({ + key: 'department', + type: AttributeType.String, + description: 'The department used by user policies.', +}); +const read = { + ...attribute, + id: 'attribute-id', + resource_id: 'user-schema-id', + resource_key: '__user', + organization_id: 'org', + project_id: 'project', + environment_id: 'environment', + created_at: '2026-10-08T00:00:00Z', + updated_at: '2026-10-08T00:00:00Z', + built_in: false, +} satisfies ResourceAttributeRead; +const key = 'department/a?b+c=%é'; +const encodedKey = 'department%2Fa%3Fb%2Bc%3D%25%C3%A9'; +const prefix = + 'https://control.example/v2/schema/project%2Fone/environment%20east/users/attributes'; + +interface Request { + method: string | undefined; + url: string; + body: unknown; + headers: AxiosHeaders; +} + +function response(config: InternalAxiosRequestConfig, data: unknown, status = 200) { + return { data, status, statusText: 'Fixture response', headers: new AxiosHeaders(), config }; +} + +function wire(proxyFactsViaPdp = true) { + const calls: Request[] = []; + const reply: { status: number; data: unknown } = { status: 200, data: read }; + const permit = new Permit({ + token: 'attribute-fixture', + apiUrl: 'https://control.example', + pdp: 'https://pdp.invalid', + proxyFactsViaPdp, + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + calls.push({ + method: config.method, + url: axios.getUri(config), + body: config.data, + headers: new AxiosHeaders(config.headers), + }); + const result = response(config, reply.data, reply.status); + if (reply.status >= 400) { + throw new AxiosError( + 'User attribute request failed', + 'ERR_BAD_RESPONSE', + config, + undefined, + result, + ); + } + return result; + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project/one', 'environment east'); + return { permit, calls, reply }; +} + +test.each([true, false])( + 'five operations preserve dedicated schema wire contracts (proxy %s)', + async (proxy) => { + const { permit, calls, reply } = wire(proxy); + const api = permit.api.userAttributes; + reply.data = { ...read, additive: { nullable: null } }; + expect(await api.create(attribute)).toEqual(reply.data); + expect(await api.get(key)).toEqual(reply.data); + const update = Object.freeze({ description: 'Updated schema description.' }); + expect(await api.update(key, update)).toEqual(reply.data); + reply.data = [reply.data]; + expect(await api.list()).toEqual(reply.data); + reply.status = 204; + reply.data = undefined; + expect(await api.delete(key)).toBeUndefined(); + expect(calls.map(({ method, url, body }) => [method, url, body])).toEqual([ + ['post', prefix, JSON.stringify(attribute)], + ['get', `${prefix}/${encodedKey}`, undefined], + ['patch', `${prefix}/${encodedKey}`, JSON.stringify(update)], + ['get', `${prefix}?page=1&per_page=100`, undefined], + ['delete', `${prefix}/${encodedKey}`, undefined], + ]); + for (const call of calls) { + expect(call.headers.get('authorization')).toBe('Bearer attribute-fixture'); + expect(call.headers.has('x-wait-timeout')).toBe(false); + expect(call.headers.has('x-timeout-policy')).toBe(false); + expect(new URL(call.url).searchParams.has('resource_id')).toBe(false); + if (call.body) expect(call.headers.get('content-type')).toContain('application/json'); + } + expect(attribute.description).toBe('The department used by user policies.'); + expect(update.description).toBe('Updated schema description.'); + expect('waitForSync' in api).toBe(false); + }, +); + +test('list snapshots pagination and preserves a plain empty array', async () => { + const { permit, calls, reply } = wire(); + const params = { page: 2, perPage: 3 }; + reply.data = [{ ...read, type: 'future-kind', additive: false }]; + const pending = permit.api.userAttributes.list(params); + params.page = 9; + params.perPage = 10; + expect(await pending).toEqual(reply.data); + expect(calls[0]?.url).toBe(`${prefix}?page=2&per_page=3`); + reply.data = []; + expect(await permit.api.userAttributes.list({ page: 1, perPage: 1 })).toEqual([]); + expect(calls[1]?.url).toBe(`${prefix}?page=1&per_page=1`); + expect(await permit.api.userAttributes.list(undefined)).toEqual([]); + expect(calls[2]?.url).toBe(`${prefix}?page=1&per_page=100`); +}); + +test('schema CRUD and readback retain the complete stored response', async () => { + let stored: ResourceAttributeRead | undefined; + const patch = Object.freeze({ type: AttributeType.Bool, description: 'Updated policy schema.' }); + const permit = new Permit({ + token: 'attribute-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const url = new URL(axios.getUri(config)); + expect(url.pathname).toContain('/schema/project/environment/users/attributes'); + expect(url.searchParams.has('resource_id')).toBe(false); + if (config.method === 'post') { + expect(JSON.parse(String(config.data))).toEqual(attribute); + stored = { ...read }; + } else if (config.method === 'patch') { + expect(JSON.parse(String(config.data))).toEqual(patch); + assert(stored); + stored = { ...stored, ...patch, updated_at: '2026-10-08T01:00:00Z' }; + } else if (config.method === 'delete') { + stored = undefined; + return response(config, undefined, 204); + } else if (url.pathname.endsWith('/users/attributes')) { + return response(config, stored ? [stored] : []); + } + if (!stored) { + throw new AxiosError( + 'Missing schema attribute', + 'ERR_BAD_REQUEST', + config, + undefined, + response(config, { detail: 'Schema attribute not found' }, 404), + ); + } + return response(config, { ...stored }); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const api = permit.api.userAttributes; + expect(await api.list()).toEqual([]); + const created = await api.create(attribute); + expect(created).toEqual(read); + expect(await api.get(attribute.key)).toEqual(created); + expect(await api.list()).toEqual([created]); + const updated = await api.update(attribute.key, patch); + expect(updated).toEqual({ ...created, ...patch, updated_at: '2026-10-08T01:00:00Z' }); + expect(await api.get(created.id)).toEqual(updated); + expect(await api.list()).toEqual([updated]); + expect(await api.delete(created.id)).toBeUndefined(); + expect(await api.list()).toEqual([]); + await expect(api.get(attribute.key)).rejects.toMatchObject({ + name: 'PermitApiError', + status: 404, + }); +}); + +const operations: Array<[string, (api: IUserAttributesApi) => Promise]> = [ + ['list', (api) => api.list()], + ['get', (api) => api.get(key)], + ['create', (api) => api.create(attribute)], + ['update', (api) => api.update(key, { type: AttributeType.Bool })], + ['delete', (api) => api.delete(key)], +]; + +test.each(operations)( + '%s rejects an unselected environment before operation traffic', + async (_, call) => { + for (const scopedProject of [undefined, 'project']) { + let requests = 0; + const permit = new Permit({ + token: 'attribute-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async () => { + requests++; + throw new Error('Unexpected operation traffic'); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', scopedProject); + await expect(call(permit.api.userAttributes)).rejects.toBeInstanceOf(PermitContextError); + expect(requests).toBe(0); + } + }, +); + +test.each(operations)( + '%s preserves named REST errors and HTTP status metadata', + async (_, call) => { + const { permit, calls, reply } = wire(); + for (const status of [401, 403, 404, 422, 503]) { + reply.status = status; + reply.data = { detail: 'Schema attribute operation rejected' }; + const error: unknown = await call(permit.api.userAttributes).catch( + (caught: unknown) => caught, + ); + assert(error instanceof PermitApiError); + expect(error.status).toBe(status); + expect(error.code).toBe('ERR_BAD_RESPONSE'); + expect(error.message).toContain('Schema attribute operation rejected'); + expect(error.response?.status).toBe(status); + } + expect(calls).toHaveLength(5); + }, +); + +test.each(operations)( + '%s surfaces ordinary transport failures without a fallback', + async (_, call) => { + let requests = 0; + const permit = new Permit({ + token: 'attribute-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async () => { + requests++; + throw new Error('Fixture transport unavailable'); + }, + }), + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const error: unknown = await call(permit.api.userAttributes).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.message).toContain('Fixture transport unavailable'); + expect(error.status).toBeUndefined(); + expect(requests).toBe(1); + }, +); + +test('initializes environment scope once before a schema operation', async () => { + const urls: string[] = []; + const permit = new Permit({ + token: 'attribute-fixture', + apiUrl: 'https://control.example', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async (config) => { + const url = axios.getUri(config); + urls.push(url); + return response( + config, + url.endsWith('/v2/api-key/scope') + ? { organization_id: 'org', project_id: 'project', environment_id: 'environment' } + : [read], + ); + }, + }), + }); + expect(await permit.api.userAttributes.list()).toEqual([read]); + expect(await permit.api.userAttributes.list()).toEqual([read]); + expect(urls).toEqual([ + 'https://control.example/v2/api-key/scope', + 'https://control.example/v2/schema/project/environment/users/attributes?page=1&per_page=100', + 'https://control.example/v2/schema/project/environment/users/attributes?page=1&per_page=100', + ]); +}); + +test('failed scope discovery remains a context error without a schema request', async () => { + let requests = 0; + const permit = new Permit({ + token: 'attribute-fixture', + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async () => { + requests++; + throw new Error('Scope discovery unavailable'); + }, + }), + }); + await expect(permit.api.userAttributes.list()).rejects.toBeInstanceOf(PermitContextError); + expect(requests).toBe(1); +}); diff --git a/src/api/user-attributes.ts b/src/api/user-attributes.ts new file mode 100644 index 00000000..9296cec9 --- /dev/null +++ b/src/api/user-attributes.ts @@ -0,0 +1,168 @@ +import type { Logger } from 'pino'; + +import type { IPermitConfig } from '#src/config'; +import { + UserAttributesApi as AutogenUserAttributesApi, + type ResourceAttributeCreate, + type ResourceAttributeRead, + type ResourceAttributeUpdate, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; +import { BasePermitApi, type IPagination } from '#src/api/base'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc resolves the named REST failure. +import type { PermitApiError } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc resolves the named context failure. +import type { PermitContextError } from '#src/api/context'; + +/** Defines the environment's user attribute schema; user values belong to the Users API. */ +export interface IUserAttributesApi { + /** + * Lists user attribute definitions in the selected environment. + * @param params - Optional pagination; page defaults to 1 and perPage to 100. + * @returns The complete attribute rows, including identity, context and timestamps. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + list(params?: IPagination): Promise; + + /** + * Gets a user attribute definition by its key or UUID. + * @param attributeKey - The attribute key or UUID. + * @returns The complete stored attribute definition. + * @throws {@link PermitApiError} If the attribute is absent or the API rejects the request. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + get(attributeKey: string): Promise; + + /** + * Creates a user attribute definition; it does not assign values to individual users. + * @param attribute - The schema key, type and optional description. + * @returns The complete stored attribute definition. + * @throws {@link PermitApiError} If the API rejects the body or denies write access. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + create(attribute: ResourceAttributeCreate): Promise; + + /** + * Partially updates a user attribute definition, overwriting the supplied fields. + * @param attributeKey - The attribute key or UUID. + * @param attribute - The type and/or description to update. + * @returns The complete updated attribute definition. + * @throws {@link PermitApiError} If the attribute is absent or the API rejects the update. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + update(attributeKey: string, attribute: ResourceAttributeUpdate): Promise; + + /** + * Deletes a user attribute definition and related data; policies then see it as undefined. + * @param attributeKey - The attribute key or UUID. + * @returns A promise that resolves to undefined after successful deletion. + * @throws {@link PermitApiError} If the attribute is absent or the API denies deletion. + * @throws {@link PermitContextError} If the environment or API key scope is insufficient. + */ + delete(attributeKey: string): Promise; +} + +/** Direct control-plane client for the five user attribute schema operations. */ +export class UserAttributesApi extends BasePermitApi implements IUserAttributesApi { + private readonly attributes: AutogenUserAttributesApi; + + /** + * Creates the user attribute schema client. + * @param config - The SDK configuration and selected API context. + * @param logger - The SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.attributes = new AutogenUserAttributesApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** {@inheritDoc IUserAttributesApi.list} */ + public async list(params: IPagination = {}): Promise { + const { page = 1, perPage = 100 } = params; + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.attributes.listUserAttributes({ + ...this.config.apiContext.environmentContext, + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserAttributesApi.get} */ + public async get(attributeKey: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.attributes.getUserAttribute({ + ...this.config.apiContext.environmentContext, + attributeId: attributeKey, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserAttributesApi.create} */ + public async create(attribute: ResourceAttributeCreate): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.attributes.createUserAttribute({ + ...this.config.apiContext.environmentContext, + resourceAttributeCreate: attribute, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserAttributesApi.update} */ + public async update( + attributeKey: string, + attribute: ResourceAttributeUpdate, + ): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.attributes.updateUserAttribute({ + ...this.config.apiContext.environmentContext, + attributeId: attributeKey, + resourceAttributeUpdate: attribute, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserAttributesApi.delete} */ + public async delete(attributeKey: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + await this.attributes.deleteUserAttribute({ + ...this.config.apiContext.environmentContext, + attributeId: attributeKey, + }); + } catch (err) { + this.handleApiError(err); + } + } +} diff --git a/src/api/user-invites.test.ts b/src/api/user-invites.test.ts new file mode 100644 index 00000000..e22f5626 --- /dev/null +++ b/src/api/user-invites.test.ts @@ -0,0 +1,306 @@ +import assert from 'node:assert/strict'; +import { createServer, type IncomingHttpHeaders } from 'node:http'; +import { inspect } from 'node:util'; + +import axios, { AxiosError, AxiosHeaders } from 'axios'; +import pino from 'pino'; +import { onTestFinished, test, vi } from 'vitest'; + +import { PermitApiError } from '#src/api/base'; +import { PermitContextError } from '#src/api/context'; +import { + UserInvitesApi, + type ElementsUserInviteCreate, + type IUserInvitesApi, +} from '#src/api/user-invites'; +import { Permit } from '#src/index'; + +const invite: ElementsUserInviteCreate = Object.freeze({ + key: null, + status: 'pending', + email: 'requested@example.com', + first_name: null, + last_name: null, + role_id: 'eaf54312-e329-4f53-9e35-3e815e23f62b', + tenant_id: '3058d6f6-2c6e-4828-b8ac-0e3af627b50d', + resource_instance_id: null, +}); +const id = '06e3805a-ae67-4c49-a102-f5f0c45bbf86'; +const read = { + ...invite, + id, + organization_id: 'org', + project_id: 'project', + environment_id: 'environment', + created_at: '2026-10-01T00:00:00Z', + updated_at: '2026-10-01T00:00:00Z', +}; +const approval = Object.freeze({ email: invite.email, key: 'approved-user', attributes: null }); +const user = { + ...read, + key: approval.key, + attributes: null, + associated_tenants: [{ tenant: 'east', roles: ['reader'], status: 'pending' }], +}; +const prefix = '/v2/facts/project%2Fone/environment%20east/user_invites'; + +interface Request { + method: string | undefined; + path: string | undefined; + headers: IncomingHttpHeaders; + body: string; +} + +async function wire(proxyFactsViaPdp = true) { + const calls: Request[] = []; + const reply: { status: number; data: unknown } = { status: 200, data: read }; + const server = createServer(async (request, response) => { + const chunks: Buffer[] = []; + for await (const chunk of request) chunks.push(Buffer.from(chunk)); + calls.push({ + method: request.method, + path: request.url, + headers: request.headers, + body: Buffer.concat(chunks).toString(), + }); + response.writeHead(reply.status, { 'Content-Type': 'application/json' }); + response.end(reply.status === 204 ? undefined : JSON.stringify(reply.data)); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + server.closeAllConnections(); + }), + ); + const address = server.address(); + assert(address && typeof address !== 'string'); + const permit = new Permit({ + token: 'invite-fixture', + apiUrl: `http://127.0.0.1:${address.port}`, + pdp: 'http://pdp.invalid', + proxyFactsViaPdp, + retry: false, + log: { level: 'silent' }, + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org'); + permit.config.apiContext.setEnvironmentLevelContext('org', 'project/one', 'environment east'); + return { permit, calls, reply }; +} + +test.each([true, false])( + 'all six operations use exact direct wire contracts (proxy %s)', + async (proxy) => { + const { permit, calls, reply } = await wire(proxy); + const api = permit.api.userInvites; + expect(await api.create(invite)).toEqual(read); + expect(await api.get(id)).toEqual(read); + const update = Object.freeze({ ...invite, key: 'suggested-user', first_name: 'Ada' }); + expect(await api.update(id, update)).toEqual(read); + reply.data = { data: [read], total_count: 7, page_count: 1, future_field: 'preserved' }; + expect(await api.list()).toEqual(reply.data); + reply.data = user; + expect(await api.approve(id, approval)).toEqual(user); + reply.status = 204; + expect(await api.delete(id)).toBeUndefined(); + expect(calls.map(({ method, path, body }) => [method, path, body])).toEqual([ + ['POST', prefix, JSON.stringify(invite)], + ['GET', `${prefix}/${id}`, ''], + ['PATCH', `${prefix}/${id}`, JSON.stringify(update)], + ['GET', `${prefix}?page=1&per_page=100`, ''], + ['POST', `${prefix}/${id}/approve`, JSON.stringify(approval)], + ['DELETE', `${prefix}/${id}`, ''], + ]); + for (const call of calls) { + expect(call.headers.authorization).toBe('Bearer invite-fixture'); + expect(call.headers['x-wait-timeout']).toBeUndefined(); + expect(call.headers['x-timeout-policy']).toBeUndefined(); + if (call.body) expect(call.headers['content-type']).toContain('application/json'); + } + expect(invite.key).toBeNull(); + expect(approval.attributes).toBeNull(); + expect('waitForSync' in api).toBe(false); + }, +); + +test('list snapshots filters and preserves IDs and complete pages', async () => { + const { permit, calls, reply } = await wire(); + const params = { + role: 'role / east', + tenant: 'tenant:one', + search: 'name & email', + page: 2, + perPage: 3, + }; + reply.data = { data: [{ ...read, extra: true }], total_count: 19, page_count: 1, extra: true }; + const pending = permit.api.userInvites.list(params); + params.role = 'changed'; + params.page = 9; + expect(await pending).toEqual(reply.data); + const query = new URL(calls[0]?.path ?? '', 'http://fixture.invalid').searchParams; + expect(Object.fromEntries(query)).toEqual({ + role: 'role / east', + tenant: 'tenant:one', + search: 'name & email', + page: '2', + per_page: '3', + }); + reply.data = { data: [], total_count: 19 }; + expect(await permit.api.userInvites.list({ role: '', tenant: '', search: '' })).toEqual( + reply.data, + ); + reply.data = { ...read, future: true }; + expect(await permit.api.userInvites.get('id / encoded')).toEqual(reply.data); + expect(calls[2]?.path).toBe(`${prefix}/id%20%2F%20encoded`); +}); + +const operations: Array<[string, (api: IUserInvitesApi) => Promise]> = [ + ['list', (api) => api.list()], + ['create', (api) => api.create(invite)], + ['get', (api) => api.get(id)], + ['update', (api) => api.update(id, invite)], + ['delete', (api) => api.delete(id)], + ['approve', (api) => api.approve(id, approval)], +]; + +test.each(operations)( + '%s fails without selected environment before operation traffic', + async (_, call) => { + let calls = 0; + const permit = new Permit({ + token: 'invite-fixture', + axiosInstance: axios.create({ + adapter: async () => { + calls++; + throw new Error('Unexpected transport'); + }, + }), + log: { level: 'silent' }, + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project'); + permit.config.apiContext.setProjectLevelContext('org', 'project'); + await expect(call(permit.api.userInvites)).rejects.toBeInstanceOf(PermitContextError); + expect(calls).toBe(0); + }, +); + +test.each(operations)('%s retains normal HTTP failures and status metadata', async (_, call) => { + const { permit, calls, reply } = await wire(); + for (const status of [401, 403, 404, 422, 503]) { + reply.status = status; + reply.data = { detail: 'Invite operation rejected', error_code: 'INVITE_REJECTED' }; + const error: unknown = await call(permit.api.userInvites).catch((caught: unknown) => caught); + assert(error instanceof PermitApiError); + expect(error.status).toBe(status); + expect(error.message).toContain('Invite operation rejected'); + expect(error.response?.status).toBe(status); + } + expect(calls).toHaveLength(5); +}); + +test('real HTTP approval refusal drops unknown stored email text and body', async () => { + const { permit, reply } = await wire(); + const storedEmail = 'unknown-stored@example.com'; + reply.status = 400; + reply.data = { + detail: `Requested ${approval.email} differs from stored ${storedEmail}`, + }; + const error: unknown = await permit.api.userInvites.approve(id, approval).catch((e) => e); + assert(error instanceof PermitApiError); + expect(error.status).toBe(400); + expect(error.message).toContain('approval refused'); + expect(error.response).toBeUndefined(); + expect(inspect(error, { depth: 8 })).not.toContain(storedEmail); + expect(JSON.stringify(error.formattedAxiosError)).not.toContain(approval.email); +}); + +test('approval refusal detaches public/log surfaces and preserves caller error', async () => { + const storedEmail = 'private-stored@example.com'; + const lines: string[] = []; + const raw = new AxiosError(`Refused: ${storedEmail}`, 'ERR_BAD_REQUEST'); + raw.cause = new Error(`Stored email ${storedEmail}`); + const caller = axios.create({ + adapter: async (config) => { + raw.config = config; + raw.status = 400; + raw.response = { + data: { detail: `${storedEmail} differs from ${approval.email}`, extra: 'remote-only' }, + status: 400, + statusText: 'Bad Request', + headers: new AxiosHeaders({ 'content-type': 'application/json' }), + config, + }; + throw raw; + }, + }); + let callerSnapshot: string | undefined; + const request = caller.request.bind(caller); + vi.spyOn(caller, 'request').mockImplementation(async (config) => { + try { + return await request(config); + } catch (error) { + callerSnapshot = inspect(error, { depth: Infinity, showHidden: true }); + throw error; + } + }); + const permit = new Permit({ + token: 'invite-fixture', + axiosInstance: caller, + retry: false, + log: { level: 'silent' }, + }); + permit.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const api = new UserInvitesApi( + permit.config, + pino( + { level: 'error' }, + { + write: (line: string) => lines.push(line), + }, + ), + ); + const error: unknown = await api.approve(id, approval).catch((e) => e); + assert(error instanceof PermitApiError); + expect(error.status).toBe(400); + expect(error.code).toBe('ERR_BAD_REQUEST'); + expect(error.response).toBeUndefined(); + expect(error.originalError.config?.url).toContain(`/user_invites/${id}/approve`); + const surfaces = [ + inspect(error, { depth: Infinity, showHidden: true }), + error.message, + error.stack, + JSON.stringify(error), + JSON.stringify(error.formattedAxiosError), + ...lines, + ].join('\n'); + expect(surfaces).not.toContain(storedEmail); + expect(surfaces).not.toContain(approval.email); + expect(lines).toHaveLength(1); + expect(inspect(raw, { depth: Infinity, showHidden: true })).toBe(callerSnapshot); + expect(raw.response?.data).toEqual({ + detail: `${storedEmail} differs from ${approval.email}`, + extra: 'remote-only', + }); +}); + +test('other HTTP400 and ordinary adapter failures retain established diagnostics', async () => { + const { permit, reply } = await wire(); + reply.status = 400; + reply.data = { detail: 'Create refused for a missing tenant' }; + await expect(permit.api.userInvites.create(invite)).rejects.toThrow('Create refused'); + const failing = new Permit({ + token: 'invite-fixture', + log: { level: 'silent' }, + axiosInstance: axios.create({ + adapter: async () => { + throw new Error('Adapter unavailable'); + }, + }), + }); + failing.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + await expect(failing.api.userInvites.get(id)).rejects.toThrow('Adapter unavailable'); +}); diff --git a/src/api/user-invites.ts b/src/api/user-invites.ts new file mode 100644 index 00000000..f520cb0b --- /dev/null +++ b/src/api/user-invites.ts @@ -0,0 +1,300 @@ +import type { Logger } from 'pino'; +import { AxiosError, isAxiosError } from 'axios'; + +import type { IPermitConfig } from '#src/config'; +import { + UserInvitesApi as AutogenUserInvitesApi, + type ElementsUserInviteApprove as GeneratedApprove, + type ElementsUserInviteCreate as GeneratedCreate, + type ElementsUserInviteRead as GeneratedRead, + type ElementsUserInviteUpdate as GeneratedUpdate, + type PaginatedResultElementsUserInviteRead as GeneratedPage, +} from '#src/openapi/index'; +import { BASE_PATH } from '#src/openapi/base'; +import { BasePermitApi, PermitApiError, type IPagination } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +// oxlint-disable-next-line no-unused-vars -- Public TSDoc resolves the named context failure. +import type { PermitContextError } from '#src/api/context'; +import type { UserRead } from '#src/api/users'; +import { diagnosticAxiosError, diagnosticMetadata } from '#src/utils/diagnostics'; + +export { UserInviteStatus } from '#src/openapi/index'; + +type NullableInviteKeys = 'key' | 'first_name' | 'last_name' | 'resource_instance_id'; + +/** Complete invite creation body; nullable fields remain required by the facts API. */ +export interface ElementsUserInviteCreate extends Omit { + /** Suggested user key; approval supplies the final key. */ + key: string | null; + /** First name, or null when absent. */ + first_name: string | null; + /** Last name, or null when absent. */ + last_name: string | null; + /** Internal instance ID, or null for a tenant role invite. */ + resource_instance_id: string | null; +} + +/** Full PATCH body; the facts endpoint requires every editable field. */ +export interface ElementsUserInviteUpdate extends Omit { + /** Suggested user key; approval supplies the final key. */ + key: string | null; + /** First name, or null when absent. */ + first_name: string | null; + /** Last name, or null when absent. */ + last_name: string | null; + /** Internal instance ID, or null for a tenant role invite. */ + resource_instance_id: string | null; +} + +/** Stored invite, including its required context, timestamps and nullable editable fields. */ +export interface ElementsUserInviteRead extends Omit { + /** Suggested or approved user key. */ + key: string | null; + /** First name, or null when absent. */ + first_name: string | null; + /** Last name, or null when absent. */ + last_name: string | null; + /** Internal instance ID, or null for a tenant role invite. */ + resource_instance_id: string | null; +} + +/** Approval body: the matching email, final user key and required nullable attributes. */ +export interface ElementsUserInviteApprove extends Omit { + /** User attributes, or null; this field must be supplied. */ + attributes: object | null; +} + +/** Full invite page; page_count, when present, counts rows on the current page. */ +export interface PaginatedResultElementsUserInviteRead extends Omit { + /** The returned invite rows, including legal null values. */ + data: ElementsUserInviteRead[]; +} + +/** Approval's user result; an explicit attribute shape is a caller assertion, not validation. */ +export interface UserInviteApprovalRead extends Omit< + UserRead, + 'first_name' | 'last_name' | 'attributes' +> { + /** First name, if supplied, including null. */ + first_name?: string | null; + /** Last name, if supplied, including null. */ + last_name?: string | null; + /** Returned attributes retain their actual null or caller-declared shape. */ + attributes?: Attributes | null; +} + +/** Scoped role/tenant filters and text search across invite email, key or name. */ +export interface IListUserInvites extends IPagination { + /** Role key or ID to filter by. */ + role?: string; + /** Tenant key or ID to filter by. */ + tenant?: string; + /** Text to search for in the invite email, key or name. */ + search?: string; +} + +/** Manages facts invites directly through the control plane; it does not send invitation mail. */ +export interface IUserInvitesApi { + /** + * Lists invites in the selected environment. + * @param params - Optional filters; page defaults to 1 and perPage to 100. + * @returns The complete page without replacing counts, nulls or additive fields. + * @throws {@link PermitApiError} If the API rejects the request. + * @throws {@link PermitContextError} If the selected context or API key scope is insufficient. + */ + list(params?: IListUserInvites): Promise; + + /** + * Stores an invite record. Setting its status does not approve a user or assign a role. + * @param invite - All editable fields; role and tenant references are internal UUIDs. + * @returns The stored invite, including its internal ID. + * @throws {@link PermitApiError} If the API rejects the body or denies write access. + * @throws {@link PermitContextError} If the selected context or API key scope is insufficient. + */ + create(invite: ElementsUserInviteCreate): Promise; + + /** + * Gets an invite by its internal ID. + * @param userInviteId - The internal invite ID; this route does not look up user keys. + * @returns The stored invite. + * @throws {@link PermitApiError} If the invite is absent or the API rejects the request. + * @throws {@link PermitContextError} If the selected context or API key scope is insufficient. + */ + get(userInviteId: string): Promise; + + /** + * Updates an invite using the complete editable body, even though the route uses PATCH. + * @param userInviteId - The internal invite ID. + * @param invite - All editable fields, including required nullable fields. + * @returns The updated invite; changing status alone does not execute approval. + * @throws {@link PermitApiError} If the API rejects the body or denies write access. + * @throws {@link PermitContextError} If the selected context or API key scope is insufficient. + */ + update(userInviteId: string, invite: ElementsUserInviteUpdate): Promise; + + /** + * Deletes an invite record; it does not revoke facts created by an earlier approval. + * @param userInviteId - The internal invite ID. + * @returns A promise that resolves to undefined after successful deletion. + * @throws {@link PermitApiError} If the invite is absent or write access is denied. + * @throws {@link PermitContextError} If the selected context or API key scope is insufficient. + */ + delete(userInviteId: string): Promise; + + /** + * Approves an invite, creating or reusing its user and granting membership and the invite role. + * Uses the control plane even when facts proxying is enabled; success is not PDP synchronization. + * @param userInviteId - The internal invite ID. + * @param approval - Matching email, final user key and required nullable attributes. + * @returns The actual user; existing-user profile attributes are not guaranteed to be replaced. + * HTTP 400 refusals omit remote text and body, which can contain another invite's email. + * @throws {@link PermitApiError} If approval is refused or the API denies write access. + * @throws {@link PermitContextError} If the selected context or API key scope is insufficient. + */ + approve( + userInviteId: string, + approval: ElementsUserInviteApprove, + ): Promise>; +} + +/** Direct API-key client for the six facts user-invite operations. */ +export class UserInvitesApi extends BasePermitApi implements IUserInvitesApi { + private readonly invites: AutogenUserInvitesApi; + + /** + * Creates the invite client. + * @param config - The SDK configuration and selected API context. + * @param logger - The SDK logger. + */ + constructor(config: IPermitConfig, logger: Logger) { + super(config, logger); + this.invites = new AutogenUserInvitesApi( + this.openapiClientConfig, + BASE_PATH, + this.config.axiosInstance, + ); + } + + /** {@inheritDoc IUserInvitesApi.list} */ + public async list(params: IListUserInvites = {}): Promise { + const { role, tenant, search, page = 1, perPage = 100 } = params; + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.invites.listUserInvites({ + ...this.config.apiContext.environmentContext, + ...(role !== undefined && { role }), + ...(tenant !== undefined && { tenant }), + ...(search !== undefined && { search }), + page, + perPage, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserInvitesApi.create} */ + public async create(invite: ElementsUserInviteCreate): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.invites.createUserInvite({ + ...this.config.apiContext.environmentContext, + // Captured declarations omit the pinned API's four required nullable fields. + elementsUserInviteCreate: invite as GeneratedCreate, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserInvitesApi.get} */ + public async get(userInviteId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.invites.getUserInvite({ + ...this.config.apiContext.environmentContext, + userInviteId, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserInvitesApi.update} */ + public async update( + userInviteId: string, + invite: ElementsUserInviteUpdate, + ): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + return ( + await this.invites.updateUserInvite({ + ...this.config.apiContext.environmentContext, + userInviteId, + // Captured declarations omit the pinned API's four required nullable fields. + elementsUserInviteUpdate: invite as GeneratedUpdate, + }) + ).data; + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserInvitesApi.delete} */ + public async delete(userInviteId: string): Promise { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + await this.invites.deleteUserInvite({ + ...this.config.apiContext.environmentContext, + userInviteId, + }); + } catch (err) { + this.handleApiError(err); + } + } + + /** {@inheritDoc IUserInvitesApi.approve} */ + public async approve( + userInviteId: string, + approval: ElementsUserInviteApprove, + ): Promise> { + await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + await this.ensureContext(ApiContextLevel.ENVIRONMENT); + try { + const response = await this.invites.approveUserInvite({ + ...this.config.apiContext.environmentContext, + userInviteId, + // The verified approval body requires attributes but permits null. + elementsUserInviteApprove: approval as GeneratedApprove, + }); + // Preserve real nullable values; an explicit Attributes argument is a caller assertion. + return response.data as UserInviteApprovalRead; + } catch (err) { + if (isAxiosError(err) && diagnosticMetadata(err).status === 400) { + const snapshot = diagnosticAxiosError(err, [this.config.token]); + // A wrong-email refusal contains stored data absent from this request's private values. + const refusal = new AxiosError( + 'User invite approval refused. Check the invite status, matching email and role target.', + snapshot.code, + snapshot.config, + ); + refusal.status = 400; + const failure = new PermitApiError(refusal.message, refusal); + this.logger.error({ err: failure, operation: 'REST' }, 'Permit REST API request failed'); + throw failure; + } + this.handleApiError(err); + } + } +} diff --git a/src/api/users.ts b/src/api/users.ts index 858c39ee..ba9bc6c1 100644 --- a/src/api/users.ts +++ b/src/api/users.ts @@ -1,44 +1,53 @@ -import { Logger } from 'pino'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; +import { type IPermitConfig } from '#src/config'; import { RoleAssignmentsApi as AutogenRoleAssignmentsApi, UsersApi as AutogenUsersApi, - PaginatedResultRoleAssignmentDetailedRead, - PaginatedResultRoleAssignmentRead, - PaginatedResultUserRead, - RoleAssignmentCreate, - RoleAssignmentDetailedRead, - RoleAssignmentRead, - RoleAssignmentRemove, - UserCreate, - UserRead, - UserUpdate, -} from '../openapi'; -import { BulkOperationsApi } from '../openapi/api/bulk-operations-api'; -import { BASE_PATH } from '../openapi/base'; -import { UserCreateBulkOperation } from '../openapi/types/user-create-bulk-operation'; -import { UserDeleteBulkOperation } from '../openapi/types/user-delete-bulk-operation'; -import { UserReplaceBulkOperation } from '../openapi/types/user-replace-bulk-operation'; - -import { BaseFactsPermitAPI, IPagination, IWaitForSync } from './base'; -import { ApiContextLevel, ApiKeyLevel } from './context'; + type PaginatedResultRoleAssignmentDetailedRead, + type PaginatedResultRoleAssignmentRead, + type PaginatedResultUserRead as GeneratedPaginatedResultUserRead, + type RoleAssignmentCreate, + type RoleAssignmentDetailedRead, + type RoleAssignmentRead, + type RoleAssignmentRemove, + type SearchOperator, + type UserCreate, + type UserRead as GeneratedUserRead, + type UserUpdate, +} from '#src/openapi/index'; +import { BulkOperationsApi } from '#src/openapi/api/bulk-operations-api'; +import { BASE_PATH } from '#src/openapi/base'; + +import { BaseFactsPermitAPI, type IPagination, type IWaitForSync } from '#src/api/base'; +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; export { - PaginatedResultUserRead, - RoleAssignmentCreate, - RoleAssignmentRead, - RoleAssignmentRemove, - UserCreate, - UserRead, - UserUpdate, -} from '../openapi'; + type RoleAssignmentCreate, + type RoleAssignmentRead, + type RoleAssignmentRemove, + type UserCreate, + type UserUpdate, +} from '#src/openapi/index'; + +/** A user response with an optional caller-declared attribute shape; no runtime validation. */ +export interface UserRead extends GeneratedUserRead { + /** Attribute values retain the caller's declared shape when present. */ + attributes?: Attributes; +} + +/** The full user page with the same attribute shape on each returned user. */ +export interface PaginatedResultUserRead< + Attributes extends object = object, +> extends GeneratedPaginatedResultUserRead { + data: UserRead[]; +} -export interface ICreateOrUpdateUserResult { +export interface ICreateOrUpdateUserResult { /** * the created or updated user */ - user: UserRead; + user: UserRead; /** * whether the user was newly created @@ -91,21 +100,34 @@ export interface IBaseGetUserRoles { type IGetUserRolesWithTotalCount = IBaseGetUserRoles & { includeTotalCount: true }; type IGetUserRolesWithDetails = IBaseGetUserRoles & { detailed: true }; -type IGetUserRoles = IBaseGetUserRoles | IGetUserRolesWithTotalCount | IGetUserRolesWithDetails; +export type IGetUserRoles = + | IBaseGetUserRoles + | IGetUserRolesWithTotalCount + | IGetUserRolesWithDetails; -type ReturnIGetUserRolesType = T extends IGetUserRolesWithTotalCount +export type ReturnIGetUserRolesType = T extends IGetUserRolesWithTotalCount ? // with total count T extends IGetUserRolesWithDetails ? PaginatedResultRoleAssignmentDetailedRead : PaginatedResultRoleAssignmentRead : // without total count - T extends IGetUserRolesWithDetails - ? RoleAssignmentDetailedRead[] - : RoleAssignmentRead[]; + T extends IGetUserRolesWithDetails + ? RoleAssignmentDetailedRead[] + : RoleAssignmentRead[]; export interface IUsersListParams extends IPagination { search?: string; + /** + * Matches search against user keys, emails and names using the selected operator. + * The API defaults to `contains` when this option is omitted. + */ + searchOperator?: SearchOperator; role?: string; + /** + * Includes resource instance roles in each user's associated tenant details. + * The API defaults to false; the list result remains the full paginated envelope. + */ + includeResourceInstanceRoles?: boolean; } export interface IUsersApi extends IWaitForSync { @@ -117,7 +139,9 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - list(params?: IUsersListParams): Promise; + list( + params?: IUsersListParams, + ): Promise>; /** * Retrieves a user by its key. @@ -127,7 +151,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - get(userKey: string): Promise; + get(userKey: string): Promise>; /** * Retrieves a user by its key. @@ -138,7 +162,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - getByKey(userKey: string): Promise; + getByKey(userKey: string): Promise>; /** * Retrieves a user by its ID. @@ -149,7 +173,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - getById(userId: string): Promise; + getById(userId: string): Promise>; /** * Creates a new user. @@ -159,7 +183,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - create(userData: UserCreate): Promise; + create(userData: UserCreate): Promise>; /** * Updates a user. @@ -170,7 +194,10 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - update(userKey: string, userData: UserUpdate): Promise; + update( + userKey: string, + userData: UserUpdate, + ): Promise>; /** * Synchronizes user data by creating or updating a user. @@ -180,7 +207,9 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - sync(userData: UserCreate): Promise; + sync( + userData: UserCreate, + ): Promise>; /** * Deletes a user. @@ -216,7 +245,7 @@ export interface IUsersApi extends IWaitForSync { * Retrieves the roles assigned to a user in a given tenant (if the tenant filter is provided) * or across all tenants (if the tenant filter in not provided). * - * @param roleFilters - The filters for retrieving role assignments. + * @param params - The filters for retrieving role assignments. * @returns A promise that resolves with an array of role assignments for the user. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. @@ -231,7 +260,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - bulkUserCreate(users: UserCreate[]): Promise; + bulkUserCreate(users: UserCreate[]): Promise; /** * Deletes users in bulk. @@ -241,7 +270,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - bulkUserDelete(userKeys: string[]): Promise; + bulkUserDelete(userKeys: string[]): Promise; /** * Replaces users in bulk. @@ -253,7 +282,7 @@ export interface IUsersApi extends IWaitForSync { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - bulkUserReplace(users: UserCreate[]): Promise; + bulkUserReplace(users: UserCreate[]): Promise; } /** @@ -296,7 +325,9 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async list(params?: IUsersListParams): Promise { + public async list( + params?: IUsersListParams, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -305,7 +336,7 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { ...params, ...this.config.apiContext.environmentContext, }) - ).data; + ).data as PaginatedResultUserRead; } catch (err) { this.handleApiError(err); } @@ -319,7 +350,9 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async get(userKey: string): Promise { + public async get( + userKey: string, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -328,7 +361,7 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { ...this.config.apiContext.environmentContext, userId: userKey, }) - ).data; + ).data as UserRead; } catch (err) { this.handleApiError(err); } @@ -343,8 +376,10 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async getByKey(userKey: string): Promise { - return await this.get(userKey); + public async getByKey( + userKey: string, + ): Promise> { + return await this.get(userKey); } /** @@ -356,8 +391,10 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async getById(userId: string): Promise { - return await this.get(userId); + public async getById( + userId: string, + ): Promise> { + return await this.get(userId); } /** @@ -368,7 +405,9 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async create(userData: UserCreate): Promise { + public async create( + userData: UserCreate, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -377,7 +416,7 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { ...this.config.apiContext.environmentContext, userCreate: userData, }) - ).data; + ).data as UserRead; } catch (err) { this.handleApiError(err); } @@ -392,7 +431,10 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async update(userKey: string, userData: UserUpdate): Promise { + public async update( + userKey: string, + userData: UserUpdate, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -402,7 +444,7 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { userId: userKey, userUpdate: userData, }) - ).data; + ).data as UserRead; } catch (err) { this.handleApiError(err); } @@ -416,7 +458,9 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async sync(userData: UserCreate): Promise { + public async sync( + userData: UserCreate, + ): Promise> { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -426,7 +470,7 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { userCreate: userData, }); return { - user: response.data, + user: response.data as UserRead, created: response.status === 201, }; } catch (err) { @@ -490,12 +534,10 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { - return ( - await this.roleAssignments.unassignRole({ - ...this.config.apiContext.environmentContext, - roleAssignmentRemove: unassignment, - }) - ).data; + await this.roleAssignments.unassignRole({ + ...this.config.apiContext.environmentContext, + roleAssignmentRemove: unassignment, + }); } catch (err) { this.handleApiError(err); } @@ -505,25 +547,23 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * Creates users in bulk. * * @param users The array of users to create. - * @returns A promise that resolves to the bulk creation result. + * @returns The response object. Its fields are unspecified by the current API schema. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async bulkUserCreate(users: UserCreate[]): Promise { - // Ensure access level and context + public async bulkUserCreate(users: UserCreate[]): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { return ( await this.bulkOperationsApi.bulkCreateUsers({ ...this.config.apiContext.environmentContext, - userCreateBulkOperations: { + userCreateBulkOperation: { operations: users, }, }) ).data; } catch (err) { - // Handle any errors that occur during the API call this.handleApiError(err); } } @@ -532,12 +572,11 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * Deletes users in bulk. * * @param userKeys The array of user keys to delete. - * @returns A promise that resolves to the bulk deletion result. + * @returns The response object. Its fields are unspecified by the current API schema. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async bulkUserDelete(userKeys: string[]): Promise { - // Ensure access level and context + public async bulkUserDelete(userKeys: string[]): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -550,7 +589,6 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { }) ).data; } catch (err) { - // Handle any errors that occur during the API call this.handleApiError(err); } } @@ -561,12 +599,11 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * If a user exists, it will be replaced. Otherwise, it will be created. * * @param users The array of users to replace. - * @returns A promise that resolves to the bulk replacement result. + * @returns The response object. Its fields are unspecified by the current API schema. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ - public async bulkUserReplace(users: UserCreate[]): Promise { - // Ensure access level and context + public async bulkUserReplace(users: UserCreate[]): Promise { await this.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); await this.ensureContext(ApiContextLevel.ENVIRONMENT); try { @@ -579,7 +616,6 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { }) ).data; } catch (err) { - // Handle any errors that occur during the API call this.handleApiError(err); } } @@ -588,7 +624,7 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { * Retrieves the roles assigned to a user in a given tenant (if the tenant filter is provided) * or across all tenants (if the tenant filter in not provided). * - * @param roleFilters - The filters for retrieving role assignments. + * @param params - The filters for retrieving role assignments. * @returns A promise that resolves with an array of role assignments for the user. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. @@ -615,8 +651,8 @@ export class UsersApi extends BaseFactsPermitAPI implements IUsersApi { return ( await this.roleAssignments.listRoleAssignments({ ...this.config.apiContext.environmentContext, - user, - tenant, + user: [user], + ...(tenant !== undefined && { tenant: [tenant] }), page, perPage, detailed, diff --git a/src/config.test.ts b/src/config.test.ts new file mode 100644 index 00000000..c23a8fd7 --- /dev/null +++ b/src/config.test.ts @@ -0,0 +1,422 @@ +import { inspect } from 'node:util'; + +import axios, { type AxiosError } from 'axios'; +import { afterEach, expect, test, vi } from 'vitest'; + +import { ApiContext } from '#src/api/context'; +import { ConfigFactory, type IPermitOptions } from '#src/config'; +import { Permit, type IPermitClient } from '#src/index'; +import { LoggerFactory } from '#src/logger'; +import { createMockPermit } from '#src/tests/helpers/mock-api'; + +afterEach(() => { + vi.restoreAllMocks(); + vi.unstubAllEnvs(); +}); + +const marker = 'private-option-value'; +const invalidOptions: Array<[string, unknown]> = [ + ['null options', null], + ['array options', []], + ['string options', marker], + ['numeric token', { token: 42 }], + ['null token', { token: null }], + ['empty token', { token: '' }], + ['whitespace token', { token: `${marker} ` }], + ['embedded token whitespace', { token: `${marker}\nkey` }], + ['control token', { token: `${marker}\u007f` }], + ['numeric API URL', { apiUrl: 42 }], + ['relative API URL', { apiUrl: `/${marker}` }], + ['credential URL with invalid scheme', { apiUrl: `ftp://user:${marker}@api.invalid` }], + ['null PDP URL', { pdp: null }], + ['malformed PDP URL', { pdp: marker }], + ['whitespace PDP URL', { pdp: ` http://${marker}.invalid` }], + ['negative timeout', { timeout: -1 }], + ['nonfinite timeout', { timeout: Infinity }], + ['NaN timeout', { timeout: NaN }], + ['oversized timeout', { timeout: 2_147_483_648 }], + ['string timeout', { timeout: marker }], + ['null timeout', { timeout: null }], + ['string error policy', { throwOnError: marker }], + ['null error policy', { throwOnError: null }], + ['string PDP proxy flag', { proxyFactsViaPdp: marker }], + ['null PDP proxy flag', { proxyFactsViaPdp: null }], + ['negative facts timeout', { factsSyncTimeout: -1 }], + ['nonfinite facts timeout', { factsSyncTimeout: Infinity }], + ['string facts timeout', { factsSyncTimeout: marker }], + ['invalid facts policy', { factsSyncTimeoutPolicy: marker }], + ['null logger', { log: null }], + ['array logger', { log: [] }], + ['invalid logger level', { log: { level: marker } }], + ['invalid logger label', { log: { label: { secret: marker } } }], + ['invalid logger JSON flag', { log: { json: marker } }], + ['null tenancy', { multiTenancy: null }], + ['array tenancy', { multiTenancy: [] }], + ['empty tenant', { multiTenancy: { defaultTenant: '' } }], + ['nonnumeric tenant flag', { multiTenancy: { useDefaultTenantIfEmpty: marker } }], + ['incomplete REST client', { axiosInstance: {} }], + ['null REST client', { axiosInstance: null }], + ['incomplete OPA client', { opaAxiosInstance: {} }], + ['invalid context', { apiContext: {} }], + ['null context', { apiContext: null }], + ['invalid retry callback', { retry: { retryCondition: {} } }], + ['invalid PDP retry callback', { pdpRetry: { retryCondition: marker } }], +]; + +test.each(invalidOptions)('rejects %s before creating a logger or transport', (_name, value) => { + const logger = vi.spyOn(LoggerFactory, 'createLogger'); + const transport = vi.spyOn(axios, 'create'); + const options = + value && typeof value === 'object' && !Array.isArray(value) + ? { token: 'test-token', ...value } + : value; + let failure: unknown; + try { + Reflect.construct(Permit, [options]); + } catch (error) { + failure = error; + } + expect(failure).toBeInstanceOf(TypeError); + expect(inspect(failure)).not.toContain(marker); + expect(JSON.stringify(failure)).not.toContain(marker); + expect(logger).not.toHaveBeenCalled(); + expect(transport).not.toHaveBeenCalled(); +}); + +const baseUrlOptions = ['apiUrl', 'pdp'] as const; +const invalidBaseUrls = [ + `http://user:${marker}@api.invalid?${marker}=1`, + `https://api.invalid/prefix#${marker}`, + 'http://api.invalid?', + 'http://api.invalid#', + 'http://api.invalid/prefix/?', + 'http://api.invalid/prefix/#', + 'http://api.invalid/prefix?%23=encoded', + 'http://api.invalid/prefix#%3Fencoded', +]; + +test.each(baseUrlOptions)('rejects query/fragment %s before logger and transport', (name) => { + const logger = vi.spyOn(LoggerFactory, 'createLogger'); + const transport = vi.spyOn(axios, 'create'); + for (const value of invalidBaseUrls) { + let failure: unknown; + try { + new Permit({ token: 'test-token', [name]: value }); + } catch (error) { + failure = error; + } + expect(failure).toBeInstanceOf(TypeError); + expect(failure).toHaveProperty('message', expect.stringContaining(`Invalid ${name}:`)); + expect(failure).toHaveProperty('message', expect.stringContaining('query or fragment')); + expect(inspect(failure)).not.toContain(marker); + expect(JSON.stringify(failure)).not.toContain(marker); + expect(failure).not.toHaveProperty('cause'); + } + expect(logger).not.toHaveBeenCalled(); + expect(transport).not.toHaveBeenCalled(); +}); + +test.each(baseUrlOptions)('checks effective %s defaults and explicit overrides', (name) => { + const variable = name === 'pdp' ? 'PERMIT_PDP_URL' : 'PERMIT_API_URL'; + vi.stubEnv('PERMIT_API_KEY', 'environment-key'); + const logger = vi.spyOn(LoggerFactory, 'createLogger'); + const transport = vi.spyOn(axios, 'create'); + for (const value of invalidBaseUrls) { + vi.stubEnv(variable, value); + expect(() => new Permit({ [name]: undefined })).toThrow(`Invalid ${name}:`); + } + expect(logger).not.toHaveBeenCalled(); + expect(transport).not.toHaveBeenCalled(); + const valid = 'https://api.invalid/prefix/%3Fsegment/%23segment'; + const permit = new Permit({ [name]: valid, log: { level: 'silent' } }); + expect(permit.config[name]).toBe(valid); +}); + +test.each(baseUrlOptions)('preserves supported %s origins and encoded prefixes', (name) => { + for (const value of [ + 'http://localhost:7766', + 'https://api.invalid:8443/prefix/', + 'http://[::1]:7766/prefix/%3Fsegment/%23segment', + 'https://api.invalid/prefix/%3fsegment/%23segment', + 'https://api.invalid/prefix/%253F/%2523', + ]) { + const config = ConfigFactory.build({ token: 'test-token', [name]: value }); + expect(config[name]).toBe(value); + } +}); + +test('requires a nonempty effective token and preserves opaque tokens and undefined fallback', () => { + vi.stubEnv('PERMIT_API_KEY', 'environment-key'); + expect(ConfigFactory.build({ token: undefined }).token).toBe('environment-key'); + expect(ConfigFactory.build({ token: 'opaque/key+=:value' }).token).toBe('opaque/key+=:value'); + vi.stubEnv('PERMIT_API_KEY', ''); + expect(() => ConfigFactory.build({})).toThrow('Invalid token'); + vi.stubEnv('PERMIT_API_KEY', `${marker}\t`); + expect(() => ConfigFactory.build({})).toThrow('Invalid token'); +}); + +test('checks invalid environment defaults before constructing transport', () => { + vi.stubEnv('PERMIT_API_KEY', 'environment-key'); + vi.stubEnv('PERMIT_PDP_URL', marker); + const transport = vi.spyOn(axios, 'create'); + expect(() => ConfigFactory.build({})).toThrow('Invalid pdp'); + expect(transport).not.toHaveBeenCalled(); +}); + +test('preserves zero/undefined timeout and nullable facts options', () => { + const base = { token: 'test-token' }; + expect(ConfigFactory.build({ ...base, timeout: 0 }).timeout).toBe(0); + expect(ConfigFactory.build({ ...base, timeout: undefined }).timeout).toBeUndefined(); + expect(ConfigFactory.build({ ...base, factsSyncTimeout: 0 }).factsSyncTimeout).toBe(0); + expect(ConfigFactory.build({ ...base, factsSyncTimeout: null }).factsSyncTimeout).toBeNull(); + expect( + ConfigFactory.build({ ...base, factsSyncTimeoutPolicy: 'ignore' }).factsSyncTimeoutPolicy, + ).toBe('ignore'); + expect( + ConfigFactory.build({ ...base, factsSyncTimeoutPolicy: 'fail' }).factsSyncTimeoutPolicy, + ).toBe('fail'); +}); + +test('snapshots and freezes owned settings while keeping clients and callbacks live', () => { + const caller = axios.create(); + const condition = Object.assign((_error: AxiosError) => true, { enabled: true }); + const options: IPermitOptions = { + token: 'original', + axiosInstance: caller, + opaAxiosInstance: caller, + log: { level: 'silent' }, + multiTenancy: { defaultTenant: 'original-tenant' }, + retry: { maxRetries: 1, retryMethods: ['GET'], retryCondition: condition }, + pdpRetry: { maxRetries: 2, retryMethods: ['POST'] }, + }; + const config = ConfigFactory.build(options); + options.token = 'changed'; + if (options.log) options.log.level = 'debug'; + if (options.multiTenancy) options.multiTenancy.defaultTenant = 'changed-tenant'; + if (options.retry && options.retry.retryMethods) + Reflect.set(options.retry.retryMethods, 0, 'POST'); + expect(config.token).toBe('original'); + expect(config.log.level).toBe('silent'); + expect(config.multiTenancy.defaultTenant).toBe('original-tenant'); + expect(config.retry && config.retry.retryMethods).toEqual(['GET']); + for (const settings of [config, config.log, config.multiTenancy, config.retry, config.pdpRetry]) { + expect(Object.isFrozen(settings)).toBe(true); + } + expect(config.retry && Object.isFrozen(config.retry.retryMethods)).toBe(true); + expect(config.pdpRetry && Object.isFrozen(config.pdpRetry.retryMethods)).toBe(true); + expect(config.axiosInstance).toBe(caller); + expect(config.opaAxiosInstance).toBe(caller); + expect(config.retry && config.retry.retryCondition).toBe(condition); + expect(Object.isFrozen(caller)).toBe(false); + expect(Object.isFrozen(caller.defaults)).toBe(false); + expect(Object.isFrozen(condition)).toBe(false); + caller.defaults.timeout = 17; + condition.enabled = false; + expect(config.axiosInstance.defaults.timeout).toBe(17); + expect(condition.enabled).toBe(false); +}); + +test('rejects malformed callable Axios facades', () => { + const incomplete = Object.assign(() => undefined, { request: () => undefined, defaults: {} }); + expect(() => Reflect.construct(Permit, [{ token: 'test', axiosInstance: incomplete }])).toThrow( + 'Invalid axiosInstance', + ); + const missingManager = axios.create(); + Reflect.set(missingManager.interceptors, 'response', null); + expect(() => + Reflect.construct(Permit, [{ token: 'test', opaAxiosInstance: missingManager }]), + ).toThrow('Invalid opaAxiosInstance'); +}); + +test('owns independent snapshots of a supplied context and preserves its permissions', () => { + const supplied = new ApiContext(); + supplied._saveApiKeyAccessibleScope('org', 'project'); + supplied.setEnvironmentLevelContext('org', 'project', 'first-environment'); + const first = ConfigFactory.build({ token: 'first', apiContext: supplied }); + const second = ConfigFactory.build({ token: 'second', apiContext: supplied }); + expect(first.apiContext).not.toBe(supplied); + expect(second.apiContext).not.toBe(first.apiContext); + expect(first.apiContext.environmentContext).toEqual({ + projId: 'project', + envId: 'first-environment', + }); + supplied.setEnvironmentLevelContext('org', 'project', 'caller-environment'); + first.apiContext.setEnvironmentLevelContext('org', 'project', 'sdk-environment'); + expect(second.apiContext.environment).toBe('first-environment'); + expect(supplied.environment).toBe('caller-environment'); + expect(first.apiContext.environment).toBe('sdk-environment'); + expect(() => first.apiContext.setProjectLevelContext('org', 'other-project')).toThrow(); +}); + +const contextBridgeKey = Symbol.for('permitio.ApiContext.snapshot'); +const validSnapshot = { + scope: { + level: 'PROJECT_LEVEL_API_KEY', + organization: 'org', + project: 'project', + environment: null, + }, + selection: { level: 3, organization: 'org', project: 'project', environment: 'environment' }, +}; + +test('the readonly context bridge exposes only detached permission and selection copies', () => { + const context = new ApiContext(); + context._saveApiKeyAccessibleScope('org', 'project'); + context.setEnvironmentLevelContext('org', 'project', 'environment'); + const descriptor = Object.getOwnPropertyDescriptor(context, contextBridgeKey); + expect(descriptor).toMatchObject({ writable: false, configurable: false, enumerable: false }); + const bridge: unknown = Reflect.get(context, contextBridgeKey); + if (typeof bridge !== 'function') throw new Error('Context fixture has no snapshot bridge.'); + const snapshot: unknown = Reflect.apply(bridge, context, []); + expect(snapshot).toStrictEqual(validSnapshot); + if (snapshot === null || typeof snapshot !== 'object') + throw new Error('Invalid snapshot fixture.'); + const scope: unknown = Reflect.get(snapshot, 'scope'); + const selection: unknown = Reflect.get(snapshot, 'selection'); + if ( + scope === null || + typeof scope !== 'object' || + selection === null || + typeof selection !== 'object' + ) { + throw new Error('Invalid snapshot fields in fixture.'); + } + Reflect.set(scope, 'project', 'forbidden-project'); + Reflect.set(selection, 'environment', 'changed-environment'); + expect(context.environment).toBe('environment'); + expect(() => context.setProjectLevelContext('org', 'forbidden-project')).toThrow(); + expect(Reflect.set(context, contextBridgeKey, () => validSnapshot)).toBe(false); +}); + +test('borrowed snapshot bridges reject receivers absent from the originating class state', () => { + const real = new ApiContext(); + const fake: object = Object.create(ApiContext.prototype); + Object.defineProperty(fake, contextBridgeKey, { value: Reflect.get(real, contextBridgeKey) }); + expect(() => Reflect.construct(Permit, [{ token: 'test', apiContext: fake }])).toThrow(TypeError); +}); + +test('a fake partial context cannot become an accepted option through a snapshot-shaped function', () => { + const fake = { [contextBridgeKey]: () => validSnapshot }; + expect(() => Reflect.construct(Permit, [{ token: 'test', apiContext: fake }])).toThrow(TypeError); +}); + +const malformedSnapshots: Array<[string, unknown]> = [ + ['null', null], + ['array', []], + ['missing fields', {}], + [ + 'missing scope project', + { + ...validSnapshot, + scope: { level: 'ORGANIZATION_LEVEL_API_KEY', organization: 'org', environment: null }, + }, + ], + [ + 'missing scope organization', + { ...validSnapshot, scope: { ...validSnapshot.scope, organization: undefined } }, + ], + ['blank scope project', { ...validSnapshot, scope: { ...validSnapshot.scope, project: '' } }], + [ + 'environment without scope project', + { + ...validSnapshot, + scope: { ...validSnapshot.scope, project: null, environment: 'environment' }, + }, + ], + [ + 'incorrect permission level', + { ...validSnapshot, scope: { ...validSnapshot.scope, level: 'ORGANIZATION_LEVEL_API_KEY' } }, + ], + ['missing selection', { scope: validSnapshot.scope }], + [ + 'invalid selection level', + { ...validSnapshot, selection: { ...validSnapshot.selection, level: 99 } }, + ], + [ + 'environment without selected project', + { ...validSnapshot, selection: { ...validSnapshot.selection, project: null } }, + ], + [ + 'selected project outside permission scope', + { ...validSnapshot, selection: { ...validSnapshot.selection, project: 'forbidden-project' } }, + ], + ['selection without permissions', { ...validSnapshot, scope: null }], +]; + +test.each(malformedSnapshots)( + 'rejects %s snapshot before logger or transport creation', + (_name, snapshot) => { + const fake: object = Object.create(ApiContext.prototype); + Object.defineProperty(fake, contextBridgeKey, { value: () => snapshot }); + const logger = vi.spyOn(LoggerFactory, 'createLogger'); + const transport = vi.spyOn(axios, 'create'); + expect(() => Reflect.construct(Permit, [{ token: 'test', apiContext: fake }])).toThrow( + TypeError, + ); + expect(logger).not.toHaveBeenCalled(); + expect(transport).not.toHaveBeenCalled(); + }, +); + +test('snapshot bridge errors never expose caller error text or retain a cause', () => { + const fake: object = Object.create(ApiContext.prototype); + Object.defineProperty(fake, contextBridgeKey, { + get() { + throw new Error(marker); + }, + }); + let failure: unknown; + try { + Reflect.construct(Permit, [{ token: 'test', apiContext: fake }]); + } catch (error) { + failure = error; + } + expect(failure).toBeInstanceOf(TypeError); + expect(inspect(failure)).not.toContain(marker); + expect(failure).not.toHaveProperty('cause'); +}); + +test('prevents mutation from changing REST, PDP or OPA credentials', async () => { + const { permit, rest, pdp, opa } = createMockPermit({ token: 'original' }); + expect(Reflect.set(permit.config, 'token', 'changed')).toBe(false); + expect(Reflect.set(permit, 'config', {})).toBe(false); + rest.resolveWith({ key: 'alice' }); + pdp.resolveWith({ allow: true }); + opa.resolveWith({ result: { allow: true } }); + await permit.api.users.get('alice'); + expect(await permit.check('alice', 'read', 'doc')).toBe(true); + expect(await permit.check('alice', 'read', 'doc', {}, { useOpa: true })).toBe(true); + for (const request of [rest.last, pdp.last, opa.last]) { + expect(request?.headers['Authorization']).toBe('Bearer original'); + } +}); + +// Strict compilation checks these unreachable calls without running invalid constructors. +function constructorTypeChecks(): void { + const caller = axios.create(); + new Permit({ token: 'test', axiosInstance: caller, retry: { retryCondition: () => true } }); + // @ts-expect-error An incomplete object is not an AxiosInstance. + new Permit({ token: 'test', axiosInstance: { defaults: {} } }); + // @ts-expect-error OPA also requires an intact AxiosInstance. + new Permit({ token: 'test', opaAxiosInstance: { request: () => undefined } }); + // @ts-expect-error A retry callback must be callable. + new Permit({ token: 'test', retry: { retryCondition: {} } }); + // @ts-expect-error Retry callbacks return boolean decisions. + new Permit({ token: 'test', retry: { retryCondition: () => 'yes' } }); + // @ts-expect-error API context must preserve its complete class type. + new Permit({ token: 'test', apiContext: {} }); + const permit = new Permit({ token: 'test' }); + const facade: IPermitClient = permit; + // @ts-expect-error The exported client interface also preserves the config binding. + facade.config = permit.config; + // @ts-expect-error Owned top-level settings are immutable. + permit.config.token = 'changed'; + // @ts-expect-error Owned nested settings are immutable. + permit.config.log.level = 'debug'; + // @ts-expect-error Owned retry options are immutable. + if (permit.config.retry) permit.config.retry.maxRetries = 4; + // @ts-expect-error Owned retry method arrays are immutable. + if (permit.config.retry) permit.config.retry.retryMethods?.push('POST'); +} + +void constructorTypeChecks; diff --git a/src/config.ts b/src/config.ts index fa6b06d7..554c6a8d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,9 +1,6 @@ -import globalAxios, { AxiosInstance } from 'axios'; -import _ from 'lodash'; - -import { ApiContext } from './api/context'; -import { IRetryConfig } from './utils/retry'; -import { RecursivePartial } from './utils/types'; +import globalAxios, { type AxiosInstance } from 'axios'; +import { ApiContext, snapshotApiContext } from '#src/api/context'; +import { type IRetryConfig, resolveRetryConfig } from '#src/utils/retry'; export type FactsSyncTimeoutPolicy = 'ignore' | 'fail'; @@ -41,81 +38,90 @@ export interface IPermitConfig { /** * The token (API Key) used for authorization against the PDP and the Permit REST API. */ - token: string; + readonly token: string; /** - * Configures the Policy Decision Point (PDP) address. + * Configures the absolute HTTP(S) PDP base URL, without query or fragment components. */ - pdp: string; + readonly pdp: string; /** - * Configures the URL of the Permit REST API. + * Configures the absolute HTTP(S) REST base URL, without query or fragment components. */ - apiUrl: string; + readonly apiUrl: string; /** * the logger configuration used by the SDK, @see {@link ILoggerConfig} */ - log: ILoggerConfig; + readonly log: Readonly; /** * @see: {@link IMultiTenancyConfig} */ - multiTenancy: IMultiTenancyConfig; + readonly multiTenancy: Readonly; /** - * specifies the number of milliseconds before a permit.check() request times out. - * If the request takes longer than `timeout`, the request will be aborted. + * PDP/OPA request timeout in milliseconds; 0 disables it. REST and Elements use + * the supplied Axios instance timeout instead. When retries are enabled, + * failed attempts and backoff consume one shared timeout budget. Each retry receives + * the remaining Axios timeout. Caller adapters must honor it; arbitrary caller hooks + * are not interrupted. When omitted, supplied transport timeout defaults are preserved. */ - timeout: number | undefined; + readonly timeout: number | undefined; /** * whether or not permit.check() will throw on error, or return a default denied decision. */ - throwOnError: boolean | undefined; + readonly throwOnError: boolean | undefined; /** * represents the current API key authorization level. * @see {@link ApiContext} */ - apiContext: ApiContext; + readonly apiContext: ApiContext; /** * an optional custom axios instance, to control the behavior of the HTTP client * used to connect to the Permit REST API. * - * This instance applies to the REST API only. PDP and OPA calls use dedicated - * internal axios instances, so their retry policy can differ and non-idempotent - * POST writes on the shared REST client are never retried. + * This instance applies to REST and Elements only. The SDK delegates each attempt + * through its current adapters, transforms and interceptors without changing defaults + * or installing handlers. SDK routes and Bearer tokens override transport defaults. + * SDK requests explicitly set allowAbsoluteUrls:true so caller base URLs cannot prefix + * an SDK destination. Direct caller requests retain the caller's own setting. + * SDK retry/logging policies stay private; caller-owned retries and redirects remain + * the caller's responsibility. PDP uses an internal transport; OPA has its own option. * * @see https://axios-http.com/docs/instance * @see https://axios-http.com/docs/req_config */ - axiosInstance: AxiosInstance; + readonly axiosInstance: AxiosInstance; /** * Create facts via the PDP API instead of using the default Permit REST API. */ - proxyFactsViaPdp: boolean; + readonly proxyFactsViaPdp: boolean; /** * The amount of time in seconds to wait for facts to be available * in the PDP cache before returning the response. */ - factsSyncTimeout: number | null; + readonly factsSyncTimeout: number | null; /** * Controls what happens when the facts synchronization timeout is reached during proxy requests to the PDP. * - 'ignore': Respond immediately when data update did not apply within the timeout period * - 'fail': Respond with 424 status code when data update did not apply within the timeout period */ - factsSyncTimeoutPolicy: FactsSyncTimeoutPolicy | null; + readonly factsSyncTimeoutPolicy: FactsSyncTimeoutPolicy | null; /** * an optional custom axios instance for OPA, to control the behavior of the HTTP * client used to connect to OPA. This applies to OPA calls only and is separate * from `axiosInstance` (REST API) and the dedicated internal PDP instance. + * Its defaults and interceptors remain unchanged. SDK routing, headers and retry policy + * are applied privately; intentional caller hooks still run for each attempt. * * @see https://axios-http.com/docs/instance * @see https://axios-http.com/docs/req_config */ - opaAxiosInstance?: AxiosInstance; + readonly opaAxiosInstance?: AxiosInstance; /** * Configuration for automatic retry of failed requests. @@ -125,7 +131,7 @@ export interface IPermitConfig { * * @see {@link IRetryConfig} */ - retry?: IRetryConfig | false; + readonly retry?: Readonly | false; /** * Optional separate retry configuration for PDP (enforcement) calls. @@ -134,7 +140,35 @@ export interface IPermitConfig { * * @see {@link IRetryConfig} */ - pdpRetry?: IRetryConfig | false; + readonly pdpRetry?: Readonly | false; +} + +/** Constructor options; supplied clients and callbacks retain their complete public types. */ +export interface IPermitOptions { + token?: string | undefined; + pdp?: string | undefined; + apiUrl?: string | undefined; + log?: Partial | undefined; + multiTenancy?: Partial | undefined; + timeout?: number | undefined; + throwOnError?: boolean | undefined; + /** Initial permissions and selection are copied; edit permit.config.apiContext afterward. */ + apiContext?: ApiContext | undefined; + axiosInstance?: AxiosInstance | undefined; + proxyFactsViaPdp?: boolean | undefined; + factsSyncTimeout?: number | null | undefined; + factsSyncTimeoutPolicy?: FactsSyncTimeoutPolicy | null | undefined; + opaAxiosInstance?: AxiosInstance | undefined; + retry?: IRetryConfig | false | undefined; + pdpRetry?: IRetryConfig | false | undefined; +} + +/** + * Reads PERMIT_LOG_JSON, ignoring letter case and surrounding whitespace. Only `false` selects + * pretty output: `true`, an unset variable and unrecognized values all keep the JSON default. + */ +function logJsonFromEnv(): boolean { + return process.env['PERMIT_LOG_JSON']?.trim().toLowerCase() !== 'false'; } /** @@ -146,28 +180,9 @@ export class ConfigFactory { */ static defaults(): IPermitConfig { return { - token: _.get(process.env, 'PERMIT_API_KEY', ''), - pdp: _.get(process.env, 'PERMIT_PDP_URL', 'http://localhost:7766'), - apiUrl: _.get(process.env, 'PERMIT_API_URL', 'https://api.permit.io'), - log: { - // log level, default is warn (warnings and errors) - level: _.get(process.env, 'PERMIT_LOG_LEVEL', 'warn'), - // Label added to logs - label: _.get(process.env, 'PERMIT_LOG_LABEL', 'Permit.io'), - // When logging - dump full data to console as JSON - json: JSON.parse(_.get(process.env, 'PERMIT_LOG_JSON', 'false')), - }, - multiTenancy: { - defaultTenant: 'default', - useDefaultTenantIfEmpty: true, - }, - timeout: undefined, - throwOnError: true, + ...defaultSettings(), apiContext: new ApiContext(), axiosInstance: globalAxios.create(), - proxyFactsViaPdp: false, - factsSyncTimeout: null, - factsSyncTimeoutPolicy: null, }; } @@ -175,11 +190,202 @@ export class ConfigFactory { * Builds the Permit SDK configuration from the values provided by the SDK user * and from the default SDK configuration when no specific values are set. * - * @param options - a partial configuration - * @returns the SDK configuration (for unset values returns the default config) + * @param options - Constructor options, using environment/default values when omitted. + * @returns Frozen SDK-owned settings with a mutable SDK-owned API context. + * @throws TypeError When an effective option is invalid; errors never echo caller values. */ - static build(options: RecursivePartial): IPermitConfig { - const config = _.merge(_.assign({}, ConfigFactory.defaults()), options); - return config; + static build(options: IPermitOptions): IPermitConfig { + objectOption(options, 'options'); + if (options.log !== undefined) objectOption(options.log, 'log'); + if (options.multiTenancy !== undefined) objectOption(options.multiTenancy, 'multiTenancy'); + const defaults = defaultSettings(); + const settings = { + token: options.token ?? defaults.token, + pdp: options.pdp ?? defaults.pdp, + apiUrl: options.apiUrl ?? defaults.apiUrl, + log: { ...defaults.log, ...options.log }, + multiTenancy: { ...defaults.multiTenancy, ...options.multiTenancy }, + timeout: options.timeout, + throwOnError: options.throwOnError ?? defaults.throwOnError, + proxyFactsViaPdp: options.proxyFactsViaPdp ?? defaults.proxyFactsViaPdp, + factsSyncTimeout: options.factsSyncTimeout ?? defaults.factsSyncTimeout, + factsSyncTimeoutPolicy: options.factsSyncTimeoutPolicy ?? defaults.factsSyncTimeoutPolicy, + }; + // Check the supplied values as well as the effective defaults, so null cannot hide behind ??. + for (const key of ['token', 'pdp', 'apiUrl'] as const) { + if (options[key] !== undefined) stringOption(options[key], key, true); + } + stringOption(settings.token, 'token', true); + if (/[\s\p{Cc}]/u.test(settings.token)) { + throw new TypeError( + 'Invalid token: API keys must not contain whitespace or control characters.', + ); + } + urlOption(settings.pdp, 'pdp'); + urlOption(settings.apiUrl, 'apiUrl'); + stringOption(settings.log.level, 'log.level', true); + if ( + !['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'].includes(settings.log.level) + ) { + throw new TypeError( + 'Invalid log.level: use fatal, error, warn, info, debug, trace or silent.', + ); + } + stringOption(settings.log.label, 'log.label', false); + booleanOption(settings.log.json, 'log.json'); + stringOption(settings.multiTenancy.defaultTenant, 'multiTenancy.defaultTenant', true); + booleanOption( + settings.multiTenancy.useDefaultTenantIfEmpty, + 'multiTenancy.useDefaultTenantIfEmpty', + ); + for (const key of ['throwOnError', 'proxyFactsViaPdp'] as const) { + if (options[key] !== undefined) booleanOption(options[key], key); + booleanOption(settings[key], key); + } + if (settings.timeout !== undefined) { + nonnegativeOption(settings.timeout, 'timeout', 2_147_483_647); + } + if (settings.factsSyncTimeout !== null) + nonnegativeOption(settings.factsSyncTimeout, 'factsSyncTimeout'); + if ( + settings.factsSyncTimeoutPolicy !== null && + !['ignore', 'fail'].includes(settings.factsSyncTimeoutPolicy) + ) { + throw new TypeError('Invalid factsSyncTimeoutPolicy: use ignore, fail or null.'); + } + if (options.axiosInstance !== undefined) axiosOption(options.axiosInstance, 'axiosInstance'); + if (options.opaAxiosInstance !== undefined) + axiosOption(options.opaAxiosInstance, 'opaAxiosInstance'); + const retry = snapshotRetry(options.retry); + const pdpRetry = snapshotRetry(options.pdpRetry); + const apiContext = + options.apiContext === undefined ? new ApiContext() : snapshotApiContext(options.apiContext); + return Object.freeze({ + ...settings, + log: Object.freeze(settings.log), + multiTenancy: Object.freeze(settings.multiTenancy), + apiContext, + axiosInstance: options.axiosInstance ?? globalAxios.create(), + ...(options.opaAxiosInstance !== undefined && { opaAxiosInstance: options.opaAxiosInstance }), + ...(retry !== undefined && { retry }), + ...(pdpRetry !== undefined && { pdpRetry }), + }); } } + +function defaultSettings() { + return { + token: process.env['PERMIT_API_KEY'] ?? '', + pdp: process.env['PERMIT_PDP_URL'] ?? 'http://localhost:7766', + apiUrl: process.env['PERMIT_API_URL'] ?? 'https://api.permit.io', + log: { + level: process.env['PERMIT_LOG_LEVEL'] ?? 'warn', + label: process.env['PERMIT_LOG_LABEL'] ?? 'Permit.io', + json: logJsonFromEnv(), + }, + multiTenancy: { defaultTenant: 'default', useDefaultTenantIfEmpty: true }, + timeout: undefined, + throwOnError: true, + proxyFactsViaPdp: false, + factsSyncTimeout: null, + factsSyncTimeoutPolicy: null, + }; +} + +function objectOption(value: unknown, name: string): void { + if (value === null || typeof value !== 'object' || Array.isArray(value)) { + throw new TypeError(`Invalid ${name}: expected an options object.`); + } +} + +function stringOption(value: unknown, name: string, nonempty: boolean): void { + if (typeof value !== 'string' || (nonempty && value.trim().length === 0)) { + throw new TypeError(`Invalid ${name}: expected ${nonempty ? 'a nonempty' : 'a'} string.`); + } +} + +function booleanOption(value: unknown, name: string): void { + if (typeof value !== 'boolean') throw new TypeError(`Invalid ${name}: expected a boolean.`); +} + +function nonnegativeOption(value: unknown, name: string, maximum = Number.MAX_VALUE): void { + if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > maximum) { + throw new TypeError( + `Invalid ${name}: expected a finite nonnegative number no greater than ${maximum}.`, + ); + } +} + +function urlOption(value: string, name: string): void { + try { + const url = new URL(value); + if ( + (url.protocol === 'http:' || url.protocol === 'https:') && + !/[\s\p{Cc}]/u.test(value) && + !value.includes('?') && + !value.includes('#') + ) { + return; + } + } catch { + // Report the option name without retaining an exception that may contain credentials. + } + throw new TypeError( + `Invalid ${name}: expected an absolute http(s) URL without query or fragment components.`, + ); +} + +function axiosOption(value: unknown, name: string): void { + if (typeof value === 'function') { + const methods = [ + 'request', + 'getUri', + 'get', + 'delete', + 'head', + 'options', + 'post', + 'put', + 'patch', + 'postForm', + 'putForm', + 'patchForm', + ]; + const defaults: unknown = Reflect.get(value, 'defaults'); + const interceptors: unknown = Reflect.get(value, 'interceptors'); + if ( + methods.every((method) => typeof Reflect.get(value, method) === 'function') && + defaults !== null && + typeof defaults === 'object' && + interceptors !== null && + typeof interceptors === 'object' && + ['request', 'response'].every((kind) => { + const manager: unknown = Reflect.get(interceptors, kind); + return ( + manager !== null && + typeof manager === 'object' && + ['use', 'eject', 'clear'].every( + (method) => typeof Reflect.get(manager, method) === 'function', + ) + ); + }) + ) + return; + } + throw new TypeError( + `Invalid ${name}: expected a complete Axios instance created with axios.create().`, + ); +} + +function snapshotRetry( + value: IRetryConfig | false | undefined, +): Readonly | false | undefined { + resolveRetryConfig(value); + if (value === false || value === undefined) return value; + return Object.freeze({ + ...value, + ...(value.retryMethods !== undefined && { + retryMethods: Object.freeze([...value.retryMethods]), + }), + }); +} diff --git a/src/diagnostics.test.ts b/src/diagnostics.test.ts new file mode 100644 index 00000000..50228344 --- /dev/null +++ b/src/diagnostics.test.ts @@ -0,0 +1,944 @@ +import { createServer } from 'node:http'; +import { inspect } from 'node:util'; +import { Writable } from 'node:stream'; + +import axios, { AxiosError, AxiosHeaders } from 'axios'; +import pino from 'pino'; +import pretty from 'pino-pretty'; + +import { + ApiContext, + Permit, + PermitApiError, + PermitConnectionError, + PermitContextError, + PermitError, + PermitPDPStatusError, +} from '#src/index'; +import { PermitContextChangeError } from '#src/api/context'; +import { LoggerFactory } from '#src/logger'; +import { rejectionOf } from '#src/tests/helpers/rejection'; +import { createOwnedTransport } from '#src/utils/http-transport'; +import { resolveRetryConfig } from '#src/utils/retry'; + +const TOKEN = 'permit_key_diagnostics_canary'; +const PRIVATE = 'private_attribute_diagnostics_canary'; +const COOKIE = 'cookie_diagnostics_canary'; +const URL_SECRET = 'url_password_diagnostics_canary'; +const CUSTOM = 'custom_header_diagnostics_canary'; +const NUMBER = 92186753090077; +const CODE = 'PRIVATE_ATTRIBUTE_CANARY'; +const CANARIES = [TOKEN, PRIVATE, COOKIE, URL_SECRET, CUSTOM, String(NUMBER), CODE]; +const user = { key: 'user-1', email: PRIVATE, attributes: { note: PRIVATE } }; + +function initializedContext(): ApiContext { + const context = new ApiContext(); + context._saveApiKeyAccessibleScope('org', 'proj', 'env'); + context.setEnvironmentLevelContext('org', 'proj', 'env'); + return context; +} + +async function startApi(body: unknown, scopeFailure = false, status = 503): Promise { + const server = createServer((request, response) => { + request.resume(); + if (request.url?.includes('/api-key/scope') && !scopeFailure) { + response.writeHead(200, { 'Content-Type': 'application/json' }); + response.end( + JSON.stringify({ organization_id: 'org', project_id: 'proj', environment_id: 'env' }), + ); + } else if (body === 'reset') { + request.socket.destroy(); + } else { + response.writeHead(status, { 'Content-Type': 'application/json', 'Set-Cookie': COOKIE }); + response.end(typeof body === 'string' ? body : JSON.stringify(body)); + } + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + }), + ); + const address = server.address(); + assert(address !== null && typeof address !== 'string'); + return `http://127.0.0.1:${address.port}`; +} + +function fixture(options: ConstructorParameters[0], json = true) { + const lines: string[] = []; + const destination = new Writable({ + write(chunk, _encoding, callback) { + lines.push(String(chunk)); + callback(); + }, + }); + const logger = pino( + { level: 'debug' }, + json ? destination : pretty({ sync: true, colorize: false, destination }), + ); + vi.spyOn(LoggerFactory, 'createLogger').mockReturnValue(logger); + onTestFinished(() => { + vi.restoreAllMocks(); + }); + const permit = new Permit({ token: TOKEN, retry: false, ...options }); + return { permit, lines, logger }; +} + +function representations(error: Error): string[] { + const lines: string[] = []; + const logger = pino({ level: 'error' }, { write: (line: string) => lines.push(line) }); + logger.error({ err: error }, 'Application error'); + return [ + String(error), + inspect(error, { depth: Infinity, showHidden: true }), + JSON.stringify(error), + ...lines, + ]; +} + +function assertSafe(values: string[]): void { + for (const value of values) { + for (const canary of CANARIES) expect(value).not.toContain(canary); + } +} + +describe('PER-16565: safe diagnostics at public boundaries', () => { + for (const [body, message] of [ + [null, '503'], + ['', '503'], + ['upstream unavailable', 'upstream unavailable'], + [{ detail: 'Service unavailable' }, 'Service unavailable'], + [{ detail: [{ msg: 'Invalid field', loc: ['body', 'key'], input: PRIVATE }] }, 'Invalid field'], + ] as const) { + it(`normalizes REST body ${JSON.stringify(body)}`, async () => { + const { permit } = fixture({ apiUrl: await startApi(body) }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + expect(error.name).toBe('PermitApiError'); + expect(error.message).toContain(message); + expect(error).toMatchObject({ status: 503 }); + assertSafe(representations(error)); + }); + } + + it('retains a safe network cause and transport code', async () => { + const { permit } = fixture({ apiUrl: await startApi('reset') }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + expect(error.message).toContain('socket hang up'); + expect(error).toMatchObject({ code: 'ECONNRESET', cause: { code: 'ECONNRESET' } }); + assertSafe(representations(error)); + }); + + for (const code of ['OPAQUE_SECRET_CREDENTIAL', 'ECONNRESET']) { + it(`sanitizes non-Axios adapter metadata ${code} without changing the caller error`, async () => { + const token = 'OPAQUE_SECRET_CREDENTIAL'; + const raw = Object.assign(new Error('caller adapter failed'), { code, status: 502 }); + const apiContext = initializedContext(); + const { permit, lines } = fixture({ + token, + apiContext, + axiosInstance: axios.create({ + adapter: async () => { + throw raw; + }, + }), + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + expect(error.message).toContain('caller adapter failed'); + expect(error).toMatchObject({ status: 502 }); + expect((error as PermitApiError).code).toBe(code === token ? undefined : code); + for (const value of [...lines, ...representations(error)]) expect(value).not.toContain(token); + expect(raw.code).toBe(code); + expect(raw.status).toBe(502); + }); + } + + for (const source of [ + 'adapter', + 'bare Axios error', + 'request hook', + 'response hook', + 'retry predicate', + ]) { + it(`redacts original request values when a caller ${source} throws an ordinary Error`, async () => { + const raw = + source === 'bare Axios error' + ? new AxiosError(`Caller failed for ${PRIVATE} ${NUMBER}`, 'ECONNRESET') + : new Error(`Caller failed for ${PRIVATE} ${NUMBER}`); + const originalKeys = Object.keys(raw); + let transient: AxiosError | undefined; + let predicateCalls = 0; + const caller = axios.create({ + adapter: async (config) => { + if (source === 'adapter' || source === 'bare Axios error') throw raw; + const response = { + status: 503, + statusText: 'Unavailable', + headers: {}, + config, + data: {}, + }; + if (source === 'retry predicate') { + transient = new AxiosError( + 'upstream failed', + 'ERR_BAD_RESPONSE', + config, + undefined, + response, + ); + throw transient; + } + return { ...response, status: 200 }; + }, + }); + if (source === 'request hook') + caller.interceptors.request.use(() => { + throw raw; + }); + if (source === 'response hook') + caller.interceptors.response.use(() => { + throw raw; + }); + const apiContext = initializedContext(); + const { permit, lines } = fixture({ + apiContext, + axiosInstance: caller, + retry: + source === 'retry predicate' + ? { + maxRetries: 1, + retryCondition: (error) => { + predicateCalls += 1; + expect(error).toBe(transient); + throw raw; + }, + } + : false, + }); + const error = await rejectionOf( + permit.api.users.sync({ + key: 'user-1', + attributes: { note: PRIVATE, number: NUMBER }, + }), + ); + expect(error).toBeInstanceOf(PermitApiError); + assertSafe([...lines, ...representations(error)]); + expect(raw.message).toBe(`Caller failed for ${PRIVATE} ${NUMBER}`); + expect(Object.keys(raw)).toEqual(originalKeys); + expect(predicateCalls).toBe(source === 'retry predicate' ? 1 : 0); + if (raw instanceof AxiosError) expect(raw.config).toBeUndefined(); + const direct = new PermitContextError(`Other operation ${PRIVATE} ${NUMBER}`, { cause: raw }); + assertSafe(representations(direct)); + }); + } + + for (const body of [ + { + message: `Rejected ${PRIVATE}`, + detail: [ + ...Array.from({ length: 8 }, () => ({ msg: 'Invalid field' })), + { msg: 'Invalid field', input: PRIVATE }, + ], + }, + { + message: `Rejected ${PRIVATE}`, + errors: [ + { + errors: [ + { + errors: [ + { + attributes: { note: PRIVATE }, + }, + ], + }, + ], + }, + ], + }, + ]) { + it(`fails closed when response privacy traversal cannot inspect ${'detail' in body ? 'an array tail' : 'deep objects'}`, () => { + const raw = new AxiosError('request failed', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders(), + }); + raw.response = { + status: 503, + statusText: 'Unavailable', + headers: {}, + config: raw.config!, + data: body, + }; + const error = new PermitApiError('Request failed', raw); + expect(error.status).toBe(503); + expect(error.originalError.message).toContain('503'); + assertSafe(representations(error)); + }); + } + + it('redacts an opaque credential on a URL path before bounding public errors', () => { + const credential = `opaque-${'abcde'.repeat(300)}-end`; + const raw = new AxiosError('Request failed', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders({ Authorization: `Bearer ${credential}` }), + url: `https://example.test/${credential}`, + }); + const error = new PermitApiError('Request failed', raw); + for (const value of representations(error)) + expect(value).not.toContain(credential.slice(0, 900)); + expect((error.originalError.config?.url ?? '').length).toBeLessThan(1100); + expect(raw.config?.url).toContain(credential); + }); + + it('redacts long URL-path credentials before bounding real SDK request logs', async () => { + const credential = `opaque-${'abcde'.repeat(300)}-end`; + const { permit, lines } = fixture({ + token: credential, + apiUrl: `${await startApi({ detail: 'Service unavailable' })}/${credential}`, + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + for (const value of [...lines, ...representations(error)]) + expect(value).not.toContain(credential.slice(0, 900)); + }); + + it('uses recorded caller-header privacy for ordinary scope-hook failures', async () => { + const raw = new Error(`Scope hook failed for ${CUSTOM} ${TOKEN}`); + const caller = axios.create({ headers: { 'X-Custom': CUSTOM } }); + caller.interceptors.request.use(() => { + throw raw; + }); + const { permit, lines } = fixture({ axiosInstance: caller }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitContextError); + expect(error.message).toContain('Scope hook failed'); + assertSafe([...lines, ...representations(error)]); + expect(raw.message).toBe(`Scope hook failed for ${CUSTOM} ${TOKEN}`); + }); + + it('scrubs OPA ordinary caller failures and PDP URL guidance using the same request privacy', async () => { + const raw = Object.assign(new Error(`Caller failed for ${PRIVATE} ${NUMBER}`), { + code: 'ECONNRESET', + }); + const { permit, lines } = fixture({ + pdp: `http://127.0.0.1:8181/${TOKEN}/${PRIVATE}`, + opaAxiosInstance: axios.create({ + adapter: async () => { + throw raw; + }, + }), + }); + const error = await rejectionOf( + permit.check(user, 'read', 'doc', { privateNumber: NUMBER }, { useOpa: true }), + ); + expect(error).toBeInstanceOf(PermitConnectionError); + expect(error).toMatchObject({ code: 'ECONNRESET' }); + assertSafe([...lines, ...representations(error)]); + expect(raw.message).toContain(PRIVATE); + }); + + for (const primitive of [PRIVATE, NUMBER, true]) { + it(`fails closed with useful REST guidance for a primitive caller rejection ${typeof primitive}`, async () => { + const apiContext = initializedContext(); + const caller = axios.create({ + adapter: async () => { + throw primitive; + }, + }); + const { permit, lines } = fixture({ apiContext, axiosInstance: caller }); + const error = await rejectionOf(permit.api.users.create(user)); + expect(error).toBeInstanceOf(PermitApiError); + expect(error.message).toContain('check connectivity and configuration'); + assertSafe([...lines, ...representations(error)]); + const transport = createOwnedTransport({ + caller, + logger: pino({ level: 'silent' }), + retry: resolveRetryConfig(false), + name: 'REST', + }); + await expect(transport.post('/users', user)).rejects.toBe(primitive); + }); + } + + it('merges privacy for a reused caller error across SDKs without mixing distinct failures', async () => { + const firstToken = 'OPAQUE_FIRST_TOKEN'; + const secondToken = 'OPAQUE_SECOND_TOKEN'; + const raw = Object.assign(new Error(`Caller failed for ${PRIVATE} ${firstToken}`), { + code: firstToken, + }); + const caller = axios.create({ + adapter: async () => { + throw raw; + }, + }); + const apiContext = initializedContext(); + const first = fixture({ token: firstToken, apiContext, axiosInstance: caller }); + const firstError = await rejectionOf( + first.permit.api.users.create({ key: 'one', attributes: { note: PRIVATE } }), + ); + assertSafe([...first.lines, ...representations(firstError)]); + raw.message = `Caller failed for ${PRIVATE} ${CUSTOM} ${firstToken} ${secondToken}`; + const second = fixture({ token: secondToken, apiContext, axiosInstance: caller }); + const secondError = await rejectionOf( + second.permit.api.users.create({ key: 'two', attributes: { note: CUSTOM } }), + ); + expect((secondError as PermitApiError).code).toBeUndefined(); + for (const value of [ + ...first.lines, + ...second.lines, + ...representations(firstError), + ...representations(secondError), + ]) { + for (const token of [firstToken, secondToken]) expect(value).not.toContain(token); + } + assertSafe([...second.lines, ...representations(secondError)]); + expect(raw.code).toBe(firstToken); + expect(raw.message).toContain(CUSTOM); + const unrelated = fixture({ + apiContext, + axiosInstance: axios.create({ + adapter: async () => { + throw Object.assign(new Error('Upstream unavailable'), { code: 'ECONNRESET' }); + }, + }), + }); + const unrelatedError = await rejectionOf(unrelated.permit.api.users.get('user-1')); + expect(unrelatedError.message).toBe('Upstream unavailable'); + expect(unrelatedError).toMatchObject({ code: 'ECONNRESET' }); + }); + + it('keeps reused request privacy bounded and permanently fails closed after overflow', async () => { + const raw = Object.assign(new Error(`Caller failed for ${PRIVATE}`), { code: 'ECONNRESET' }); + const apiContext = initializedContext(); + const { permit, lines } = fixture({ + apiContext, + axiosInstance: axios.create({ + adapter: async () => { + throw raw; + }, + }), + }); + for (const phase of [1, 2, 3]) { + const values = + phase === 3 ? [] : Array.from({ length: 280 }, (_, index) => `private-${phase}-${index}`); + const error = await rejectionOf( + permit.api.users.create({ key: 'user-1', attributes: { values, note: PRIVATE } }), + ); + assertSafe([...lines, ...representations(error)]); + if (phase > 1) { + expect(error.message).toContain('check connectivity and configuration'); + expect((error as PermitApiError).code).toBeUndefined(); + } + expect(JSON.stringify(error).length).toBeLessThan(10_000); + } + expect(raw.code).toBe('ECONNRESET'); + expect(Object.keys(raw)).toEqual(['code']); + }); + + it('fails closed when ordinary caller request privacy exceeds the character budget', async () => { + const raw = new Error(`Caller failed for ${PRIVATE}`); + const apiContext = initializedContext(); + const { permit, lines } = fixture({ + apiContext, + axiosInstance: axios.create({ + adapter: async () => { + throw raw; + }, + }), + }); + const error = await rejectionOf( + permit.api.users.create({ + key: 'user-1', + attributes: { note: `${'x'.repeat(70_000)}${PRIVATE}` }, + }), + ); + expect(error.message).toContain('check connectivity and configuration'); + assertSafe([...lines, ...representations(error)]); + }); + + it('scrubs slash/dot credentials before URL normalization can expose a suffix', async () => { + const credential = 'credential-prefix/../opaque-credential-suffix'; + const raw = new AxiosError('Request failed', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders({ Authorization: `Bearer ${credential}` }), + url: `https://example.test/${credential}`, + }); + const direct = new PermitApiError('Request failed', raw); + const { permit, lines } = fixture({ + token: credential, + apiUrl: `${await startApi({ detail: 'Unavailable' })}/${credential}`, + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + for (const value of [...lines, ...representations(error), ...representations(direct)]) + expect(value).not.toContain('opaque-credential-suffix'); + }); + + for (const operation of ['REST', 'OPA']) { + for (const status of [PRIVATE, NUMBER]) { + it(`omits a fabricated private ${typeof status} HTTP status from ${operation} diagnostics`, async () => { + const caller = axios.create({ + adapter: async (config) => { + const response = { + status: 503, + statusText: 'Unavailable', + headers: {}, + config, + data: {}, + }; + Reflect.set(response, 'status', status); + if (operation === 'REST') + throw new AxiosError( + 'Request failed', + 'ERR_BAD_RESPONSE', + config, + undefined, + response, + ); + return response; + }, + }); + const { permit, lines } = fixture({ + apiContext: initializedContext(), + axiosInstance: caller, + opaAxiosInstance: caller, + }); + const error = await rejectionOf( + operation === 'REST' + ? permit.api.users.create({ ...user, attributes: { note: PRIVATE, number: NUMBER } }) + : permit.check(user, 'read', 'doc', { number: NUMBER }, { useOpa: true }), + ); + expect(error).toBeInstanceOf(operation === 'REST' ? PermitApiError : PermitPDPStatusError); + assertSafe([...lines, ...representations(error)]); + if (error instanceof PermitApiError) expect(error.status).toBeUndefined(); + if (error instanceof PermitPDPStatusError) expect(error.statusCode).toBeUndefined(); + }); + } + } + + for (const status of [PRIVATE, NUMBER, 200]) { + it(`logs safe resolved REST statuses (${typeof status})`, async () => { + const body = { key: 'user-1', attributes: { note: PRIVATE } }; + const { permit, lines } = fixture({ + apiContext: initializedContext(), + axiosInstance: axios.create({ + adapter: async (config) => { + const response = { config, status: 200, statusText: 'OK', headers: {}, data: body }; + Reflect.set(response, 'status', status); + return response; + }, + }), + }); + expect(await permit.api.users.get('user-1')).toEqual(body); + assertSafe(lines); + if (status === 200) expect(lines.join('')).toContain('200'); + }); + } + + for (const [kind, credential, spelling] of [ + ['lowercase escapes', 'opaque:credential/with-space', 'opaque%3acredential%2fwith-space'], + ['partial encoding', 'OPAQUE_CREDENTIAL', '%4fPAQUE_CREDENTIAL'], + ['malformed suffix', 'OPAQUE_CREDENTIAL', '%4fPAQUE_CREDENTIAL/%zz'], + ['invalid Unicode suffix', 'OPAQUE_CREDENTIAL', '%4fPAQUE_CREDENTIAL/%ED%A0%80'], + ['Unicode escapes', 'opaque-雪', 'opaque-%e9%9b%aa'], + ] as const) { + it(`redacts ${kind} of known credentials before URL normalization and logging`, async () => { + const raw = new AxiosError('Request failed', 'ECONNRESET', { + headers: new AxiosHeaders({ Authorization: `Bearer ${credential}` }), + url: `https://example.test/${spelling}`, + }); + const direct = new PermitApiError('Request failed', raw); + const { permit, lines } = fixture({ + token: credential, + apiUrl: `${await startApi({ detail: 'Unavailable' })}/${spelling}`, + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + for (const value of [...lines, ...representations(error), ...representations(direct)]) { + expect(value).not.toContain(credential); + expect(value).not.toContain(spelling); + } + expect(direct.originalError.config?.url).toBe('[REDACTED]'); + expect(raw.config?.url).toBe(`https://example.test/${spelling}`); + }); + } + + for (const source of ['API response', 'ordinary caller failure']) { + it(`redacts JSON-escaped private values in an ${source}`, async () => { + const secret = 'json-private-canary\\path"quoted\nline\ud800'; + const escaped = JSON.stringify(secret).slice(1, -1); + const raw = new Error(`Caller rejected ${escaped}`); + const options = + source === 'API response' + ? { apiUrl: await startApi({ message: `API rejected ${escaped}` }) } + : { + apiContext: initializedContext(), + axiosInstance: axios.create({ + adapter: async () => { + throw raw; + }, + }), + }; + const { permit, lines } = fixture(options); + const error = await rejectionOf( + permit.api.users.create({ key: 'user-1', attributes: { note: secret } }), + ); + expect(error).toBeInstanceOf(PermitApiError); + for (const value of [error.message, ...lines, ...representations(error)]) { + expect(value).not.toContain(secret); + expect(value).not.toContain(escaped); + } + expect(raw.message).toBe(`Caller rejected ${escaped}`); + }); + } + + it('retains a named safe scope failure and status', async () => { + const { permit, lines } = fixture({ + apiUrl: await startApi({ detail: 'Scope unavailable', attributes: { note: PRIVATE } }, true), + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitContextError); + expect(error.name).toBe('PermitContextError'); + expect(error.message).toContain('Scope unavailable'); + expect(error).toMatchObject({ status: 503, cause: { status: 503 } }); + assertSafe([...lines, ...representations(error)]); + }); + + it('bounds and sanitizes request, response, URL, custom cause and logs without mutating transport errors', async () => { + const raw = new AxiosError( + 'failed', + CODE, + { + headers: new AxiosHeaders({ Authorization: `Bearer ${TOKEN}`, 'X-Custom': CUSTOM }), + method: 'post', + url: `https://name:${URL_SECRET}@example.test/users?api_key=${TOKEN}#${PRIVATE}`, + params: { private: PRIVATE }, + data: JSON.stringify({ ...user, privateNumber: NUMBER, privateCode: CODE }), + }, + { raw: TOKEN }, + ); + raw.response = { + status: 503, + statusText: PRIVATE, + config: raw.config!, + headers: new AxiosHeaders({ 'Set-Cookie': COOKIE, 'X-Private': PRIVATE }), + data: { + message: `Failed for ${PRIVATE} ${TOKEN} ${NUMBER} ${CODE}`, + attributes: { note: PRIVATE }, + huge: 'x'.repeat(100_000), + }, + }; + raw.cause = Object.assign(new Error(TOKEN), { private: PRIVATE }); + const { permit, lines } = fixture({ + axiosInstance: axios.create({ + adapter: async (config) => { + if (config.url?.includes('/api-key/scope')) + return { + config, + status: 200, + statusText: 'OK', + headers: {}, + data: { organization_id: 'org', project_id: 'proj', environment_id: 'env' }, + }; + throw raw; + }, + }), + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + assert(error instanceof PermitApiError); + expect(error.code).toBeUndefined(); + // The oversized omitted response cannot be inspected completely, so all text fails closed. + expect(error.originalError.config?.url).toBe('[REDACTED]'); + assertSafe([...lines, ...representations(error)]); + expect(JSON.stringify(error).length).toBeLessThan(10_000); + expect(inspect(raw, { depth: Infinity })).toContain(TOKEN); + }); + + it('removes credentials from callback URLs inside server error descriptions', async () => { + const address = `https://name:${URL_SECRET}@example.test/retry?token=${CUSTOM}#${PRIVATE}`; + const { permit, lines } = fixture({ + apiUrl: await startApi({ detail: `Upstream callback failed at ${address}` }), + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + expect(error.message).toContain('https://example.test/retry'); + assertSafe([...lines, ...representations(error)]); + }); + + it('sanitizes the exported REST error constructor against opaque header and numeric secrets', () => { + const raw = new AxiosError('Opaque failure', 'ECONNRESET', { + headers: new AxiosHeaders({ 'X-Custom': CUSTOM }), + data: { privateNumber: NUMBER, privateCode: CODE }, + }); + const error = new PermitApiError(`Failed for ${CUSTOM} ${NUMBER} ${CODE}`, raw); + assertSafe(representations(error)); + expect(error.code).toBe('ECONNRESET'); + expect(error.originalError).not.toBe(raw); + }); + + it('sanitizes direct Axios causes on exported context errors', () => { + const raw = new AxiosError(`Transport failed for ${CUSTOM} ${NUMBER}`, 'ECONNRESET', { + headers: new AxiosHeaders({ 'X-Custom': CUSTOM }), + data: { privateNumber: NUMBER }, + }); + const error = new PermitContextError('Scope request failed', { cause: raw }); + expect(error.code).toBe('ECONNRESET'); + expect(error.cause).not.toBe(raw); + assertSafe(representations(error)); + }); + + for (const Constructor of [ + PermitError, + PermitContextError, + PermitContextChangeError, + PermitConnectionError, + ]) { + it(`sanitizes the ${Constructor.name} constructor message against raw cause private values`, () => { + const raw = new AxiosError('Request failed', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders({ 'X-Custom': CUSTOM }), + data: { privateNumber: NUMBER }, + }); + raw.response = { + status: 503, + statusText: 'Unavailable', + config: raw.config!, + headers: {}, + data: { detail: 'Upstream unavailable' }, + }; + const error = new Constructor(`Operation rejected ${CUSTOM} ${NUMBER}`, { cause: raw }); + expect(error.name).toBe(Constructor.name); + expect(error.message).toContain('Operation rejected'); + expect(error.cause).toMatchObject({ status: 503, code: 'ERR_BAD_RESPONSE' }); + expect(error.cause).not.toBe(raw); + assertSafe(representations(error)); + expect(raw.config?.headers['X-Custom']).toBe(CUSTOM); + expect(raw.config?.data).toEqual({ privateNumber: NUMBER }); + }); + } + + it('sanitizes and bounds the PDP status constructor message and body against raw cause private values', () => { + const raw = new AxiosError('Request failed', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders({ 'X-Custom': CUSTOM }), + data: { privateNumber: NUMBER }, + }); + const body = { + message: `Operation rejected ${CUSTOM} ${NUMBER}`, + detail: NUMBER, + errors: Array.from({ length: 100 }, () => ({ msg: `${CUSTOM} ${'x'.repeat(9000)}` })), + attributes: { note: PRIVATE }, + }; + const error = new PermitPDPStatusError(body.message, 503, body, { cause: raw }); + expect(error.name).toBe('PermitPDPStatusError'); + expect(error.statusCode).toBe(503); + expect(error.code).toBe('ERR_BAD_RESPONSE'); + expect(error.cause).not.toBe(raw); + expect(error.responseBody).toMatchObject({ detail: '[REDACTED]' }); + expect(JSON.stringify(error.responseBody).length).toBeLessThan(4000); + assertSafe(representations(error)); + expect(body.detail).toBe(NUMBER); + expect(raw.config?.headers['X-Custom']).toBe(CUSTOM); + }); + + it('fails closed on oversized or deeply nested private requests and bounds response descriptions', async () => { + let attributes: unknown = PRIVATE; + for (let depth = 0; depth < 20; depth++) attributes = { nested: attributes }; + const raw = new AxiosError('failure', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders(), + data: { attributes }, + }); + raw.response = { + status: 500, + statusText: 'failed', + headers: {}, + config: raw.config!, + data: { + message: `Failure for ${PRIVATE}`, + detail: Array.from({ length: 1000 }, () => ({ msg: 'x'.repeat(20_000), input: PRIVATE })), + }, + }; + const error = new PermitApiError(`Failure for ${PRIVATE}`, raw); + assertSafe(representations(error)); + expect(JSON.stringify(error.response?.data).length).toBeLessThan(4000); + expect(error.status).toBe(500); + const oversized = new PermitApiError( + `Failure for ${PRIVATE}`, + new AxiosError('failure', 'ERR_BAD_RESPONSE', { + headers: new AxiosHeaders(), + data: `${'x'.repeat(70_000)}${PRIVATE}`, + }), + ); + assertSafe(representations(oversized)); + }); + + it('redacts private response fields even when they were not part of the request', async () => { + const { permit, lines } = fixture({ + apiUrl: await startApi({ + message: `Unexpected private value ${PRIVATE} ${NUMBER}`, + email: PRIVATE, + attributes: { privateNumber: NUMBER }, + }), + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + assertSafe([...lines, ...representations(error)]); + expect(error).toMatchObject({ + response: { data: { message: expect.stringContaining('[REDACTED]') } }, + }); + }); + + it('redacts scalar numeric descriptions and tolerates unpaired Unicode in private attributes', async () => { + const apiUrl = await startApi({ detail: NUMBER, message: 'Request rejected' }); + const { permit, lines } = fixture({ apiUrl }); + const error = await rejectionOf( + permit.api.users.create({ + key: 'user-1', + attributes: { privateNumber: NUMBER, unicode: '\ud800' }, + }), + ); + expect(error).toBeInstanceOf(PermitApiError); + expect(error).toMatchObject({ status: 503, response: { data: { detail: '[REDACTED]' } } }); + assertSafe([...lines, ...representations(error)]); + expect(error.message).toBe('Request rejected'); + }); + + it('bounds long descriptions and validation arrays on every public error projection', async () => { + const { permit, lines } = fixture({ + apiUrl: await startApi({ + message: 'x'.repeat(40_000), + detail: Array.from({ length: 100 }, () => ({ msg: 'y'.repeat(9000) })), + }), + }); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + assert(error instanceof PermitApiError); + expect(error.message.length).toBeLessThan(1100); + expect(JSON.stringify(error.response?.data).length).toBeLessThan(4000); + for (const value of [...lines, ...representations(error)]) + expect(value.length).toBeLessThan(30_000); + }); + + for (const json of [true, false]) { + it(`captures safe ${json ? 'JSON' : 'pretty'} output on a real REST failure with echoed inputs`, async () => { + const apiUrl = await startApi({ + message: `Invalid user ${PRIVATE} ${NUMBER} ${TOKEN}`, + email: PRIVATE, + attributes: { privateNumber: NUMBER }, + }); + const { permit, lines } = fixture({ apiUrl }, json); + const error = await rejectionOf( + permit.api.users.create({ + key: 'user-1', + email: PRIVATE, + attributes: { privateNumber: NUMBER }, + }), + ); + assertSafe([...lines, ...representations(error)]); + expect(lines.join('')).toContain('Permit REST API request failed'); + if (json) expect(lines.some((line) => JSON.parse(line).operation === 'REST')).toBe(true); + else expect(lines.join('')).toContain('ERROR'); + }); + + it(`omits identity and permission attributes from successful ${json ? 'JSON' : 'pretty'} PDP logs`, async () => { + const pdp = await startApi( + { + tenant: { + permissions: ['read'], + resource: { + type: 'doc', + key: 'one', + attributes: { privateNumber: NUMBER, note: PRIVATE }, + }, + }, + }, + false, + 200, + ); + const { permit, lines } = fixture({ pdp }, json); + const permissions = await permit.getUserPermissions(user); + expect(permissions).toMatchObject({ + tenant: { resource: { attributes: { note: PRIVATE } } }, + }); + assertSafe(lines); + expect(lines.join('')).toContain('permit.getUserPermissions() succeeded'); + }); + } + + it('redacts credentials from HTTP retry logs while preserving private transport error identity', async () => { + const { logger, lines } = fixture({}); + const raw = new AxiosError('failure', 'ECONNRESET'); + const caller = axios.create({ + adapter: async () => { + throw raw; + }, + headers: { 'X-Custom': CUSTOM }, + }); + const transport = createOwnedTransport({ + caller, + logger, + name: 'API', + retry: resolveRetryConfig({ maxRetries: 1, retryDelay: 0 }), + }); + await expect( + transport.get(`https://name:${URL_SECRET}@example.test/${CUSTOM}?token=${TOKEN}#${PRIVATE}`), + ).rejects.toBe(raw); + assertSafe(lines); + expect(lines.join('')).toContain('retry 1/1'); + }); + + for (const status of [200, 201]) { + for (const useOpa of [true, false]) { + it(`redacts echoed private inputs in resolved ${status} ${useOpa ? 'OPA' : 'PDP'} responses`, async () => { + const transport = axios.create({ + adapter: async (config) => ({ + config, + status, + statusText: 'OK', + headers: {}, + data: { detail: `Rejected ${PRIVATE} ${NUMBER}` }, + }), + }); + const { permit, lines } = fixture({ + pdp: await startApi({ detail: `Rejected ${PRIVATE} ${NUMBER}` }, false, status), + opaAxiosInstance: transport, + }); + const error = await rejectionOf( + permit.check(user, 'read', 'doc:one', { privateNumber: NUMBER }, { useOpa }), + ); + expect(error).toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: status, + cause: { status }, + }); + assertSafe([...lines, ...representations(error)]); + expect(error).toMatchObject({ + responseBody: { detail: expect.stringContaining('[REDACTED]') }, + }); + }); + } + } + + for (const operation of [ + 'check', + 'bulkCheck', + 'getUserPermissions', + 'checkAllTenants', + ] as const) { + it(`redacts identity, bodies and credential URLs for PDP ${operation}`, async () => { + const pdp = await startApi({ detail: 'PDP unavailable', attributes: { note: PRIVATE } }); + const { permit, lines } = fixture({ + pdp: pdp.replace('http://', `http://name:${URL_SECRET}@`), + }); + const call = { + check: () => + permit.check(user, 'read', { type: 'doc', key: 'one', attributes: { note: PRIVATE } }), + bulkCheck: () => permit.bulkCheck([{ user, action: 'read', resource: 'doc:one' }]), + getUserPermissions: () => permit.getUserPermissions(user), + checkAllTenants: () => permit.checkAllTenants(user, 'read', 'doc:one'), + }; + const error = await rejectionOf(call[operation]()); + expect(error).toBeInstanceOf(PermitConnectionError); + assertSafe([...lines, ...representations(error)]); + }); + } +}); diff --git a/src/enforcement/check-url.test.ts b/src/enforcement/check-url.test.ts new file mode 100644 index 00000000..0a6658d9 --- /dev/null +++ b/src/enforcement/check-url.test.ts @@ -0,0 +1,392 @@ +import { deepStrictEqual } from 'node:assert'; +import { inspect } from 'node:util'; + +import pino from 'pino'; + +import { ConfigFactory } from '#src/config'; +import { Enforcer } from '#src/enforcement/enforcer'; +import { Permit, PermitConnectionError, PermitError, PermitPDPStatusError } from '#src/index'; +import { parseCheckUrlResponse } from '#src/enforcement/responses'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; +import { rejectionOf } from '#src/tests/helpers/rejection'; + +const options = { token: TEST_TOKEN, retry: false as const, log: { level: 'silent' as const } }; +const url = 'https://api.example.test:443/documents/a%2Fb?enabled=false&count=0#section'; + +it.each([true, false])( + 'returns the literal URL decision %s and sends the full published body', + async (allow) => { + const pdp = await startPdp({ + status: 200, + body: { allow, result: !allow, debug: { future: null } }, + }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const user = Object.freeze({ key: 'alice', attributes: { enabled: false, count: 0 } }); + const context = Object.freeze({ request: false, count: 0 }); + expect(await permit.checkUrl(user, 'gEt', url, { tenant: 'east', context })).toBe(allow); + assertPdpRequest(pdp.requests[0], { + path: '/allowed_url', + body: { user, http_method: 'gEt', url, tenant: 'east', context }, + }); + expect(pdp.requests).toHaveLength(1); + }, +); + +it.each([undefined, ''])('uses the configured default tenant for %j', async (tenant) => { + const pdp = await startPdp({ status: 200, body: { allow: false } }); + const permit = new Permit({ + ...options, + pdp: pdp.url, + multiTenancy: { defaultTenant: 'custom' }, + }); + expect(await permit.checkUrl('alice', 'GET', url, tenant === undefined ? {} : { tenant })).toBe( + false, + ); + assertPdpRequest(pdp.requests[0], { + path: '/allowed_url', + body: { user: { key: 'alice' }, http_method: 'GET', url, tenant: 'custom', context: {} }, + }); +}); + +it('requires an explicit tenant when default tenancy is disabled, even in non-throwing mode', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ + ...options, + pdp: pdp.url, + throwOnError: false, + multiTenancy: { useDefaultTenantIfEmpty: false }, + }); + for (const config of [{}, { tenant: '', throwOnError: false }]) { + await expect(permit.checkUrl('alice', 'GET', url, config)).rejects.toThrow('requires a tenant'); + } + expect(pdp.requests).toHaveLength(0); + expect(await permit.checkUrl('alice', 'GET', url, { tenant: 'east' })).toBe(true); + expect(pdp.requests[0]?.body).toMatchObject({ tenant: 'east' }); +}); + +it('snapshots user and merged context synchronously across concurrent calls', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const enforcer = new Enforcer( + ConfigFactory.build({ ...options, pdp: pdp.url }), + pino({ level: 'silent' }), + ); + const global = { shared: 'global', onlyGlobal: true, nested: { count: 0 } }; + enforcer.contextStore.add(global); + const user = { key: 'alice', attributes: { enabled: false } }; + const firstContext = { shared: 'first', onlyFirst: true }; + const firstOptions = { tenant: 'east', context: firstContext, throwOnError: true }; + const first = enforcer.checkUrl(user, 'GET', url, firstOptions); + user.key = 'changed'; + user.attributes.enabled = true; + firstContext.shared = 'changed'; + firstOptions.tenant = 'changed'; + global.nested.count = 7; + enforcer.contextStore.add({ shared: 'new-global' }); + const second = enforcer.checkUrl('bob', 'POST', url, { context: { shared: 'second' } }); + expect(await Promise.all([first, second])).toStrictEqual([true, true]); + const bodies = pdp.requests.map((request) => request.body); + expect(bodies).toContainEqual({ + user: { key: 'alice', attributes: { enabled: false } }, + http_method: 'GET', + url, + tenant: 'east', + context: { shared: 'first', onlyGlobal: true, nested: { count: 0 }, onlyFirst: true }, + }); + expect(bodies).toContainEqual({ + user: { key: 'bob' }, + http_method: 'POST', + url, + tenant: 'default', + context: { shared: 'second', onlyGlobal: true, nested: { count: 7 } }, + }); + expect(enforcer.contextStore.getDerivedContext({})['shared']).toBe('new-global'); +}); + +it.each(['ftp://example.test/document', 'urn:example:document', 'mailto:alice@example.test'])( + 'does not invent a scheme restriction or fetch the authorization URI %s', + async (target) => { + const pdp = await startPdp({ status: 200, body: { allow: false } }); + const permit = new Permit({ ...options, pdp: pdp.url }); + expect(await permit.checkUrl('alice', 'CUSTOM', target)).toBe(false); + expect(pdp.requests[0]?.body).toMatchObject({ url: target, http_method: 'CUSTOM' }); + }, +); + +it('accepts the published maximum URL length, counting Unicode code points', async () => { + const pdp = await startPdp({ status: 200, body: { allow: false } }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const prefix = 'https://example.test/'; + const target = prefix + '🦉'.repeat(65_536 - Array.from(prefix).length); + expect(await permit.checkUrl('alice', '', target)).toBe(false); + expect(pdp.requests[0]?.body).toMatchObject({ url: target, http_method: '' }); + await expect(permit.checkUrl('alice', 'GET', target + 'a')).rejects.toThrow('1..65536'); + expect(pdp.requests).toHaveLength(1); +}); + +const invalidInputs: { name: string; args: unknown[] }[] = [ + { name: 'null user', args: [null, 'GET', url] }, + { name: 'missing key', args: [{ attributes: {} }, 'GET', url] }, + { name: 'numeric key', args: [{ key: 7 }, 'GET', url] }, + { name: 'array user', args: [[], 'GET', url] }, + { name: 'nonstring user field', args: [{ key: 'alice', email: false }, 'GET', url] }, + { name: 'null user attributes', args: [{ key: 'alice', attributes: null }, 'GET', url] }, + { name: 'array user attributes', args: [{ key: 'alice', attributes: [] }, 'GET', url] }, + { name: 'numeric HTTP method', args: ['alice', 7, url] }, + { name: 'null URL', args: ['alice', 'GET', null] }, + ...[ + '', + '/document', + '//example.test/document', + 'not a URL', + 'https://example.test/a b', + 'https://example.test/a\nb', + ].map((target) => ({ + name: `invalid URI ${JSON.stringify(target)}`, + args: ['alice', 'GET', target], + })), + { name: 'null options', args: ['alice', 'GET', url, null] }, + { name: 'array options', args: ['alice', 'GET', url, []] }, + ...[null, 7].map((tenant) => ({ + name: `invalid tenant ${tenant}`, + args: ['alice', 'GET', url, { tenant }], + })), + ...[null, [], 'request'].map((context) => ({ + name: `invalid context ${JSON.stringify(context)}`, + args: ['alice', 'GET', url, { context }], + })), + ...[-1, Infinity, NaN, 2_147_483_648, '10'].map((timeout) => ({ + name: `invalid timeout ${String(timeout)}`, + args: ['alice', 'GET', url, { timeout }], + })), + { name: 'nonboolean useOpa', args: ['alice', 'GET', url, { useOpa: 'false' }] }, + { name: 'nonboolean throwOnError', args: ['alice', 'GET', url, { throwOnError: 'false' }] }, +]; +it.each(invalidInputs)( + 'rejects $name before HTTP despite fallback denial mode', + async ({ args }) => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + await expect(Reflect.apply(permit.checkUrl, permit, args)).rejects.toBeInstanceOf(PermitError); + expect(pdp.requests).toHaveLength(0); + }, +); + +it('rejects unsupported OPA before any request despite fallback denial mode', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + await expect( + permit.checkUrl('alice', 'GET', url, { useOpa: true, throwOnError: false }), + ).rejects.toThrow('supported only by permit.check()'); + expect(pdp.requests).toHaveLength(0); +}); + +it.each([404, 405, 501])( + 'keeps unavailable HTTP %i visible with either error policy', + async (status) => { + const pdp = await startPdp({ status, body: { detail: 'Not supported' } }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + for (const config of [undefined, { throwOnError: false }, { throwOnError: true }]) { + await expect(permit.checkUrl('alice', 'GET', url, config)).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: status, + message: expect.stringContaining('endpoint /allowed_url is unavailable'), + }); + } + }, +); + +it.each( + [ + null, + [], + {}, + true, + 'true', + { result: true }, + { result: { allow: true } }, + ...[null, 1, 'true', [], {}].map((allow) => ({ allow })), + ].map((body) => ({ body })), +)('keeps malformed 200 body $body visible with either error policy', async ({ body }) => { + const pdp = await startPdp({ status: 200, body }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + for (const throwOnError of [true, false]) { + await expect(permit.checkUrl('alice', 'GET', url, { throwOnError })).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 200, + }); + } +}); + +it('does not accept an inherited allow field as a direct PDP decision', () => { + expect(() => parseCheckUrlResponse(Object.create({ allow: true }))).toThrow(); +}); + +it.each([201, 401, 403, 422, 500, 503])( + 'retains ordinary HTTP %i and per-call error precedence', + async (status) => { + const pdp = await startPdp({ status, body: { detail: 'Rejected' } }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + await expect( + permit.checkUrl('alice', 'GET', url, { throwOnError: true }), + ).rejects.toMatchObject({ name: 'PermitPDPStatusError', statusCode: status }); + expect(await permit.checkUrl('alice', 'GET', url)).toBe(false); + const throwing = new Permit({ ...options, pdp: pdp.url }); + expect(await throwing.checkUrl('alice', 'GET', url, { throwOnError: false })).toBe(false); + }, +); + +it('retains typed timeout failure and respects per-call timeout and error policy', async () => { + const pdp = await startPdp(); + const permit = new Permit({ ...options, pdp: pdp.url, timeout: 5_000 }); + const failure = await rejectionOf(permit.checkUrl('alice', 'GET', url, { timeout: 10 })); + expect(failure).toBeInstanceOf(PermitConnectionError); + expect(failure).not.toBeInstanceOf(PermitPDPStatusError); + expect(await permit.checkUrl('alice', 'GET', url, { timeout: 10, throwOnError: false })).toBe( + false, + ); +}); + +it('does not hide non-JSON input behind fallback denial', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + const context: Record = {}; + context['cycle'] = context; + for (const value of [context, { large: 1n }]) { + await expect(permit.checkUrl('alice', 'GET', url, { context: value })).rejects.toThrow( + 'JSON-serializable', + ); + } + expect(pdp.requests).toHaveLength(0); +}); + +it('detaches status errors from URL, user and context request data', async () => { + const pdp = await startPdp({ + status: 200, + body: { allow: 'true', query: { private: 'response-secret' } }, + }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const failure = await rejectionOf( + permit.checkUrl( + { key: 'private-user', attributes: { private: 'attribute-secret' } }, + 'GET', + 'https://user:password@example.test/path?secret=url-secret', + { context: { private: 'context-secret' } }, + ), + ); + expect(failure).toBeInstanceOf(PermitPDPStatusError); + for (const secret of [ + TEST_TOKEN, + 'private-user', + 'attribute-secret', + 'user:password', + 'url-secret', + 'context-secret', + 'response-secret', + ]) { + expect(inspect(failure)).not.toContain(secret); + } +}); + +it('uses timeout zero to override a configured timeout without mutating the options', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true }, delayMs: 40 }); + const permit = new Permit({ ...options, pdp: pdp.url, timeout: 10 }); + await expect(permit.checkUrl('alice', 'GET', url)).rejects.toBeInstanceOf(PermitConnectionError); + const config = Object.freeze({ timeout: 0 }); + expect(await permit.checkUrl('alice', 'GET', url, config)).toBe(true); + expect(config.timeout).toBe(0); +}); + +it('retains the serialized URL request across retries and per-call option mutation', async () => { + const pdp = await startPdp((index) => ({ + status: index === 0 ? 503 : 200, + body: index === 0 ? { detail: 'Retry later' } : { allow: true }, + })); + const permit = new Permit({ + ...options, + pdp: pdp.url, + retry: { maxRetries: 1, retryDelay: 5, maxDelay: 5 }, + }); + const user = { key: 'alice', attributes: { enabled: false } }; + const config = { + tenant: 'east', + context: { enabled: false, count: 0 }, + timeout: 1_000, + throwOnError: true, + }; + const decision = permit.checkUrl(user, 'GET', url, config); + user.key = 'changed'; + user.attributes.enabled = true; + config.tenant = 'changed'; + config.context.enabled = true; + config.timeout = 0; + config.throwOnError = false; + expect(await decision).toBe(true); + expect(pdp.requests).toHaveLength(2); + for (const request of pdp.requests) { + assertPdpRequest(request, { + path: '/allowed_url', + body: { + user: { key: 'alice', attributes: { enabled: false } }, + http_method: 'GET', + url, + tenant: 'east', + context: { enabled: false, count: 0 }, + }, + }); + } +}); + +it('captures the per-call throwing policy before awaiting a failed URL request', async () => { + const pdp = await startPdp({ status: 503, body: { detail: 'Rejected' }, delayMs: 10 }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + const config = { throwOnError: true }; + const decision = permit.checkUrl('alice', 'GET', url, config); + config.throwOnError = false; + await expect(decision).rejects.toMatchObject({ name: 'PermitPDPStatusError', statusCode: 503 }); +}); + +it('merges literal false, zero, null and legal prototype-like context keys without mutation', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const context = Object.freeze( + Object.fromEntries([ + ['__proto__', { enabled: false }], + ['constructor', { count: 0 }], + ['nullable', null], + ]), + ); + expect(await permit.checkUrl('', 'GET', url, { context })).toBe(true); + deepStrictEqual(pdp.requests[0]?.body, { + user: { key: '' }, + http_method: 'GET', + url, + tenant: 'default', + context, + }); + expect(Object.hasOwn(context, '__proto__')).toBe(true); + expect(Object.getPrototypeOf(context)).toBe(Object.prototype); +}); + +it.each([ + 'https://example.test/%', + 'https://example.test/%2', + 'https://example.test/%zz', + String.raw`https:\example.test\document`, +])('rejects URI syntax repaired by URL parsing before HTTP: %s', async (target) => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ ...options, pdp: pdp.url }); + for (const throwOnError of [true, false]) { + await expect(permit.checkUrl('alice', 'GET', target, { throwOnError })).rejects.toBeInstanceOf( + PermitError, + ); + } + expect(pdp.requests).toHaveLength(0); +}); + +it('forwards valid percent-encoded delimiters byte-for-byte', async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const target = 'https://EXAMPLE.test:443/%5Cpath?x=%25%2F#%20'; + expect(await permit.checkUrl('alice', 'GET', target)).toBe(true); + expect(pdp.requests[0]?.body).toMatchObject({ url: target }); +}); diff --git a/src/enforcement/enforcer.ts b/src/enforcement/enforcer.ts index f5218daf..0103f63a 100644 --- a/src/enforcement/enforcer.ts +++ b/src/enforcement/enforcer.ts @@ -1,55 +1,102 @@ -import axios, { AxiosInstance } from 'axios'; -import { Logger } from 'pino'; -import URL from 'url-parse'; +import axios, { AxiosError, type AxiosInstance, type AxiosResponse } from 'axios'; +import { type Logger } from 'pino'; -import { IPermitConfig } from '../config'; -import { CheckConfig, Context, ContextStore } from '../utils/context'; -import { AxiosLoggingInterceptor } from '../utils/http-logger'; -import { resolveRetryConfig } from '../utils/retry'; -import { AxiosRetryInterceptor } from '../utils/retry-interceptor'; +import { type IPermitConfig } from '#src/config'; +import { + type CheckConfig, + type CheckUrlConfig, + type Context, + type GetUserPermissionsConfig, + ContextStore, +} from '#src/utils/context'; +import { createOwnedTransport } from '#src/utils/http-transport'; +import { + diagnosticAxiosError, + diagnosticBody, + diagnosticCause, + diagnosticErrorSecrets, + diagnosticMetadata, + diagnosticStatus, + diagnosticText, + diagnosticUrl, +} from '#src/utils/diagnostics'; +import { resolveRetryConfig } from '#src/utils/retry'; + +import { + type IAction, + type IAuthorizedUsersResult, + type ILocalRoleAssignment, + type ILocalRoleAssignmentsQuery, + type IFilterObject, + type ICheckInput, + type ICheckUrlInput, + type ICheckOpaInput, + type ICheckQuery, + type IResource, + type IUser, + type IUserPermissions, + type TenantDetails, +} from '#src/enforcement/interfaces'; import { - AllTenantsResponse, - BulkOpaDecisionResult, - BulkPolicyDecision, - IAction, - ICheckInput, - ICheckOpaInput, - ICheckQuery, - IResource, - isOpaGetUserPermissionsResult, - IUser, - IUserPermissions, - OpaDecisionResult, - OpaGetUserPermissionsResult, - PolicyDecision, - TenantDetails, -} from './interfaces'; + parseAllTenantsResponse, + parseAuthorizedUsersResponse, + parseUserTenantsResponse, + parseBulkResponse, + parseCheckResponse, + parseCheckUrlResponse, + parsePermissionsResponse, + parseLocalRoleAssignmentsResponse, +} from '#src/enforcement/responses'; const RESOURCE_DELIMITER = ':'; -function isString(x: any): x is string { +function isString(x: unknown): x is string { return typeof x === 'string'; } export class PermitError extends Error { - constructor(message: string) { - super(message); + constructor(message: string, options?: ErrorOptions) { + const privacy = diagnosticErrorSecrets(options?.cause); + const cause = options?.cause === undefined ? undefined : diagnosticCause(options.cause); + super(diagnosticText(message, privacy), cause === undefined ? undefined : { cause }); this.name = 'PermitError'; } } export class PermitConnectionError extends PermitError { - constructor(message: string) { - super(message); + public readonly code: string | undefined; + + constructor(message: string, options?: ErrorOptions) { + super(message, options); this.name = 'PermitConnectionError'; + this.code = diagnosticMetadata(this.cause).code; } } -export class PermitPDPStatusError extends PermitError { - constructor(message: string) { - super(message); +export class PermitPDPStatusError extends PermitConnectionError { + public readonly responseBody: unknown; + public readonly statusCode?: number; + + /** + * Creates an error for an unexpected HTTP status code or response body from the PDP. + * + * @param message - Description of the failed operation. + * @param statusCode - HTTP status code, supplied for errors raised by the SDK. + * @param responseBody - Body reduced to bounded error-description fields. + * @param options - Optional cause; only safe message, status and code metadata are retained. + */ + constructor( + message: string, + statusCode?: number, + responseBody?: unknown, + options?: ErrorOptions, + ) { + super(message, options); this.name = 'PermitPDPStatusError'; + const status = diagnosticStatus(statusCode); + if (status !== undefined) this.statusCode = status; + this.responseBody = diagnosticBody(responseBody, diagnosticErrorSecrets(options?.cause)); } } @@ -63,7 +110,7 @@ export interface IEnforcer { * @param context - The context object representing the context in which the action is performed. * @returns `true` if the user is authorized, `false` otherwise. * @throws {@link PermitConnectionError} if an error occurs while sending the authorization request to the PDP. - * @throws {@link PermitPDPStatusError} if received a response with unexpected status code from the PDP. + * @throws {@link PermitPDPStatusError} if the PDP's status code or response body is unexpected. */ check( user: IUser | string, @@ -73,6 +120,14 @@ export interface IEnforcer { config?: CheckConfig, ): Promise; + /** Checks a full URL on a compatible container PDP; invalid or unavailable decisions reject. */ + checkUrl( + user: IUser | string, + httpMethod: string, + url: string, + config?: CheckUrlConfig, + ): Promise; + /** * Checks multiple requests within the specified context. * @@ -80,7 +135,7 @@ export interface IEnforcer { * @param context - The context object representing the context in which the action is performed. * @returns array containing `true` if the user is authorized, `false` otherwise for each check request. * @throws {@link PermitConnectionError} if an error occurs while sending the authorization request to the PDP. - * @throws {@link PermitPDPStatusError} if received a response with unexpected status code from the PDP. + * @throws {@link PermitPDPStatusError} if the PDP's status code or response body is unexpected. */ bulkCheck( checks: Array, @@ -95,18 +150,49 @@ export interface IEnforcer { * @param tenants - The list of tenants to filter the permissions on ( given by roles ). * @param resources - The list of resources to filter the permissions on ( given by resource roles ). * @param resource_types - The list of resource types to filter the permissions on ( given by resource roles ). + * @param config - Timeout/error policy and request context overriding existing global context. * @returns object with key as the resource identifier and value as the resource details and permissions. * @throws {@link PermitConnectionError} if an error occurs while sending the authorization request to the PDP. - * @throws {@link PermitPDPStatusError} if received a response with unexpected status code from the PDP. + * @throws {@link PermitPDPStatusError} if the PDP's status code or response body is unexpected. */ getUserPermissions( user: IUser | string, tenants?: string[], resources?: string[], resource_types?: string[], - config?: CheckConfig, + config?: GetUserPermissionsConfig, ): Promise; + /** Queries the full authorized-user envelope; unsupported OPA queries always reject. */ + getAuthorizedUsers( + action: IAction, + resource: IResource | string, + context?: Context, + config?: CheckConfig, + ): Promise; + + /** Queries container PDP role-derived tenants; an unavailable endpoint always rejects. */ + getUserTenants( + user: IUser | string, + context?: Context, + config?: CheckConfig, + ): Promise; + + /** Reads one validated container PDP page; invalid, malformed or unavailable reads reject. */ + getLocalRoleAssignments( + query?: ILocalRoleAssignmentsQuery, + config?: CheckConfig, + ): Promise; + + /** Filters a stable snapshot of objects through positional bulk authorization decisions. */ + filterObjects( + user: IUser | string, + action: IAction, + objects: readonly T[], + context?: Context, + config?: CheckConfig, + ): Promise; + /** * Get all tenants available in the system. * @returns An array of TenantDetails representing all tenants. @@ -120,6 +206,34 @@ export interface IEnforcer { ): Promise; } +/** + * Builds the OPA client base URL from the configured PDP URL by forcing the OPA + * port (8181) and appending the OPA data path, using the native WHATWG `URL` + * (Node >= 10) in place of the previous `url-parse` dependency (#106). + * + * @param pdp - The configured PDP base URL (e.g. `http://localhost:7766`). + * @returns The OPA base URL (e.g. `http://localhost:8181/v1/data/permit/`). A PDP + * path with no trailing slash is glued to the data path (`/prefix` -> + * `/prefixv1/data/permit/`), preserved from `url-parse` and locked by a test. + * @throws {PermitError} on input without a scheme (e.g. `localhost`); a `host:port` + * value like `localhost:7766` is misparsed, not rejected — pass a full URL. The + * error omits the configured value because it may carry credentials. + */ +export function buildOpaBaseUrl(pdp: string): string { + let opaBaseUrl: URL; + try { + opaBaseUrl = new URL(pdp); + } catch { + throw new PermitError( + 'Invalid PDP URL in the "pdp" option: expected an absolute http(s) URL, ' + + 'e.g. "http://localhost:7766".', + ); + } + opaBaseUrl.port = '8181'; + opaBaseUrl.pathname = `${opaBaseUrl.pathname}v1/data/permit/`; + return opaBaseUrl.toString(); +} + /** * The {@link Enforcer} class is responsible for performing permission checks against the PDP. * It implements the {@link IEnforcer} interface. @@ -134,45 +248,37 @@ export class Enforcer implements IEnforcer { * @param config - The configuration object for the Permit SDK. * @param logger - The logger instance for logging. */ - constructor(private config: IPermitConfig, private logger: Logger) { - const opaBaseUrl = new URL(this.config.pdp); - opaBaseUrl.set('port', '8181'); - opaBaseUrl.set('pathname', `${opaBaseUrl.pathname}v1/data/permit/`); - const version = process.env.npm_package_version ?? 'unknown'; - // PDP gets its own dedicated axios instance so PDP-only POST retries never - // apply to the shared REST API client (config.axiosInstance) — REST writes - // must never be retried. - this.client = axios.create({ - baseURL: `${this.config.pdp}/`, - headers: { 'X-Permit-SDK-Version': `node:${version}` }, + constructor( + private config: IPermitConfig, + private logger: Logger, + ) { + const opaBaseUrl = buildOpaBaseUrl(this.config.pdp); + const version = process.env['npm_package_version'] ?? 'unknown'; + const resolvedRetry = resolveRetryConfig( + config.pdpRetry === undefined ? config.retry : config.pdpRetry, + ); + const retry = { + ...resolvedRetry, + retryMethods: [...new Set([...resolvedRetry.retryMethods, 'POST'])], + }; + const headers = { + 'X-Permit-SDK-Version': `node:${version}`, + 'Content-Type': 'application/json', + }; + this.client = createOwnedTransport({ + caller: axios.create(), + logger: this.logger, + retry, + name: 'PDP', + defaults: { baseURL: `${this.config.pdp}/`, headers }, + }); + this.opaClient = createOwnedTransport({ + caller: config.opaAxiosInstance ?? axios.create(), + logger: this.logger, + retry, + name: 'OPA', + defaults: { baseURL: opaBaseUrl, headers }, }); - if (config.opaAxiosInstance) { - this.opaClient = config.opaAxiosInstance; - this.opaClient.defaults.baseURL = opaBaseUrl.toString(); - this.opaClient.defaults.headers.common['X-Permit-SDK-Version'] = `node:${version}`; - } else { - this.opaClient = axios.create({ - baseURL: opaBaseUrl.toString(), - headers: { - 'X-Permit-SDK-Version': `node:${version}`, - }, - }); - } - this.logger = logger; - AxiosLoggingInterceptor.setupInterceptor(this.client, this.logger); - - // Setup retry interceptors for PDP clients - // Use pdpRetry config if provided, otherwise fall back to main retry config - const pdpRetryConfig = resolveRetryConfig(config.pdpRetry ?? config.retry); - if (pdpRetryConfig.enabled) { - // For PDP calls, enable POST retry since check operations are idempotent - const pdpRetryWithPost = { - ...pdpRetryConfig, - retryMethods: [...new Set([...pdpRetryConfig.retryMethods, 'POST'])], - }; - AxiosRetryInterceptor.setupInterceptor(this.client, pdpRetryWithPost, this.logger, 'PDP'); - AxiosRetryInterceptor.setupInterceptor(this.opaClient, pdpRetryWithPost, this.logger, 'OPA'); - } this.contextStore = new ContextStore(); } @@ -182,7 +288,7 @@ export class Enforcer implements IEnforcer { tenants?: string[], resources?: string[], resource_types?: string[], - config: CheckConfig = {}, + config: GetUserPermissionsConfig = {}, ): Promise { return await this.getUserPermissionsWithExceptions( user, @@ -196,7 +302,10 @@ export class Enforcer implements IEnforcer { if (shouldThrow) { throw err; } else { - this.logger.error(err); + this.logger.error( + { err: diagnosticCause(err, [this.config.token]) }, + 'Permit authorization failed', + ); return {}; } }); @@ -207,55 +316,337 @@ export class Enforcer implements IEnforcer { tenants?: string[], resources?: string[], resource_types?: string[], - config: CheckConfig = {}, + config: GetUserPermissionsConfig = {}, ): Promise { - const checkTimeout = config.timeout || this.config.timeout; + const checkTimeout = config.timeout ?? this.config.timeout; + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); + } const input = { user: isString(user) ? { key: user } : user, tenants, resources, resource_types, + context: this.contextStore.getDerivedContext(config.context ?? {}), }; return await this.client - .post('user-permissions', input, { + .post('user-permissions', this.serializeInput(input, 'getUserPermissions'), { headers: { Authorization: `Bearer ${this.config.token}`, }, - timeout: checkTimeout, + ...(checkTimeout !== undefined && { timeout: checkTimeout }), }) .then((response) => { if (response.status !== 200) { - throw new PermitPDPStatusError(`Permit.getUserPermissions() got an unexpected status code: ${response.status}, please check your SDK init and make sure the PDP sidecar is configured correctly. \n\ - Read more about setting up the PDP at https://docs.permit.io`); + throw this.pdpStatusError('getUserPermissions', response); } - const permissions = - (isOpaGetUserPermissionsResult(response.data) - ? response.data.result.permissions - : response.data) || {}; + const permissions = this.parsePdpResponse( + 'getUserPermissions', + response, + parsePermissionsResponse, + ); this.logger.info( - `permit.getUserPermissions(${Enforcer.userRepr(input.user)}) = ${JSON.stringify( - permissions, - )}`, + { operation: 'getUserPermissions' }, + 'permit.getUserPermissions() succeeded', ); return permissions; }) - .catch((error) => { - const errorMessage = `Error in permit.getUserPermissions(${Enforcer.userRepr(input.user)})`; - - if (axios.isAxiosError(error)) { - const errorStatusCode: string = error.response?.status.toString() || ''; - const errorDetails: string = error?.response?.data - ? JSON.stringify(error.response.data) - : error.message; - this.logger.error(`[${errorStatusCode}] ${errorMessage}, err: ${errorDetails}`); - } else { - this.logger.error(`${errorMessage}\n${error}`); + .catch((error: unknown) => { + return this.handlePDPError(error, 'getUserPermissions'); + }); + } + + /** + * Queries the users authorized for a resource using the PDP's complete result envelope. + * + * @param action - Action to evaluate. + * @param resource - Resource type, type:key string or resource attributes and tenant. + * @param context - Request context overriding the existing global context. + * @param config - Timeout and error policy; useOpa:true is unsupported and always rejects. + * @returns The full result, or a normalized empty result in explicit non-throwing mode. + * @throws {PermitError} For unsupported OPA, invalid resource strings, or non-JSON inputs. + * @throws {PermitConnectionError} On operational failure in throwing mode. + * @throws {PermitPDPStatusError} On a rejected or malformed PDP response in throwing mode. + */ + public async getAuthorizedUsers( + action: IAction, + resource: IResource | string, + context: Context = {}, + config: CheckConfig = {}, + ): Promise { + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); + } + const normalized = this.normalizeResource( + isString(resource) ? Enforcer.resourceFromString(resource) : resource, + ); + const empty: IAuthorizedUsersResult = { + resource: `${normalized.type}:${normalized.key ?? '*'}`, + tenant: normalized.tenant || 'default', + users: {}, + }; + return await this.getAuthorizedUsersWithExceptions(action, normalized, context, config).catch( + (error: unknown) => { + if (config.throwOnError ?? this.config.throwOnError) throw error; + this.logger.error( + { err: diagnosticCause(error, [this.config.token]) }, + 'Permit authorization failed', + ); + return empty; + }, + ); + } + + private async getAuthorizedUsersWithExceptions( + action: IAction, + resource: IResource, + context: Context, + config: CheckConfig, + ): Promise { + const input = { action, resource, context: this.contextStore.getDerivedContext(context) }; + const timeout = config.timeout ?? this.config.timeout; + return await this.client + .post('authorized_users', this.serializeInput(input, 'getAuthorizedUsers'), { + headers: { Authorization: `Bearer ${this.config.token}` }, + ...(timeout !== undefined && { timeout }), + }) + .then((response) => { + if (response.status !== 200) throw this.pdpStatusError('getAuthorizedUsers', response); + return this.parsePdpResponse('getAuthorizedUsers', response, parseAuthorizedUsersResponse); + }) + .catch((error: unknown) => this.handlePDPError(error, 'getAuthorizedUsers')); + } + + /** + * Queries role-derived tenants for a user on a compatible container PDP. + * + * @param user - User key or attributes to query. + * @param context - Request context overriding the existing global context. + * @param config - Timeout and error policy; useOpa:true is unsupported and always rejects. + * @returns All tenants, or [] on operational failure in explicit non-throwing mode. + * @throws {PermitError} For unsupported OPA or non-JSON input in throwing mode. + * @throws {PermitPDPStatusError} If the endpoint is unavailable (including cloud PDPs), even + * in non-throwing mode; also on rejected or malformed responses in throwing mode. + * @throws {PermitConnectionError} On operational failure in throwing mode. + */ + public async getUserTenants( + user: IUser | string, + context: Context = {}, + config: CheckConfig = {}, + ): Promise { + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); + } + return await this.getUserTenantsWithExceptions(user, context, config).catch( + (error: unknown) => { + if ( + (error instanceof PermitPDPStatusError && error.statusCode === 404) || + (config.throwOnError ?? this.config.throwOnError) + ) { + throw error; + } + this.logger.error( + { err: diagnosticCause(error, [this.config.token]) }, + 'Permit authorization failed', + ); + return []; + }, + ); + } + + private async getUserTenantsWithExceptions( + user: IUser | string, + context: Context, + config: CheckConfig, + ): Promise { + const input = { + user: isString(user) ? { key: user } : user, + context: this.contextStore.getDerivedContext(context), + }; + const timeout = config.timeout ?? this.config.timeout; + return await this.client + .post('user-tenants', this.serializeInput(input, 'getUserTenants'), { + headers: { Authorization: `Bearer ${this.config.token}` }, + ...(timeout !== undefined && { timeout }), + }) + .then((response) => { + if (response.status !== 200) throw this.pdpStatusError('getUserTenants', response); + return this.parsePdpResponse('getUserTenants', response, parseUserTenantsResponse); + }) + .catch((error: unknown) => this.handlePDPError(error, 'getUserTenants')); + } + + /** + * Reads one page of role assignments cached by a compatible container PDP. + * + * @param query - Optional key filters and pagination; defaults to page 1 and page size 30. + * @param config - Timeout/error policy; useOpa:true is unsupported and always rejects. + * @returns The complete validated page, or [] on ordinary operational failure in + * non-throwing mode. This does not automatically paginate or synchronize the local cache. + * @throws {PermitError} For invalid query/options or unsupported OPA, regardless of policy. + * @throws {PermitPDPStatusError} For malformed responses or unavailable 404/405/501 endpoints + * regardless of policy; for other rejected responses in throwing mode. + * @throws {PermitConnectionError} On operational failure in throwing mode. + */ + public async getLocalRoleAssignments( + query: ILocalRoleAssignmentsQuery = {}, + config: CheckConfig = {}, + ): Promise { + const params = this.buildLocalRoleAssignmentsQuery(query, config); + const shouldThrow = config.throwOnError ?? this.config.throwOnError; + const timeout = config.timeout ?? this.config.timeout; + return await this.client + .get('local/role_assignments', { + params, + headers: { Authorization: `Bearer ${this.config.token}` }, + ...(timeout !== undefined && { timeout }), + }) + .then((response) => { + if (response.status !== 200) throw this.pdpStatusError('getLocalRoleAssignments', response); + return this.parsePdpResponse( + 'getLocalRoleAssignments', + response, + parseLocalRoleAssignmentsResponse, + ); + }) + .catch((error: unknown) => this.handlePDPError(error, 'getLocalRoleAssignments')) + .catch((failure: unknown) => { + if ( + (failure instanceof PermitPDPStatusError && + [200, 404, 405, 501].includes(failure.statusCode ?? 0)) || + shouldThrow + ) { + throw failure; + } + return []; + }); + } + + private buildLocalRoleAssignmentsQuery( + query: ILocalRoleAssignmentsQuery, + config: CheckConfig, + ): Record { + if (query === null || typeof query !== 'object' || Array.isArray(query)) { + throw new PermitError('Permit.getLocalRoleAssignments() query must be an object.'); + } + const fields = ['user', 'role', 'tenant', 'resource', 'resourceInstance', 'page', 'perPage']; + for (const field of Reflect.ownKeys(query)) { + if (typeof field !== 'string' || !fields.includes(field)) { + throw new PermitError('Permit.getLocalRoleAssignments() query has an unsupported field.'); + } + } + if (config === null || typeof config !== 'object' || Array.isArray(config)) { + throw new PermitError('Permit.getLocalRoleAssignments() options must be an object.'); + } + for (const field of Reflect.ownKeys(config)) { + if (typeof field !== 'string' || !['useOpa', 'throwOnError', 'timeout'].includes(field)) { + throw new PermitError( + 'Permit.getLocalRoleAssignments() options have an unsupported field.', + ); + } + } + for (const field of ['useOpa', 'throwOnError'] as const) { + if (config[field] !== undefined && typeof config[field] !== 'boolean') { + throw new PermitError(`Permit.getLocalRoleAssignments() ${field} must be a boolean.`); + } + } + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); + } + if ( + config.timeout !== undefined && + (typeof config.timeout !== 'number' || + !Number.isFinite(config.timeout) || + config.timeout < 0 || + config.timeout > 2_147_483_647) + ) { + throw new PermitError( + 'Permit.getLocalRoleAssignments() timeout must be between 0 and 2147483647 ms.', + ); + } + const params: Record = {}; + for (const field of ['user', 'role', 'tenant', 'resource', 'resourceInstance'] as const) { + const value = query[field]; + if (value !== undefined) { + if (typeof value !== 'string') { + throw new PermitError(`Permit.getLocalRoleAssignments() ${field} must be a string.`); } - throw new PermitConnectionError(`Permit SDK got error: \n ${error.message} \n - and cannot connect to the PDP, please check your configuration and make sure the - PDP is running at ${this.config.pdp} and accepting requests. \n - Read more about setting up the PDP at https://docs.permit.io`); + params[field === 'resourceInstance' ? 'resource_instance' : field] = value; + } + } + const page = query.page ?? 1; + const perPage = query.perPage ?? 30; + if ( + (query.page !== undefined && typeof query.page !== 'number') || + !Number.isSafeInteger(page) || + page < 1 + ) { + throw new PermitError( + 'Permit.getLocalRoleAssignments() page must be a positive safe integer.', + ); + } + if ( + (query.perPage !== undefined && typeof query.perPage !== 'number') || + !Number.isInteger(perPage) || + perPage < 1 || + perPage > 100 + ) { + throw new PermitError( + 'Permit.getLocalRoleAssignments() perPage must be an integer from 1 to 100.', + ); + } + params['page'] = page; + params['per_page'] = perPage; + return params; + } + + /** + * Keeps objects authorized for an action, preserving original references and input order. + * + * @param user - User key or user attributes. + * @param action - Action to evaluate for every object. + * @param objects - Readonly dense array; only known resource fields are sent to the PDP. + * @param context - Shared context, overridden by each object's request context. + * @param config - Bulk timeout/error policy; unsupported OPA queries always reject. + * @returns The authorized subset of a synchronous array snapshot, including duplicates. + * @throws {PermitError} For unsupported OPA/invalid slots, or non-JSON inputs in throwing mode. + * @throws {PermitConnectionError} On operational failure in throwing mode. + * @throws {PermitPDPStatusError} On rejected or malformed bulk results in throwing mode. + */ + public async filterObjects( + user: IUser | string, + action: IAction, + objects: readonly T[], + context: Context = {}, + config: CheckConfig = {}, + ): Promise { + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); + } + const snapshot = [...objects]; + const checks: ICheckQuery[] = []; + for (const object of snapshot) { + if (object === undefined || object === null || typeof object.type !== 'string') { + throw new PermitError('permit.filterObjects() requires a resource at every array position'); + } + const resource: IResource = { + type: object.type, + ...(object.key !== undefined && { key: object.key }), + ...(object.tenant !== undefined && { tenant: object.tenant }), + ...(object.attributes !== undefined && { attributes: object.attributes }), + }; + checks.push({ + user, + action, + resource, + ...(object.context !== undefined && { + context: object.context, + }), }); + } + if (snapshot.length === 0) return []; + const allowed = await this.bulkCheck(checks, context, config); + return snapshot.filter((_object, index) => allowed[index] === true); } public async bulkCheck( @@ -263,14 +654,18 @@ export class Enforcer implements IEnforcer { context: Context = {}, // context provided specifically for this query config: CheckConfig = {}, ): Promise> { + const checkCount = checks.length; return await this.bulkCheckWithExceptions(checks, context, config).catch((err) => { const shouldThrow = config.throwOnError === undefined ? this.config.throwOnError : config.throwOnError; if (shouldThrow) { throw err; } else { - this.logger.error(err); - return []; + this.logger.error( + { err: diagnosticCause(err, [this.config.token]) }, + 'Permit authorization failed', + ); + return Array.from({ length: checkCount }, () => false); } }); } @@ -296,62 +691,49 @@ export class Enforcer implements IEnforcer { }; } - private checkInputRepr(checkInput: ICheckInput): string { - return `${Enforcer.userRepr(checkInput.user)}, ${checkInput.action}, ${Enforcer.resourceRepr( - checkInput.resource, - )}`; - } - private async bulkCheckWithExceptions( checks: Array, context: Context = {}, // context provided specifically for this query config: CheckConfig = {}, ): Promise> { - const checkTimeout = config.timeout || this.config.timeout; + const checkTimeout = config.timeout ?? this.config.timeout; + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); + } const inputs: Array = []; - checks.forEach((check) => { - const input = this.buildCheckInput(check.user, check.action, check.resource, context); + for (const check of checks) { + if (check === undefined) { + throw new PermitError('permit.bulkCheck() requires a check at every array position'); + } + const input = this.buildCheckInput(check.user, check.action, check.resource, { + ...context, + ...check.context, + }); inputs.push(input); - }); + } return await this.client - .post('allowed/bulk', inputs, { + .post('allowed/bulk', this.serializeInput(inputs, 'bulkCheck'), { headers: { Authorization: `Bearer ${this.config.token}`, }, - timeout: checkTimeout, + ...(checkTimeout !== undefined && { timeout: checkTimeout }), }) .then((response) => { if (response.status !== 200) { - throw new PermitPDPStatusError(`Permit.bulkCheck() got an unexpected status code: ${response.status}, please check your SDK init and make sure the PDP sidecar is configured correctly. \n\ - Read more about setting up the PDP at https://docs.permit.io`); + throw this.pdpStatusError('bulkCheck', response); } - const decisions = ( - ('allow' in response.data ? response.data.allow : response.data.result.allow) || [] - ).map((decision) => decision.allow || false); + const decisions = this.parsePdpResponse('bulkCheck', response, (data) => + parseBulkResponse(data, inputs.length), + ); this.logger.info( - `permit.bulkCheck(${inputs.map((input) => this.checkInputRepr(input))}) = ${decisions}`, + { operation: 'bulkCheck', count: inputs.length }, + 'permit.bulkCheck() succeeded', ); return decisions; }) - .catch((error) => { - const errorMessage = `Error in permit.bulkCheck(${inputs.map((input) => - this.checkInputRepr(input), - )})`; - - if (axios.isAxiosError(error)) { - const errorStatusCode: string = error.response?.status.toString() || ''; - const errorDetails: string = error?.response?.data - ? JSON.stringify(error.response.data) - : error.message; - this.logger.error(`[${errorStatusCode}] ${errorMessage}, err: ${errorDetails}`); - } else { - this.logger.error(`${errorMessage}\n${error}`); - } - throw new PermitConnectionError(`Permit SDK got error: \n ${error.message} \n - and cannot connect to the PDP, please check your configuration and make sure the - PDP is running at ${this.config.pdp} and accepting requests. \n - Read more about setting up the PDP at https://docs.permit.io`); + .catch((error: unknown) => { + return this.handlePDPError(error, 'bulkCheck'); }); } @@ -362,24 +744,208 @@ export class Enforcer implements IEnforcer { context: Context = {}, // default to empty context if not provided sdk = 'node', // default to "node" if not provided ): Promise { - try { - const response = await this.client.post('/allowed/all-tenants', { + return await this.checkAllTenantsWithExceptions(user, action, resource, context, sdk).catch( + (err) => { + if (this.config.throwOnError) { + throw err; + } else { + this.logger.error( + { err: diagnosticCause(err, [this.config.token]) }, + 'Permit authorization failed', + ); + return []; + } + }, + ); + } + + private async checkAllTenantsWithExceptions( + user: IUser | string, + action: string, + resource: IResource | string, + context: Context, + sdk: string, + ): Promise { + // checkAllTenants evaluates the request across ALL tenants, so the resource + // must NOT be pinned to a tenant. We normalize the string forms of user and + // resource to match check()'s input contract, but intentionally skip + // normalizeResource() because it injects config.multiTenancy.defaultTenant. + const input: ICheckInput = { + user: isString(user) ? { key: user } : user, + action, + resource: isString(resource) ? Enforcer.resourceFromString(resource) : resource, + context: this.contextStore.getDerivedContext(context), + }; + + return await this.client + .post('allowed/all-tenants', this.serializeInput(input, 'checkAllTenants'), { headers: { Authorization: `Bearer ${this.config.token}`, 'X-Permit-Sdk-Language': sdk, }, - params: { - user, - action, - resource, - context, - }, + ...(this.config.timeout !== undefined && { timeout: this.config.timeout }), + }) + .then((response) => { + if (response.status !== 200) { + throw this.pdpStatusError('checkAllTenants', response); + } + return this.parsePdpResponse('checkAllTenants', response, parseAllTenantsResponse); + }) + .catch((error: unknown) => { + return this.handlePDPError(error, 'checkAllTenants'); }); - return response.data.allowedTenants.map((item) => item.tenant); - } catch (error) { - this.logger.error('Error fetching all tenants:', error); - throw error; + } + + /** + * Checks access to a full URL using the container PDP's configured URL mappings. + * + * @param user - User key or user attributes. + * @param httpMethod - HTTP method string sent unchanged; the published contract has no enum. + * @param url - Absolute URI, 1..65536 Unicode characters, sent unchanged to the PDP. + * @param config - Tenant, context, timeout and error policy; useOpa:true always rejects. + * @returns The literal allow decision; ordinary operational failures return false in + * non-throwing mode. + * @throws {PermitError} For invalid input, input that cannot be JSON-serialized, unsupported OPA, + * or a missing tenant when default tenancy is disabled. + * @throws {PermitPDPStatusError} For malformed decisions or unavailable HTTP 404/405/501, + * regardless of error policy; other rejected responses throw in throwing mode. + * @throws {PermitConnectionError} On a connection or timeout failure in throwing mode. + */ + public async checkUrl( + user: IUser | string, + httpMethod: string, + url: string, + config: CheckUrlConfig = {}, + ): Promise { + const input = this.buildCheckUrlInput(user, httpMethod, url, config); + const shouldThrow = config.throwOnError ?? this.config.throwOnError; + return await this.checkUrlWithExceptions(input, config).catch((error: unknown) => { + if ( + (error instanceof PermitError && !(error instanceof PermitConnectionError)) || + (error instanceof PermitPDPStatusError && + [200, 404, 405, 501].includes(error.statusCode ?? 0)) || + shouldThrow + ) { + throw error; + } + this.logger.error( + { err: diagnosticCause(error, [this.config.token]) }, + 'Permit authorization failed', + ); + return false; + }); + } + + private buildCheckUrlInput( + user: IUser | string, + httpMethod: string, + url: string, + config: CheckUrlConfig, + ): ICheckUrlInput { + if (config === null || typeof config !== 'object' || Array.isArray(config)) { + throw new PermitError('Permit.checkUrl() options must be an object.'); + } + for (const field of ['useOpa', 'throwOnError'] as const) { + if (config[field] !== undefined && typeof config[field] !== 'boolean') { + throw new PermitError(`Permit.checkUrl() ${field} must be a boolean.`); + } + } + if (config.useOpa) { + throw new PermitError('The useOpa option is supported only by permit.check()'); } + if ( + config.timeout !== undefined && + (typeof config.timeout !== 'number' || + !Number.isFinite(config.timeout) || + config.timeout < 0 || + config.timeout > 2_147_483_647) + ) { + throw new PermitError('Permit.checkUrl() timeout must be between 0 and 2147483647 ms.'); + } + const normalizedUser = isString(user) ? { key: user } : user; + if ( + normalizedUser === null || + typeof normalizedUser !== 'object' || + Array.isArray(normalizedUser) || + typeof normalizedUser.key !== 'string' + ) { + throw new PermitError( + 'Permit.checkUrl() user must be a string or an object with a string key.', + ); + } + for (const field of ['email', 'firstName', 'lastName'] as const) { + if (normalizedUser[field] !== undefined && typeof normalizedUser[field] !== 'string') { + throw new PermitError(`Permit.checkUrl() user.${field} must be a string.`); + } + } + for (const [field, value] of [ + ['user.attributes', normalizedUser.attributes], + ['context', config.context], + ] as const) { + if ( + value !== undefined && + (value === null || typeof value !== 'object' || Array.isArray(value)) + ) { + throw new PermitError(`Permit.checkUrl() ${field} must be an object.`); + } + } + if (typeof httpMethod !== 'string') { + throw new PermitError('Permit.checkUrl() httpMethod must be a string.'); + } + let urlLength = 0; + if (typeof url === 'string') { + for (const _character of url) { + urlLength += 1; + if (urlLength > 65_536) break; + } + } + if (urlLength < 1 || urlLength > 65_536) { + throw new PermitError('Permit.checkUrl() URL must contain 1..65536 Unicode characters.'); + } + try { + if (/[\\\s\p{Cc}]/u.test(url) || /%(?![0-9A-Fa-f]{2})/u.test(url)) { + throw new Error('Invalid URI syntax'); + } + new URL(url); + } catch { + throw new PermitError('Permit.checkUrl() URL must be an absolute URI.'); + } + if (config.tenant !== undefined && typeof config.tenant !== 'string') { + throw new PermitError('Permit.checkUrl() tenant must be a string.'); + } + let tenant = config.tenant; + if (!tenant) { + if (!this.config.multiTenancy.useDefaultTenantIfEmpty) { + throw new PermitError( + 'Permit.checkUrl() requires a tenant when default tenancy is disabled.', + ); + } + tenant = this.config.multiTenancy.defaultTenant; + } + return { + user: normalizedUser, + http_method: httpMethod, + url, + tenant, + context: this.contextStore.getDerivedContext(config.context ?? {}), + }; + } + + private async checkUrlWithExceptions( + input: ICheckUrlInput, + config: CheckUrlConfig, + ): Promise { + const timeout = config.timeout ?? this.config.timeout; + return await this.client + .post('allowed_url', this.serializeInput(input, 'checkUrl'), { + headers: { Authorization: `Bearer ${this.config.token}` }, + ...(timeout !== undefined && { timeout }), + }) + .then((response) => { + if (response.status !== 200) throw this.pdpStatusError('checkUrl', response); + return this.parsePdpResponse('checkUrl', response, parseCheckUrlResponse); + }) + .catch((error: unknown) => this.handlePDPError(error, 'checkUrl')); } public async check( @@ -395,7 +961,10 @@ export class Enforcer implements IEnforcer { if (shouldThrow) { throw err; } else { - this.logger.error(err); + this.logger.error( + { err: diagnosticCause(err, [this.config.token]) }, + 'Permit authorization failed', + ); return false; } }); @@ -409,105 +978,144 @@ export class Enforcer implements IEnforcer { context: Context = {}, // context provided specifically for this query config: CheckConfig = {}, ): Promise { - let input: ICheckOpaInput | ICheckInput = this.buildCheckInput(user, action, resource, context); + const checkInput = this.buildCheckInput(user, action, resource, context); + const input: ICheckOpaInput | ICheckInput = config.useOpa ? { input: checkInput } : checkInput; const client = config?.useOpa ? this.opaClient : this.client; const path = config?.useOpa ? 'root' : 'allowed'; - if (config?.useOpa) { - input = { input: input }; - } - // /root - const checkTimeout = config.timeout || this.config.timeout; + const checkTimeout = config.timeout ?? this.config.timeout; return await client - .post(path, input, { + .post(path, this.serializeInput(input, 'check'), { headers: { Authorization: `Bearer ${this.config.token}`, }, - timeout: checkTimeout, + ...(checkTimeout !== undefined && { timeout: checkTimeout }), }) .then((response) => { if (response.status !== 200) { - throw new PermitPDPStatusError(`Permit.check() got an unexpected status code: ${response.status}, please check your SDK init and make sure the PDP sidecar is configured correctly. \n\ - Read more about setting up the PDP at https://docs.permit.io`); + throw this.pdpStatusError('check', response); } - const decision = - ('allow' in response.data ? response.data.allow : response.data.result.allow) || false; + const decision = this.parsePdpResponse('check', response, parseCheckResponse); - this.logger.info( - `permit.check(${this.checkInputRepr((input as any).input || input)}) = ${decision}`, - ); + this.logger.info({ operation: 'check', decision }, 'permit.check() succeeded'); return decision; }) - .catch((error) => { - const errorMessage = `Error in permit.check(${this.checkInputRepr( - (input as any).input || input, - )})`; - - if (axios.isAxiosError(error)) { - const errorStatusCode: string = error.response?.status.toString() || ''; - const errorDetails: string = error?.response?.data - ? JSON.stringify(error.response.data) - : error.message; - this.logger.error(`[${errorStatusCode}] ${errorMessage}, err: ${errorDetails}`); - } else { - this.logger.error(`${errorMessage}\n${error}`); - } - throw new PermitConnectionError(`Permit SDK got error: \n ${error.message} \n - and cannot connect to the PDP, please check your configuration and make sure the PDP is running at ${this.config.pdp} and accepting requests. \n - Read more about setting up the PDP at https://docs.permit.io`); + .catch((error: unknown) => { + return this.handlePDPError(error, 'check'); }); } - // TODO: remove this eventually, once we decide on finalized structure of AuthzQuery - private normalizeResource(resource: IResource): IResource { - const normalizedResource: IResource = Object.assign({}, resource); - - // if tenant is empty, we might auto-set the default tenant according to config - if (!normalizedResource.tenant && this.config.multiTenancy.useDefaultTenantIfEmpty) { - normalizedResource.tenant = this.config.multiTenancy.defaultTenant; + private serializeInput(input: unknown, method: string): string { + try { + const body = JSON.stringify(input); + if (typeof body === 'string') return body; + } catch { + // JSON errors may contain caller property names; omit the raw exception and request data. } + throw new PermitError( + `Permit.${method}() input must be JSON-serializable. ` + + 'Remove circular references and unsupported JSON values.', + ); + } - return normalizedResource; + private pdpStatusError( + method: string, + response: AxiosResponse, + malformedBody = false, + source?: AxiosError, + ): PermitPDPStatusError { + const status = diagnosticStatus(response.status); + const statusLabel = status ?? 'unknown'; + const message = + method === 'checkUrl' && (status === 404 || status === 405 || status === 501) + ? `Permit.checkUrl() endpoint /allowed_url is unavailable (status ${status}). ` + + 'Configure a compatible Permit container PDP; the cloud PDP contract does not publish ' + + 'this endpoint.' + : method === 'getLocalRoleAssignments' && + (status === 404 || status === 405 || status === 501) + ? `Permit.getLocalRoleAssignments() endpoint /local/role_assignments is unavailable ` + + `(status ${status}). Configure a compatible Permit container PDP; the cloud PDP ` + + 'contract does not publish this endpoint.' + : method === 'getUserTenants' && status === 404 + ? 'Permit.getUserTenants() endpoint /user-tenants is unavailable (status 404). ' + + 'Configure a compatible Permit container PDP; the cloud PDP contract does not publish ' + + 'this endpoint.' + : malformedBody + ? `Permit.${method}() got an unexpected response body from the PDP ` + + `(status ${statusLabel}), please check that the SDK's pdp URL points to a Permit ` + + 'PDP. Read more about setting up the PDP at https://docs.permit.io' + : `Permit.${method}() got an unexpected status code: ${statusLabel}, ` + + 'please check your SDK init and make sure the PDP sidecar is configured correctly. ' + + 'Read more about setting up the PDP at https://docs.permit.io'; + const snapshot = diagnosticAxiosError( + source ?? new AxiosError(message, undefined, response.config, undefined, response), + [this.config.token], + ); + return new PermitPDPStatusError(message, status, snapshot.response?.data, { + cause: snapshot, + }); } - private static userRepr(user: IUser): string { - if (user.attributes || user.email) { - return JSON.stringify(user); + /** + * Reads the body of a successful PDP response. The PDP was reachable, so a body without the + * expected shape is reported as a {@link PermitPDPStatusError}, not as a connection failure. + */ + private parsePdpResponse( + method: string, + response: AxiosResponse, + parse: (data: unknown) => R, + ): R { + try { + return parse(response.data); + } catch { + throw this.pdpStatusError(method, response, true); } - return user.key; } - private static resourceRepr(resource: IResource): string { - if (resource.attributes && resource.attributes.length > 0) { - return JSON.stringify(resource); + private handlePDPError(error: unknown, method: string): never { + let failure: PermitConnectionError; + if (error instanceof PermitPDPStatusError) { + failure = error; + } else if (axios.isAxiosError(error) && error.response) { + failure = this.pdpStatusError(method, error.response, false, error); + } else { + const privacy = diagnosticErrorSecrets(error, [this.config.token]); + const cause = axios.isAxiosError(error) + ? diagnosticAxiosError(error, [this.config.token]) + : diagnosticCause(error, [this.config.token]); + failure = new PermitConnectionError( + `Permit SDK got error: ${cause.message} and cannot connect to the PDP. ` + + `Check your configuration and make sure the PDP is running at ${diagnosticUrl(this.config.pdp, privacy)} ` + + 'and accepting requests. Read more about setting up the PDP at https://docs.permit.io', + { cause }, + ); } + this.logger.error({ err: failure, operation: method }, `permit.${method}() failed`); + throw failure; + } + + // TODO: remove this eventually, once we decide on finalized structure of AuthzQuery + private normalizeResource(resource: IResource): IResource { + const normalizedResource: IResource = { ...resource }; - let resourceRepr = ''; - if (resource.tenant) { - resourceRepr += `${resource.tenant}/`; + // if tenant is empty, we might auto-set the default tenant according to config + if (!normalizedResource.tenant && this.config.multiTenancy.useDefaultTenantIfEmpty) { + normalizedResource.tenant = this.config.multiTenancy.defaultTenant; } - resourceRepr += `${resource.type}:${resource.key ?? '*'}`; - return resourceRepr; + + return normalizedResource; } private static resourceFromString(resource: string): IResource { const parts = resource.split(RESOURCE_DELIMITER); - if (parts.length < 1 || parts.length > 2) { - throw Error(`permit.check() got invalid resource string: '${resource}'`); + const [type, key] = parts; + if (type === undefined || parts.length > 2) { + throw new PermitError('Invalid resource string: expected a resource type or type:key.'); } return { - type: parts[0], - key: parts.length > 1 ? parts[1] : undefined, - }; - } - - public getMethods(): IEnforcer { - return { - check: this.check.bind(this), - bulkCheck: this.bulkCheck.bind(this), - getUserPermissions: this.getUserPermissions.bind(this), - checkAllTenants: this.checkAllTenants.bind(this), + type, + ...(key !== undefined && { key }), }; } } diff --git a/src/enforcement/filter-objects.test.ts b/src/enforcement/filter-objects.test.ts new file mode 100644 index 00000000..700af7af --- /dev/null +++ b/src/enforcement/filter-objects.test.ts @@ -0,0 +1,187 @@ +import pino from 'pino'; + +import { Permit } from '#src/index'; +import { ConfigFactory } from '#src/config'; +import { Enforcer, PermitError, PermitPDPStatusError } from '#src/enforcement/enforcer'; +import { type IFilterObject } from '#src/enforcement/interfaces'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; + +const config = { token: TEST_TOKEN, retry: false as const, log: { level: 'silent' as const } }; + +it('filters through one bulk request, preserving identities/order/duplicates and known fields only', async () => { + const pdp = await startPdp({ + status: 200, + body: { allow: [{ allow: true }, { allow: false }, { allow: true }, { allow: true }] }, + }); + const enforcer = new Enforcer( + ConfigFactory.build({ ...config, pdp: pdp.url, multiTenancy: { defaultTenant: 'custom' } }), + pino({ level: 'silent' }), + ); + const global = Object.freeze({ globalOnly: true, shared: 'global' }); + const shared = Object.freeze({ methodOnly: true, shared: 'call' }); + const first = Object.freeze({ + type: 'document', + key: 'one', + title: 'Kept title', + attributes: Object.freeze({ enabled: false, count: 0 }), + context: Object.freeze({ objectOnly: true, shared: 'object' }), + }); + const denied = Object.freeze({ type: 'document', key: 'two', tenant: 'east' }); + const last = Object.freeze({ type: 'document', key: 'three', tenant: '', extra: null }); + const objects = Object.freeze([first, denied, first, last]); + const snapshot = JSON.stringify({ objects, global, shared }); + enforcer.contextStore.add(global); + const result = await enforcer.filterObjects('alice', 'read', objects, shared); + expect(result).toStrictEqual([first, first, last]); + expect(result[0]).toBe(first); + expect(result[1]).toBe(first); + expect(result[2]).toBe(last); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/bulk', + body: [ + { + user: { key: 'alice' }, + action: 'read', + resource: { type: 'document', key: 'one', tenant: 'custom', attributes: first.attributes }, + context: { globalOnly: true, methodOnly: true, objectOnly: true, shared: 'object' }, + }, + { + user: { key: 'alice' }, + action: 'read', + resource: { type: 'document', key: 'two', tenant: 'east' }, + context: { globalOnly: true, methodOnly: true, shared: 'call' }, + }, + { + user: { key: 'alice' }, + action: 'read', + resource: { type: 'document', key: 'one', tenant: 'custom', attributes: first.attributes }, + context: { globalOnly: true, methodOnly: true, objectOnly: true, shared: 'object' }, + }, + { + user: { key: 'alice' }, + action: 'read', + resource: { type: 'document', key: 'three', tenant: 'custom' }, + context: { globalOnly: true, methodOnly: true, shared: 'call' }, + }, + ], + }); + expect(JSON.stringify({ objects, global, shared })).toBe(snapshot); +}); + +it('returns the original dispatched array snapshot when the caller mutates the array', async () => { + const pdp = await startPdp({ status: 200, body: { allow: [{ allow: true }, { allow: false }] } }); + const permit = new Permit({ ...config, pdp: pdp.url }); + const first = { type: 'document', key: 'one', title: 'Original' }; + const second = { type: 'document', key: 'two', title: 'Denied' }; + const objects = [first, second]; + const pending = permit.filterObjects('alice', 'read', objects); + objects.splice(0, objects.length, { type: 'changed', key: 'changed', title: 'Changed' }); + const result = await pending; + expect(result).toStrictEqual([first]); + expect(result[0]).toBe(first); +}); + +it('does not inject a default tenant when configured off and retains object context as request data', async () => { + const pdp = await startPdp({ status: 200, body: { allow: [{ allow: true }] } }); + const permit = new Permit({ + ...config, + pdp: pdp.url, + multiTenancy: { useDefaultTenantIfEmpty: false }, + }); + const context = JSON.parse('{"__proto__":{"flag":true},"constructor":"legal"}'); + const object = { type: 'document', key: 'one', context, extra: 'Only returned' }; + expect(await permit.filterObjects('alice', 'read', [object])).toStrictEqual([object]); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/bulk', + body: [ + { + user: { key: 'alice' }, + action: 'read', + resource: { type: 'document', key: 'one' }, + context, + }, + ], + }); +}); + +it('returns [] for empty input without any HTTP request', async () => { + const pdp = await startPdp({ status: 200, body: {} }); + const permit = new Permit({ ...config, pdp: pdp.url }); + expect(await permit.filterObjects('alice', 'read', Object.freeze([]))).toStrictEqual([]); + expect(pdp.requests).toHaveLength(0); +}); + +it('validates unsupported OPA before empty input and regardless of the error policy', async () => { + const pdp = await startPdp({ status: 200, body: {} }); + const permit = new Permit({ ...config, pdp: pdp.url, throwOnError: false }); + await expect( + permit.filterObjects( + 'alice', + 'read', + [], + {}, + { + useOpa: true, + throwOnError: false, + }, + ), + ).rejects.toBeInstanceOf(PermitError); + expect(pdp.requests).toHaveLength(0); +}); + +it('rejects sparse and explicit undefined input before HTTP even in non-throwing mode', async () => { + const pdp = await startPdp({ status: 200, body: { allow: [{ allow: true }] } }); + const permit = new Permit({ ...config, pdp: pdp.url, throwOnError: false }); + const sparse: IFilterObject[] = []; + sparse.length = 2; + sparse[1] = { type: 'document' }; + await expect(permit.filterObjects('alice', 'read', sparse)).rejects.toBeInstanceOf(PermitError); + await expect( + Reflect.apply(permit.filterObjects, permit, [ + 'alice', + 'read', + [undefined, { type: 'document' }], + {}, + { throwOnError: false }, + ]), + ).rejects.toBeInstanceOf(PermitError); + expect(pdp.requests).toHaveLength(0); +}); + +it.each([ + { allow: [{ allow: false }, { allow: false }] }, + { allow: [{ allow: true }] }, + { allow: [{ allow: true }, { allow: 'false' }] }, + { allow: [{ allow: true }, {}] }, +])('never grants a subset from denied or malformed bulk output: %j', async (body) => { + const pdp = await startPdp({ status: 200, body }); + const permit = new Permit({ ...config, pdp: pdp.url }); + const objects = [ + { type: 'document', key: 'one' }, + { type: 'document', key: 'two' }, + ]; + if (body.allow.every((value) => value.allow === false)) { + expect(await permit.filterObjects('alice', 'read', objects)).toStrictEqual([]); + } else { + await expect(permit.filterObjects('alice', 'read', objects)).rejects.toBeInstanceOf( + PermitPDPStatusError, + ); + } + expect( + await permit.filterObjects('alice', 'read', objects, {}, { throwOnError: false }), + ).toStrictEqual([]); +}); + +it('honors operational bulk failures without retaining any original object', async () => { + const pdp = await startPdp({ status: 503, body: {} }); + const permit = new Permit({ ...config, pdp: pdp.url }); + const objects = [{ type: 'document', key: 'one' }]; + await expect(permit.filterObjects('alice', 'read', objects)).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 503, + }); + expect( + await permit.filterObjects('alice', 'read', objects, {}, { throwOnError: false }), + ).toStrictEqual([]); +}); diff --git a/src/enforcement/interfaces.ts b/src/enforcement/interfaces.ts index ad963e04..39cabcb5 100644 --- a/src/enforcement/interfaces.ts +++ b/src/enforcement/interfaces.ts @@ -1,5 +1,5 @@ -import { Context } from '../utils/context'; -import { Dict } from '../utils/dict'; +import { type Context } from '#src/utils/context'; +import { type Dict } from '#src/utils/dict'; export interface ICheckInput { user: IUser; @@ -8,6 +8,15 @@ export interface ICheckInput { context?: Context; } +/** The published container PDP URL authorization request. */ +export interface ICheckUrlInput { + user: IUser; + http_method: string; + url: string; + tenant: string; + context: Context; +} + export interface ICheckOpaInput { input: ICheckInput; } @@ -90,6 +99,56 @@ export interface IResource { attributes?: Dict; } +/** An object to filter, with request context that overrides the shared call context. */ +export interface IFilterObject extends IResource { + context?: Context; +} + +/** Filters one page of role assignments cached by a compatible container PDP. */ +export interface ILocalRoleAssignmentsQuery { + /** User key; omission leaves users unfiltered. */ + user?: string; + /** Role key; omission leaves roles unfiltered. */ + role?: string; + /** Tenant key; omission does not select the configured default tenant. */ + tenant?: string; + /** Resource type key. */ + resource?: string; + /** Resource type:key identifier, forwarded unchanged. */ + resourceInstance?: string; + /** Positive safe integer; defaults to 1. */ + page?: number; + /** Page size from 1 through 100; defaults to 30. */ + perPage?: number; +} + +/** A local PDP assignment with keys, distinct from a control-plane assignment with IDs. */ +export interface ILocalRoleAssignment { + user: string; + role: string; + tenant: string; + /** Resource type:key identifier; absence and explicit null are preserved. */ + resource_instance?: string | null; + [id: string]: unknown; +} + +/** A role assignment explaining a user's access to a resource. */ +export interface IAuthorizedUserAssignment { + user: string; + tenant: string; + resource: string; + role: string; + [id: string]: unknown; +} + +/** The complete authorized-user result, including arbitrary user-key dictionary entries. */ +export interface IAuthorizedUsersResult { + resource: string; + tenant: string; + users: Record; + [id: string]: unknown; +} + /** * Represents the bulk decision made by a policy. */ @@ -138,11 +197,12 @@ export interface TenantDetails { } export interface AllTenantsCheckResponse { + allow: true; tenant: TenantDetails; } export interface AllTenantsResponse { - allowedTenants: AllTenantsCheckResponse[]; + allowed_tenants: AllTenantsCheckResponse[]; } interface TenantPermissions { @@ -178,7 +238,3 @@ export interface GetUserPermissionsResult { export interface OpaGetUserPermissionsResult { result: GetUserPermissionsResult; } - -export function isOpaGetUserPermissionsResult(obj: any): obj is OpaGetUserPermissionsResult { - return 'result' in obj; -} diff --git a/src/enforcement/json-dispatch.test.ts b/src/enforcement/json-dispatch.test.ts new file mode 100644 index 00000000..1914a0c8 --- /dev/null +++ b/src/enforcement/json-dispatch.test.ts @@ -0,0 +1,219 @@ +import { deepStrictEqual } from 'node:assert'; + +import axios, { AxiosError } from 'axios'; +import { vi } from 'vitest'; + +import { Permit, PermitError } from '#src/index'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; +import { type Context } from '#src/utils/context'; + +const options = { token: TEST_TOKEN, retry: false as const, log: { level: 'silent' as const } }; +const context: Context = JSON.parse('{"__proto__":{"flag":true},"constructor":"legal"}'); +const resource = JSON.parse( + '{"type":"document","attributes":{"__proto__":"attribute","constructor":"legal"}}', +); +const checkBody = { + user: { key: 'alice' }, + action: 'read', + resource: { ...resource, tenant: 'default' }, + context, +}; +const operations = [ + { + method: 'check', + path: '/allowed', + response: { allow: true }, + body: checkBody, + fallback: false, + run: (permit: Permit, input: Context, throwOnError = true) => + permit.check('alice', 'read', resource, input, { throwOnError }), + }, + { + method: 'bulkCheck', + path: '/allowed/bulk', + response: { allow: [{ allow: true }] }, + body: [checkBody], + fallback: [false], + run: (permit: Permit, input: Context, throwOnError = true) => + permit.bulkCheck([{ user: 'alice', action: 'read', resource }], input, { throwOnError }), + }, + { + method: 'checkAllTenants', + path: '/allowed/all-tenants', + response: { allowed_tenants: [] }, + body: { ...checkBody, resource }, + fallback: [], + run: (permit: Permit, input: Context) => + permit.checkAllTenants('alice', 'read', resource, input), + }, + { + method: 'getUserPermissions', + path: '/user-permissions', + response: {}, + body: { user: { key: 'alice' }, context }, + fallback: {}, + run: (permit: Permit, input: Context, throwOnError = true) => + permit.getUserPermissions('alice', undefined, undefined, undefined, { + context: input, + throwOnError, + }), + }, + { + method: 'getAuthorizedUsers', + path: '/authorized_users', + response: { resource: 'document:*', tenant: 'default', users: {} }, + body: { action: 'read', resource: checkBody.resource, context }, + fallback: { resource: 'document:*', tenant: 'default', users: {} }, + run: (permit: Permit, input: Context, throwOnError = true) => + permit.getAuthorizedUsers('read', resource, input, { throwOnError }), + }, + { + method: 'getUserTenants', + path: '/user-tenants', + response: [], + body: { user: { key: 'alice' }, context }, + fallback: [], + run: (permit: Permit, input: Context, throwOnError = true) => + permit.getUserTenants('alice', input, { throwOnError }), + }, +]; + +it.each(operations)( + 'preserves legal own JSON dictionary keys on $method wire requests', + async (operation) => { + const pdp = await startPdp({ status: 200, body: operation.response }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const before = JSON.stringify({ context, resource }); + await operation.run(permit, context); + assertPdpRequest(pdp.requests[0], { + path: operation.path, + body: operation.body, + sdk: operation.method === 'checkAllTenants' ? 'node' : undefined, + }); + deepStrictEqual(pdp.requests[0]?.body, operation.body); + expect(JSON.stringify({ context, resource })).toBe(before); + }, +); + +for (const operation of operations) { + it.each(['circular', 'bigint'])( + '%s JSON input fails safely before HTTP on ' + operation.method, + async (kind) => { + const pdp = await startPdp({ status: 200, body: operation.response }); + const privateValue = 'private-invalid-json-do-not-retain'; + const input: Context = { privateValue }; + input['bad'] = kind === 'circular' ? input : 1n; + const permit = new Permit({ ...options, pdp: pdp.url }); + const error: unknown = await operation + .run(permit, input) + .catch((failure: unknown) => failure); + expect(error).toBeInstanceOf(PermitError); + expect(error).toMatchObject({ + name: 'PermitError', + message: expect.stringContaining(`Permit.${operation.method}() input`), + }); + expect(error).not.toHaveProperty('cause'); + expect(String(error)).not.toContain(privateValue); + expect(JSON.stringify(error)).not.toContain(privateValue); + const denying = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + expect(await operation.run(denying, input, false)).toStrictEqual(operation.fallback); + expect(pdp.requests).toHaveLength(0); + }, + ); +} + +it('supplied OPA hooks parse/edit JSON text, preserving live caller defaults and retry ownership', async () => { + const wire = await startPdp({ status: 200, body: { result: { allow: true } } }); + const bodies: unknown[] = []; + const transform = vi.fn((data: unknown) => { + if (typeof data === 'string') { + const body = JSON.parse(data); + expect(Object.hasOwn(body.input.context, '__proto__')).toBe(true); + body.input.context.transformed = true; + return JSON.stringify(body); + } + return JSON.stringify(data); + }); + const caller = axios.create({ + baseURL: wire.url, + auth: { username: 'caller', password: 'owned' }, + headers: { 'X-Caller': 'kept' }, + transformRequest: [transform], + }); + const requestHook = vi.fn((config) => { + if (config.url === 'root') { + expect(new URL(config.baseURL).port).toBe('8181'); + config.baseURL = wire.url + '/v1/data/permit/'; + expect(typeof config.data).toBe('string'); + const body = JSON.parse(config.data); + body.input.context.hook = true; + config.data = JSON.stringify(body); + } + return config; + }); + const responseHook = vi.fn((response) => response); + caller.interceptors.request.use(requestHook, undefined, { synchronous: true }); + caller.interceptors.response.use(responseHook); + const before = { ...caller.defaults, headers: structuredClone(caller.defaults.headers) }; + const httpAdapter = axios.getAdapter(caller.defaults.adapter); + let attempts = 0; + caller.defaults.adapter = async (config) => { + bodies.push(JSON.parse(config.data)); + if (config.url === 'root' && attempts++ === 0) { + throw new AxiosError('Temporary failure', undefined, config, undefined, { + config, + status: 503, + statusText: 'Unavailable', + headers: {}, + data: {}, + }); + } + return httpAdapter(config); + }; + const ownAdapter = caller.defaults.adapter; + const retryCondition = vi.fn(() => true); + const permit = new Permit({ + ...options, + pdp: wire.url, + opaAxiosInstance: caller, + pdpRetry: { maxRetries: 1, retryDelay: 0, maxDelay: 0, retryCondition }, + }); + expect(await permit.check('alice', 'read', resource, context, { useOpa: true })).toBe(true); + expect(attempts).toBe(2); + expect(retryCondition).toHaveBeenCalledTimes(1); + expect(bodies.slice(0, 2)).toStrictEqual([ + { input: { ...checkBody, context: { ...context, hook: true, transformed: true } } }, + { input: { ...checkBody, context: { ...context, hook: true, transformed: true } } }, + ]); + expect(wire.requests[0]?.path).toBe('/v1/data/permit/root'); + expect(wire.requests[0]?.headers.authorization).toBe(`Bearer ${TEST_TOKEN}`); + await caller.post('/direct', { direct: true }); + expect(bodies[2]).toStrictEqual({ direct: true }); + expect(wire.requests[1]?.headers.authorization).toBe( + 'Basic ' + Buffer.from('caller:owned').toString('base64'), + ); + expect(transform).toHaveBeenCalledTimes(3); + expect(requestHook).toHaveBeenCalledTimes(3); + expect(responseHook).toHaveBeenCalledTimes(2); + expect(caller.interceptors.request.handlers).toHaveLength(1); + expect(caller.interceptors.response.handlers).toHaveLength(1); + expect(caller.defaults).toEqual({ ...before, adapter: ownAdapter }); +}); + +it('redacts serialized private JSON echoed by a supplied OPA hook without retaining the body', async () => { + const secret = 'private-json-request-description'; + const caller = axios.create(); + const raw = new Error(secret); + caller.interceptors.request.use(() => { + throw raw; + }); + const permit = new Permit({ ...options, opaAxiosInstance: caller }); + const error: unknown = await permit + .check('alice', 'read', 'document', { secret }, { useOpa: true }) + .catch((failure: unknown) => failure); + expect(error).toMatchObject({ name: 'PermitConnectionError' }); + expect(String(error)).not.toContain(secret); + expect(JSON.stringify(error)).not.toContain(secret); + expect(raw.message).toBe(secret); + expect(error).not.toHaveProperty('cause.config.data'); +}); diff --git a/src/enforcement/local-role-assignments.test.ts b/src/enforcement/local-role-assignments.test.ts new file mode 100644 index 00000000..1e3342bd --- /dev/null +++ b/src/enforcement/local-role-assignments.test.ts @@ -0,0 +1,446 @@ +import { deepStrictEqual } from 'node:assert'; +import { createServer, type IncomingHttpHeaders } from 'node:http'; +import { type Socket } from 'node:net'; +import { inspect } from 'node:util'; + +import pino from 'pino'; + +import { ConfigFactory } from '#src/config'; +import { Enforcer } from '#src/enforcement/enforcer'; +import { parseLocalRoleAssignmentsResponse } from '#src/enforcement/responses'; +import { Permit, PermitConnectionError, PermitError, PermitPDPStatusError } from '#src/index'; +import { TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; +import { rejectionOf } from '#src/tests/helpers/rejection'; + +const options = { token: TEST_TOKEN, retry: false as const, log: { level: 'silent' as const } }; +const tenantRow = { user: 'alice', role: 'reader', tenant: 'east' }; +const instanceRow = { ...tenantRow, resource_instance: 'document:report' }; +interface Request { + method: string | undefined; + path: string; + headers: IncomingHttpHeaders; + body: string; +} +interface Reply { + status: number; + body: unknown; + delayMs?: number; + disconnect?: boolean; +} + +async function startLocalPdp(reply: Reply | ((index: number) => Reply)) { + const requests: Request[] = []; + const sockets = new Set(); + process.env['NO_PROXY'] = [process.env['NO_PROXY'], '127.0.0.1'].filter(Boolean).join(','); + const server = createServer((request, response) => { + let body = ''; + request.setEncoding('utf8'); + request.on('data', (chunk: string) => { + body += chunk; + }); + request.on('end', () => { + requests.push({ + method: request.method, + path: request.url ?? '', + headers: request.headers, + body, + }); + const selected = typeof reply === 'function' ? reply(requests.length - 1) : reply; + if (selected.disconnect) { + request.socket.destroy(); + return; + } + const send = () => { + response.writeHead(selected.status, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify(selected.body)); + }; + if (selected.delayMs === undefined) send(); + else setTimeout(send, selected.delayMs).unref(); + }); + }); + server.on('connection', (socket: Socket) => { + sockets.add(socket); + socket.on('close', () => sockets.delete(socket)); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve(); + }); + }); + onTestFinished(async () => { + await new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + for (const socket of sockets) socket.destroy(); + }); + }); + const address = server.address(); + assert(address !== null && typeof address !== 'string'); + return { url: `http://127.0.0.1:${address.port}`, requests }; +} + +function requestQuery(request: Request | undefined): Record { + assert(request); + expect(request.method).toBe('GET'); + expect(request.body).toBe(''); + expect(request.headers.authorization).toBe(`Bearer ${TEST_TOKEN}`); + expect(request.headers['x-permit-sdk-version']).toBe( + `node:${process.env['npm_package_version'] ?? 'unknown'}`, + ); + return Object.fromEntries(new URL(request.path, 'http://fixture.invalid').searchParams); +} + +it('reads one full local page through the configured PDP prefix and never adds default tenancy', async () => { + const rows = [ + tenantRow, + { ...instanceRow, future: { enabled: false, count: 0, nullable: null } }, + { ...tenantRow, resource_instance: null }, + instanceRow, + tenantRow, + ]; + const pdp = await startLocalPdp({ status: 200, body: rows }); + const permit = new Permit({ + ...options, + pdp: `${pdp.url}/gateway`, + apiUrl: 'http://unused.invalid', + multiTenancy: { defaultTenant: 'not-a-filter' }, + }); + deepStrictEqual(await permit.getLocalRoleAssignments(), rows); + expect(pdp.requests).toHaveLength(1); + expect(pdp.requests[0]?.path).toBe('/gateway/local/role_assignments?page=1&per_page=30'); + expect(requestQuery(pdp.requests[0])).toStrictEqual({ page: '1', per_page: '30' }); + const parsed = parseLocalRoleAssignmentsResponse(rows); + expect(Object.hasOwn(parsed[0] ?? {}, 'resource_instance')).toBe(false); + expect(parsed[2]?.resource_instance).toBeNull(); + expect(rows[0]).toStrictEqual(tenantRow); +}); + +it.each(['user', 'role', 'tenant', 'resource', 'resourceInstance'] as const)( + 'maps and encodes the single %s filter exactly once', + async (field) => { + const pdp = await startLocalPdp({ status: 200, body: [] }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const value = 'a +%/:?&=🦉'; + expect(await permit.getLocalRoleAssignments(Object.freeze({ [field]: value }))).toStrictEqual( + [], + ); + expect(requestQuery(pdp.requests[0])).toStrictEqual({ + [field === 'resourceInstance' ? 'resource_instance' : field]: value, + page: '1', + per_page: '30', + }); + expect(pdp.requests[0]?.path).toContain('%2B%25'); + expect(pdp.requests).toHaveLength(1); + }, +); + +it('forwards all key filters and accepted empty strings without context or normalization', async () => { + const pdp = await startLocalPdp({ status: 200, body: [] }); + const enforcer = new Enforcer( + ConfigFactory.build({ ...options, pdp: pdp.url }), + pino({ level: 'silent' }), + ); + enforcer.contextStore.add({ secret: 'never-on-wire' }); + const query = Object.freeze({ + user: '', + role: 'r/a', + tenant: 'tenant', + resource: 'document', + resourceInstance: 'document:a:b', + page: 2, + perPage: 100, + }); + expect( + await enforcer.getLocalRoleAssignments(query, Object.freeze({ timeout: 0 })), + ).toStrictEqual([]); + expect(requestQuery(pdp.requests[0])).toStrictEqual({ + user: '', + role: 'r/a', + tenant: 'tenant', + resource: 'document', + resource_instance: 'document:a:b', + page: '2', + per_page: '100', + }); + expect(query.resourceInstance).toBe('document:a:b'); +}); + +it.each([ + { page: Number.MAX_SAFE_INTEGER, perPage: 1 }, + { page: 1, perPage: 100 }, +])('accepts pagination boundary %j without fetching another page', async (query) => { + const pdp = await startLocalPdp({ status: 200, body: [tenantRow] }); + const permit = new Permit({ ...options, pdp: pdp.url }); + expect(await permit.getLocalRoleAssignments(query)).toStrictEqual([tenantRow]); + expect(requestQuery(pdp.requests[0])).toStrictEqual({ + page: String(query.page), + per_page: String(query.perPage), + }); + expect(pdp.requests).toHaveLength(1); +}); + +const invalidQueries: unknown[] = [ + null, + [], + 'alice', + 7, + true, + { user: 7 }, + { role: null }, + { tenant: [] }, + { resource: {} }, + { resourceInstance: 1 }, + { context: {} }, + { detailed: true }, + { includeTotalCount: true }, + { resource_instance: 'a:b' }, + { [Symbol('unknown')]: 'value' }, + ...[0, -1, 1.5, NaN, Infinity, Number.MAX_SAFE_INTEGER + 1, '1', null].map((page) => ({ page })), + ...[0, -1, 101, 1.5, NaN, Infinity, '30', null].map((perPage) => ({ perPage })), +]; +it.each(invalidQueries)( + 'rejects invalid query %j before HTTP under every error policy', + async (query) => { + const pdp = await startLocalPdp({ status: 200, body: [] }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + for (const throwOnError of [false, true]) { + await expect( + Reflect.apply(permit.getLocalRoleAssignments, permit, [query, { throwOnError }]), + ).rejects.toBeInstanceOf(PermitError); + } + expect(pdp.requests).toHaveLength(0); + }, +); + +it.each([ + null, + [], + false, + 'options', + { useOpa: true }, + { useOpa: 'true' }, + { throwOnError: 0 }, + { timeout: -1 }, + { timeout: NaN }, + { timeout: Infinity }, + { timeout: 2_147_483_648 }, + { timeout: '10' }, + { timeout: null }, + { tenant: 'east' }, + { context: {} }, +])('rejects invalid or unsupported options %j before HTTP', async (config) => { + const pdp = await startLocalPdp({ status: 200, body: [] }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + await expect( + Reflect.apply(permit.getLocalRoleAssignments, permit, [{}, config]), + ).rejects.toBeInstanceOf(PermitError); + expect(pdp.requests).toHaveLength(0); +}); + +const invalidBodies: unknown[] = [ + null, + {}, + true, + 'rows', + 7, + { data: [tenantRow] }, + { result: [tenantRow] }, + [null], + [[]], + [7], + [true], + ...['user', 'role', 'tenant'].flatMap((field) => [ + [tenantRow, Object.fromEntries(Object.entries(tenantRow).filter(([key]) => key !== field))], + [tenantRow, { ...tenantRow, [field]: null }], + [tenantRow, { ...tenantRow, [field]: 7 }], + ]), + ...[undefined, 7, {}, [], true].map((resource_instance) => [ + tenantRow, + { ...tenantRow, resource_instance }, + ]), +]; +it.each(invalidBodies)( + 'rejects every malformed 200 page %j without returning a partial result', + async (body) => { + // JSON omits explicit undefined; the direct parser still rejects it below. + if ( + Array.isArray(body) && + body.some( + (row) => + row && + typeof row === 'object' && + Object.hasOwn(row, 'resource_instance') && + row.resource_instance === undefined, + ) + ) { + expect(() => parseLocalRoleAssignmentsResponse(body)).toThrow(); + return; + } + const pdp = await startLocalPdp({ status: 200, body }); + const permit = new Permit({ ...options, pdp: pdp.url }); + for (const throwOnError of [true, false]) { + await expect(permit.getLocalRoleAssignments({}, { throwOnError })).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 200, + }); + } + }, +); + +it('rejects sparse arrays and retains legal additive dictionary keys', () => { + const sparse: unknown[] = [tenantRow]; + sparse.length = 2; + expect(() => parseLocalRoleAssignmentsResponse(sparse)).toThrow(); + const row = { + ...tenantRow, + ...Object.fromEntries([ + ['__proto__', { enabled: false }], + ['constructor', null], + ]), + }; + const parsed = parseLocalRoleAssignmentsResponse([row]); + deepStrictEqual(parsed, [row]); + expect(Object.hasOwn(parsed[0] ?? {}, '__proto__')).toBe(true); + expect(Object.getPrototypeOf(parsed[0])).toBe(Object.prototype); +}); + +it.each([404, 405, 501])( + 'reports an unavailable endpoint at %s even with fallback disabled errors', + async (status) => { + const pdp = await startLocalPdp({ status, body: { detail: 'Unavailable' } }); + const permit = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + const error = await rejectionOf(permit.getLocalRoleAssignments()); + expect(error).toBeInstanceOf(PermitPDPStatusError); + expect(error).toMatchObject({ statusCode: status }); + expect(error.message).toContain('/local/role_assignments'); + expect(error.message).toContain('compatible Permit container PDP'); + }, +); + +it.each([201, 204, 302, 401, 403, 422, 500, 503])( + 'follows per-call and global ordinary HTTP policy for %s', + async (status) => { + const pdp = await startLocalPdp({ status, body: { detail: 'Rejected' } }); + const permit = new Permit({ ...options, pdp: pdp.url }); + await expect(permit.getLocalRoleAssignments()).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: status, + }); + expect(await permit.getLocalRoleAssignments({}, { throwOnError: false })).toStrictEqual([]); + const fallback = new Permit({ ...options, pdp: pdp.url, throwOnError: false }); + expect(await fallback.getLocalRoleAssignments()).toStrictEqual([]); + await expect( + fallback.getLocalRoleAssignments({}, { throwOnError: true }), + ).rejects.toMatchObject({ statusCode: status }); + }, +); + +it('snapshots filters and error policy synchronously across calls and retry attempts', async () => { + const pdp = await startLocalPdp((index) => ({ + status: index === 0 ? 503 : 200, + body: index === 0 ? {} : [tenantRow], + delayMs: 5, + })); + const permit = new Permit({ + ...options, + pdp: pdp.url, + retry: { maxRetries: 1, retryDelay: 5, maxDelay: 5 }, + }); + const query = { user: 'alice', resourceInstance: 'document:original', page: 2, perPage: 1 }; + const config = { timeout: 1_000, throwOnError: true }; + const pending = permit.getLocalRoleAssignments(query, config); + query.user = 'changed'; + query.resourceInstance = 'document:changed'; + query.page = 7; + config.timeout = 0; + config.throwOnError = false; + expect(await pending).toStrictEqual([tenantRow]); + expect(pdp.requests).toHaveLength(2); + for (const request of pdp.requests) + expect(requestQuery(request)).toStrictEqual({ + user: 'alice', + resource_instance: 'document:original', + page: '2', + per_page: '1', + }); + const failing = await startLocalPdp({ status: 503, body: {}, delayMs: 5 }); + const errorPermit = new Permit({ ...options, pdp: failing.url, throwOnError: false }); + const policy = { throwOnError: true }; + const failed = errorPermit.getLocalRoleAssignments({}, policy); + policy.throwOnError = false; + await expect(failed).rejects.toMatchObject({ statusCode: 503 }); +}); + +it('keeps concurrent query snapshots separate', async () => { + const pdp = await startLocalPdp({ status: 200, body: [] }); + const permit = new Permit({ ...options, pdp: pdp.url }); + const query = { user: 'alice', tenant: 'east' }; + const first = permit.getLocalRoleAssignments(query); + query.user = 'bob'; + query.tenant = 'west'; + const second = permit.getLocalRoleAssignments(query); + expect(await Promise.all([first, second])).toStrictEqual([[], []]); + expect(pdp.requests.map(requestQuery)).toContainEqual({ + user: 'alice', + tenant: 'east', + page: '1', + per_page: '30', + }); + expect(pdp.requests.map(requestQuery)).toContainEqual({ + user: 'bob', + tenant: 'west', + page: '1', + per_page: '30', + }); +}); + +it('preserves timeout zero and per-call overrides while exposing ordinary network failure', async () => { + const pdp = await startLocalPdp({ status: 200, body: [], delayMs: 50 }); + const permit = new Permit({ ...options, pdp: pdp.url, timeout: 10 }); + await expect(permit.getLocalRoleAssignments()).rejects.toBeInstanceOf(PermitConnectionError); + expect(await permit.getLocalRoleAssignments({}, { throwOnError: false })).toStrictEqual([]); + expect(await permit.getLocalRoleAssignments({}, Object.freeze({ timeout: 0 }))).toStrictEqual([]); + expect(await permit.getLocalRoleAssignments({}, { timeout: 200 })).toStrictEqual([]); + const reset = await startLocalPdp({ status: 200, body: [], disconnect: true }); + const disconnected = new Permit({ ...options, pdp: reset.url }); + await expect(disconnected.getLocalRoleAssignments()).rejects.toBeInstanceOf( + PermitConnectionError, + ); + expect(await disconnected.getLocalRoleAssignments({}, { throwOnError: false })).toStrictEqual([]); +}); + +it('does not expose tokens, private query values or untrusted body echoes in errors or logs', async () => { + const query = { + user: 'private-user-8764', + role: 'private-role-8754', + tenant: 'private-tenant-4321', + resource: 'private-resource-1234', + resourceInstance: 'private-resource:private-instance-5678', + }; + const echo = [TEST_TOKEN, ...Object.values(query)].join(' '); + const pdp = await startLocalPdp({ + status: 422, + body: { detail: echo, message: echo, future: echo }, + }); + let logs = ''; + const logger = pino( + { level: 'error' }, + { + write(value: string) { + logs += value; + }, + }, + ); + const enforcer = new Enforcer(ConfigFactory.build({ ...options, pdp: pdp.url }), logger); + const error = await rejectionOf(enforcer.getLocalRoleAssignments(query)); + const diagnostic = [ + inspect(error, { depth: 10 }), + JSON.stringify(error), + error.message, + logs, + ].join(' '); + for (const secret of [TEST_TOKEN, ...Object.values(query)]) + expect(diagnostic).not.toContain(secret); + expect(error).toMatchObject({ name: 'PermitPDPStatusError', statusCode: 422 }); +}); diff --git a/src/enforcement/pdp-capabilities.test.ts b/src/enforcement/pdp-capabilities.test.ts new file mode 100644 index 00000000..06155fae --- /dev/null +++ b/src/enforcement/pdp-capabilities.test.ts @@ -0,0 +1,306 @@ +import { deepStrictEqual } from 'node:assert'; + +import pino from 'pino'; + +import { Permit } from '#src/index'; +import { ConfigFactory } from '#src/config'; +import { Enforcer, PermitConnectionError, PermitError } from '#src/enforcement/enforcer'; +import { type IResource } from '#src/enforcement/interfaces'; +import { parseAuthorizedUsersResponse, parseUserTenantsResponse } from '#src/enforcement/responses'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; + +const resource = { type: 'document', key: 'report', tenant: 'east' }; +const assignment = { user: 'alice', tenant: 'east', resource: 'document:report', role: 'reader' }; +const authorized = { resource: 'document:report', tenant: 'east', users: { alice: [assignment] } }; +const config = { token: TEST_TOKEN, retry: false as const, log: { level: 'silent' as const } }; + +it('queries permissions with global then request context in the existing fifth argument', async () => { + const pdp = await startPdp({ status: 200, body: { document: { permissions: ['read'] } } }); + const enforcer = new Enforcer( + ConfigFactory.build({ ...config, pdp: pdp.url }), + pino({ level: 'silent' }), + ); + enforcer.contextStore.add({ globalOnly: true, shared: 'global' }); + const user = Object.freeze({ key: 'alice', attributes: { eligible: true } }); + const context = Object.freeze({ shared: 'call', enabled: false, count: 0 }); + expect( + await enforcer.getUserPermissions(user, ['east'], ['document:report'], ['document'], { + context, + }), + ).toStrictEqual({ document: { permissions: ['read'] } }); + assertPdpRequest(pdp.requests[0], { + path: '/user-permissions', + body: { + user, + tenants: ['east'], + resources: ['document:report'], + resource_types: ['document'], + context: { globalOnly: true, shared: 'call', enabled: false, count: 0 }, + }, + }); + expect(context).toStrictEqual({ shared: 'call', enabled: false, count: 0 }); + expect(enforcer.contextStore.getDerivedContext({})).toStrictEqual({ + globalOnly: true, + shared: 'global', + }); +}); + +it('sends authorized-user resource attributes and preserves the complete validated result', async () => { + const result = { + ...authorized, + users: Object.fromEntries( + ['alice', '__proto__', 'constructor'].map((key) => [key, [{ ...assignment, future: null }]]), + ), + future: { value: null }, + }; + const pdp = await startPdp({ status: 200, body: result }); + const permit = new Permit({ ...config, pdp: pdp.url }); + const input = Object.freeze({ ...resource, attributes: { enabled: false, count: 0 } }); + deepStrictEqual(await permit.getAuthorizedUsers('read', input, { request: 'caller' }), result); + assertPdpRequest(pdp.requests[0], { + path: '/authorized_users', + body: { action: 'read', resource: input, context: { request: 'caller' } }, + }); + const parsed = parseAuthorizedUsersResponse(result); + expect(Object.hasOwn(parsed.users, '__proto__')).toBe(true); + expect(Object.hasOwn(parsed.users, 'constructor')).toBe(true); + expect(Object.getPrototypeOf(parsed.users)).toBe(Object.prototype); + deepStrictEqual(result.users, parsed.users); +}); + +it.each(['getAuthorizedUsers', 'getUserTenants'] as const)( + 'merges global then call context for %s without changing either source', + async (method) => { + const response = method === 'getAuthorizedUsers' ? authorized : [{ key: 'east' }]; + const pdp = await startPdp({ status: 200, body: response }); + const enforcer = new Enforcer( + ConfigFactory.build({ ...config, pdp: pdp.url }), + pino({ level: 'silent' }), + ); + const global = Object.freeze({ globalOnly: true, shared: 'global' }); + const call = Object.freeze({ callOnly: true, shared: 'call', enabled: false, count: 0 }); + enforcer.contextStore.add(global); + if (method === 'getAuthorizedUsers') await enforcer.getAuthorizedUsers('read', resource, call); + else await enforcer.getUserTenants('alice', call); + expect(pdp.requests[0]?.body).toMatchObject({ + context: { globalOnly: true, callOnly: true, shared: 'call', enabled: false, count: 0 }, + }); + expect(global).toStrictEqual({ globalOnly: true, shared: 'global' }); + expect(call).toStrictEqual({ callOnly: true, shared: 'call', enabled: false, count: 0 }); + }, +); + +it('normalizes resource strings and the configured tenant for an empty authorized-user result', async () => { + const result = { resource: 'document:*', tenant: 'custom', users: {} }; + const pdp = await startPdp({ status: 200, body: result }); + const permit = new Permit({ + ...config, + pdp: pdp.url, + multiTenancy: { defaultTenant: 'custom' }, + }); + expect(await permit.getAuthorizedUsers('read', 'document')).toStrictEqual(result); + assertPdpRequest(pdp.requests[0], { + path: '/authorized_users', + body: { action: 'read', resource: { type: 'document', tenant: 'custom' }, context: {} }, + }); +}); + +it('reads container tenants, defaults only missing attributes and preserves additive fields', async () => { + const tenants = [ + { key: 'east', label: 'East' }, + { key: 'west', attributes: { enabled: false, count: 0 }, future: null }, + ]; + const pdp = await startPdp({ status: 200, body: tenants }); + const permit = new Permit({ ...config, pdp: pdp.url }); + const user = Object.freeze({ key: 'alice', attributes: { eligible: true } }); + expect(await permit.getUserTenants(user, { request: 'caller' })).toStrictEqual([ + { key: 'east', label: 'East', attributes: {} }, + tenants[1], + ]); + assertPdpRequest(pdp.requests[0], { + path: '/user-tenants', + body: { user, context: { request: 'caller' } }, + }); + expect(tenants[0]).toStrictEqual({ key: 'east', label: 'East' }); +}); + +it('accepts a genuine empty tenant array and wraps a string user', async () => { + const pdp = await startPdp({ status: 200, body: [] }); + const permit = new Permit({ ...config, pdp: pdp.url }); + expect(await permit.getUserTenants('alice')).toStrictEqual([]); + assertPdpRequest(pdp.requests[0], { + path: '/user-tenants', + body: { user: { key: 'alice' }, context: {} }, + }); +}); + +it.each([ + null, + [], + { tenant: 'east', users: {} }, + { resource: 'document:*', users: {} }, + { resource: 'document:*', tenant: 'east', users: [] }, + { resource: 1, tenant: 'east', users: {} }, + { ...authorized, users: { alice: assignment } }, + { ...authorized, users: { alice: [null] } }, + ...['user', 'tenant', 'resource', 'role'].map((field) => ({ + ...authorized, + users: { alice: [assignment], bad: [{ ...assignment, [field]: 7 }] }, + })), +])('rejects an entire malformed authorized-user response: %j', async (body) => { + const pdp = await startPdp({ status: 200, body }); + const permit = new Permit({ ...config, pdp: pdp.url }); + await expect(permit.getAuthorizedUsers('read', resource)).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 200, + }); + expect( + await permit.getAuthorizedUsers('read', resource, {}, { throwOnError: false }), + ).toStrictEqual({ resource: 'document:report', tenant: 'east', users: {} }); +}); + +it.each([ + null, + {}, + [null], + [{ key: 1 }], + [{ key: 'east', attributes: null }], + [{ key: 'east' }, { key: 'bad', attributes: [] }], +])('rejects an entire malformed tenant response: %j', async (body) => { + const pdp = await startPdp({ status: 200, body }); + const permit = new Permit({ ...config, pdp: pdp.url }); + await expect(permit.getUserTenants('alice')).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 200, + }); + expect(await permit.getUserTenants('alice', {}, { throwOnError: false })).toStrictEqual([]); +}); + +it('rejects sparse discovery arrays without preserving a partially valid member', () => { + const values: unknown[] = []; + values.length = 2; + values[1] = assignment; + expect(() => parseAuthorizedUsersResponse({ ...authorized, users: { alice: values } })).toThrow(); + values[1] = { key: 'east' }; + expect(() => parseUserTenantsResponse(values)).toThrow(); +}); + +it('reports an unavailable user-tenants capability even in non-throwing mode', async () => { + const pdp = await startPdp({ status: 404, body: { detail: 'Not found' } }); + const permit = new Permit({ ...config, pdp: pdp.url, throwOnError: false }); + await expect(permit.getUserTenants('alice', {}, { throwOnError: false })).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 404, + message: expect.stringContaining('compatible Permit container PDP'), + }); + await expect(permit.getUserTenants('alice')).rejects.toThrow( + 'endpoint /user-tenants is unavailable', + ); +}); + +it.each([403, 503])( + 'preserves operational discovery HTTP %i and honors the explicit error policy', + async (status) => { + const pdp = await startPdp({ status, body: { detail: 'Request rejected' } }); + const permit = new Permit({ ...config, pdp: pdp.url }); + await expect(permit.getAuthorizedUsers('read', resource)).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: status, + }); + await expect(permit.getUserTenants('alice')).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: status, + }); + expect(await permit.getUserTenants('alice', {}, { throwOnError: false })).toStrictEqual([]); + }, +); + +it('captures the authorized-user deny envelope before caller resource mutation', async () => { + const pdp = await startPdp({ status: 503, body: {} }); + const permit = new Permit({ ...config, pdp: pdp.url }); + const original: IResource = { ...resource }; + const pending = permit.getAuthorizedUsers('read', original, {}, { throwOnError: false }); + original.type = 'changed'; + original.key = 'changed'; + original.tenant = 'changed'; + expect(await pending).toStrictEqual({ resource: 'document:report', tenant: 'east', users: {} }); +}); + +it('uses the pinned wildcard/default-tenant empty envelope when automatic tenant injection is off', async () => { + const pdp = await startPdp({ status: 503, body: {} }); + const permit = new Permit({ + ...config, + pdp: pdp.url, + multiTenancy: { useDefaultTenantIfEmpty: false }, + }); + expect( + await permit.getAuthorizedUsers('read', 'document', {}, { throwOnError: false }), + ).toStrictEqual({ resource: 'document:*', tenant: 'default', users: {} }); +}); + +it('uses per-call timeout for both discovery queries', async () => { + const pdp = await startPdp(); + const permit = new Permit({ ...config, pdp: pdp.url, timeout: 5000 }); + await expect( + permit.getAuthorizedUsers('read', resource, {}, { timeout: 10 }), + ).rejects.toBeInstanceOf(PermitConnectionError); + await expect(permit.getUserTenants('alice', {}, { timeout: 10 })).rejects.toBeInstanceOf( + PermitConnectionError, + ); +}); + +it('rejects unsupported OPA for new discovery calls regardless of error policy without HTTP', async () => { + const pdp = await startPdp({ status: 200, body: authorized }); + const permit = new Permit({ ...config, pdp: pdp.url, throwOnError: false }); + await expect( + permit.getAuthorizedUsers('read', resource, {}, { useOpa: true, throwOnError: false }), + ).rejects.toBeInstanceOf(PermitError); + await expect( + permit.getUserTenants('alice', {}, { useOpa: true, throwOnError: false }), + ).rejects.toBeInstanceOf(PermitError); + expect(pdp.requests).toHaveLength(0); +}); + +it('retains the existing permission-query OPA deny policy', async () => { + const pdp = await startPdp({ status: 200, body: {} }); + const permit = new Permit({ ...config, pdp: pdp.url }); + await expect( + permit.getUserPermissions('alice', [], [], [], { useOpa: true }), + ).rejects.toBeInstanceOf(PermitError); + expect( + await permit.getUserPermissions('alice', [], [], [], { + useOpa: true, + throwOnError: false, + context: { request: true }, + }), + ).toStrictEqual({}); + expect(pdp.requests).toHaveLength(0); +}); + +it('keeps legal context/resource dictionary keys as own data and sends the default tenant', async () => { + const context = JSON.parse('{"__proto__":{"contextValue":true},"constructor":"legal"}'); + const input = JSON.parse( + '{"type":"document","__proto__":{"tenant":"untrusted"},"constructor":"legal"}', + ); + const snapshot = JSON.stringify({ context, input }); + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const enforcer = new Enforcer( + ConfigFactory.build({ ...config, pdp: pdp.url }), + pino({ level: 'silent' }), + ); + enforcer.contextStore.add(context); + const derived = enforcer.contextStore.getDerivedContext({ caller: true }); + expect(Object.hasOwn(derived, '__proto__')).toBe(true); + expect(Object.getPrototypeOf(derived)).toBe(Object.prototype); + expect(await enforcer.check('alice', 'read', input, { caller: true })).toBe(true); + assertPdpRequest(pdp.requests[0], { + path: '/allowed', + body: { + user: { key: 'alice' }, + action: 'read', + resource: { ...input, tenant: 'default' }, + context: { ...context, caller: true }, + }, + }); + expect(JSON.stringify({ context, input })).toBe(snapshot); +}); diff --git a/src/enforcement/response-validation.test.ts b/src/enforcement/response-validation.test.ts new file mode 100644 index 00000000..0ca57fad --- /dev/null +++ b/src/enforcement/response-validation.test.ts @@ -0,0 +1,413 @@ +import { once } from 'node:events'; +import { createServer, type IncomingMessage, type ServerResponse } from 'node:http'; + +import axios from 'axios'; + +import { Permit, PermitError, PermitPDPStatusError } from '#src/index'; +import { type ICheckQuery } from '#src/enforcement/interfaces'; +import { startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; +import { type CheckConfig } from '#src/utils/context'; + +const checks: ICheckQuery[] = [ + { user: 'user', action: 'read', resource: 'document:one' }, + { user: 'user', action: 'write', resource: 'document:two' }, +]; +const tenant = { key: 'tenant', attributes: { region: 'west' }, name: 'Tenant' }; +const permissionMap = { + result: { permissions: ['read'], roles: ['reader'], detail: { additive: true } }, + permissions: { permissions: [], tenant }, + document: { + permissions: ['document:read'], + tenant, + resource: { type: 'document', key: 'one', attributes: {}, name: 'Document' }, + }, +}; + +interface Operation { + name: string; + denied: unknown; + perCallErrors: boolean; + call: (permit: Permit, config?: CheckConfig) => Promise; + valid: { body: unknown; expected: unknown }[]; + invalid: unknown[]; +} + +const operations: Operation[] = [ + { + name: 'check', + denied: false, + perCallErrors: true, + call: (permit, config) => permit.check('user', 'read', 'document', {}, config), + valid: [ + { body: { allow: true, result: true, debug: {} }, expected: true }, + { body: { allow: false, result: false }, expected: false }, + { body: { result: { allow: true, extra: 'kept' } }, expected: true }, + { body: { result: { allow: false } }, expected: false }, + ], + invalid: [ + null, + [], + {}, + true, + { result: null }, + { result: {} }, + { result: true }, + ...[null, 'false', 'true', 0, 1, [], {}].flatMap((allow) => [ + { allow }, + { result: { allow } }, + ]), + { allow: 'true', result: { allow: true } }, + ], + }, + { + name: 'bulkCheck', + denied: [false, false], + perCallErrors: true, + call: (permit, config) => permit.bulkCheck(checks, {}, config), + valid: [ + { body: { allow: [{ allow: true }, { allow: false }] }, expected: [true, false] }, + { + body: { result: { allow: [{ allow: false }, { allow: true, extra: 1 }] } }, + expected: [false, true], + }, + ], + invalid: [ + null, + [], + {}, + { allow: null }, + { allow: true }, + { result: {} }, + ...[ + [], + [{ allow: true }], + [{ allow: true }, { allow: false }, { allow: true }], + [true, false], + [{}, { allow: false }], + [null, { allow: true }], + [{ allow: 'false' }, { allow: true }], + [{ allow: true }, { allow: 1 }], + ].flatMap((allow) => [{ allow }, { result: { allow } }]), + ], + }, + { + name: 'getUserPermissions', + denied: {}, + perCallErrors: true, + call: (permit, config) => + permit.getUserPermissions('user', undefined, undefined, undefined, config), + valid: [ + { body: {}, expected: {} }, + { body: permissionMap, expected: permissionMap }, + { body: { result: { permissions: permissionMap }, extra: true }, expected: permissionMap }, + { body: { result: { permissions: {} } }, expected: {} }, + { + body: { result: {}, permissions: { roles: null, tenant: null, resource: null, extra: 4 } }, + expected: { result: { permissions: [] }, permissions: { permissions: [], extra: 4 } }, + }, + { + body: { + document: { + tenant: { key: 'tenant', name: 'Tenant' }, + resource: { type: 'document', key: 'one', name: 'Document' }, + }, + }, + expected: { + document: { + permissions: [], + tenant: { + key: 'tenant', + name: 'Tenant', + attributes: {}, + }, + resource: { + type: 'document', + key: 'one', + name: 'Document', + attributes: {}, + }, + }, + }, + }, + { + body: { + result: { + permissions: { + document: { permissions: [], roles: null, tenant: null, resource: null }, + }, + }, + }, + expected: { document: { permissions: [] } }, + }, + { + body: { result: { permissions: ['read'] } }, + expected: { result: { permissions: ['read'] } }, + }, + ], + invalid: [ + null, + [], + false, + { result: null }, + { result: { permissions: null } }, + ...[ + null, + [], + 'read', + { permissions: null }, + { permissions: 'read' }, + { permissions: [true] }, + { permissions: [], roles: 'reader' }, + { permissions: [], roles: [4] }, + { permissions: [], tenant: [] }, + { permissions: [], tenant: { key: 42, attributes: {} } }, + { permissions: [], tenant: { attributes: {} } }, + { permissions: [], tenant: { key: 'tenant', attributes: null } }, + { permissions: [], resource: { type: 4, key: 'one', attributes: {} } }, + { permissions: [], resource: { key: 'one', attributes: {} } }, + { permissions: [], resource: { type: 'document', key: 'one', attributes: [] } }, + ].flatMap((entry) => [{ document: entry }, { result: { permissions: { document: entry } } }]), + ], + }, + { + name: 'checkAllTenants', + denied: [], + perCallErrors: false, + call: (permit) => permit.checkAllTenants('user', 'read', 'document'), + valid: [ + { body: { allowed_tenants: [] }, expected: [] }, + { + body: { allowed_tenants: [{ allow: true, tenant: { key: 'tenant', name: 'Tenant' } }] }, + expected: [{ key: 'tenant', name: 'Tenant', attributes: {} }], + }, + { body: { result: { allowed_tenants: [] } }, expected: [] }, + { body: { allowed_tenants: [{ allow: true, result: false, tenant }] }, expected: [tenant] }, + { body: { result: { allowed_tenants: [{ allow: true, tenant }] } }, expected: [tenant] }, + ], + invalid: [ + null, + [], + {}, + { allowed_tenants: null }, + { allowed_tenants: {} }, + ...[ + null, + true, + {}, + { tenant }, + { allow: false, tenant }, + { allow: 'true', tenant }, + { allow: 1, tenant }, + { allow: true, tenant: null }, + { allow: true, tenant: { key: 42, attributes: {} } }, + { allow: true, tenant: { attributes: {} } }, + { allow: true, tenant: { key: 'tenant', attributes: [] } }, + ].flatMap((entry) => [ + { allowed_tenants: [{ allow: true, tenant }, entry] }, + { result: { allowed_tenants: [{ allow: true, tenant }, entry] } }, + ]), + ], + }, +]; + +for (const operation of operations) { + describe(`${operation.name} response validation over HTTP`, () => { + for (const [index, scenario] of operation.valid.entries()) { + it(`accepts supported response ${index} without losing additive fields`, async () => { + const pdp = await startPdp({ status: 200, body: scenario.body }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + retry: false, + log: { level: 'silent' }, + }); + expect(await operation.call(permit)).toStrictEqual(scenario.expected); + expect(pdp.requests).toHaveLength(1); + }); + } + for (const [index, body] of operation.invalid.entries()) { + it(`rejects malformed response ${index} and applies the configured error policy`, async () => { + const pdp = await startPdp({ status: 200, body }); + const options = { + token: TEST_TOKEN, + pdp: pdp.url, + retry: false as const, + log: { level: 'silent' }, + }; + const strict = new Permit(options); + const failClosed = new Permit({ ...options, throwOnError: false }); + await expect(operation.call(strict)).rejects.toMatchObject({ + name: 'PermitPDPStatusError', + statusCode: 200, + }); + expect(await operation.call(failClosed)).toStrictEqual(operation.denied); + if (operation.perCallErrors) { + expect(await operation.call(strict, { throwOnError: false })).toStrictEqual( + operation.denied, + ); + await expect(operation.call(failClosed, { throwOnError: true })).rejects.toBeInstanceOf( + PermitPDPStatusError, + ); + } + expect(pdp.requests).toHaveLength(operation.perCallErrors ? 4 : 2); + }); + } + }); +} + +it('checks an OPA result envelope over HTTP with the OPA request shape', async () => { + const pdp = await startPdp({ status: 200, body: { result: { allow: true } } }); + const opa = axios.create(); + // The transport boundary routes the SDK's fixed OPA port to this ephemeral loopback fixture. + opa.interceptors.request.use((config) => { + config.baseURL = `${pdp.url}/`; + return config; + }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + opaAxiosInstance: opa, + retry: false, + log: { level: 'silent' }, + }); + expect(await permit.check('user', 'read', 'document', {}, { useOpa: true })).toBe(true); + expect(pdp.requests[0]?.path).toBe('/root'); + expect(pdp.requests[0]?.body).toStrictEqual({ + input: { + user: { key: 'user' }, + action: 'read', + resource: { type: 'document', tenant: 'default' }, + context: {}, + }, + }); +}); + +for (const operation of operations.filter( + (item) => item.name === 'bulkCheck' || item.name === 'getUserPermissions', +)) { + it(`${operation.name} rejects unsupported OPA mode before sending a PDP request`, async () => { + const pdp = await startPdp({ status: 200, body: operation.valid[0]?.body }); + const options = { + token: TEST_TOKEN, + pdp: pdp.url, + retry: false as const, + log: { level: 'silent' }, + }; + const strict = new Permit(options); + await expect(operation.call(strict, { useOpa: true })).rejects.toBeInstanceOf(PermitError); + await expect(operation.call(strict, { useOpa: true })).rejects.toThrow(/useOpa.*check/); + expect(await operation.call(strict, { useOpa: true, throwOnError: false })).toStrictEqual( + operation.denied, + ); + const failClosed = new Permit({ ...options, throwOnError: false }); + expect(await operation.call(failClosed, { useOpa: true })).toStrictEqual(operation.denied); + await expect( + operation.call(failClosed, { useOpa: true, throwOnError: true }), + ).rejects.toThrow(); + expect(pdp.requests).toHaveLength(0); + }); +} + +it('requires zero bulk decisions for zero checks', async () => { + const pdp = await startPdp({ status: 200, body: { allow: [{ allow: true }] } }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + retry: false, + log: { level: 'silent' }, + }); + await expect(permit.bulkCheck([])).rejects.toBeInstanceOf(PermitPDPStatusError); + expect(await permit.bulkCheck([], {}, { throwOnError: false })).toStrictEqual([]); +}); + +it('rejects sparse bulk input and returns one dense deny per position in non-throwing mode', async () => { + const pdp = await startPdp({ status: 200, body: { allow: [{ allow: true }] } }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + retry: false, + log: { level: 'silent' }, + }); + const sparse: ICheckQuery[] = []; + sparse.length = 2; + sparse[1] = { user: 'user', action: 'read', resource: 'document' }; + await expect(permit.bulkCheck(sparse)).rejects.toBeInstanceOf(PermitError); + expect(await permit.bulkCheck(sparse, {}, { throwOnError: false })).toStrictEqual([false, false]); + expect(pdp.requests).toHaveLength(0); +}); + +it('preserves prototype-like permission identifiers as own data properties', async () => { + const body = Object.fromEntries( + ['__proto__', 'constructor', 'toString'].map((key) => [key, { permissions: ['read'] }]), + ); + const pdp = await startPdp({ status: 200, body }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + retry: false, + log: { level: 'silent' }, + }); + const result = await permit.getUserPermissions('user'); + expect(Object.entries(result)).toStrictEqual(Object.entries(body)); + expect(Object.getPrototypeOf(result)).toBe(Object.prototype); + for (const key of Object.keys(body)) expect(Object.hasOwn(result, key)).toBe(true); +}); + +for (const scenario of [ + { + name: 'valid positional response', + decisions: [{ allow: true }, { allow: false }], + throwOnError: true, + expected: [true, false], + }, + { name: 'truncated positional response', decisions: [{ allow: true }], throwOnError: true }, + { + name: 'original-count fallback', + decisions: [{ allow: true }], + throwOnError: false, + expected: [false, false], + }, +]) { + it(`uses the dispatched bulk count despite caller mutation: ${scenario.name}`, async () => { + const server = createServer(); + const captured = new Promise<() => void>((resolve) => { + server.once('request', (request: IncomingMessage, response: ServerResponse) => { + request.resume(); + request.once('end', () => + resolve(() => { + response.writeHead(200, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify({ allow: scenario.decisions })); + }), + ); + }); + }); + onTestFinished(async () => { + const closed = new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + server.closeAllConnections(); + }); + await closed; + }); + server.listen(0, '127.0.0.1'); + await once(server, 'listening'); + const address = server.address(); + assert(address && typeof address !== 'string'); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: `http://127.0.0.1:${address.port}`, + retry: false, + throwOnError: scenario.throwOnError, + log: { level: 'silent' }, + }); + const requests = [...checks]; + const pending = permit.bulkCheck(requests); + const respond = await captured; + requests.pop(); + respond(); + if ('expected' in scenario) { + expect(await pending).toStrictEqual(scenario.expected); + } else { + await expect(pending).rejects.toBeInstanceOf(PermitPDPStatusError); + } + }); +} diff --git a/src/enforcement/responses.test.ts b/src/enforcement/responses.test.ts new file mode 100644 index 00000000..0ad868d6 --- /dev/null +++ b/src/enforcement/responses.test.ts @@ -0,0 +1,58 @@ +import { + parseAllTenantsResponse, + parseBulkResponse, + parsePermissionsResponse, +} from '#src/enforcement/responses'; + +it('rejects sparse bulk decisions instead of skipping an absent position', () => { + const decisions: unknown[] = []; + decisions.length = 2; + decisions[1] = { allow: true }; + expect(() => parseBulkResponse({ allow: decisions }, 2)).toThrow(); +}); + +it('rejects sparse permission and role arrays returned by a custom transport', () => { + const values: string[] = []; + values.length = 2; + values[1] = 'read'; + expect(() => parsePermissionsResponse({ document: { permissions: values } })).toThrow(); + expect(() => + parsePermissionsResponse({ document: { permissions: [], roles: values } }), + ).toThrow(); +}); + +it('rejects sparse all-tenant results instead of skipping an absent tenant', () => { + const tenants: unknown[] = []; + tenants.length = 2; + tenants[1] = { allow: true, tenant: { key: 'tenant' } }; + expect(() => parseAllTenantsResponse({ allowed_tenants: tenants })).toThrow(); +}); + +it('applies permission defaults without mutating the original response', () => { + const entry = Object.freeze({ + tenant: Object.freeze({ key: 'tenant', name: 'Name' }), + roles: null, + }); + const body = Object.freeze({ + result: Object.freeze({ permissions: Object.freeze({ document: entry }) }), + }); + expect(parsePermissionsResponse(body)).toStrictEqual({ + document: { + permissions: [], + tenant: { key: 'tenant', name: 'Name', attributes: {} }, + }, + }); + expect(entry).toStrictEqual({ tenant: { key: 'tenant', name: 'Name' }, roles: null }); +}); + +it('validates both tenant and resource details when they coexist in a permission entry', () => { + expect(() => + parsePermissionsResponse({ + document: { + permissions: [], + tenant: { key: 'tenant', attributes: {} }, + resource: { type: 'document', key: 42, attributes: {} }, + }, + }), + ).toThrow(); +}); diff --git a/src/enforcement/responses.ts b/src/enforcement/responses.ts new file mode 100644 index 00000000..3275e207 --- /dev/null +++ b/src/enforcement/responses.ts @@ -0,0 +1,268 @@ +import { + type IAuthorizedUserAssignment, + type IAuthorizedUsersResult, + type ILocalRoleAssignment, + type IUserPermissions, + type TenantDetails, +} from '#src/enforcement/interfaces'; + +function isRecord(value: unknown): value is Record { + return value !== null && typeof value === 'object' && !Array.isArray(value); +} + +function isStringArray(value: unknown): value is string[] { + if (!Array.isArray(value)) return false; + for (const item of value) { + if (typeof item !== 'string') return false; + } + return true; +} + +interface TenantDetailsWire extends Record { + key: string; + attributes?: Record; +} + +function isTenantDetails(value: unknown): value is TenantDetailsWire { + return ( + isRecord(value) && + typeof value['key'] === 'string' && + (!Object.hasOwn(value, 'attributes') || isRecord(value['attributes'])) + ); +} + +function isResourceDetails(value: unknown): value is TenantDetailsWire & { type: string } { + return isTenantDetails(value) && typeof value['type'] === 'string'; +} + +function normalizeTenant(value: TenantDetailsWire): TenantDetails { + return { ...value, attributes: value.attributes ?? {} }; +} + +/** Selects the direct PDP decision or its OPA result envelope without trusting its contents. */ +function decisionEnvelope(value: unknown, field: string): Record { + if (isRecord(value)) { + if (Object.hasOwn(value, field)) return value; + if (isRecord(value['result']) && Object.hasOwn(value['result'], field)) { + return value['result']; + } + } + throw new Error(`Expected a PDP ${field} field or an OPA result envelope`); +} + +/** + * Reads a literal boolean decision from the PDP or OPA envelope. + * + * @param value - Untrusted response body. + * @returns The validated decision, without truthiness coercion. + * @throws {Error} If the response does not contain a boolean decision. + */ +export function parseCheckResponse(value: unknown): boolean { + const decision = decisionEnvelope(value, 'allow')['allow']; + if (typeof decision !== 'boolean') throw new Error('Expected a boolean allow decision'); + return decision; +} + +/** + * Reads a literal direct URL authorization decision from the container PDP. + * + * @param value - Untrusted response body. + * @returns The validated boolean allow field, without OPA-envelope or truthiness fallback. + * @throws {Error} If a direct boolean allow field is absent. + */ +export function parseCheckUrlResponse(value: unknown): boolean { + if (!isRecord(value) || !Object.hasOwn(value, 'allow') || typeof value['allow'] !== 'boolean') { + throw new Error('Expected a direct boolean allow decision'); + } + return value['allow']; +} + +/** + * Reads exactly one boolean decision per requested position, preserving order. + * + * @param value - Untrusted response body. + * @param expectedLength - Number of requests sent to the PDP. + * @returns The positional decisions. + * @throws {Error} If the envelope, cardinality, or any decision is invalid. + */ +export function parseBulkResponse(value: unknown, expectedLength: number): boolean[] { + const decisions = decisionEnvelope(value, 'allow')['allow']; + if (!Array.isArray(decisions) || decisions.length !== expectedLength) { + throw new Error('Expected one bulk decision per requested check'); + } + const result: boolean[] = []; + for (const decision of decisions) { + if (!isRecord(decision) || typeof decision['allow'] !== 'boolean') { + throw new Error('Expected a boolean allow decision at every bulk position'); + } + result.push(decision['allow']); + } + return result; +} + +function readPermissionEntry(value: unknown): IUserPermissions[string] | undefined { + if (!isRecord(value)) return undefined; + const { permissions, roles, tenant, resource, ...additional } = value; + if (Object.hasOwn(value, 'permissions') && !isStringArray(permissions)) return undefined; + if (roles !== undefined && roles !== null && !isStringArray(roles)) return undefined; + if (tenant !== undefined && tenant !== null && !isTenantDetails(tenant)) return undefined; + if (resource !== undefined && resource !== null && !isResourceDetails(resource)) { + return undefined; + } + // PDP models default missing permissions/attributes and omit nullable optional members. + return { + ...additional, + permissions: isStringArray(permissions) ? permissions : [], + ...(isStringArray(roles) && { roles }), + ...(isTenantDetails(tenant) && { tenant: normalizeTenant(tenant) }), + ...(isResourceDetails(resource) && { + resource: { ...resource, attributes: resource.attributes ?? {} }, + }), + }; +} + +function readPermissionMap(value: unknown): IUserPermissions | undefined { + if (!isRecord(value)) return undefined; + const entries: [string, IUserPermissions[string]][] = []; + for (const [key, entry] of Object.entries(value)) { + const permissions = readPermissionEntry(entry); + if (permissions === undefined) return undefined; + entries.push([key, permissions]); + } + // fromEntries retains arbitrary identifiers, including __proto__, as own dictionary keys. + return Object.fromEntries(entries); +} + +/** + * Reads a permission map, prioritizing legal raw identifiers over OPA envelope detection. + * + * @param value - Untrusted response body. + * @returns Permissions with PDP defaults applied and additive fields preserved. + * @throws {Error} If the response is not a valid direct or wrapped permission map. + */ +export function parsePermissionsResponse(value: unknown): IUserPermissions { + const direct = readPermissionMap(value); + if (direct !== undefined) return direct; + if (isRecord(value) && isRecord(value['result'])) { + const wrapped = readPermissionMap(value['result']['permissions']); + if (wrapped !== undefined) return wrapped; + } + throw new Error('Expected a permission map or an OPA result.permissions map'); +} + +/** + * Reads only granted tenants; a denied or malformed member invalidates the entire response. + * + * @param value - Untrusted response body. + * @returns Validated tenants with missing attributes defaulted to an empty object. + * @throws {Error} If any member is malformed or is not explicitly allowed. + */ +export function parseAllTenantsResponse(value: unknown): TenantDetails[] { + const tenants = decisionEnvelope(value, 'allowed_tenants')['allowed_tenants']; + if (!Array.isArray(tenants)) throw new Error('Expected an allowed_tenants array'); + const result: TenantDetails[] = []; + for (const entry of tenants) { + if (!isRecord(entry) || entry['allow'] !== true || !isTenantDetails(entry['tenant'])) { + throw new Error('Expected an allowed tenant with allow:true and a string tenant key'); + } + result.push(normalizeTenant(entry['tenant'])); + } + return result; +} + +/** + * Reads the complete authorized-user envelope without accepting a partial assignment map. + * + * @param value - Untrusted direct PDP response body. + * @returns The validated result with legal dictionary keys and additive fields preserved. + * @throws {Error} If a required string, dictionary, array or assignment is malformed. + */ +export function parseAuthorizedUsersResponse(value: unknown): IAuthorizedUsersResult { + if ( + !isRecord(value) || + typeof value['resource'] !== 'string' || + typeof value['tenant'] !== 'string' || + !isRecord(value['users']) + ) { + throw new Error('Expected an authorized-user result with resource, tenant and users'); + } + const users: [string, IAuthorizedUserAssignment[]][] = []; + for (const [key, assignments] of Object.entries(value['users'])) { + if (!Array.isArray(assignments)) throw new Error('Expected an assignment array per user'); + const checked: IAuthorizedUserAssignment[] = []; + for (const assignment of assignments) { + if ( + !isRecord(assignment) || + typeof assignment['user'] !== 'string' || + typeof assignment['tenant'] !== 'string' || + typeof assignment['resource'] !== 'string' || + typeof assignment['role'] !== 'string' + ) { + throw new Error('Expected four string fields in every authorized-user assignment'); + } + checked.push({ + ...assignment, + user: assignment['user'], + tenant: assignment['tenant'], + resource: assignment['resource'], + role: assignment['role'], + }); + } + users.push([key, checked]); + } + return { + ...value, + resource: value['resource'], + tenant: value['tenant'], + users: Object.fromEntries(users), + }; +} + +/** + * Reads the container PDP's tenant array, applying only its documented attributes default. + * + * @param value - Untrusted direct PDP response body. + * @returns All validated tenants, preserving input order and additive fields. + * @throws {Error} If the array or any tenant is malformed. + */ +export function parseUserTenantsResponse(value: unknown): TenantDetails[] { + if (!Array.isArray(value)) throw new Error('Expected a user-tenants array'); + const result: TenantDetails[] = []; + for (const tenant of value) { + if (!isTenantDetails(tenant)) throw new Error('Expected a tenant with a string key'); + result.push(normalizeTenant(tenant)); + } + return result; +} + +/** + * Reads one complete local PDP role-assignment page without projecting or defaulting fields. + * + * @param value - Untrusted direct response body. + * @returns All validated rows, preserving order, duplicates and additive fields. + * @throws {Error} If the body or any required or optional row field is malformed. + */ +export function parseLocalRoleAssignmentsResponse(value: unknown): ILocalRoleAssignment[] { + if (!Array.isArray(value)) throw new Error('Expected a local role-assignment array'); + const result: ILocalRoleAssignment[] = []; + for (const assignment of value) { + if ( + !isRecord(assignment) || + typeof assignment['user'] !== 'string' || + typeof assignment['role'] !== 'string' || + typeof assignment['tenant'] !== 'string' || + (Object.hasOwn(assignment, 'resource_instance') && + assignment['resource_instance'] !== null && + typeof assignment['resource_instance'] !== 'string') + ) { + throw new Error('Expected valid user, role, tenant and optional resource_instance fields'); + } + result.push({ + ...assignment, + user: assignment['user'], + role: assignment['role'], + tenant: assignment['tenant'], + }); + } + return result; +} diff --git a/src/http-ownership.test.ts b/src/http-ownership.test.ts new file mode 100644 index 00000000..a9a9a373 --- /dev/null +++ b/src/http-ownership.test.ts @@ -0,0 +1,175 @@ +import { createServer, type IncomingHttpHeaders } from 'node:http'; + +import axios, { type AxiosInstance } from 'axios'; +import { expect, onTestFinished, test, vi } from 'vitest'; + +import { Permit } from '#src/index'; +import { type IPermitOptions } from '#src/config'; + +interface WireRequest { + method: string | undefined; + path: string | undefined; + headers: IncomingHttpHeaders; + body: string; +} +async function wire(status = 200) { + const calls: WireRequest[] = []; + const server = createServer(async (request, response) => { + const chunks: Buffer[] = []; + for await (const chunk of request) chunks.push(Buffer.from(chunk)); + calls.push({ + method: request.method, + path: request.url, + headers: request.headers, + body: Buffer.concat(chunks).toString(), + }); + response.writeHead(status, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify({ key: 'alice', allow: true })); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', resolve); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + server.closeAllConnections(); + }), + ); + const address = server.address(); + assert(address && typeof address !== 'string'); + return { url: `http://127.0.0.1:${address.port}`, calls }; +} +function permit(caller: AxiosInstance, config: IPermitOptions) { + const client = new Permit({ + axiosInstance: caller, + token: 'sdk', + log: { level: 'silent' }, + ...config, + }); + client.config.apiContext._saveApiKeyAccessibleScope('org', 'project', 'environment'); + client.config.apiContext.setEnvironmentLevelContext('org', 'project', 'environment'); + return client; +} +const retry = { maxRetries: 1, retryDelay: 0, maxDelay: 0 }; + +test('sharing pristine REST transport preserves defaults/hooks and isolates SDK routes and tokens', async () => { + const first = await wire(); + const second = await wire(); + const caller = axios.create({ + baseURL: first.url, + allowAbsoluteUrls: false, + timeout: 800, + auth: { username: 'caller', password: 'owned' }, + headers: { 'X-Caller': 'kept' }, + }); + const requestHook = vi.fn((config) => config); + const responseHook = vi.fn((response) => response); + caller.interceptors.request.use(requestHook, undefined, { synchronous: true }); + caller.interceptors.response.use(responseHook); + const defaults = { ...caller.defaults, headers: structuredClone(caller.defaults.headers) }; + const firstClient = permit(caller, { apiUrl: first.url, token: 'first' }); + const secondClient = permit(caller, { apiUrl: second.url, token: 'second' }); + for (let index = 0; index < 20; index++) permit(caller, { apiUrl: first.url }); + expect(firstClient.config.axiosInstance).toBe(caller); + expect(secondClient.config.axiosInstance).toBe(caller); + expect(caller.defaults).toEqual(defaults); + expect(caller.interceptors.request.handlers).toHaveLength(1); + expect(caller.interceptors.response.handlers).toHaveLength(1); + await firstClient.api.users.get('alice'); + await secondClient.api.users.get('alice'); + await caller.get(second.url + '/caller'); + expect(first.calls.map((call) => [call.path, call.headers.authorization])).toEqual([ + ['/v2/facts/project/environment/users/alice', 'Bearer first'], + ['/' + second.url + '/caller', 'Basic ' + Buffer.from('caller:owned').toString('base64')], + ]); + expect(second.calls[0]?.headers.authorization).toBe('Bearer second'); + expect(first.calls[0]?.headers['x-caller']).toBe('kept'); + expect(requestHook).toHaveBeenCalledTimes(3); + expect(responseHook).toHaveBeenCalledTimes(3); + expect(caller.defaults).toEqual(defaults); +}); + +test('sharing an OPA transport preserves caller destination and routes each SDK independently', async () => { + const server = await wire(); + const caller = axios.create({ + baseURL: 'https://caller.invalid/original', + headers: { 'X-Caller': 'kept' }, + }); + const original = caller.defaults.baseURL; + caller.interceptors.request.use((config) => { + const destination = new URL(config.baseURL ?? 'https://missing.invalid'); + config.baseURL = server.url + destination.pathname; + return config; + }); + const first = permit(axios.create(), { + pdp: 'http://first.invalid/first/', + token: 'first', + opaAxiosInstance: caller, + }); + const second = permit(axios.create(), { + pdp: 'http://second.invalid/second/', + token: 'second', + opaAxiosInstance: caller, + }); + expect(await first.check('alice', 'read', 'document', {}, { useOpa: true })).toBe(true); + expect(await second.check('alice', 'read', 'document', {}, { useOpa: true })).toBe(true); + expect(server.calls.map((call) => [call.path, call.headers.authorization])).toEqual([ + ['/first/v1/data/permit/root', 'Bearer first'], + ['/second/v1/data/permit/root', 'Bearer second'], + ]); + expect(caller.defaults.baseURL).toBe(original); + expect(caller.defaults.headers.common['X-Permit-SDK-Version']).toBeUndefined(); + expect(caller.interceptors.request.handlers).toHaveLength(1); + expect(caller.interceptors.response.handlers).toHaveLength(0); +}); + +test('one SDK retry policy cannot affect another SDK or direct caller requests', async () => { + const server = await wire(503); + const caller = axios.create(); + const enabled = permit(caller, { apiUrl: server.url, retry }); + const disabled = permit(caller, { apiUrl: server.url, retry: false }); + await expect(disabled.api.users.get('alice')).rejects.toThrow(); + expect(server.calls).toHaveLength(1); + await expect(enabled.api.users.get('alice')).rejects.toThrow(); + expect(server.calls).toHaveLength(3); + await expect(caller.get(server.url + '/direct')).rejects.toThrow(); + expect(server.calls).toHaveLength(4); +}); + +for (const method of ['POST', 'PATCH']) { + test(`REST never replays ${method} even when explicitly configured`, async () => { + const server = await wire(503); + const client = permit(axios.create(), { + apiUrl: server.url, + retry: { ...retry, retryMethods: [method] }, + }); + await expect( + method === 'POST' + ? client.api.users.create({ key: 'alice' }) + : client.api.users.update('alice', {}), + ).rejects.toThrow(); + expect(server.calls).toHaveLength(1); + expect(server.calls[0]?.method).toBe(method); + }); +} + +test('PDP POST retries remain separate from REST writes', async () => { + const server = await wire(503); + const client = permit(axios.create(), { + apiUrl: server.url, + pdp: server.url, + retry: false, + pdpRetry: retry, + }); + await expect(client.check('alice', 'read', 'document')).rejects.toThrow(); + expect(server.calls).toHaveLength(2); + await expect(client.api.users.create({ key: 'alice' })).rejects.toThrow(); + expect(server.calls).toHaveLength(3); + expect(server.calls.map((call) => call.path)).toEqual([ + '/allowed', + '/allowed', + '/v2/facts/project/environment/users', + ]); +}); diff --git a/src/index.ts b/src/index.ts index a96af183..da3d21f1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,40 +1,74 @@ // For Default export import pino from 'pino'; -import { ApiClient, IPermitApi } from './api/api-client'; -import { ElementsClient, IPermitElementsApi } from './api/elements'; -import { ConfigFactory, IPermitConfig } from './config'; -import { Enforcer, IEnforcer } from './enforcement/enforcer'; +import { ApiClient, type IPermitApi } from '#src/api/api-client'; +import { ElementsClient, type IPermitElementsApi } from '#src/api/elements'; +import { ConfigFactory, type IPermitConfig, type IPermitOptions } from '#src/config'; +import { Enforcer, type IEnforcer } from '#src/enforcement/enforcer'; import { - ICheckQuery, - IResource, - IUser, - IUserPermissions, - TenantDetails, -} from './enforcement/interfaces'; -import { LoggerFactory } from './logger'; -import { CheckConfig, Context } from './utils/context'; -import { AxiosLoggingInterceptor } from './utils/http-logger'; -import { resolveRetryConfig } from './utils/retry'; -import { AxiosRetryInterceptor } from './utils/retry-interceptor'; -import { RecursivePartial } from './utils/types'; + type ICheckQuery, + type IAuthorizedUsersResult, + type ILocalRoleAssignment, + type ILocalRoleAssignmentsQuery, + type IFilterObject, + type IResource, + type IUser, + type IUserPermissions, + type TenantDetails, +} from '#src/enforcement/interfaces'; +import { LoggerFactory } from '#src/logger'; +import { + type CheckConfig, + type CheckUrlConfig, + type Context, + type GetUserPermissionsConfig, +} from '#src/utils/context'; +import { createOwnedTransport } from '#src/utils/http-transport'; +import { resolveRetryConfig } from '#src/utils/retry'; // exported interfaces -export * from './api'; -export { IPermitConfig } from './config'; -export { IUser, IAction, IResource } from './enforcement/interfaces'; -export { PermitConnectionError, PermitError, PermitPDPStatusError } from './enforcement/enforcer'; -export { Context, ContextTransform } from './utils/context'; -export { ApiContext, PermitContextError, ApiKeyLevel } from './api/context'; -export { PermitApiError } from './api/base'; -export { IRetryConfig, RetryConditionFn, RETRYABLE_STATUS_CODES } from './utils/retry'; +export * from '#src/api/index'; +export { type IPermitConfig, type IPermitOptions, type FactsSyncTimeoutPolicy } from '#src/config'; +export { + type IUser, + type ICheckQuery, + type IUserPermissions, + type IAction, + type IResource, + type IFilterObject, + type IAuthorizedUserAssignment, + type IAuthorizedUsersResult, + type ILocalRoleAssignment, + type ILocalRoleAssignmentsQuery, + type TenantDetails, +} from '#src/enforcement/interfaces'; +export { + PermitConnectionError, + PermitError, + PermitPDPStatusError, +} from '#src/enforcement/enforcer'; +export { + type Context, + type CheckConfig, + type CheckUrlConfig, + type GetUserPermissionsConfig, +} from '#src/utils/context'; +export { + ApiContext, + ApiContextLevel, + PermitContextError, + PermitContextChangeError, + ApiKeyLevel, +} from '#src/api/context'; +export { PermitApiError, type FormattedAxiosError } from '#src/api/base'; +export { type IRetryConfig, type RetryConditionFn, RETRYABLE_STATUS_CODES } from '#src/utils/retry'; export interface IPermitClient extends IEnforcer { /** * Access the SDK configuration using this property. * Once the SDK is initialized, the configuration is read-only. */ - config: IPermitConfig; + readonly config: IPermitConfig; /** * Access the Permit REST API using this property. @@ -49,7 +83,7 @@ export interface IPermitClient extends IEnforcer { /** * The `Permit` class represents the main entry point for interacting with the Permit.io SDK. - * The SDK constructor expects an object implementing the {@link IPermitConfig} interface. + * The SDK constructor expects {@link IPermitOptions}; effective settings are validated and frozen. * * Example usage: * @@ -137,40 +171,32 @@ export class Permit implements IPermitClient { * Constructs a new instance of the {@link Permit} class with the specified configuration. * * @param config - The configuration for the Permit SDK. + * @throws TypeError When effective constructor options are invalid. */ - constructor(config: RecursivePartial) { + constructor(config: IPermitOptions) { this.config = ConfigFactory.build(config); + Object.defineProperty(this, 'config', { writable: false, configurable: false }); this.logger = LoggerFactory.createLogger(this.config); - AxiosLoggingInterceptor.setupInterceptor(this.config.axiosInstance, this.logger); - - // Setup retry interceptor for REST API calls. - // Strip POST from the REST retryMethods regardless of user config: REST - // writes are non-idempotent and must never be repeated. (This is symmetric - // with the enforcer, which ADDS POST for the idempotent PDP/OPA check calls.) const resolvedRetryConfig = resolveRetryConfig(this.config.retry); - const restRetryConfig = { - ...resolvedRetryConfig, - retryMethods: resolvedRetryConfig.retryMethods.filter((m) => m !== 'POST'), + const restConfig = { + ...this.config, + axiosInstance: createOwnedTransport({ + caller: this.config.axiosInstance, + logger: this.logger, + retry: { + ...resolvedRetryConfig, + retryMethods: resolvedRetryConfig.retryMethods.filter( + (method) => method !== 'POST' && method !== 'PATCH', + ), + }, + name: 'API', + }), }; - // Skip the install when no methods remain (e.g. retryMethods: ['POST']), - // which would otherwise add an interceptor that can never retry. - if (resolvedRetryConfig.enabled && restRetryConfig.retryMethods.length > 0) { - AxiosRetryInterceptor.setupInterceptor( - this.config.axiosInstance, - restRetryConfig, - this.logger, - 'API', - ); - } - - this.api = new ApiClient(this.config, this.logger); - + this.api = new ApiClient(restConfig, this.logger); this.enforcer = new Enforcer(this.config, this.logger); - this.elements = new ElementsClient(this.config, this.logger); + this.elements = new ElementsClient(restConfig, this.logger); - this.logger.debug( - `Permit.io SDK initialized with config:\n${JSON.stringify(this.config, undefined, 2)}`, - ); + this.logger.debug('Permit.io SDK initialized'); } /** @@ -182,7 +208,7 @@ export class Permit implements IPermitClient { * @param context - The context object representing the context in which the action is performed. * @returns `true` if the user is authorized, `false` otherwise. * @throws {@link PermitConnectionError} if an error occurs while sending the authorization request to the PDP. - * @throws {@link PermitPDPStatusError} if received a response with unexpected status code from the PDP. + * @throws {@link PermitPDPStatusError} if the PDP returned an unexpected status code or response body. */ public async check( user: string | IUser, @@ -194,6 +220,29 @@ export class Permit implements IPermitClient { return await this.enforcer.check(user, action, resource, context, config); } + /** + * Checks a full URL against URL mappings on a compatible Permit container PDP. + * + * @param user - User key or attributes. + * @param httpMethod - HTTP method string, sent unchanged without an invented method enum. + * @param url - Absolute URI, 1..65536 Unicode characters, sent unchanged; it is not fetched. + * @param config - Tenant, context, timeout/error policy; unsupported OPA always rejects. + * @returns Literal allow decision, or false for ordinary failures in non-throwing mode. + * @throws {PermitError} For invalid input, input that cannot be JSON-serialized, + * or a missing tenant with default tenancy disabled. + * @throws {PermitPDPStatusError} For malformed decisions or unavailable 404/405/501 regardless + * of error policy; other rejected responses throw in throwing mode. + * @throws {PermitConnectionError} On connection/timeout failure in throwing mode. + */ + public async checkUrl( + user: IUser | string, + httpMethod: string, + url: string, + config?: CheckUrlConfig, + ): Promise { + return await this.enforcer.checkUrl(user, httpMethod, url, config); + } + /** * Checks multiple requests within the specified context. * @@ -201,7 +250,7 @@ export class Permit implements IPermitClient { * @param context - The context object representing the context in which the action is performed. * @returns array containing `true` if the user is authorized, `false` otherwise for each check request. * @throws {@link PermitConnectionError} if an error occurs while sending the authorization request to the PDP. - * @throws {@link PermitPDPStatusError} if received a response with unexpected status code from the PDP. + * @throws {@link PermitPDPStatusError} if the PDP returned an unexpected status code or response body. */ public async bulkCheck( checks: Array, @@ -212,9 +261,88 @@ export class Permit implements IPermitClient { } /** - * Get all tenants available in the system. - * @returns An array of TenantDetails representing all tenants. + * Returns the full PDP result for users authorized to perform an action on a resource. + * + * @param action - Action to evaluate. + * @param resource - Resource type, type:key string, or resource attributes and tenant. + * @param context - Request context overriding existing global context. + * @param config - Timeout/error policy; unsupported useOpa:true always rejects. + * @returns The validated result or a normalized empty result in non-throwing mode. + * @throws {PermitError} For unsupported OPA, invalid resource strings, or non-JSON inputs. + * @throws {PermitConnectionError} On an operational failure in throwing mode. + * @throws {PermitPDPStatusError} On a rejected or malformed response in throwing mode. + */ + public async getAuthorizedUsers( + action: string, + resource: IResource | string, + context?: Context, + config?: CheckConfig, + ): Promise { + return await this.enforcer.getAuthorizedUsers(action, resource, context, config); + } + + /** + * Returns a user's role-derived tenants from a compatible container PDP; not published by cloud. + * + * @param user - User key or attributes. + * @param context - Request context overriding existing global context. + * @param config - Timeout/error policy; unsupported useOpa:true always rejects. + * @returns Validated tenants, or [] on operational failure in non-throwing mode. + * @throws {PermitError} For unsupported OPA or non-JSON input in throwing mode. + * @throws {PermitPDPStatusError} For an unavailable endpoint regardless of error policy, + * or other rejected/malformed responses in throwing mode. + * @throws {PermitConnectionError} On an operational failure in throwing mode. */ + public async getUserTenants( + user: IUser | string, + context?: Context, + config?: CheckConfig, + ): Promise { + return await this.enforcer.getUserTenants(user, context, config); + } + + /** + * Returns one page of role assignments cached by a compatible container PDP. + * + * @param query - Key filters and pagination; defaults to page 1 and page size 30, maximum 100. + * @param config - Timeout/error policy; useOpa:true is unsupported and always rejects. + * @returns Complete local rows, or [] on ordinary operational failure in non-throwing mode. + * Omitted tenant is unfiltered. There is no automatic pagination or cache synchronization. + * @throws {PermitError} For invalid input or unsupported OPA, regardless of error policy. + * @throws {PermitPDPStatusError} For malformed responses or unavailable 404/405/501 endpoints + * regardless of policy; for other rejected responses in throwing mode. + * @throws {PermitConnectionError} On operational failure in throwing mode. + */ + public async getLocalRoleAssignments( + query?: ILocalRoleAssignmentsQuery, + config?: CheckConfig, + ): Promise { + return await this.enforcer.getLocalRoleAssignments(query, config); + } + + /** + * Filters objects through bulk authorization while retaining original references and order. + * + * @param user - User key or attributes. + * @param action - Action to evaluate for every object. + * @param objects - Dense readonly array; extra fields remain in returned objects only. + * @param context - Shared request context; an object's context overrides it. + * @param config - Bulk timeout/error policy; unsupported OPA queries always reject. + * @returns Authorized original objects from a synchronous snapshot, including duplicates. + * @throws {PermitError} For unsupported OPA/invalid slots, or non-JSON inputs in throwing mode. + * @throws {PermitConnectionError} On an operational failure in throwing mode. + * @throws {PermitPDPStatusError} On rejected/malformed bulk responses in throwing mode. + */ + public async filterObjects( + user: IUser | string, + action: string, + objects: readonly T[], + context?: Context, + config?: CheckConfig, + ): Promise { + return await this.enforcer.filterObjects(user, action, objects, context, config); + } + /** * Get all tenants available in the system. * @returns An array of TenantDetails representing all tenants. @@ -226,12 +354,7 @@ export class Permit implements IPermitClient { context?: Context | undefined, sdk?: string | undefined, ): Promise { - try { - return await this.enforcer.checkAllTenants(user, action, resource, context, sdk); - } catch (error) { - this.logger.error('Error fetching all tenants:', error); - throw error; - } + return await this.enforcer.checkAllTenants(user, action, resource, context, sdk); } /** @@ -241,16 +364,17 @@ export class Permit implements IPermitClient { * @param tenants - The list of tenants to filter the permissions on ( given by roles ). * @param resources - The list of resources to filter the permissions on ( given by resource roles ). * @param resource_types - The list of resource types to filter the permissions on ( given by resource roles ). + * @param config - Timeout/error policy and request context overriding existing global context. * @returns object with key as the resource identifier and value as the resource details and permissions. * @throws {@link PermitConnectionError} if an error occurs while sending the authorization request to the PDP. - * @throws {@link PermitPDPStatusError} if received a response with unexpected status code from the PDP. + * @throws {@link PermitPDPStatusError} if the PDP returned an unexpected status code or response body. */ public async getUserPermissions( user: IUser | string, tenants?: string[], resources?: string[], resource_types?: string[], - config?: CheckConfig, + config?: GetUserPermissionsConfig, ): Promise { return await this.enforcer.getUserPermissions(user, tenants, resources, resource_types, config); } diff --git a/src/logger.ts b/src/logger.ts index 48a13c25..8bbb5e53 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -1,20 +1,24 @@ import util from 'util'; import pino from 'pino'; +import pretty from 'pino-pretty'; -import { IPermitConfig } from './config'; +import { type IPermitConfig } from '#src/config'; +import { diagnosticBody, diagnosticText } from '#src/utils/diagnostics'; -export function prettyConsoleLog(label: string, data: any) { - console.log(label, util.inspect(data, false, 12, true)); +export function prettyConsoleLog(label: string, data: unknown) { + console.log(diagnosticText(label), util.inspect(diagnosticBody(data), false, 4, true)); } export class LoggerFactory { static createLogger(config: IPermitConfig): pino.Logger { - return pino({ + const options = { level: config.log.level, - prettyPrint: config.log.json ? { levelFirst: true } : false, - base: { label: config.log.label }, + base: { label: diagnosticText(config.log.label, [config.token]) }, timestamp: pino.stdTimeFunctions.isoTime, - }); + }; + return config.log.json + ? pino(options) + : pino(options, pretty({ levelFirst: true, sync: true })); } } diff --git a/src/openapi/api.ts b/src/openapi/api.ts index 32ac1514..30535688 100644 --- a/src/openapi/api.ts +++ b/src/openapi/api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,25 +10,33 @@ * Do not edit the class manually. */ +export * from './api/access-requests-eapapi'; +export * from './api/activity-log-api'; +export * from './api/apihistory-api'; export * from './api/apikeys-api'; export * from './api/audit-elements-data-api'; +export * from './api/audit-log-replay-api'; export * from './api/audit-logs-api'; export * from './api/authentication-api'; +export * from './api/bulk-operations-api'; export * from './api/condition-set-rules-api'; export * from './api/condition-sets-api'; -export * from './api/decision-logs-api'; -export * from './api/decision-logs-ingress-api'; +export * from './api/data-export-api'; export * from './api/default-api'; -export * from './api/elements-configs-api'; +export * from './api/elements-configs-eapapi'; +export * from './api/email-configurations-api'; +export * from './api/email-templates-api'; export * from './api/environments-api'; +export * from './api/groups-api'; export * from './api/implicit-grants-api'; -export * from './api/instructions-api'; +export * from './api/invites-api'; export * from './api/members-api'; -export * from './api/opaldata-api'; +export * from './api/opaldata-eapapi'; +export * from './api/operation-approval-eapapi'; export * from './api/organizations-api'; -export * from './api/policy-api'; export * from './api/policy-decision-points-api'; export * from './api/policy-git-repositories-api'; +export * from './api/policy-guards-eapapi'; export * from './api/projects-api'; export * from './api/proxy-config-api'; export * from './api/relationship-tuples-api'; @@ -43,7 +49,9 @@ export * from './api/resource-roles-api'; export * from './api/resources-api'; export * from './api/role-assignments-api'; export * from './api/roles-api'; +export * from './api/scope-configurations-api'; export * from './api/tenants-api'; export * from './api/user-attributes-api'; +export * from './api/user-invites-api'; export * from './api/users-api'; export * from './api/users-elements-data-api'; diff --git a/src/openapi/api/access-requests-eapapi.ts b/src/openapi/api/access-requests-eapapi.ts new file mode 100644 index 00000000..a38527f6 --- /dev/null +++ b/src/openapi/api/access-requests-eapapi.ts @@ -0,0 +1,3054 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { + AccessRequestApproved, + AccessRequestCanceled, + AccessRequestDenied, + AccessRequestRead, + AccessRequestReview, + AccessRequestReviewDeny, + AccessRequestUserCreate, + PaginatedResultAccessRequestList, + RequestStatus, +} from '../types'; +/** + * AccessRequestsEAPApi - axios parameter creator + */ +export const AccessRequestsEAPApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Approve Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveAccessRequest: async ( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists('approveAccessRequest', 'accessRequestId', accessRequestId); + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('approveAccessRequest', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('approveAccessRequest', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('approveAccessRequest', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('approveAccessRequest', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('approveAccessRequest', 'elementsConfigId', elementsConfigId); + // verify required parameter 'accessRequestReview' is not null or undefined + assertParamExists('approveAccessRequest', 'accessRequestReview', accessRequestReview); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/approve` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Approve Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut: + async ( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists( + 'approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut', + 'accessRequestId', + accessRequestId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut', + 'envId', + envId, + ); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut', + 'elementsConfigId', + elementsConfigId, + ); + // verify required parameter 'accessRequestReview' is not null or undefined + assertParamExists( + 'approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut', + 'accessRequestReview', + accessRequestReview, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/approve` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Cancel Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelAccessRequest: async ( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists('cancelAccessRequest', 'accessRequestId', accessRequestId); + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('cancelAccessRequest', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('cancelAccessRequest', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('cancelAccessRequest', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('cancelAccessRequest', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('cancelAccessRequest', 'elementsConfigId', elementsConfigId); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/cancel` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Cancel Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut: + async ( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists( + 'cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut', + 'accessRequestId', + accessRequestId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut', + 'envId', + envId, + ); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut', + 'elementsConfigId', + elementsConfigId, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/cancel` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create Access Request + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestUserCreate} accessRequestUserCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createAccessRequest: async ( + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestUserCreate: AccessRequestUserCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('createAccessRequest', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('createAccessRequest', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('createAccessRequest', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('createAccessRequest', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('createAccessRequest', 'elementsConfigId', elementsConfigId); + // verify required parameter 'accessRequestUserCreate' is not null or undefined + assertParamExists('createAccessRequest', 'accessRequestUserCreate', accessRequestUserCreate); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}` + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestUserCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create Access Request + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {AccessRequestUserCreate} accessRequestUserCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost: async ( + elementsConfigId: string, + projId: string, + envId: string, + accessRequestUserCreate: AccessRequestUserCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost', + 'elementsConfigId', + elementsConfigId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost', + 'envId', + envId, + ); + // verify required parameter 'accessRequestUserCreate' is not null or undefined + assertParamExists( + 'createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost', + 'accessRequestUserCreate', + accessRequestUserCreate, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests` + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestUserCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deny Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReviewDeny} accessRequestReviewDeny + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + denyAccessRequest: async ( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReviewDeny: AccessRequestReviewDeny, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists('denyAccessRequest', 'accessRequestId', accessRequestId); + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('denyAccessRequest', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('denyAccessRequest', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('denyAccessRequest', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('denyAccessRequest', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('denyAccessRequest', 'elementsConfigId', elementsConfigId); + // verify required parameter 'accessRequestReviewDeny' is not null or undefined + assertParamExists('denyAccessRequest', 'accessRequestReviewDeny', accessRequestReviewDeny); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/deny` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestReviewDeny, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deny Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReviewDeny} accessRequestReviewDeny + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut: + async ( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReviewDeny: AccessRequestReviewDeny, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists( + 'denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut', + 'accessRequestId', + accessRequestId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut', + 'envId', + envId, + ); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut', + 'elementsConfigId', + elementsConfigId, + ); + // verify required parameter 'accessRequestReviewDeny' is not null or undefined + assertParamExists( + 'denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut', + 'accessRequestReviewDeny', + accessRequestReviewDeny, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/deny` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestReviewDeny, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAccessRequest: async ( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists('getAccessRequest', 'accessRequestId', accessRequestId); + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('getAccessRequest', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('getAccessRequest', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAccessRequest', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAccessRequest', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('getAccessRequest', 'elementsConfigId', elementsConfigId); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Access Request + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet: + async ( + elementsConfigId: string, + accessRequestId: string, + projId: string, + envId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet', + 'elementsConfigId', + elementsConfigId, + ); + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists( + 'getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet', + 'accessRequestId', + accessRequestId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet', + 'envId', + envId, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}` + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List Access Requests + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {RequestStatus} [status] Optional status filter, will only return access requests with this status. + * @param {string} [role] Optional role filter, will only return access request granted with that role. + * @param {string} [resource] Optional resource filter, will only return access request granted in that resource. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listAccessRequests: async ( + tenantId: string, + userId: string, + elementsConfigId: string, + projId: string, + envId: string, + status?: RequestStatus, + role?: string, + resource?: string, + page?: number, + perPage?: number, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('listAccessRequests', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('listAccessRequests', 'userId', userId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('listAccessRequests', 'elementsConfigId', elementsConfigId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('listAccessRequests', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listAccessRequests', 'envId', envId); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}` + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (role !== undefined) { + localVarQueryParameter['role'] = role; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List Access Requests + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {RequestStatus} [status] Optional status filter, will only return access requests with this status. + * @param {string} [tenant] Optional tenant filter, will only return access request granted in that tenant. + * @param {string} [role] Optional role filter, will only return access request granted with that role. + * @param {string} [resource] Optional resource filter, will only return access request granted in that resource. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet: async ( + elementsConfigId: string, + projId: string, + envId: string, + status?: RequestStatus, + tenant?: string, + role?: string, + resource?: string, + page?: number, + perPage?: number, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet', + 'elementsConfigId', + elementsConfigId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet', + 'envId', + envId, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests` + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (tenant !== undefined) { + localVarQueryParameter['tenant'] = tenant; + } + + if (role !== undefined) { + localVarQueryParameter['role'] = role; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update Access Request Reviewer + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateAccessRequestReviewer: async ( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'accessRequestId', accessRequestId); + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'tenantId', tenantId); + // verify required parameter 'userId' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'elementsConfigId', elementsConfigId); + // verify required parameter 'accessRequestReview' is not null or undefined + assertParamExists('updateAccessRequestReviewer', 'accessRequestReview', accessRequestReview); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/reviewer` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update Access Request Reviewer + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch: + async ( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'accessRequestId' is not null or undefined + assertParamExists( + 'updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch', + 'accessRequestId', + accessRequestId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists( + 'updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch', + 'projId', + projId, + ); + // verify required parameter 'envId' is not null or undefined + assertParamExists( + 'updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch', + 'envId', + envId, + ); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists( + 'updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch', + 'elementsConfigId', + elementsConfigId, + ); + // verify required parameter 'accessRequestReview' is not null or undefined + assertParamExists( + 'updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch', + 'accessRequestReview', + accessRequestReview, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/reviewer` + .replace('{access_request_id}', encodeURIComponent(String(accessRequestId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + accessRequestReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * AccessRequestsEAPApi - functional programming interface + */ +export const AccessRequestsEAPApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = AccessRequestsEAPApiAxiosParamCreator(configuration); + return { + /** + * + * @summary Approve Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async approveAccessRequest( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approveAccessRequest( + accessRequestId, + tenantId, + userId, + projId, + envId, + elementsConfigId, + accessRequestReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.approveAccessRequest']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Approve Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut( + accessRequestId, + projId, + envId, + elementsConfigId, + accessRequestReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Cancel Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async cancelAccessRequest( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelAccessRequest( + accessRequestId, + tenantId, + userId, + projId, + envId, + elementsConfigId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.cancelAccessRequest']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Cancel Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut( + accessRequestId, + projId, + envId, + elementsConfigId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Create Access Request + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestUserCreate} accessRequestUserCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createAccessRequest( + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestUserCreate: AccessRequestUserCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAccessRequest( + tenantId, + userId, + projId, + envId, + elementsConfigId, + accessRequestUserCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.createAccessRequest']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Create Access Request + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {AccessRequestUserCreate} accessRequestUserCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost( + elementsConfigId: string, + projId: string, + envId: string, + accessRequestUserCreate: AccessRequestUserCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost( + elementsConfigId, + projId, + envId, + accessRequestUserCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Deny Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReviewDeny} accessRequestReviewDeny + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async denyAccessRequest( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReviewDeny: AccessRequestReviewDeny, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.denyAccessRequest( + accessRequestId, + tenantId, + userId, + projId, + envId, + elementsConfigId, + accessRequestReviewDeny, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.denyAccessRequest']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Deny Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReviewDeny} accessRequestReviewDeny + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReviewDeny: AccessRequestReviewDeny, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut( + accessRequestId, + projId, + envId, + elementsConfigId, + accessRequestReviewDeny, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Access Request + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAccessRequest( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccessRequest( + accessRequestId, + tenantId, + userId, + projId, + envId, + elementsConfigId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.getAccessRequest']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Access Request + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet( + elementsConfigId: string, + accessRequestId: string, + projId: string, + envId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet( + elementsConfigId, + accessRequestId, + projId, + envId, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List Access Requests + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {RequestStatus} [status] Optional status filter, will only return access requests with this status. + * @param {string} [role] Optional role filter, will only return access request granted with that role. + * @param {string} [resource] Optional resource filter, will only return access request granted in that resource. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listAccessRequests( + tenantId: string, + userId: string, + elementsConfigId: string, + projId: string, + envId: string, + status?: RequestStatus, + role?: string, + resource?: string, + page?: number, + perPage?: number, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAccessRequests( + tenantId, + userId, + elementsConfigId, + projId, + envId, + status, + role, + resource, + page, + perPage, + resourceInstanceId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.listAccessRequests']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List Access Requests + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {RequestStatus} [status] Optional status filter, will only return access requests with this status. + * @param {string} [tenant] Optional tenant filter, will only return access request granted in that tenant. + * @param {string} [role] Optional role filter, will only return access request granted with that role. + * @param {string} [resource] Optional resource filter, will only return access request granted in that resource. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet( + elementsConfigId: string, + projId: string, + envId: string, + status?: RequestStatus, + tenant?: string, + role?: string, + resource?: string, + page?: number, + perPage?: number, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet( + elementsConfigId, + projId, + envId, + status, + tenant, + role, + resource, + page, + perPage, + resourceInstanceId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Update Access Request Reviewer + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async updateAccessRequestReviewer( + accessRequestId: string, + tenantId: string, + userId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccessRequestReviewer( + accessRequestId, + tenantId, + userId, + projId, + envId, + elementsConfigId, + accessRequestReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AccessRequestsEAPApi.updateAccessRequestReviewer']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Update Access Request Reviewer + * @param {string} accessRequestId Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {AccessRequestReview} accessRequestReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch( + accessRequestId: string, + projId: string, + envId: string, + elementsConfigId: string, + accessRequestReview: AccessRequestReview, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch( + accessRequestId, + projId, + envId, + elementsConfigId, + accessRequestReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'AccessRequestsEAPApi.updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * AccessRequestsEAPApi - factory interface + */ +export const AccessRequestsEAPApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = AccessRequestsEAPApiFp(configuration); + return { + /** + * + * @summary Approve Access Request + * @param {AccessRequestsEAPApiApproveAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveAccessRequest( + requestParameters: AccessRequestsEAPApiApproveAccessRequestRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .approveAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Approve Access Request + * @param {AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut( + requestParameters: AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Cancel Access Request + * @param {AccessRequestsEAPApiCancelAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelAccessRequest( + requestParameters: AccessRequestsEAPApiCancelAccessRequestRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .cancelAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Cancel Access Request + * @param {AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut( + requestParameters: AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create Access Request + * @param {AccessRequestsEAPApiCreateAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createAccessRequest( + requestParameters: AccessRequestsEAPApiCreateAccessRequestRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createAccessRequest( + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestUserCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create Access Request + * @param {AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost( + requestParameters: AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.accessRequestUserCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deny Access Request + * @param {AccessRequestsEAPApiDenyAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + denyAccessRequest( + requestParameters: AccessRequestsEAPApiDenyAccessRequestRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .denyAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReviewDeny, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deny Access Request + * @param {AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut( + requestParameters: AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReviewDeny, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Access Request + * @param {AccessRequestsEAPApiGetAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAccessRequest( + requestParameters: AccessRequestsEAPApiGetAccessRequestRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Access Request + * @param {AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet( + requestParameters: AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet( + requestParameters.elementsConfigId, + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Access Requests + * @param {AccessRequestsEAPApiListAccessRequestsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listAccessRequests( + requestParameters: AccessRequestsEAPApiListAccessRequestsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listAccessRequests( + requestParameters.tenantId, + requestParameters.userId, + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.status, + requestParameters.role, + requestParameters.resource, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Access Requests + * @param {AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet( + requestParameters: AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.status, + requestParameters.tenant, + requestParameters.role, + requestParameters.resource, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update Access Request Reviewer + * @param {AccessRequestsEAPApiUpdateAccessRequestReviewerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateAccessRequestReviewer( + requestParameters: AccessRequestsEAPApiUpdateAccessRequestReviewerRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateAccessRequestReviewer( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update Access Request Reviewer + * @param {AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch( + requestParameters: AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for approveAccessRequest operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiApproveAccessRequestRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestReview: AccessRequestReview; +} + +/** + * Request parameters for approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestReview: AccessRequestReview; +} + +/** + * Request parameters for cancelAccessRequest operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiCancelAccessRequestRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; +} + +/** + * Request parameters for cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; +} + +/** + * Request parameters for createAccessRequest operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiCreateAccessRequestRequest { + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestUserCreate: AccessRequestUserCreate; +} + +/** + * Request parameters for createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly accessRequestUserCreate: AccessRequestUserCreate; +} + +/** + * Request parameters for denyAccessRequest operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiDenyAccessRequestRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestReviewDeny: AccessRequestReviewDeny; +} + +/** + * Request parameters for denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestReviewDeny: AccessRequestReviewDeny; +} + +/** + * Request parameters for getAccessRequest operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiGetAccessRequestRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; +} + +/** + * Request parameters for getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listAccessRequests operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiListAccessRequestsRequest { + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Optional status filter, will only return access requests with this status. + */ + readonly status?: RequestStatus; + + /** + * Optional role filter, will only return access request granted with that role. + */ + readonly role?: string; + + /** + * Optional resource filter, will only return access request granted in that resource. + */ + readonly resource?: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; +} + +/** + * Request parameters for listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Optional status filter, will only return access requests with this status. + */ + readonly status?: RequestStatus; + + /** + * Optional tenant filter, will only return access request granted in that tenant. + */ + readonly tenant?: string; + + /** + * Optional role filter, will only return access request granted with that role. + */ + readonly role?: string; + + /** + * Optional resource filter, will only return access request granted in that resource. + */ + readonly resource?: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; +} + +/** + * Request parameters for updateAccessRequestReviewer operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiUpdateAccessRequestReviewerRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestReview: AccessRequestReview; +} + +/** + * Request parameters for updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch operation in AccessRequestsEAPApi. + */ +export interface AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest { + /** + * Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the \"slug\"). + */ + readonly accessRequestId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly accessRequestReview: AccessRequestReview; +} + +/** + * AccessRequestsEAPApi - object-oriented interface + */ +export class AccessRequestsEAPApi extends BaseAPI { + /** + * + * @summary Approve Access Request + * @param {AccessRequestsEAPApiApproveAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public approveAccessRequest( + requestParameters: AccessRequestsEAPApiApproveAccessRequestRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .approveAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Approve Access Request + * @param {AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut( + requestParameters: AccessRequestsEAPApiApproveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePutRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .approveAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdApprovePut( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Cancel Access Request + * @param {AccessRequestsEAPApiCancelAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public cancelAccessRequest( + requestParameters: AccessRequestsEAPApiCancelAccessRequestRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .cancelAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Cancel Access Request + * @param {AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut( + requestParameters: AccessRequestsEAPApiCancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPutRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .cancelAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdCancelPut( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create Access Request + * @param {AccessRequestsEAPApiCreateAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createAccessRequest( + requestParameters: AccessRequestsEAPApiCreateAccessRequestRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .createAccessRequest( + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestUserCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create Access Request + * @param {AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost( + requestParameters: AccessRequestsEAPApiCreateAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPostRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .createAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsPost( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.accessRequestUserCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deny Access Request + * @param {AccessRequestsEAPApiDenyAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public denyAccessRequest( + requestParameters: AccessRequestsEAPApiDenyAccessRequestRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .denyAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReviewDeny, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deny Access Request + * @param {AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut( + requestParameters: AccessRequestsEAPApiDenyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPutRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .denyAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdDenyPut( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReviewDeny, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Access Request + * @param {AccessRequestsEAPApiGetAccessRequestRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAccessRequest( + requestParameters: AccessRequestsEAPApiGetAccessRequestRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .getAccessRequest( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Access Request + * @param {AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet( + requestParameters: AccessRequestsEAPApiGetAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGetRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .getAccessRequestV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdGet( + requestParameters.elementsConfigId, + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List Access Requests + * @param {AccessRequestsEAPApiListAccessRequestsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listAccessRequests( + requestParameters: AccessRequestsEAPApiListAccessRequestsRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .listAccessRequests( + requestParameters.tenantId, + requestParameters.userId, + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.status, + requestParameters.role, + requestParameters.resource, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List Access Requests + * @param {AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet( + requestParameters: AccessRequestsEAPApiListAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGetRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .listAccessRequestsV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsGet( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.status, + requestParameters.tenant, + requestParameters.role, + requestParameters.resource, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update Access Request Reviewer + * @param {AccessRequestsEAPApiUpdateAccessRequestReviewerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public updateAccessRequestReviewer( + requestParameters: AccessRequestsEAPApiUpdateAccessRequestReviewerRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .updateAccessRequestReviewer( + requestParameters.accessRequestId, + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update Access Request Reviewer + * @param {AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch( + requestParameters: AccessRequestsEAPApiUpdateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatchRequest, + options?: RawAxiosRequestConfig, + ) { + return AccessRequestsEAPApiFp(this.configuration) + .updateAccessRequestReviewerV2ElementsProjIdEnvIdConfigElementsConfigIdAccessRequestsAccessRequestIdReviewerPatch( + requestParameters.accessRequestId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.accessRequestReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/activity-log-api.ts b/src/openapi/api/activity-log-api.ts new file mode 100644 index 00000000..464607d9 --- /dev/null +++ b/src/openapi/api/activity-log-api.ts @@ -0,0 +1,391 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + createRequestFunction, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { LimitedPaginatedResultActivityLogEventRead } from '../types'; +/** + * ActivityLogApi - axios parameter creator + */ +export const ActivityLogApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Activity Events + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listActivityEvents: async ( + actorId?: Array, + actorDisplayName?: string, + actorType?: Array, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/v2/activity`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (actorId) { + localVarQueryParameter['actor_id'] = actorId; + } + + if (actorDisplayName !== undefined) { + localVarQueryParameter['actor_display_name'] = actorDisplayName; + } + + if (actorType) { + localVarQueryParameter['actor_type'] = actorType; + } + + if (projectId) { + localVarQueryParameter['project_id'] = projectId; + } + + if (envId) { + localVarQueryParameter['env_id'] = envId; + } + + if (timestampFrom !== undefined) { + localVarQueryParameter['timestamp_from'] = timestampFrom; + } + + if (timestampUntil !== undefined) { + localVarQueryParameter['timestamp_until'] = timestampUntil; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List Activity Types + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listActivityTypes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v2/activity/types`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * ActivityLogApi - functional programming interface + */ +export const ActivityLogApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ActivityLogApiAxiosParamCreator(configuration); + return { + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Activity Events + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listActivityEvents( + actorId?: Array, + actorDisplayName?: string, + actorType?: Array, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listActivityEvents( + actorId, + actorDisplayName, + actorType, + projectId, + envId, + timestampFrom, + timestampUntil, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ActivityLogApi.listActivityEvents']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List Activity Types + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listActivityTypes( + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listActivityTypes(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ActivityLogApi.listActivityTypes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * ActivityLogApi - factory interface + */ +export const ActivityLogApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ActivityLogApiFp(configuration); + return { + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Activity Events + * @param {ActivityLogApiListActivityEventsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listActivityEvents( + requestParameters: ActivityLogApiListActivityEventsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listActivityEvents( + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.actorType, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Activity Types + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listActivityTypes(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listActivityTypes(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for listActivityEvents operation in ActivityLogApi. + */ +export interface ActivityLogApiListActivityEventsRequest { + /** + * Actor ID to search + */ + readonly actorId?: Array; + + /** + * Actor display name to search + */ + readonly actorDisplayName?: string; + + /** + * Actor type to search (member, user, api_key) + */ + readonly actorType?: Array; + + /** + * Projects to include in search + */ + readonly projectId?: Array; + + /** + * Environments to include in search + */ + readonly envId?: Array; + + /** + * Retrieve only events after this timestamp (seconds since epoch) + */ + readonly timestampFrom?: number; + + /** + * Retrieve only events before this timestamp (seconds since epoch) + */ + readonly timestampUntil?: number; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * ActivityLogApi - object-oriented interface + */ +export class ActivityLogApi extends BaseAPI { + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Activity Events + * @param {ActivityLogApiListActivityEventsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listActivityEvents( + requestParameters: ActivityLogApiListActivityEventsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ActivityLogApiFp(this.configuration) + .listActivityEvents( + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.actorType, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List Activity Types + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listActivityTypes(options?: RawAxiosRequestConfig) { + return ActivityLogApiFp(this.configuration) + .listActivityTypes(options) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/apihistory-api.ts b/src/openapi/api/apihistory-api.ts new file mode 100644 index 00000000..2d0b185b --- /dev/null +++ b/src/openapi/api/apihistory-api.ts @@ -0,0 +1,733 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { APIHistoryEventFullRead, LimitedPaginatedResultAPIHistoryEventRead } from '../types'; +/** + * APIHistoryApi - axios parameter creator + */ +export const APIHistoryApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {string} eventId + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getApiEventV2HistoryEventIdGet: async ( + eventId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'eventId' is not null or undefined + assertParamExists('getApiEventV2HistoryEventIdGet', 'eventId', eventId); + const localVarPath = `/v2/history/{event_id}`.replace( + '{event_id}', + encodeURIComponent(String(eventId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Request Body + * @param {string} eventId + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getRequestBodyV2HistoryEventIdRequestGet: async ( + eventId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'eventId' is not null or undefined + assertParamExists('getRequestBodyV2HistoryEventIdRequestGet', 'eventId', eventId); + const localVarPath = `/v2/history/{event_id}/request`.replace( + '{event_id}', + encodeURIComponent(String(eventId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Response Body + * @param {string} eventId + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getResponseBodyV2HistoryEventIdResponseGet: async ( + eventId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'eventId' is not null or undefined + assertParamExists('getResponseBodyV2HistoryEventIdResponseGet', 'eventId', eventId); + const localVarPath = `/v2/history/{event_id}/response`.replace( + '{event_id}', + encodeURIComponent(String(eventId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Api Events + * @param {Array} [method] HTTP methods to include in search + * @param {Array} [path] API paths to include in search + * @param {boolean} [success] Filter by API request success/failure + * @param {Array} [statusCode] HTTP status codes to include in search + * @param {Array} [clientIp] IPs of clients to include in search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listApiEventsV2HistoryGet: async ( + method?: Array, + path?: Array, + success?: boolean, + statusCode?: Array, + clientIp?: Array, + actorType?: Array, + actorId?: Array, + actorDisplayName?: string, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/v2/history`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (method) { + localVarQueryParameter['method'] = method; + } + + if (path) { + localVarQueryParameter['path'] = path; + } + + if (success !== undefined) { + localVarQueryParameter['success'] = success; + } + + if (statusCode) { + localVarQueryParameter['status_code'] = statusCode; + } + + if (clientIp) { + localVarQueryParameter['client_ip'] = clientIp; + } + + if (actorType) { + localVarQueryParameter['actor_type'] = actorType; + } + + if (actorId) { + localVarQueryParameter['actor_id'] = actorId; + } + + if (actorDisplayName !== undefined) { + localVarQueryParameter['actor_display_name'] = actorDisplayName; + } + + if (projectId) { + localVarQueryParameter['project_id'] = projectId; + } + + if (envId) { + localVarQueryParameter['env_id'] = envId; + } + + if (timestampFrom !== undefined) { + localVarQueryParameter['timestamp_from'] = timestampFrom; + } + + if (timestampUntil !== undefined) { + localVarQueryParameter['timestamp_until'] = timestampUntil; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * APIHistoryApi - functional programming interface + */ +export const APIHistoryApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = APIHistoryApiAxiosParamCreator(configuration); + return { + /** + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {string} eventId + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getApiEventV2HistoryEventIdGet( + eventId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getApiEventV2HistoryEventIdGet( + eventId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIHistoryApi.getApiEventV2HistoryEventIdGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Request Body + * @param {string} eventId + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getRequestBodyV2HistoryEventIdRequestGet( + eventId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getRequestBodyV2HistoryEventIdRequestGet(eventId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIHistoryApi.getRequestBodyV2HistoryEventIdRequestGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Response Body + * @param {string} eventId + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getResponseBodyV2HistoryEventIdResponseGet( + eventId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResponseBodyV2HistoryEventIdResponseGet( + eventId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIHistoryApi.getResponseBodyV2HistoryEventIdResponseGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Api Events + * @param {Array} [method] HTTP methods to include in search + * @param {Array} [path] API paths to include in search + * @param {boolean} [success] Filter by API request success/failure + * @param {Array} [statusCode] HTTP status codes to include in search + * @param {Array} [clientIp] IPs of clients to include in search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listApiEventsV2HistoryGet( + method?: Array, + path?: Array, + success?: boolean, + statusCode?: Array, + clientIp?: Array, + actorType?: Array, + actorId?: Array, + actorDisplayName?: string, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listApiEventsV2HistoryGet( + method, + path, + success, + statusCode, + clientIp, + actorType, + actorId, + actorDisplayName, + projectId, + envId, + timestampFrom, + timestampUntil, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIHistoryApi.listApiEventsV2HistoryGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * APIHistoryApi - factory interface + */ +export const APIHistoryApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = APIHistoryApiFp(configuration); + return { + /** + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {APIHistoryApiGetApiEventV2HistoryEventIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getApiEventV2HistoryEventIdGet( + requestParameters: APIHistoryApiGetApiEventV2HistoryEventIdGetRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getApiEventV2HistoryEventIdGet(requestParameters.eventId, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Request Body + * @param {APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getRequestBodyV2HistoryEventIdRequestGet( + requestParameters: APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getRequestBodyV2HistoryEventIdRequestGet(requestParameters.eventId, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Response Body + * @param {APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getResponseBodyV2HistoryEventIdResponseGet( + requestParameters: APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResponseBodyV2HistoryEventIdResponseGet(requestParameters.eventId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Api Events + * @param {APIHistoryApiListApiEventsV2HistoryGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listApiEventsV2HistoryGet( + requestParameters: APIHistoryApiListApiEventsV2HistoryGetRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listApiEventsV2HistoryGet( + requestParameters.method, + requestParameters.path, + requestParameters.success, + requestParameters.statusCode, + requestParameters.clientIp, + requestParameters.actorType, + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getApiEventV2HistoryEventIdGet operation in APIHistoryApi. + */ +export interface APIHistoryApiGetApiEventV2HistoryEventIdGetRequest { + readonly eventId: string; +} + +/** + * Request parameters for getRequestBodyV2HistoryEventIdRequestGet operation in APIHistoryApi. + */ +export interface APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest { + readonly eventId: string; +} + +/** + * Request parameters for getResponseBodyV2HistoryEventIdResponseGet operation in APIHistoryApi. + */ +export interface APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest { + readonly eventId: string; +} + +/** + * Request parameters for listApiEventsV2HistoryGet operation in APIHistoryApi. + */ +export interface APIHistoryApiListApiEventsV2HistoryGetRequest { + /** + * HTTP methods to include in search + */ + readonly method?: Array; + + /** + * API paths to include in search + */ + readonly path?: Array; + + /** + * Filter by API request success/failure + */ + readonly success?: boolean; + + /** + * HTTP status codes to include in search + */ + readonly statusCode?: Array; + + /** + * IPs of clients to include in search + */ + readonly clientIp?: Array; + + /** + * Actor type to search (member, user, api_key) + */ + readonly actorType?: Array; + + /** + * Actor ID to search + */ + readonly actorId?: Array; + + /** + * Actor display name to search + */ + readonly actorDisplayName?: string; + + /** + * Projects to include in search + */ + readonly projectId?: Array; + + /** + * Environments to include in search + */ + readonly envId?: Array; + + /** + * Retrieve only events after this timestamp (seconds since epoch) + */ + readonly timestampFrom?: number; + + /** + * Retrieve only events before this timestamp (seconds since epoch) + */ + readonly timestampUntil?: number; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * APIHistoryApi - object-oriented interface + */ +export class APIHistoryApi extends BaseAPI { + /** + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {APIHistoryApiGetApiEventV2HistoryEventIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getApiEventV2HistoryEventIdGet( + requestParameters: APIHistoryApiGetApiEventV2HistoryEventIdGetRequest, + options?: RawAxiosRequestConfig, + ) { + return APIHistoryApiFp(this.configuration) + .getApiEventV2HistoryEventIdGet(requestParameters.eventId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Request Body + * @param {APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getRequestBodyV2HistoryEventIdRequestGet( + requestParameters: APIHistoryApiGetRequestBodyV2HistoryEventIdRequestGetRequest, + options?: RawAxiosRequestConfig, + ) { + return APIHistoryApiFp(this.configuration) + .getRequestBodyV2HistoryEventIdRequestGet(requestParameters.eventId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Response Body + * @param {APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getResponseBodyV2HistoryEventIdResponseGet( + requestParameters: APIHistoryApiGetResponseBodyV2HistoryEventIdResponseGetRequest, + options?: RawAxiosRequestConfig, + ) { + return APIHistoryApiFp(this.configuration) + .getResponseBodyV2HistoryEventIdResponseGet(requestParameters.eventId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches all API History events for given filters. Available to members with Viewer (or higher) role. + * @summary List Api Events + * @param {APIHistoryApiListApiEventsV2HistoryGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listApiEventsV2HistoryGet( + requestParameters: APIHistoryApiListApiEventsV2HistoryGetRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return APIHistoryApiFp(this.configuration) + .listApiEventsV2HistoryGet( + requestParameters.method, + requestParameters.path, + requestParameters.success, + requestParameters.statusCode, + requestParameters.clientIp, + requestParameters.actorType, + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/apikeys-api.ts b/src/openapi/api/apikeys-api.ts index f0d976da..35695682 100644 --- a/src/openapi/api/apikeys-api.ts +++ b/src/openapi/api/apikeys-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,39 +10,28 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { APIKeyCreate } from '../types'; -// @ts-ignore -import { APIKeyRead } from '../types'; -// @ts-ignore -import { APIKeyScopeRead } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { MemberAccessObj } from '../types'; -// @ts-ignore -import { PaginatedResultAPIKeyRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { + APIKeyCreate, + APIKeyRead, + APIKeyScopeRead, + MemberAccessObj, + PaginatedResultAPIKeyRead, +} from '../types'; /** * APIKeysApi - axios parameter creator - * @export */ export const APIKeysApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -53,11 +40,11 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * @summary Create Api Key * @param {APIKeyCreate} aPIKeyCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createApiKey: async ( aPIKeyCreate: APIKeyCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'aPIKeyCreate' is not null or undefined assertParamExists('createApiKey', 'aPIKeyCreate', aPIKeyCreate); @@ -78,6 +65,7 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -102,16 +90,16 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * @summary Delete Api Key * @param {string} apiKeyId The unique id of the API key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteApiKey: async ( apiKeyId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'apiKeyId' is not null or undefined assertParamExists('deleteApiKey', 'apiKeyId', apiKeyId); const localVarPath = `/v2/api-key/{api_key_id}`.replace( - `{${'api_key_id'}}`, + '{api_key_id}', encodeURIComponent(String(apiKeyId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -129,6 +117,8 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -147,13 +137,16 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * @summary Get Api Key * @param {string} apiKeyId The unique id of the API key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getApiKey: async (apiKeyId: string, options: AxiosRequestConfig = {}): Promise => { + getApiKey: async ( + apiKeyId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { // verify required parameter 'apiKeyId' is not null or undefined assertParamExists('getApiKey', 'apiKeyId', apiKeyId); const localVarPath = `/v2/api-key/{api_key_id}`.replace( - `{${'api_key_id'}}`, + '{api_key_id}', encodeURIComponent(String(apiKeyId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -171,6 +164,8 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -188,9 +183,9 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * * @summary Get Api Key Scope * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getApiKeyScope: async (options: AxiosRequestConfig = {}): Promise => { + getApiKeyScope: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/v2/api-key/scope`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -207,6 +202,8 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -226,20 +223,20 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getEnvironmentApiKey: async ( projId: string, envId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getEnvironmentApiKey', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getEnvironmentApiKey', 'envId', envId); const localVarPath = `/v2/api-key/{proj_id}/{env_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -255,6 +252,8 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -272,16 +271,18 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * Lists all the api_keys under the active organization. * @summary List Api Keys * @param {MemberAccessObj} [objectType] + * @param {string} [projId] Optional project filter by project id or key * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listApiKeys: async ( objectType?: MemberAccessObj, + projId?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/v2/api-key`; // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -303,6 +304,10 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['object_type'] = objectType; } + if (projId !== undefined) { + localVarQueryParameter['proj_id'] = projId; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -311,6 +316,8 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -329,16 +336,16 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati * @summary Rotate API Key * @param {string} apiKeyId The unique id of the API key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ rotateApiKey: async ( apiKeyId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'apiKeyId' is not null or undefined assertParamExists('rotateApiKey', 'apiKeyId', apiKeyId); const localVarPath = `/v2/api-key/{api_key_id}/rotate-secret`.replace( - `{${'api_key_id'}}`, + '{api_key_id}', encodeURIComponent(String(apiKeyId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -356,6 +363,8 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -374,7 +383,6 @@ export const APIKeysApiAxiosParamCreator = function (configuration?: Configurati /** * APIKeysApi - functional programming interface - * @export */ export const APIKeysApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = APIKeysApiAxiosParamCreator(configuration); @@ -384,54 +392,90 @@ export const APIKeysApiFp = function (configuration?: Configuration) { * @summary Create Api Key * @param {APIKeyCreate} aPIKeyCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createApiKey( aPIKeyCreate: APIKeyCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createApiKey(aPIKeyCreate, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.createApiKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the api_key and all its related data. * @summary Delete Api Key * @param {string} apiKeyId The unique id of the API key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteApiKey( apiKeyId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteApiKey(apiKeyId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.deleteApiKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single api_key matching the given api_key_id, if such api_key exists. * @summary Get Api Key * @param {string} apiKeyId The unique id of the API key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getApiKey( apiKeyId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getApiKey(apiKeyId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.getApiKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get Api Key Scope * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getApiKeyScope( - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getApiKeyScope(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.getApiKeyScope']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * @@ -439,65 +483,94 @@ export const APIKeysApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getEnvironmentApiKey( projId: string, envId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getEnvironmentApiKey( projId, envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.getEnvironmentApiKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the api_keys under the active organization. * @summary List Api Keys * @param {MemberAccessObj} [objectType] + * @param {string} [projId] Optional project filter by project id or key * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listApiKeys( objectType?: MemberAccessObj, + projId?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listApiKeys( objectType, + projId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.listApiKeys']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. * @summary Rotate API Key * @param {string} apiKeyId The unique id of the API key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async rotateApiKey( apiKeyId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApiKey(apiKeyId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['APIKeysApi.rotateApiKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * APIKeysApi - factory interface - * @export */ export const APIKeysApiFactory = function ( configuration?: Configuration, @@ -509,199 +582,187 @@ export const APIKeysApiFactory = function ( /** * Creates a new api_key under the active organization. * @summary Create Api Key - * @param {APIKeyCreate} aPIKeyCreate + * @param {APIKeysApiCreateApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - createApiKey(aPIKeyCreate: APIKeyCreate, options?: any): AxiosPromise { + createApiKey( + requestParameters: APIKeysApiCreateApiKeyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .createApiKey(aPIKeyCreate, options) + .createApiKey(requestParameters.aPIKeyCreate, options) .then((request) => request(axios, basePath)); }, /** * Deletes the api_key and all its related data. * @summary Delete Api Key - * @param {string} apiKeyId The unique id of the API key + * @param {APIKeysApiDeleteApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteApiKey(apiKeyId: string, options?: any): AxiosPromise { - return localVarFp.deleteApiKey(apiKeyId, options).then((request) => request(axios, basePath)); + deleteApiKey( + requestParameters: APIKeysApiDeleteApiKeyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteApiKey(requestParameters.apiKeyId, options) + .then((request) => request(axios, basePath)); }, /** * Gets a single api_key matching the given api_key_id, if such api_key exists. * @summary Get Api Key - * @param {string} apiKeyId The unique id of the API key + * @param {APIKeysApiGetApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getApiKey(apiKeyId: string, options?: any): AxiosPromise { - return localVarFp.getApiKey(apiKeyId, options).then((request) => request(axios, basePath)); + getApiKey( + requestParameters: APIKeysApiGetApiKeyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getApiKey(requestParameters.apiKeyId, options) + .then((request) => request(axios, basePath)); }, /** * * @summary Get Api Key Scope * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getApiKeyScope(options?: any): AxiosPromise { + getApiKeyScope(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getApiKeyScope(options).then((request) => request(axios, basePath)); }, /** * * @summary Get Environment Api Key - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {APIKeysApiGetEnvironmentApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getEnvironmentApiKey(projId: string, envId: string, options?: any): AxiosPromise { + getEnvironmentApiKey( + requestParameters: APIKeysApiGetEnvironmentApiKeyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getEnvironmentApiKey(projId, envId, options) + .getEnvironmentApiKey(requestParameters.projId, requestParameters.envId, options) .then((request) => request(axios, basePath)); }, /** * Lists all the api_keys under the active organization. * @summary List Api Keys - * @param {MemberAccessObj} [objectType] - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {APIKeysApiListApiKeysRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listApiKeys( - objectType?: MemberAccessObj, - page?: number, - perPage?: number, - options?: any, + requestParameters: APIKeysApiListApiKeysRequest = {}, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .listApiKeys(objectType, page, perPage, options) + .listApiKeys( + requestParameters.objectType, + requestParameters.projId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. * @summary Rotate API Key - * @param {string} apiKeyId The unique id of the API key + * @param {APIKeysApiRotateApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - rotateApiKey(apiKeyId: string, options?: any): AxiosPromise { - return localVarFp.rotateApiKey(apiKeyId, options).then((request) => request(axios, basePath)); + rotateApiKey( + requestParameters: APIKeysApiRotateApiKeyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .rotateApiKey(requestParameters.apiKeyId, options) + .then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createApiKey operation in APIKeysApi. - * @export - * @interface APIKeysApiCreateApiKeyRequest */ export interface APIKeysApiCreateApiKeyRequest { - /** - * - * @type {APIKeyCreate} - * @memberof APIKeysApiCreateApiKey - */ readonly aPIKeyCreate: APIKeyCreate; } /** * Request parameters for deleteApiKey operation in APIKeysApi. - * @export - * @interface APIKeysApiDeleteApiKeyRequest */ export interface APIKeysApiDeleteApiKeyRequest { /** * The unique id of the API key - * @type {string} - * @memberof APIKeysApiDeleteApiKey */ readonly apiKeyId: string; } /** * Request parameters for getApiKey operation in APIKeysApi. - * @export - * @interface APIKeysApiGetApiKeyRequest */ export interface APIKeysApiGetApiKeyRequest { /** * The unique id of the API key - * @type {string} - * @memberof APIKeysApiGetApiKey */ readonly apiKeyId: string; } /** * Request parameters for getEnvironmentApiKey operation in APIKeysApi. - * @export - * @interface APIKeysApiGetEnvironmentApiKeyRequest */ export interface APIKeysApiGetEnvironmentApiKeyRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof APIKeysApiGetEnvironmentApiKey */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof APIKeysApiGetEnvironmentApiKey */ readonly envId: string; } /** * Request parameters for listApiKeys operation in APIKeysApi. - * @export - * @interface APIKeysApiListApiKeysRequest */ export interface APIKeysApiListApiKeysRequest { + readonly objectType?: MemberAccessObj; + /** - * - * @type {MemberAccessObj} - * @memberof APIKeysApiListApiKeys + * Optional project filter by project id or key */ - readonly objectType?: MemberAccessObj; + readonly projId?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof APIKeysApiListApiKeys */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof APIKeysApiListApiKeys */ readonly perPage?: number; } /** * Request parameters for rotateApiKey operation in APIKeysApi. - * @export - * @interface APIKeysApiRotateApiKeyRequest */ export interface APIKeysApiRotateApiKeyRequest { /** * The unique id of the API key - * @type {string} - * @memberof APIKeysApiRotateApiKey */ readonly apiKeyId: string; } /** * APIKeysApi - object-oriented interface - * @export - * @class APIKeysApi - * @extends {BaseAPI} */ export class APIKeysApi extends BaseAPI { /** @@ -709,12 +770,11 @@ export class APIKeysApi extends BaseAPI { * @summary Create Api Key * @param {APIKeysApiCreateApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ public createApiKey( requestParameters: APIKeysApiCreateApiKeyRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return APIKeysApiFp(this.configuration) .createApiKey(requestParameters.aPIKeyCreate, options) @@ -726,12 +786,11 @@ export class APIKeysApi extends BaseAPI { * @summary Delete Api Key * @param {APIKeysApiDeleteApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ public deleteApiKey( requestParameters: APIKeysApiDeleteApiKeyRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return APIKeysApiFp(this.configuration) .deleteApiKey(requestParameters.apiKeyId, options) @@ -743,10 +802,9 @@ export class APIKeysApi extends BaseAPI { * @summary Get Api Key * @param {APIKeysApiGetApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ - public getApiKey(requestParameters: APIKeysApiGetApiKeyRequest, options?: AxiosRequestConfig) { + public getApiKey(requestParameters: APIKeysApiGetApiKeyRequest, options?: RawAxiosRequestConfig) { return APIKeysApiFp(this.configuration) .getApiKey(requestParameters.apiKeyId, options) .then((request) => request(this.axios, this.basePath)); @@ -756,10 +814,9 @@ export class APIKeysApi extends BaseAPI { * * @summary Get Api Key Scope * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ - public getApiKeyScope(options?: AxiosRequestConfig) { + public getApiKeyScope(options?: RawAxiosRequestConfig) { return APIKeysApiFp(this.configuration) .getApiKeyScope(options) .then((request) => request(this.axios, this.basePath)); @@ -770,12 +827,11 @@ export class APIKeysApi extends BaseAPI { * @summary Get Environment Api Key * @param {APIKeysApiGetEnvironmentApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ public getEnvironmentApiKey( requestParameters: APIKeysApiGetEnvironmentApiKeyRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return APIKeysApiFp(this.configuration) .getEnvironmentApiKey(requestParameters.projId, requestParameters.envId, options) @@ -787,16 +843,16 @@ export class APIKeysApi extends BaseAPI { * @summary List Api Keys * @param {APIKeysApiListApiKeysRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ public listApiKeys( requestParameters: APIKeysApiListApiKeysRequest = {}, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return APIKeysApiFp(this.configuration) .listApiKeys( requestParameters.objectType, + requestParameters.projId, requestParameters.page, requestParameters.perPage, options, @@ -809,12 +865,11 @@ export class APIKeysApi extends BaseAPI { * @summary Rotate API Key * @param {APIKeysApiRotateApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof APIKeysApi + * @throws If a required parameter is missing. */ public rotateApiKey( requestParameters: APIKeysApiRotateApiKeyRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return APIKeysApiFp(this.configuration) .rotateApiKey(requestParameters.apiKeyId, options) diff --git a/src/openapi/api/audit-elements-data-api.ts b/src/openapi/api/audit-elements-data-api.ts index 903cf43e..2f0635f2 100644 --- a/src/openapi/api/audit-elements-data-api.ts +++ b/src/openapi/api/audit-elements-data-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,31 +10,21 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultAuditLog } from '../types'; +import type { Configuration } from '../configuration'; +import type { LimitedPaginatedResultAuditLogModel } from '../types'; /** * AuditElementsDataApi - axios parameter creator - * @export */ export const AuditElementsDataApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -50,7 +38,7 @@ export const AuditElementsDataApiAxiosParamCreator = function (configuration?: C * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsListAuditLogs: async ( projId: string, @@ -59,7 +47,7 @@ export const AuditElementsDataApiAxiosParamCreator = function (configuration?: C search?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('elementsListAuditLogs', 'projId', projId); @@ -69,9 +57,9 @@ export const AuditElementsDataApiAxiosParamCreator = function (configuration?: C assertParamExists('elementsListAuditLogs', 'elementsConfigId', elementsConfigId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/audit_logs` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -99,6 +87,8 @@ export const AuditElementsDataApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -117,7 +107,6 @@ export const AuditElementsDataApiAxiosParamCreator = function (configuration?: C /** * AuditElementsDataApi - functional programming interface - * @export */ export const AuditElementsDataApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = AuditElementsDataApiAxiosParamCreator(configuration); @@ -132,7 +121,7 @@ export const AuditElementsDataApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsListAuditLogs( projId: string, @@ -141,9 +130,12 @@ export const AuditElementsDataApiFp = function (configuration?: Configuration) { search?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsListAuditLogs( projId, @@ -154,14 +146,24 @@ export const AuditElementsDataApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AuditElementsDataApi.elementsListAuditLogs']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * AuditElementsDataApi - factory interface - * @export */ export const AuditElementsDataApiFactory = function ( configuration?: Configuration, @@ -173,26 +175,24 @@ export const AuditElementsDataApiFactory = function ( /** * Lists audit logs for for specific elements config (tenant scope) * @summary List audit logs - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {AuditElementsDataApiElementsListAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsListAuditLogs( - projId: string, - envId: string, - elementsConfigId: string, - search?: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise { + requestParameters: AuditElementsDataApiElementsListAuditLogsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .elementsListAuditLogs(projId, envId, elementsConfigId, search, page, perPage, options) + .elementsListAuditLogs( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -200,58 +200,41 @@ export const AuditElementsDataApiFactory = function ( /** * Request parameters for elementsListAuditLogs operation in AuditElementsDataApi. - * @export - * @interface AuditElementsDataApiElementsListAuditLogsRequest */ export interface AuditElementsDataApiElementsListAuditLogsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof AuditElementsDataApiElementsListAuditLogs */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof AuditElementsDataApiElementsListAuditLogs */ readonly envId: string; /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof AuditElementsDataApiElementsListAuditLogs */ readonly elementsConfigId: string; /** * Text search for the email field - * @type {string} - * @memberof AuditElementsDataApiElementsListAuditLogs */ readonly search?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof AuditElementsDataApiElementsListAuditLogs */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof AuditElementsDataApiElementsListAuditLogs */ readonly perPage?: number; } /** * AuditElementsDataApi - object-oriented interface - * @export - * @class AuditElementsDataApi - * @extends {BaseAPI} */ export class AuditElementsDataApi extends BaseAPI { /** @@ -259,12 +242,11 @@ export class AuditElementsDataApi extends BaseAPI { * @summary List audit logs * @param {AuditElementsDataApiElementsListAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuditElementsDataApi + * @throws If a required parameter is missing. */ public elementsListAuditLogs( requestParameters: AuditElementsDataApiElementsListAuditLogsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return AuditElementsDataApiFp(this.configuration) .elementsListAuditLogs( diff --git a/src/openapi/api/audit-log-replay-api.ts b/src/openapi/api/audit-log-replay-api.ts new file mode 100644 index 00000000..c951d567 --- /dev/null +++ b/src/openapi/api/audit-log-replay-api.ts @@ -0,0 +1,175 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { AuditLogReplayRequest, AuditLogReplayResponse } from '../types'; +/** + * AuditLogReplayApi - axios parameter creator + */ +export const AuditLogReplayApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Run the audit log replay with the given parameters. This will replay PDP requests based on audit logs. + * @summary Run the audit log replay + * @param {AuditLogReplayRequest} auditLogReplayRequest + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + runAuditLogReplay: async ( + auditLogReplayRequest: AuditLogReplayRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'auditLogReplayRequest' is not null or undefined + assertParamExists('runAuditLogReplay', 'auditLogReplayRequest', auditLogReplayRequest); + const localVarPath = `/v2/audit-log-replay`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + auditLogReplayRequest, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * AuditLogReplayApi - functional programming interface + */ +export const AuditLogReplayApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = AuditLogReplayApiAxiosParamCreator(configuration); + return { + /** + * Run the audit log replay with the given parameters. This will replay PDP requests based on audit logs. + * @summary Run the audit log replay + * @param {AuditLogReplayRequest} auditLogReplayRequest + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async runAuditLogReplay( + auditLogReplayRequest: AuditLogReplayRequest, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.runAuditLogReplay( + auditLogReplayRequest, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AuditLogReplayApi.runAuditLogReplay']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * AuditLogReplayApi - factory interface + */ +export const AuditLogReplayApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = AuditLogReplayApiFp(configuration); + return { + /** + * Run the audit log replay with the given parameters. This will replay PDP requests based on audit logs. + * @summary Run the audit log replay + * @param {AuditLogReplayApiRunAuditLogReplayRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + runAuditLogReplay( + requestParameters: AuditLogReplayApiRunAuditLogReplayRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .runAuditLogReplay(requestParameters.auditLogReplayRequest, options) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for runAuditLogReplay operation in AuditLogReplayApi. + */ +export interface AuditLogReplayApiRunAuditLogReplayRequest { + readonly auditLogReplayRequest: AuditLogReplayRequest; +} + +/** + * AuditLogReplayApi - object-oriented interface + */ +export class AuditLogReplayApi extends BaseAPI { + /** + * Run the audit log replay with the given parameters. This will replay PDP requests based on audit logs. + * @summary Run the audit log replay + * @param {AuditLogReplayApiRunAuditLogReplayRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public runAuditLogReplay( + requestParameters: AuditLogReplayApiRunAuditLogReplayRequest, + options?: RawAxiosRequestConfig, + ) { + return AuditLogReplayApiFp(this.configuration) + .runAuditLogReplay(requestParameters.auditLogReplayRequest, options) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/audit-logs-api.ts b/src/openapi/api/audit-logs-api.ts index aa2849fd..5dfefa31 100644 --- a/src/openapi/api/audit-logs-api.ts +++ b/src/openapi/api/audit-logs-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,63 +10,54 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { AuditLogSortKey } from '../types'; -// @ts-ignore -import { DetailedAuditLog } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultAuditLog } from '../types'; +import type { Configuration } from '../configuration'; +import type { + AuditLogQueryType, + AuditLogSortKey, + DetailedAuditLogModel, + LimitedPaginatedResultAuditLogModel, +} from '../types'; /** * AuditLogsApi - axios parameter creator - * @export */ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Get detailed audit log + * @param {string} logId The unique id of the audit log * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} logId The unique id of the audit log * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getDetailedAuditLog: async ( + logId: string, projId: string, envId: string, - logId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'logId' is not null or undefined + assertParamExists('getDetailedAuditLog', 'logId', logId); // verify required parameter 'projId' is not null or undefined assertParamExists('getDetailedAuditLog', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getDetailedAuditLog', 'envId', envId); - // verify required parameter 'logId' is not null or undefined - assertParamExists('getDetailedAuditLog', 'logId', logId); const localVarPath = `/v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'log_id'}}`, encodeURIComponent(String(logId))); + .replace('{log_id}', encodeURIComponent(String(logId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -84,6 +73,8 @@ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configura // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -111,10 +102,11 @@ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configura * @param {number} [timestampFrom] Filter by timestamp from * @param {number} [timestampTo] Filter by timestamp to * @param {AuditLogSortKey} [sortBy] Sort by column + * @param {AuditLogQueryType} [query] Filter by the type of query that generated the audit log.<br />\'check\' - permit/root, permit/check, permit/bulk<br />\'get_user_permissions\' - permit/user_permissions<br />\'get_authorized_users\' - permit/authorized_users, permit/authorized_users_new<br />\'none\' - All queries * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listAuditLogs: async ( projId: string, @@ -128,17 +120,18 @@ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configura timestampFrom?: number, timestampTo?: number, sortBy?: AuditLogSortKey, + query?: AuditLogQueryType, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listAuditLogs', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listAuditLogs', 'envId', envId); const localVarPath = `/v2/pdps/{proj_id}/{env_id}/audit_logs` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -190,6 +183,10 @@ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['sort_by'] = sortBy; } + if (query !== undefined) { + localVarQueryParameter['query'] = query; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -198,6 +195,8 @@ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -216,7 +215,6 @@ export const AuditLogsApiAxiosParamCreator = function (configuration?: Configura /** * AuditLogsApi - functional programming interface - * @export */ export const AuditLogsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = AuditLogsApiAxiosParamCreator(configuration); @@ -224,25 +222,34 @@ export const AuditLogsApiFp = function (configuration?: Configuration) { /** * * @summary Get detailed audit log + * @param {string} logId The unique id of the audit log * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} logId The unique id of the audit log * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getDetailedAuditLog( + logId: string, projId: string, envId: string, - logId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDetailedAuditLog( + logId, projId, envId, - logId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AuditLogsApi.getDetailedAuditLog']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * @@ -258,10 +265,11 @@ export const AuditLogsApiFp = function (configuration?: Configuration) { * @param {number} [timestampFrom] Filter by timestamp from * @param {number} [timestampTo] Filter by timestamp to * @param {AuditLogSortKey} [sortBy] Sort by column + * @param {AuditLogQueryType} [query] Filter by the type of query that generated the audit log.<br />\'check\' - permit/root, permit/check, permit/bulk<br />\'get_user_permissions\' - permit/user_permissions<br />\'get_authorized_users\' - permit/authorized_users, permit/authorized_users_new<br />\'none\' - All queries * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listAuditLogs( projId: string, @@ -275,11 +283,15 @@ export const AuditLogsApiFp = function (configuration?: Configuration) { timestampFrom?: number, timestampTo?: number, sortBy?: AuditLogSortKey, + query?: AuditLogQueryType, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listAuditLogs( projId, @@ -293,18 +305,27 @@ export const AuditLogsApiFp = function (configuration?: Configuration) { timestampFrom, timestampTo, sortBy, + query, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AuditLogsApi.listAuditLogs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * AuditLogsApi - factory interface - * @export */ export const AuditLogsApiFactory = function ( configuration?: Configuration, @@ -316,72 +337,50 @@ export const AuditLogsApiFactory = function ( /** * * @summary Get detailed audit log - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} logId The unique id of the audit log + * @param {AuditLogsApiGetDetailedAuditLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getDetailedAuditLog( - projId: string, - envId: string, - logId: string, - options?: any, - ): AxiosPromise { + requestParameters: AuditLogsApiGetDetailedAuditLogRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getDetailedAuditLog(projId, envId, logId, options) + .getDetailedAuditLog( + requestParameters.logId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary List Audit Logs - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [pdpId] Filter by pdp config id - * @param {Array} [users] List of user keys or emails to filter by - * @param {boolean} [decision] Filter by decision result - * @param {Array} [resources] Filter by resources - * @param {string} [tenant] Filter by tenant - * @param {string} [action] Filter by action - * @param {number} [timestampFrom] Filter by timestamp from - * @param {number} [timestampTo] Filter by timestamp to - * @param {AuditLogSortKey} [sortBy] Sort by column - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {AuditLogsApiListAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listAuditLogs( - projId: string, - envId: string, - pdpId?: string, - users?: Array, - decision?: boolean, - resources?: Array, - tenant?: string, - action?: string, - timestampFrom?: number, - timestampTo?: number, - sortBy?: AuditLogSortKey, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise { + requestParameters: AuditLogsApiListAuditLogsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp .listAuditLogs( - projId, - envId, - pdpId, - users, - decision, - resources, - tenant, - action, - timestampFrom, - timestampTo, - sortBy, - page, - perPage, + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + requestParameters.users, + requestParameters.decision, + requestParameters.resources, + requestParameters.tenant, + requestParameters.action, + requestParameters.timestampFrom, + requestParameters.timestampTo, + requestParameters.sortBy, + requestParameters.query, + requestParameters.page, + requestParameters.perPage, options, ) .then((request) => request(axios, basePath)); @@ -391,135 +390,101 @@ export const AuditLogsApiFactory = function ( /** * Request parameters for getDetailedAuditLog operation in AuditLogsApi. - * @export - * @interface AuditLogsApiGetDetailedAuditLogRequest */ export interface AuditLogsApiGetDetailedAuditLogRequest { + /** + * The unique id of the audit log + */ + readonly logId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof AuditLogsApiGetDetailedAuditLog */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof AuditLogsApiGetDetailedAuditLog */ readonly envId: string; - - /** - * The unique id of the audit log - * @type {string} - * @memberof AuditLogsApiGetDetailedAuditLog - */ - readonly logId: string; } /** * Request parameters for listAuditLogs operation in AuditLogsApi. - * @export - * @interface AuditLogsApiListAuditLogsRequest */ export interface AuditLogsApiListAuditLogsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof AuditLogsApiListAuditLogs */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof AuditLogsApiListAuditLogs */ readonly envId: string; /** * Filter by pdp config id - * @type {string} - * @memberof AuditLogsApiListAuditLogs */ readonly pdpId?: string; /** * List of user keys or emails to filter by - * @type {Array} - * @memberof AuditLogsApiListAuditLogs */ readonly users?: Array; /** * Filter by decision result - * @type {boolean} - * @memberof AuditLogsApiListAuditLogs */ readonly decision?: boolean; /** * Filter by resources - * @type {Array} - * @memberof AuditLogsApiListAuditLogs */ readonly resources?: Array; /** * Filter by tenant - * @type {string} - * @memberof AuditLogsApiListAuditLogs */ readonly tenant?: string; /** * Filter by action - * @type {string} - * @memberof AuditLogsApiListAuditLogs */ readonly action?: string; /** * Filter by timestamp from - * @type {number} - * @memberof AuditLogsApiListAuditLogs */ readonly timestampFrom?: number; /** * Filter by timestamp to - * @type {number} - * @memberof AuditLogsApiListAuditLogs */ readonly timestampTo?: number; /** * Sort by column - * @type {AuditLogSortKey} - * @memberof AuditLogsApiListAuditLogs */ readonly sortBy?: AuditLogSortKey; + /** + * Filter by the type of query that generated the audit log.<br />\'check\' - permit/root, permit/check, permit/bulk<br />\'get_user_permissions\' - permit/user_permissions<br />\'get_authorized_users\' - permit/authorized_users, permit/authorized_users_new<br />\'none\' - All queries + */ + readonly query?: AuditLogQueryType; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof AuditLogsApiListAuditLogs */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof AuditLogsApiListAuditLogs */ readonly perPage?: number; } /** * AuditLogsApi - object-oriented interface - * @export - * @class AuditLogsApi - * @extends {BaseAPI} */ export class AuditLogsApi extends BaseAPI { /** @@ -527,18 +492,17 @@ export class AuditLogsApi extends BaseAPI { * @summary Get detailed audit log * @param {AuditLogsApiGetDetailedAuditLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuditLogsApi + * @throws If a required parameter is missing. */ public getDetailedAuditLog( requestParameters: AuditLogsApiGetDetailedAuditLogRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return AuditLogsApiFp(this.configuration) .getDetailedAuditLog( + requestParameters.logId, requestParameters.projId, requestParameters.envId, - requestParameters.logId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -549,12 +513,11 @@ export class AuditLogsApi extends BaseAPI { * @summary List Audit Logs * @param {AuditLogsApiListAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuditLogsApi + * @throws If a required parameter is missing. */ public listAuditLogs( requestParameters: AuditLogsApiListAuditLogsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return AuditLogsApiFp(this.configuration) .listAuditLogs( @@ -569,6 +532,7 @@ export class AuditLogsApi extends BaseAPI { requestParameters.timestampFrom, requestParameters.timestampTo, requestParameters.sortBy, + requestParameters.query, requestParameters.page, requestParameters.perPage, options, diff --git a/src/openapi/api/authentication-api.ts b/src/openapi/api/authentication-api.ts index 669d547d..686a5bfb 100644 --- a/src/openapi/api/authentication-api.ts +++ b/src/openapi/api/authentication-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,151 +10,37 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { AuthnMeRead } from '../types'; -// @ts-ignore -import { DevLogin } from '../types'; -// @ts-ignore -import { EmbeddedLoginRequestOutput } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { LoginResult } from '../types'; -// @ts-ignore -import { UserFELoginRequestInput } from '../types'; -// @ts-ignore -import { UserLoginRequestInput } from '../types'; +import type { Configuration } from '../configuration'; +import type { EmbeddedLoginRequestOutput, UserLoginRequestInput } from '../types'; /** * AuthenticationApi - axios parameter creator - * @export */ export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. - * @summary (DEV MODE) Login - * @param {DevLogin} devLogin - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - devLogin: async ( - devLogin: DevLogin, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'devLogin' is not null or undefined - assertParamExists('devLogin', 'devLogin', devLogin); - const localVarPath = `/v2/auth/devlogin`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - devLogin, - localVarRequestOptions, - configuration, - ); - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Elements Fe Login As - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {UserFELoginRequestInput} userFELoginRequestInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - elementsFeLoginAs: async ( - envId: string, - userFELoginRequestInput: UserFELoginRequestInput, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'envId' is not null or undefined - assertParamExists('elementsFeLoginAs', 'envId', envId); - // verify required parameter 'userFELoginRequestInput' is not null or undefined - assertParamExists('elementsFeLoginAs', 'userFELoginRequestInput', userFELoginRequestInput); - const localVarPath = `/v2/auth/{env_id}/elements_fe_login_as`.replace( - `{${'env_id'}}`, - encodeURIComponent(String(envId)), - ); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - userFELoginRequestInput, - localVarRequestOptions, - configuration, - ); - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * * @summary Elements Login As * @param {UserLoginRequestInput} userLoginRequestInput + * @param {string} [permitSession] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsLoginAs: async ( userLoginRequestInput: UserLoginRequestInput, - options: AxiosRequestConfig = {}, + permitSession?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'userLoginRequestInput' is not null or undefined assertParamExists('elementsLoginAs', 'userLoginRequestInput', userLoginRequestInput); @@ -177,6 +61,7 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -191,230 +76,6 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf configuration, ); - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login - * @param {string} [inviteCode] An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - login: async (inviteCode?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/auth/login`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - if (inviteCode !== undefined) { - localVarQueryParameter['invite_code'] = inviteCode; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login Elements - * @param {string} token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - loginElements: async ( - token: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'token' is not null or undefined - assertParamExists('loginElements', 'token', token); - const localVarPath = `/v2/auth/login_elements`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (token !== undefined) { - localVarQueryParameter['token'] = token; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Get - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logoutGet: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/auth/logout`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Post - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logoutPost: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/auth/logout`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Me - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - me: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/auth/me`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. - * @summary Switch Organization - * @param {string} orgId the organization id the user wishes to switch to as the active org on the session - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - switchOrganization: async ( - orgId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('switchOrganization', 'orgId', orgId); - const localVarPath = `/v2/auth/switch_org/{org_id}`.replace( - `{${'org_id'}}`, - encodeURIComponent(String(orgId)), - ); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -425,150 +86,47 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf /** * AuthenticationApi - functional programming interface - * @export */ export const AuthenticationApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration); return { - /** - * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. - * @summary (DEV MODE) Login - * @param {DevLogin} devLogin - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async devLogin( - devLogin: DevLogin, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.devLogin(devLogin, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Elements Fe Login As - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {UserFELoginRequestInput} userFELoginRequestInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async elementsFeLoginAs( - envId: string, - userFELoginRequestInput: UserFELoginRequestInput, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.elementsFeLoginAs( - envId, - userFELoginRequestInput, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * * @summary Elements Login As * @param {UserLoginRequestInput} userLoginRequestInput + * @param {string} [permitSession] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsLoginAs( userLoginRequestInput: UserLoginRequestInput, - options?: AxiosRequestConfig, + permitSession?: string, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsLoginAs( userLoginRequestInput, + permitSession, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login - * @param {string} [inviteCode] An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async login( - inviteCode?: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.login(inviteCode, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login Elements - * @param {string} token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async loginElements( - token: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.loginElements(token, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Get - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async logoutGet( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.logoutGet(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Post - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async logoutPost( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.logoutPost(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Me - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async me( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.me(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. - * @summary Switch Organization - * @param {string} orgId the organization id the user wishes to switch to as the active org on the session - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async switchOrganization( - orgId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.switchOrganization(orgId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AuthenticationApi.elementsLoginAs']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * AuthenticationApi - factory interface - * @export */ export const AuthenticationApiFactory = function ( configuration?: Configuration, @@ -577,350 +135,58 @@ export const AuthenticationApiFactory = function ( ) { const localVarFp = AuthenticationApiFp(configuration); return { - /** - * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. - * @summary (DEV MODE) Login - * @param {DevLogin} devLogin - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - devLogin(devLogin: DevLogin, options?: any): AxiosPromise { - return localVarFp.devLogin(devLogin, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Elements Fe Login As - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {UserFELoginRequestInput} userFELoginRequestInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - elementsFeLoginAs( - envId: string, - userFELoginRequestInput: UserFELoginRequestInput, - options?: any, - ): AxiosPromise { - return localVarFp - .elementsFeLoginAs(envId, userFELoginRequestInput, options) - .then((request) => request(axios, basePath)); - }, /** * * @summary Elements Login As - * @param {UserLoginRequestInput} userLoginRequestInput + * @param {AuthenticationApiElementsLoginAsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsLoginAs( - userLoginRequestInput: UserLoginRequestInput, - options?: any, + requestParameters: AuthenticationApiElementsLoginAsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .elementsLoginAs(userLoginRequestInput, options) - .then((request) => request(axios, basePath)); - }, - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login - * @param {string} [inviteCode] An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - login(inviteCode?: string, options?: any): AxiosPromise { - return localVarFp.login(inviteCode, options).then((request) => request(axios, basePath)); - }, - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login Elements - * @param {string} token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - loginElements(token: string, options?: any): AxiosPromise { - return localVarFp.loginElements(token, options).then((request) => request(axios, basePath)); - }, - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Get - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logoutGet(options?: any): AxiosPromise { - return localVarFp.logoutGet(options).then((request) => request(axios, basePath)); - }, - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Post - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logoutPost(options?: any): AxiosPromise { - return localVarFp.logoutPost(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Me - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - me(options?: any): AxiosPromise { - return localVarFp.me(options).then((request) => request(axios, basePath)); - }, - /** - * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. - * @summary Switch Organization - * @param {string} orgId the organization id the user wishes to switch to as the active org on the session - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - switchOrganization(orgId: string, options?: any): AxiosPromise { - return localVarFp - .switchOrganization(orgId, options) + .elementsLoginAs( + requestParameters.userLoginRequestInput, + requestParameters.permitSession, + options, + ) .then((request) => request(axios, basePath)); }, }; }; -/** - * Request parameters for devLogin operation in AuthenticationApi. - * @export - * @interface AuthenticationApiDevLoginRequest - */ -export interface AuthenticationApiDevLoginRequest { - /** - * - * @type {DevLogin} - * @memberof AuthenticationApiDevLogin - */ - readonly devLogin: DevLogin; -} - -/** - * Request parameters for elementsFeLoginAs operation in AuthenticationApi. - * @export - * @interface AuthenticationApiElementsFeLoginAsRequest - */ -export interface AuthenticationApiElementsFeLoginAsRequest { - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof AuthenticationApiElementsFeLoginAs - */ - readonly envId: string; - - /** - * - * @type {UserFELoginRequestInput} - * @memberof AuthenticationApiElementsFeLoginAs - */ - readonly userFELoginRequestInput: UserFELoginRequestInput; -} - /** * Request parameters for elementsLoginAs operation in AuthenticationApi. - * @export - * @interface AuthenticationApiElementsLoginAsRequest */ export interface AuthenticationApiElementsLoginAsRequest { - /** - * - * @type {UserLoginRequestInput} - * @memberof AuthenticationApiElementsLoginAs - */ readonly userLoginRequestInput: UserLoginRequestInput; -} - -/** - * Request parameters for login operation in AuthenticationApi. - * @export - * @interface AuthenticationApiLoginRequest - */ -export interface AuthenticationApiLoginRequest { - /** - * An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. - * @type {string} - * @memberof AuthenticationApiLogin - */ - readonly inviteCode?: string; -} - -/** - * Request parameters for loginElements operation in AuthenticationApi. - * @export - * @interface AuthenticationApiLoginElementsRequest - */ -export interface AuthenticationApiLoginElementsRequest { - /** - * - * @type {string} - * @memberof AuthenticationApiLoginElements - */ - readonly token: string; -} -/** - * Request parameters for switchOrganization operation in AuthenticationApi. - * @export - * @interface AuthenticationApiSwitchOrganizationRequest - */ -export interface AuthenticationApiSwitchOrganizationRequest { - /** - * the organization id the user wishes to switch to as the active org on the session - * @type {string} - * @memberof AuthenticationApiSwitchOrganization - */ - readonly orgId: string; + readonly permitSession?: string; } /** * AuthenticationApi - object-oriented interface - * @export - * @class AuthenticationApi - * @extends {BaseAPI} */ export class AuthenticationApi extends BaseAPI { - /** - * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. - * @summary (DEV MODE) Login - * @param {AuthenticationApiDevLoginRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public devLogin( - requestParameters: AuthenticationApiDevLoginRequest, - options?: AxiosRequestConfig, - ) { - return AuthenticationApiFp(this.configuration) - .devLogin(requestParameters.devLogin, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Elements Fe Login As - * @param {AuthenticationApiElementsFeLoginAsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public elementsFeLoginAs( - requestParameters: AuthenticationApiElementsFeLoginAsRequest, - options?: AxiosRequestConfig, - ) { - return AuthenticationApiFp(this.configuration) - .elementsFeLoginAs( - requestParameters.envId, - requestParameters.userFELoginRequestInput, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - /** * * @summary Elements Login As * @param {AuthenticationApiElementsLoginAsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi + * @throws If a required parameter is missing. */ public elementsLoginAs( requestParameters: AuthenticationApiElementsLoginAsRequest, - options?: AxiosRequestConfig, - ) { - return AuthenticationApiFp(this.configuration) - .elementsLoginAs(requestParameters.userLoginRequestInput, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login - * @param {AuthenticationApiLoginRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public login( - requestParameters: AuthenticationApiLoginRequest = {}, - options?: AxiosRequestConfig, - ) { - return AuthenticationApiFp(this.configuration) - .login(requestParameters.inviteCode, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. - * @summary Login Elements - * @param {AuthenticationApiLoginElementsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public loginElements( - requestParameters: AuthenticationApiLoginElementsRequest, - options?: AxiosRequestConfig, - ) { - return AuthenticationApiFp(this.configuration) - .loginElements(requestParameters.token, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Get - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public logoutGet(options?: AxiosRequestConfig) { - return AuthenticationApiFp(this.configuration) - .logoutGet(options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. - * @summary Logout Post - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public logoutPost(options?: AxiosRequestConfig) { - return AuthenticationApiFp(this.configuration) - .logoutPost(options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Me - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public me(options?: AxiosRequestConfig) { - return AuthenticationApiFp(this.configuration) - .me(options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. - * @summary Switch Organization - * @param {AuthenticationApiSwitchOrganizationRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public switchOrganization( - requestParameters: AuthenticationApiSwitchOrganizationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return AuthenticationApiFp(this.configuration) - .switchOrganization(requestParameters.orgId, options) + .elementsLoginAs( + requestParameters.userLoginRequestInput, + requestParameters.permitSession, + options, + ) .then((request) => request(this.axios, this.basePath)); } } diff --git a/src/openapi/api/bulk-operations-api.ts b/src/openapi/api/bulk-operations-api.ts index fc3289e1..16a45e65 100644 --- a/src/openapi/api/bulk-operations-api.ts +++ b/src/openapi/api/bulk-operations-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,70 +10,198 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResourceInstanceCreateBulkOperation } from '../types'; -// @ts-ignore -import { ResourceInstanceDeleteBulkOperation } from '../types'; -// @ts-ignore -import { TenantCreateBulkOperation } from '../types'; -// @ts-ignore -import { TenantDeleteBulkOperation } from '../types'; -// @ts-ignore -import { UserCreateBulkOperation } from '../types'; -// @ts-ignore -import { UserDeleteBulkOperation } from '../types'; -// @ts-ignore -import { UserReplaceBulkOperation } from '../types'; +import type { Configuration } from '../configuration'; +import type { + BulkRoleAssignmentReport, + BulkRoleUnAssignmentReport, + MissingUserPolicy, + ResourceInstanceCreateBulkOperation, + ResourceInstanceDeleteBulkOperation, + RoleAssignmentCreate, + RoleAssignmentRemove, + RoleCreateBulkOperation, + RoleCreateBulkOperationResult, + TenantCreateBulkOperation, + TenantDeleteBulkOperation, + UserCreateBulkOperation, + UserDeleteBulkOperation, + UserReplaceBulkOperation, +} from '../types'; /** * BulkOperationsApi - axios parameter creator - * @export */ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * + * @summary Bulk create role assignments + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {Array} roleAssignmentCreate + * @param {MissingUserPolicy} [missingUserPolicy] Policy for missing users - \'fail\': Fail the entire operation if a user is missing; \'ignore\': Skip assignments for missing users; \'create\': Create missing users and continue with the operation + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + bulkAssignRole: async ( + projId: string, + envId: string, + roleAssignmentCreate: Array, + missingUserPolicy?: MissingUserPolicy, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('bulkAssignRole', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('bulkAssignRole', 'envId', envId); + // verify required parameter 'roleAssignmentCreate' is not null or undefined + assertParamExists('bulkAssignRole', 'roleAssignmentCreate', roleAssignmentCreate); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments/bulk` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (missingUserPolicy !== undefined) { + localVarQueryParameter['missing_user_policy'] = missingUserPolicy; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + roleAssignmentCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create or replace roles in bulk. + * @summary Bulk Create Or Replace Roles + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {RoleCreateBulkOperation} roleCreateBulkOperation + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + bulkCreateOrReplaceRoles: async ( + projId: string, + envId: string, + roleCreateBulkOperation: RoleCreateBulkOperation, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('bulkCreateOrReplaceRoles', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('bulkCreateOrReplaceRoles', 'envId', envId); + // verify required parameter 'roleCreateBulkOperation' is not null or undefined + assertParamExists( + 'bulkCreateOrReplaceRoles', + 'roleCreateBulkOperation', + roleCreateBulkOperation, + ); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/bulk/roles` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + roleCreateBulkOperation, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Bulk Create Tenants - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {any} requestBody + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {TenantCreateBulkOperation} tenantCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkCreateTenants: async ( - projId: any, - envId: any, - requestBody: { [key: string]: any }, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + tenantCreateBulkOperation: TenantCreateBulkOperation, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkCreateTenants', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('bulkCreateTenants', 'envId', envId); - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('bulkCreateTenants', 'requestBody', requestBody); + // verify required parameter 'tenantCreateBulkOperation' is not null or undefined + assertParamExists( + 'bulkCreateTenants', + 'tenantCreateBulkOperation', + tenantCreateBulkOperation, + ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/tenants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -92,6 +218,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -101,7 +228,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( - requestBody, + tenantCreateBulkOperation, localVarRequestOptions, configuration, ); @@ -114,27 +241,27 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * * @summary Bulk Create Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userCreateBulkOperation + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserCreateBulkOperation} userCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkCreateUsers: async ( - projId: any, - envId: any, + projId: string, + envId: string, userCreateBulkOperation: UserCreateBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkCreateUsers', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('bulkCreateUsers', 'envId', envId); - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('bulkCreateUsers', 'requestBody', userCreateBulkOperation); + // verify required parameter 'userCreateBulkOperation' is not null or undefined + assertParamExists('bulkCreateUsers', 'userCreateBulkOperation', userCreateBulkOperation); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -151,6 +278,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -173,17 +301,17 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * Deletes many Resource Instances. * @summary Bulk Delete Resource Instances - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceDeleteBulkOperation} resourceInstanceDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteResourceInstances: async ( - projId: any, - envId: any, + projId: string, + envId: string, resourceInstanceDeleteBulkOperation: ResourceInstanceDeleteBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkDeleteResourceInstances', 'projId', projId); @@ -196,8 +324,8 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf resourceInstanceDeleteBulkOperation, ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/resource_instances` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -214,6 +342,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -236,27 +365,31 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * * @summary Bulk Delete Tenants - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {any} requestBody + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {TenantDeleteBulkOperation} tenantDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteTenants: async ( - projId: any, - envId: any, - requestBody: { [key: string]: any }, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + tenantDeleteBulkOperation: TenantDeleteBulkOperation, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkDeleteTenants', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('bulkDeleteTenants', 'envId', envId); - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('bulkDeleteTenants', 'requestBody', requestBody); + // verify required parameter 'tenantDeleteBulkOperation' is not null or undefined + assertParamExists( + 'bulkDeleteTenants', + 'tenantDeleteBulkOperation', + tenantDeleteBulkOperation, + ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/tenants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -273,6 +406,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -282,7 +416,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( - requestBody, + tenantDeleteBulkOperation, localVarRequestOptions, configuration, ); @@ -295,27 +429,27 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * * @summary Bulk Delete Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userDeleteBulkOperation + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserDeleteBulkOperation} userDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteUsers: async ( - projId: any, - envId: any, + projId: string, + envId: string, userDeleteBulkOperation: UserDeleteBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkDeleteUsers', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('bulkDeleteUsers', 'envId', envId); - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('bulkDeleteUsers', 'requestBody', userDeleteBulkOperation); + // verify required parameter 'userDeleteBulkOperation' is not null or undefined + assertParamExists('bulkDeleteUsers', 'userDeleteBulkOperation', userDeleteBulkOperation); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -332,6 +466,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -354,17 +489,17 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * Creates or replaces Resource Instances. If a resource instance with `key` and `resource` already exists, it will be replaced. * @summary Bulk Replace Resource Instances - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreateBulkOperation} resourceInstanceCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkReplaceResourceInstances: async ( - projId: any, - envId: any, + projId: string, + envId: string, resourceInstanceCreateBulkOperation: ResourceInstanceCreateBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkReplaceResourceInstances', 'projId', projId); @@ -377,8 +512,8 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf resourceInstanceCreateBulkOperation, ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/resource_instances` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -395,6 +530,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -417,27 +553,27 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * * @summary Bulk Replace Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userReplaceBulkOperation + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserReplaceBulkOperation} userReplaceBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkReplaceUsers: async ( - projId: any, - envId: any, + projId: string, + envId: string, userReplaceBulkOperation: UserReplaceBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkReplaceUsers', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('bulkReplaceUsers', 'envId', envId); - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('bulkReplaceUsers', 'requestBody', userReplaceBulkOperation); + // verify required parameter 'userReplaceBulkOperation' is not null or undefined + assertParamExists('bulkReplaceUsers', 'userReplaceBulkOperation', userReplaceBulkOperation); const localVarPath = `/v2/facts/{proj_id}/{env_id}/bulk/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -454,6 +590,7 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -468,6 +605,66 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf configuration, ); + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Bulk Unassign Role + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {Array} roleAssignmentRemove + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + bulkUnassignRole: async ( + projId: string, + envId: string, + roleAssignmentRemove: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('bulkUnassignRole', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('bulkUnassignRole', 'envId', envId); + // verify required parameter 'roleAssignmentRemove' is not null or undefined + assertParamExists('bulkUnassignRole', 'roleAssignmentRemove', roleAssignmentRemove); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments/bulk` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + roleAssignmentRemove, + localVarRequestOptions, + configuration, + ); + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -478,193 +675,356 @@ export const BulkOperationsApiAxiosParamCreator = function (configuration?: Conf /** * BulkOperationsApi - functional programming interface - * @export */ export const BulkOperationsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = BulkOperationsApiAxiosParamCreator(configuration); return { + /** + * + * @summary Bulk create role assignments + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {Array} roleAssignmentCreate + * @param {MissingUserPolicy} [missingUserPolicy] Policy for missing users - \'fail\': Fail the entire operation if a user is missing; \'ignore\': Skip assignments for missing users; \'create\': Create missing users and continue with the operation + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async bulkAssignRole( + projId: string, + envId: string, + roleAssignmentCreate: Array, + missingUserPolicy?: MissingUserPolicy, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.bulkAssignRole( + projId, + envId, + roleAssignmentCreate, + missingUserPolicy, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkAssignRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create or replace roles in bulk. + * @summary Bulk Create Or Replace Roles + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {RoleCreateBulkOperation} roleCreateBulkOperation + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async bulkCreateOrReplaceRoles( + projId: string, + envId: string, + roleCreateBulkOperation: RoleCreateBulkOperation, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.bulkCreateOrReplaceRoles( + projId, + envId, + roleCreateBulkOperation, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkCreateOrReplaceRoles']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, /** * * @summary Bulk Create Tenants - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {{ [key: string]: any; }} requestBody + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {TenantCreateBulkOperation} tenantCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkCreateTenants( - projId: any, - envId: any, - requestBody: { [key: string]: any }, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any }>> { + projId: string, + envId: string, + tenantCreateBulkOperation: TenantCreateBulkOperation, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkCreateTenants( projId, envId, - requestBody, + tenantCreateBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkCreateTenants']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Bulk Create Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userCreateBulkOperation + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserCreateBulkOperation} userCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkCreateUsers( - projId: any, - envId: any, + projId: string, + envId: string, userCreateBulkOperation: UserCreateBulkOperation, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkCreateUsers( projId, envId, userCreateBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkCreateUsers']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes many Resource Instances. * @summary Bulk Delete Resource Instances - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceDeleteBulkOperation} resourceInstanceDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkDeleteResourceInstances( - projId: any, - envId: any, + projId: string, + envId: string, resourceInstanceDeleteBulkOperation: ResourceInstanceDeleteBulkOperation, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkDeleteResourceInstances( projId, envId, resourceInstanceDeleteBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkDeleteResourceInstances']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Bulk Delete Tenants - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {{ [key: string]: any; }} requestBody + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {TenantDeleteBulkOperation} tenantDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkDeleteTenants( - projId: any, - envId: any, - requestBody: { [key: string]: any }, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any }>> { + projId: string, + envId: string, + tenantDeleteBulkOperation: TenantDeleteBulkOperation, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkDeleteTenants( projId, envId, - requestBody, + tenantDeleteBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkDeleteTenants']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Bulk Delete Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userDeleteBulkOperation + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserDeleteBulkOperation} userDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkDeleteUsers( - projId: any, - envId: any, + projId: string, + envId: string, userDeleteBulkOperation: UserDeleteBulkOperation, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkDeleteUsers( projId, envId, userDeleteBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkDeleteUsers']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Creates or replaces Resource Instances. If a resource instance with `key` and `resource` already exists, it will be replaced. * @summary Bulk Replace Resource Instances - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreateBulkOperation} resourceInstanceCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkReplaceResourceInstances( - projId: any, - envId: any, + projId: string, + envId: string, resourceInstanceCreateBulkOperation: ResourceInstanceCreateBulkOperation, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkReplaceResourceInstances( projId, envId, resourceInstanceCreateBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkReplaceResourceInstances']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Bulk Replace Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userReplaceBulkOperation + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserReplaceBulkOperation} userReplaceBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkReplaceUsers( - projId: any, - envId: any, + projId: string, + envId: string, userReplaceBulkOperation: UserReplaceBulkOperation, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkReplaceUsers( projId, envId, userReplaceBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkReplaceUsers']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Bulk Unassign Role + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {Array} roleAssignmentRemove + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async bulkUnassignRole( + projId: string, + envId: string, + roleAssignmentRemove: Array, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.bulkUnassignRole( + projId, + envId, + roleAssignmentRemove, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['BulkOperationsApi.bulkUnassignRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * BulkOperationsApi - factory interface - * @export */ export const BulkOperationsApiFactory = function ( configuration?: Configuration, @@ -673,362 +1033,448 @@ export const BulkOperationsApiFactory = function ( ) { const localVarFp = BulkOperationsApiFp(configuration); return { + /** + * + * @summary Bulk create role assignments + * @param {BulkOperationsApiBulkAssignRoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + bulkAssignRole( + requestParameters: BulkOperationsApiBulkAssignRoleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .bulkAssignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentCreate, + requestParameters.missingUserPolicy, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Create or replace roles in bulk. + * @summary Bulk Create Or Replace Roles + * @param {BulkOperationsApiBulkCreateOrReplaceRolesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + bulkCreateOrReplaceRoles( + requestParameters: BulkOperationsApiBulkCreateOrReplaceRolesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .bulkCreateOrReplaceRoles( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleCreateBulkOperation, + options, + ) + .then((request) => request(axios, basePath)); + }, /** * * @summary Bulk Create Tenants - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {{ [key: string]: any; }} requestBody + * @param {BulkOperationsApiBulkCreateTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkCreateTenants( - projId: any, - envId: any, - requestBody: { [key: string]: any }, - options?: any, - ): AxiosPromise<{ [key: string]: any }> { + requestParameters: BulkOperationsApiBulkCreateTenantsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkCreateTenants(projId, envId, requestBody, options) + .bulkCreateTenants( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenantCreateBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk Create Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userCreateBulkOperation + * @param {BulkOperationsApiBulkCreateUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkCreateUsers( - projId: any, - envId: any, - userCreateBulkOperation: UserCreateBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: BulkOperationsApiBulkCreateUsersRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkCreateUsers(projId, envId, userCreateBulkOperation, options) + .bulkCreateUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.userCreateBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes many Resource Instances. * @summary Bulk Delete Resource Instances - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ResourceInstanceDeleteBulkOperation} resourceInstanceDeleteBulkOperation + * @param {BulkOperationsApiBulkDeleteResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteResourceInstances( - projId: any, - envId: any, - resourceInstanceDeleteBulkOperation: ResourceInstanceDeleteBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: BulkOperationsApiBulkDeleteResourceInstancesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkDeleteResourceInstances(projId, envId, resourceInstanceDeleteBulkOperation, options) + .bulkDeleteResourceInstances( + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceInstanceDeleteBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk Delete Tenants - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {{ [key: string]: any; }} requestBody + * @param {BulkOperationsApiBulkDeleteTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteTenants( - projId: any, - envId: any, - requestBody: { [key: string]: any }, - options?: any, - ): AxiosPromise<{ [key: string]: any }> { + requestParameters: BulkOperationsApiBulkDeleteTenantsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkDeleteTenants(projId, envId, requestBody, options) + .bulkDeleteTenants( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenantDeleteBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk Delete Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userDeleteBulkOperation + * @param {BulkOperationsApiBulkDeleteUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteUsers( - projId: any, - envId: any, - userDeleteBulkOperation: UserDeleteBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: BulkOperationsApiBulkDeleteUsersRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkDeleteUsers(projId, envId, userDeleteBulkOperation, options) + .bulkDeleteUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.userDeleteBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * Creates or replaces Resource Instances. If a resource instance with `key` and `resource` already exists, it will be replaced. * @summary Bulk Replace Resource Instances - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ResourceInstanceCreateBulkOperation} resourceInstanceCreateBulkOperation + * @param {BulkOperationsApiBulkReplaceResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkReplaceResourceInstances( - projId: any, - envId: any, - resourceInstanceCreateBulkOperation: ResourceInstanceCreateBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: BulkOperationsApiBulkReplaceResourceInstancesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkReplaceResourceInstances(projId, envId, resourceInstanceCreateBulkOperation, options) + .bulkReplaceResourceInstances( + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceInstanceCreateBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk Replace Users - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param userReplaceBulkOperation + * @param {BulkOperationsApiBulkReplaceUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkReplaceUsers( - projId: any, - envId: any, - userReplaceBulkOperation: UserReplaceBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: BulkOperationsApiBulkReplaceUsersRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .bulkReplaceUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.userReplaceBulkOperation, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Bulk Unassign Role + * @param {BulkOperationsApiBulkUnassignRoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + bulkUnassignRole( + requestParameters: BulkOperationsApiBulkUnassignRoleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkReplaceUsers(projId, envId, userReplaceBulkOperation, options) + .bulkUnassignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentRemove, + options, + ) .then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for bulkCreateTenants operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkCreateTenantsRequest + * Request parameters for bulkAssignRole operation in BulkOperationsApi. */ -export interface BulkOperationsApiBulkCreateTenantsRequest { +export interface BulkOperationsApiBulkAssignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkCreateTenants */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkCreateTenants */ - readonly envId: any; + readonly envId: string; + + readonly roleAssignmentCreate: Array; /** - * - * @type {{ [key: string]: any; }} - * @memberof BulkOperationsApiBulkCreateTenants + * Policy for missing users - \'fail\': Fail the entire operation if a user is missing; \'ignore\': Skip assignments for missing users; \'create\': Create missing users and continue with the operation */ - readonly requestBody: { [key: string]: any }; + readonly missingUserPolicy?: MissingUserPolicy; } /** - * Request parameters for bulkCreateUsers operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkCreateUsersRequest + * Request parameters for bulkCreateOrReplaceRoles operation in BulkOperationsApi. */ -export interface BulkOperationsApiBulkCreateUsersRequest { +export interface BulkOperationsApiBulkCreateOrReplaceRolesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkCreateUsers */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkCreateUsers */ - readonly envId: any; + readonly envId: string; + + readonly roleCreateBulkOperation: RoleCreateBulkOperation; +} + +/** + * Request parameters for bulkCreateTenants operation in BulkOperationsApi. + */ +export interface BulkOperationsApiBulkCreateTenantsRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; /** - * - * @type {UserCreateBulkOperation} - * @memberof BulkOperationsApiBulkCreateUsers + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly userCreateBulkOperations: UserCreateBulkOperation; + readonly envId: string; + + readonly tenantCreateBulkOperation: TenantCreateBulkOperation; } /** - * Request parameters for bulkDeleteResourceInstances operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkDeleteResourceInstancesRequest + * Request parameters for bulkCreateUsers operation in BulkOperationsApi. */ -export interface BulkOperationsApiBulkDeleteResourceInstancesRequest { +export interface BulkOperationsApiBulkCreateUsersRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkDeleteResourceInstances */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkDeleteResourceInstances */ - readonly envId: any; + readonly envId: string; + + readonly userCreateBulkOperation: UserCreateBulkOperation; +} + +/** + * Request parameters for bulkDeleteResourceInstances operation in BulkOperationsApi. + */ +export interface BulkOperationsApiBulkDeleteResourceInstancesRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; /** - * - * @type {ResourceInstanceDeleteBulkOperation} - * @memberof BulkOperationsApiBulkDeleteResourceInstances + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ + readonly envId: string; + readonly resourceInstanceDeleteBulkOperation: ResourceInstanceDeleteBulkOperation; } /** * Request parameters for bulkDeleteTenants operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkDeleteTenantsRequest */ export interface BulkOperationsApiBulkDeleteTenantsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkDeleteTenants */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkDeleteTenants */ - readonly envId: any; + readonly envId: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof BulkOperationsApiBulkDeleteTenants - */ - readonly requestBody: { [key: string]: any }; + readonly tenantDeleteBulkOperation: TenantDeleteBulkOperation; } /** * Request parameters for bulkDeleteUsers operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkDeleteUsersRequest */ export interface BulkOperationsApiBulkDeleteUsersRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkDeleteUsers */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkDeleteUsers */ - readonly envId: any; + readonly envId: string; - /** - * - * @type {UserDeleteBulkOperation} - * @memberof BulkOperationsApiBulkDeleteUsers - */ readonly userDeleteBulkOperation: UserDeleteBulkOperation; } /** * Request parameters for bulkReplaceResourceInstances operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkReplaceResourceInstancesRequest */ export interface BulkOperationsApiBulkReplaceResourceInstancesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkReplaceResourceInstances */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkReplaceResourceInstances */ - readonly envId: any; + readonly envId: string; - /** - * - * @type {ResourceInstanceCreateBulkOperation} - * @memberof BulkOperationsApiBulkReplaceResourceInstances - */ readonly resourceInstanceCreateBulkOperation: ResourceInstanceCreateBulkOperation; } /** * Request parameters for bulkReplaceUsers operation in BulkOperationsApi. - * @export - * @interface BulkOperationsApiBulkReplaceUsersRequest */ export interface BulkOperationsApiBulkReplaceUsersRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkReplaceUsers */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof BulkOperationsApiBulkReplaceUsers */ - readonly envId: any; + readonly envId: string; + + readonly userReplaceBulkOperation: UserReplaceBulkOperation; +} + +/** + * Request parameters for bulkUnassignRole operation in BulkOperationsApi. + */ +export interface BulkOperationsApiBulkUnassignRoleRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; /** - * - * @type {UserReplaceBulkOperation} - * @memberof BulkOperationsApiBulkReplaceUsers + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly userReplaceBulkOperation: UserReplaceBulkOperation; + readonly envId: string; + + readonly roleAssignmentRemove: Array; } /** * BulkOperationsApi - object-oriented interface - * @export - * @class BulkOperationsApi - * @extends {BaseAPI} */ export class BulkOperationsApi extends BaseAPI { + /** + * + * @summary Bulk create role assignments + * @param {BulkOperationsApiBulkAssignRoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public bulkAssignRole( + requestParameters: BulkOperationsApiBulkAssignRoleRequest, + options?: RawAxiosRequestConfig, + ) { + return BulkOperationsApiFp(this.configuration) + .bulkAssignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentCreate, + requestParameters.missingUserPolicy, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Create or replace roles in bulk. + * @summary Bulk Create Or Replace Roles + * @param {BulkOperationsApiBulkCreateOrReplaceRolesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public bulkCreateOrReplaceRoles( + requestParameters: BulkOperationsApiBulkCreateOrReplaceRolesRequest, + options?: RawAxiosRequestConfig, + ) { + return BulkOperationsApiFp(this.configuration) + .bulkCreateOrReplaceRoles( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleCreateBulkOperation, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + /** * * @summary Bulk Create Tenants - * @param {BulkOpertionsApiBulkCreateTenantsRequest} requestParameters Request parameters. + * @param {BulkOperationsApiBulkCreateTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ public bulkCreateTenants( requestParameters: BulkOperationsApiBulkCreateTenantsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return BulkOperationsApiFp(this.configuration) .bulkCreateTenants( requestParameters.projId, requestParameters.envId, - requestParameters.requestBody, + requestParameters.tenantCreateBulkOperation, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1039,18 +1485,17 @@ export class BulkOperationsApi extends BaseAPI { * @summary Bulk Create Users * @param {BulkOperationsApiBulkCreateUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ public bulkCreateUsers( requestParameters: BulkOperationsApiBulkCreateUsersRequest, - options?: AxiosRequestConfig, - ): AxiosPromise { + options?: RawAxiosRequestConfig, + ) { return BulkOperationsApiFp(this.configuration) .bulkCreateUsers( requestParameters.projId, requestParameters.envId, - requestParameters.userCreateBulkOperations, + requestParameters.userCreateBulkOperation, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1061,12 +1506,11 @@ export class BulkOperationsApi extends BaseAPI { * @summary Bulk Delete Resource Instances * @param {BulkOperationsApiBulkDeleteResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ public bulkDeleteResourceInstances( requestParameters: BulkOperationsApiBulkDeleteResourceInstancesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return BulkOperationsApiFp(this.configuration) .bulkDeleteResourceInstances( @@ -1083,18 +1527,17 @@ export class BulkOperationsApi extends BaseAPI { * @summary Bulk Delete Tenants * @param {BulkOperationsApiBulkDeleteTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ public bulkDeleteTenants( requestParameters: BulkOperationsApiBulkDeleteTenantsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return BulkOperationsApiFp(this.configuration) .bulkDeleteTenants( requestParameters.projId, requestParameters.envId, - requestParameters.requestBody, + requestParameters.tenantDeleteBulkOperation, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1105,20 +1548,20 @@ export class BulkOperationsApi extends BaseAPI { * @summary Bulk Delete Users * @param {BulkOperationsApiBulkDeleteUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ - public async bulkDeleteUsers( + public bulkDeleteUsers( requestParameters: BulkOperationsApiBulkDeleteUsersRequest, - options?: AxiosRequestConfig, - ): Promise> { - let request = await BulkOperationsApiFp(this.configuration).bulkDeleteUsers( - requestParameters.projId, - requestParameters.envId, - requestParameters.userDeleteBulkOperation, - options, - ); - return request(this.axios, this.basePath); + options?: RawAxiosRequestConfig, + ) { + return BulkOperationsApiFp(this.configuration) + .bulkDeleteUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.userDeleteBulkOperation, + options, + ) + .then((request) => request(this.axios, this.basePath)); } /** @@ -1126,12 +1569,11 @@ export class BulkOperationsApi extends BaseAPI { * @summary Bulk Replace Resource Instances * @param {BulkOperationsApiBulkReplaceResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ public bulkReplaceResourceInstances( requestParameters: BulkOperationsApiBulkReplaceResourceInstancesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return BulkOperationsApiFp(this.configuration) .bulkReplaceResourceInstances( @@ -1148,13 +1590,12 @@ export class BulkOperationsApi extends BaseAPI { * @summary Bulk Replace Users * @param {BulkOperationsApiBulkReplaceUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BulkOperationsApi + * @throws If a required parameter is missing. */ public bulkReplaceUsers( requestParameters: BulkOperationsApiBulkReplaceUsersRequest, - options?: AxiosRequestConfig, - ): AxiosPromise { + options?: RawAxiosRequestConfig, + ) { return BulkOperationsApiFp(this.configuration) .bulkReplaceUsers( requestParameters.projId, @@ -1164,4 +1605,25 @@ export class BulkOperationsApi extends BaseAPI { ) .then((request) => request(this.axios, this.basePath)); } + + /** + * + * @summary Bulk Unassign Role + * @param {BulkOperationsApiBulkUnassignRoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public bulkUnassignRole( + requestParameters: BulkOperationsApiBulkUnassignRoleRequest, + options?: RawAxiosRequestConfig, + ) { + return BulkOperationsApiFp(this.configuration) + .bulkUnassignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentRemove, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } } diff --git a/src/openapi/api/condition-set-rules-api.ts b/src/openapi/api/condition-set-rules-api.ts index 0bffa985..4b06b819 100644 --- a/src/openapi/api/condition-set-rules-api.ts +++ b/src/openapi/api/condition-set-rules-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,26 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { ConditionSetRuleCreate } from '../types'; -// @ts-ignore -import { ConditionSetRuleRead } from '../types'; -// @ts-ignore -import { ConditionSetRuleRemove } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ConditionSetRuleCreate, + ConditionSetRuleRead, + ConditionSetRuleRemove, +} from '../types'; /** * ConditionSetRulesApi - axios parameter creator - * @export */ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -51,13 +40,13 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ConditionSetRuleCreate} conditionSetRuleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignSetPermissions: async ( projId: string, envId: string, conditionSetRuleCreate: ConditionSetRuleCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('assignSetPermissions', 'projId', projId); @@ -66,8 +55,8 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C // verify required parameter 'conditionSetRuleCreate' is not null or undefined assertParamExists('assignSetPermissions', 'conditionSetRuleCreate', conditionSetRuleCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/set_rules` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -84,6 +73,7 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -114,7 +104,7 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listSetPermissions: async ( projId: string, @@ -124,15 +114,15 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C resourceSet?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listSetPermissions', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listSetPermissions', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/set_rules` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -168,6 +158,8 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -188,13 +180,13 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ConditionSetRuleRemove} conditionSetRuleRemove * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ unassignSetPermissions: async ( projId: string, envId: string, conditionSetRuleRemove: ConditionSetRuleRemove, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('unassignSetPermissions', 'projId', projId); @@ -203,8 +195,8 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C // verify required parameter 'conditionSetRuleRemove' is not null or undefined assertParamExists('unassignSetPermissions', 'conditionSetRuleRemove', conditionSetRuleRemove); const localVarPath = `/v2/facts/{proj_id}/{env_id}/set_rules` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -221,6 +213,7 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -245,7 +238,6 @@ export const ConditionSetRulesApiAxiosParamCreator = function (configuration?: C /** * ConditionSetRulesApi - functional programming interface - * @export */ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ConditionSetRulesApiAxiosParamCreator(configuration); @@ -257,13 +249,13 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ConditionSetRuleCreate} conditionSetRuleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async assignSetPermissions( projId: string, envId: string, conditionSetRuleCreate: ConditionSetRuleCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { @@ -273,7 +265,18 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { conditionSetRuleCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetRulesApi.assignSetPermissions']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists the condition set rules matching the filter. - If the `user_set` filter is present, will only return the permissions set of that user set. - If the `permission` filter is present, will only return the permissions sets that equals to the queried permission. - If the `resource_set` filter is present, will only return the permissions set of that resource set. @@ -286,7 +289,7 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listSetPermissions( projId: string, @@ -296,7 +299,7 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { resourceSet?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { @@ -310,7 +313,18 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetRulesApi.listSetPermissions']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Revokes permissions to a user set *on* a resource set. If the permission is not granted, it is skipped. @@ -319,13 +333,13 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ConditionSetRuleRemove} conditionSetRuleRemove * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async unassignSetPermissions( projId: string, envId: string, conditionSetRuleRemove: ConditionSetRuleRemove, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.unassignSetPermissions( projId, @@ -333,14 +347,24 @@ export const ConditionSetRulesApiFp = function (configuration?: Configuration) { conditionSetRuleRemove, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetRulesApi.unassignSetPermissions']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ConditionSetRulesApi - factory interface - * @export */ export const ConditionSetRulesApiFactory = function ( configuration?: Configuration, @@ -352,66 +376,65 @@ export const ConditionSetRulesApiFactory = function ( /** * Grant permissions to a user set *on* a resource set. If the permission is already granted, it is skipped. * @summary Assign Set Permissions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ConditionSetRuleCreate} conditionSetRuleCreate + * @param {ConditionSetRulesApiAssignSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignSetPermissions( - projId: string, - envId: string, - conditionSetRuleCreate: ConditionSetRuleCreate, - options?: any, + requestParameters: ConditionSetRulesApiAssignSetPermissionsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .assignSetPermissions(projId, envId, conditionSetRuleCreate, options) + .assignSetPermissions( + requestParameters.projId, + requestParameters.envId, + requestParameters.conditionSetRuleCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists the condition set rules matching the filter. - If the `user_set` filter is present, will only return the permissions set of that user set. - If the `permission` filter is present, will only return the permissions sets that equals to the queried permission. - If the `resource_set` filter is present, will only return the permissions set of that resource set. * @summary List Set Permissions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [userSet] optional user set filter, will only return rules where the permission is granted to this user set - * @param {string} [permission] optional permission filter, will only return condition set rules granting this permission - * @param {string} [resourceSet] optional resource set filter, will only return rules where the permission is granted on this resource set - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ConditionSetRulesApiListSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listSetPermissions( - projId: string, - envId: string, - userSet?: string, - permission?: string, - resourceSet?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ConditionSetRulesApiListSetPermissionsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listSetPermissions(projId, envId, userSet, permission, resourceSet, page, perPage, options) + .listSetPermissions( + requestParameters.projId, + requestParameters.envId, + requestParameters.userSet, + requestParameters.permission, + requestParameters.resourceSet, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Revokes permissions to a user set *on* a resource set. If the permission is not granted, it is skipped. * @summary Unassign Set Permissions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ConditionSetRuleRemove} conditionSetRuleRemove + * @param {ConditionSetRulesApiUnassignSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ unassignSetPermissions( - projId: string, - envId: string, - conditionSetRuleRemove: ConditionSetRuleRemove, - options?: any, + requestParameters: ConditionSetRulesApiUnassignSetPermissionsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .unassignSetPermissions(projId, envId, conditionSetRuleRemove, options) + .unassignSetPermissions( + requestParameters.projId, + requestParameters.envId, + requestParameters.conditionSetRuleRemove, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -419,121 +442,80 @@ export const ConditionSetRulesApiFactory = function ( /** * Request parameters for assignSetPermissions operation in ConditionSetRulesApi. - * @export - * @interface ConditionSetRulesApiAssignSetPermissionsRequest */ export interface ConditionSetRulesApiAssignSetPermissionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetRulesApiAssignSetPermissions */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetRulesApiAssignSetPermissions */ readonly envId: string; - /** - * - * @type {ConditionSetRuleCreate} - * @memberof ConditionSetRulesApiAssignSetPermissions - */ readonly conditionSetRuleCreate: ConditionSetRuleCreate; } /** * Request parameters for listSetPermissions operation in ConditionSetRulesApi. - * @export - * @interface ConditionSetRulesApiListSetPermissionsRequest */ export interface ConditionSetRulesApiListSetPermissionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly envId: string; /** * optional user set filter, will only return rules where the permission is granted to this user set - * @type {string} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly userSet?: string; /** * optional permission filter, will only return condition set rules granting this permission - * @type {string} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly permission?: string; /** * optional resource set filter, will only return rules where the permission is granted on this resource set - * @type {string} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly resourceSet?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ConditionSetRulesApiListSetPermissions */ readonly perPage?: number; } /** * Request parameters for unassignSetPermissions operation in ConditionSetRulesApi. - * @export - * @interface ConditionSetRulesApiUnassignSetPermissionsRequest */ export interface ConditionSetRulesApiUnassignSetPermissionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetRulesApiUnassignSetPermissions */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetRulesApiUnassignSetPermissions */ readonly envId: string; - /** - * - * @type {ConditionSetRuleRemove} - * @memberof ConditionSetRulesApiUnassignSetPermissions - */ readonly conditionSetRuleRemove: ConditionSetRuleRemove; } /** * ConditionSetRulesApi - object-oriented interface - * @export - * @class ConditionSetRulesApi - * @extends {BaseAPI} */ export class ConditionSetRulesApi extends BaseAPI { /** @@ -541,12 +523,11 @@ export class ConditionSetRulesApi extends BaseAPI { * @summary Assign Set Permissions * @param {ConditionSetRulesApiAssignSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetRulesApi + * @throws If a required parameter is missing. */ public assignSetPermissions( requestParameters: ConditionSetRulesApiAssignSetPermissionsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetRulesApiFp(this.configuration) .assignSetPermissions( @@ -563,12 +544,11 @@ export class ConditionSetRulesApi extends BaseAPI { * @summary List Set Permissions * @param {ConditionSetRulesApiListSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetRulesApi + * @throws If a required parameter is missing. */ public listSetPermissions( requestParameters: ConditionSetRulesApiListSetPermissionsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetRulesApiFp(this.configuration) .listSetPermissions( @@ -589,12 +569,11 @@ export class ConditionSetRulesApi extends BaseAPI { * @summary Unassign Set Permissions * @param {ConditionSetRulesApiUnassignSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetRulesApi + * @throws If a required parameter is missing. */ public unassignSetPermissions( requestParameters: ConditionSetRulesApiUnassignSetPermissionsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetRulesApiFp(this.configuration) .unassignSetPermissions( diff --git a/src/openapi/api/condition-sets-api.ts b/src/openapi/api/condition-sets-api.ts index bacffc14..c2b3079e 100644 --- a/src/openapi/api/condition-sets-api.ts +++ b/src/openapi/api/condition-sets-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,37 +10,28 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { ConditionSetCreate } from '../types'; -// @ts-ignore -import { ConditionSetRead } from '../types'; -// @ts-ignore -import { ConditionSetType } from '../types'; -// @ts-ignore -import { ConditionSetUpdate } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ConditionSetCreate, + ConditionSetRead, + ConditionSetType, + ConditionSetUpdate, + ResponseListConditionSetsV2SchemaProjIdEnvIdConditionSetsGet, +} from '../types'; /** * ConditionSetsApi - axios parameter creator - * @export */ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -53,13 +42,13 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ConditionSetCreate} conditionSetCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createConditionSet: async ( projId: string, envId: string, conditionSetCreate: ConditionSetCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createConditionSet', 'projId', projId); @@ -68,8 +57,8 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi // verify required parameter 'conditionSetCreate' is not null or undefined assertParamExists('createConditionSet', 'conditionSetCreate', conditionSetCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -86,6 +75,7 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -106,30 +96,30 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set rules). + * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set users_with_role). * @summary Delete Condition Set + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteConditionSet: async ( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'conditionSetId' is not null or undefined + assertParamExists('deleteConditionSet', 'conditionSetId', conditionSetId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteConditionSet', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteConditionSet', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('deleteConditionSet', 'conditionSetId', conditionSetId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); + .replace('{condition_set_id}', encodeURIComponent(String(conditionSetId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -145,6 +135,8 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -161,28 +153,28 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi /** * Gets a single condition set, if such condition set exists. * @summary Get Condition Set + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getConditionSet: async ( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'conditionSetId' is not null or undefined + assertParamExists('getConditionSet', 'conditionSetId', conditionSetId); // verify required parameter 'projId' is not null or undefined assertParamExists('getConditionSet', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getConditionSet', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('getConditionSet', 'conditionSetId', conditionSetId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); + .replace('{condition_set_id}', encodeURIComponent(String(conditionSetId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -198,6 +190,8 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -214,33 +208,33 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi /** * Gets all ancestors (parent, parent of parent, and so on) * @summary Get Condition Set Ancestors + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getConditionSetAncestors: async ( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'conditionSetId' is not null or undefined + assertParamExists('getConditionSetAncestors', 'conditionSetId', conditionSetId); // verify required parameter 'projId' is not null or undefined assertParamExists('getConditionSetAncestors', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getConditionSetAncestors', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('getConditionSetAncestors', 'conditionSetId', conditionSetId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/ancestors` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); + .replace('{condition_set_id}', encodeURIComponent(String(conditionSetId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -264,6 +258,8 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -280,33 +276,33 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi /** * Gets all descendants (children, children of children, and so on) * @summary Get Condition Set Descendants + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getConditionSetDescendants: async ( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'conditionSetId' is not null or undefined + assertParamExists('getConditionSetDescendants', 'conditionSetId', conditionSetId); // verify required parameter 'projId' is not null or undefined assertParamExists('getConditionSetDescendants', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getConditionSetDescendants', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('getConditionSetDescendants', 'conditionSetId', conditionSetId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/descendants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); + .replace('{condition_set_id}', encodeURIComponent(String(conditionSetId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -330,71 +326,7 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['per_page'] = perPage; } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Condition Set Possible Parents - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConditionSetPossibleParents: async ( - projId: string, - envId: string, - conditionSetId: string, - page?: number, - perPage?: number, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('getConditionSetPossibleParents', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getConditionSetPossibleParents', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('getConditionSetPossibleParents', 'conditionSetId', conditionSetId); - const localVarPath = - `/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}/possible_parents` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage; - } + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -414,27 +346,31 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi * @summary List Condition Sets * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [search] Text search for the condition sets name or key * @param {ConditionSetType} [type] if provided, will return only the condition sets of the specified type. e.g: only user sets. + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listConditionSets: async ( projId: string, envId: string, + search?: string, type?: ConditionSetType, + includeTotalCount?: boolean, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listConditionSets', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listConditionSets', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -450,10 +386,18 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + if (type !== undefined) { localVarQueryParameter['type'] = type; } + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -462,6 +406,8 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -478,32 +424,32 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi /** * Partially updates a condition set. Fields that will be provided will be completely overwritten. * @summary Update Condition Set + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {ConditionSetUpdate} conditionSetUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateConditionSet: async ( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, conditionSetUpdate: ConditionSetUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'conditionSetId' is not null or undefined + assertParamExists('updateConditionSet', 'conditionSetId', conditionSetId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateConditionSet', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateConditionSet', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('updateConditionSet', 'conditionSetId', conditionSetId); // verify required parameter 'conditionSetUpdate' is not null or undefined assertParamExists('updateConditionSet', 'conditionSetUpdate', conditionSetUpdate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/condition_sets/{condition_set_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); + .replace('{condition_set_id}', encodeURIComponent(String(conditionSetId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -520,6 +466,7 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -544,7 +491,6 @@ export const ConditionSetsApiAxiosParamCreator = function (configuration?: Confi /** * ConditionSetsApi - functional programming interface - * @export */ export const ConditionSetsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ConditionSetsApiAxiosParamCreator(configuration); @@ -556,13 +502,13 @@ export const ConditionSetsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ConditionSetCreate} conditionSetCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createConditionSet( projId: string, envId: string, conditionSetCreate: ConditionSetCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createConditionSet( projId, @@ -570,210 +516,258 @@ export const ConditionSetsApiFp = function (configuration?: Configuration) { conditionSetCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.createConditionSet']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set rules). + * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set users_with_role). * @summary Delete Condition Set + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteConditionSet( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteConditionSet( + conditionSetId, projId, envId, - conditionSetId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.deleteConditionSet']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single condition set, if such condition set exists. * @summary Get Condition Set + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getConditionSet( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getConditionSet( + conditionSetId, projId, envId, - conditionSetId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.getConditionSet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets all ancestors (parent, parent of parent, and so on) * @summary Get Condition Set Ancestors + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getConditionSetAncestors( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getConditionSetAncestors( + conditionSetId, projId, envId, - conditionSetId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.getConditionSetAncestors']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets all descendants (children, children of children, and so on) * @summary Get Condition Set Descendants + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getConditionSetDescendants( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getConditionSetDescendants( - projId, - envId, conditionSetId, - page, - perPage, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Condition Set Possible Parents - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConditionSetPossibleParents( - projId: string, - envId: string, - conditionSetId: string, - page?: number, - perPage?: number, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConditionSetPossibleParents( projId, envId, - conditionSetId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.getConditionSetDescendants']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all condition sets matching a filter. * @summary List Condition Sets * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [search] Text search for the condition sets name or key * @param {ConditionSetType} [type] if provided, will return only the condition sets of the specified type. e.g: only user sets. + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listConditionSets( projId: string, envId: string, + search?: string, type?: ConditionSetType, + includeTotalCount?: boolean, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listConditionSets( projId, envId, + search, type, + includeTotalCount, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.listConditionSets']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates a condition set. Fields that will be provided will be completely overwritten. * @summary Update Condition Set + * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). * @param {ConditionSetUpdate} conditionSetUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateConditionSet( + conditionSetId: string, projId: string, envId: string, - conditionSetId: string, conditionSetUpdate: ConditionSetUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateConditionSet( + conditionSetId, projId, envId, - conditionSetId, conditionSetUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ConditionSetsApi.updateConditionSet']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ConditionSetsApi - factory interface - * @export */ export const ConditionSetsApiFactory = function ( configuration?: Configuration, @@ -785,171 +779,150 @@ export const ConditionSetsApiFactory = function ( /** * Creates a new condition set (can be either a user set or a resource set). * @summary Create Condition Set - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ConditionSetCreate} conditionSetCreate + * @param {ConditionSetsApiCreateConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createConditionSet( - projId: string, - envId: string, - conditionSetCreate: ConditionSetCreate, - options?: any, + requestParameters: ConditionSetsApiCreateConditionSetRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createConditionSet(projId, envId, conditionSetCreate, options) + .createConditionSet( + requestParameters.projId, + requestParameters.envId, + requestParameters.conditionSetCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set rules). + * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set users_with_role). * @summary Delete Condition Set - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). + * @param {ConditionSetsApiDeleteConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteConditionSet( - projId: string, - envId: string, - conditionSetId: string, - options?: any, + requestParameters: ConditionSetsApiDeleteConditionSetRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteConditionSet(projId, envId, conditionSetId, options) + .deleteConditionSet( + requestParameters.conditionSetId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single condition set, if such condition set exists. * @summary Get Condition Set - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). + * @param {ConditionSetsApiGetConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getConditionSet( - projId: string, - envId: string, - conditionSetId: string, - options?: any, + requestParameters: ConditionSetsApiGetConditionSetRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getConditionSet(projId, envId, conditionSetId, options) + .getConditionSet( + requestParameters.conditionSetId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets all ancestors (parent, parent of parent, and so on) * @summary Get Condition Set Ancestors - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ConditionSetsApiGetConditionSetAncestorsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getConditionSetAncestors( - projId: string, - envId: string, - conditionSetId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ConditionSetsApiGetConditionSetAncestorsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .getConditionSetAncestors(projId, envId, conditionSetId, page, perPage, options) + .getConditionSetAncestors( + requestParameters.conditionSetId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets all descendants (children, children of children, and so on) * @summary Get Condition Set Descendants - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ConditionSetsApiGetConditionSetDescendantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getConditionSetDescendants( - projId: string, - envId: string, - conditionSetId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ConditionSetsApiGetConditionSetDescendantsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .getConditionSetDescendants(projId, envId, conditionSetId, page, perPage, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Condition Set Possible Parents - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConditionSetPossibleParents( - projId: string, - envId: string, - conditionSetId: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { - return localVarFp - .getConditionSetPossibleParents(projId, envId, conditionSetId, page, perPage, options) + .getConditionSetDescendants( + requestParameters.conditionSetId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all condition sets matching a filter. * @summary List Condition Sets - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ConditionSetType} [type] if provided, will return only the condition sets of the specified type. e.g: only user sets. - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ConditionSetsApiListConditionSetsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listConditionSets( - projId: string, - envId: string, - type?: ConditionSetType, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + requestParameters: ConditionSetsApiListConditionSetsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listConditionSets(projId, envId, type, page, perPage, options) + .listConditionSets( + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.type, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates a condition set. Fields that will be provided will be completely overwritten. * @summary Update Condition Set - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @param {ConditionSetUpdate} conditionSetUpdate + * @param {ConditionSetsApiUpdateConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateConditionSet( - projId: string, - envId: string, - conditionSetId: string, - conditionSetUpdate: ConditionSetUpdate, - options?: any, + requestParameters: ConditionSetsApiUpdateConditionSetRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateConditionSet(projId, envId, conditionSetId, conditionSetUpdate, options) + .updateConditionSet( + requestParameters.conditionSetId, + requestParameters.projId, + requestParameters.envId, + requestParameters.conditionSetUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -957,296 +930,185 @@ export const ConditionSetsApiFactory = function ( /** * Request parameters for createConditionSet operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiCreateConditionSetRequest */ export interface ConditionSetsApiCreateConditionSetRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiCreateConditionSet */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiCreateConditionSet */ readonly envId: string; - /** - * - * @type {ConditionSetCreate} - * @memberof ConditionSetsApiCreateConditionSet - */ readonly conditionSetCreate: ConditionSetCreate; } /** * Request parameters for deleteConditionSet operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiDeleteConditionSetRequest */ export interface ConditionSetsApiDeleteConditionSetRequest { + /** + * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). + */ + readonly conditionSetId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiDeleteConditionSet */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiDeleteConditionSet */ readonly envId: string; - - /** - * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiDeleteConditionSet - */ - readonly conditionSetId: string; } /** * Request parameters for getConditionSet operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiGetConditionSetRequest */ export interface ConditionSetsApiGetConditionSetRequest { + /** + * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). + */ + readonly conditionSetId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSet */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSet */ readonly envId: string; - - /** - * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSet - */ - readonly conditionSetId: string; } /** * Request parameters for getConditionSetAncestors operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiGetConditionSetAncestorsRequest */ export interface ConditionSetsApiGetConditionSetAncestorsRequest { + /** + * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). + */ + readonly conditionSetId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetAncestors */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetAncestors */ readonly envId: string; - /** - * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetAncestors - */ - readonly conditionSetId: string; - /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ConditionSetsApiGetConditionSetAncestors */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ConditionSetsApiGetConditionSetAncestors */ readonly perPage?: number; } /** * Request parameters for getConditionSetDescendants operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiGetConditionSetDescendantsRequest */ export interface ConditionSetsApiGetConditionSetDescendantsRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetDescendants - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetDescendants - */ - readonly envId: string; - /** * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetDescendants */ readonly conditionSetId: string; - /** - * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ConditionSetsApiGetConditionSetDescendants - */ - readonly page?: number; - - /** - * The number of results per page (max 100). - * @type {number} - * @memberof ConditionSetsApiGetConditionSetDescendants - */ - readonly perPage?: number; -} - -/** - * Request parameters for getConditionSetPossibleParents operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiGetConditionSetPossibleParentsRequest - */ -export interface ConditionSetsApiGetConditionSetPossibleParentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetPossibleParents */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetPossibleParents */ readonly envId: string; - /** - * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiGetConditionSetPossibleParents - */ - readonly conditionSetId: string; - /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ConditionSetsApiGetConditionSetPossibleParents */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ConditionSetsApiGetConditionSetPossibleParents */ readonly perPage?: number; } /** * Request parameters for listConditionSets operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiListConditionSetsRequest */ export interface ConditionSetsApiListConditionSetsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiListConditionSets */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiListConditionSets */ readonly envId: string; + /** + * Text search for the condition sets name or key + */ + readonly search?: string; + /** * if provided, will return only the condition sets of the specified type. e.g: only user sets. - * @type {ConditionSetType} - * @memberof ConditionSetsApiListConditionSets */ readonly type?: ConditionSetType; + /** + * Include total count in response + */ + readonly includeTotalCount?: boolean; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ConditionSetsApiListConditionSets */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ConditionSetsApiListConditionSets */ readonly perPage?: number; } /** * Request parameters for updateConditionSet operation in ConditionSetsApi. - * @export - * @interface ConditionSetsApiUpdateConditionSetRequest */ export interface ConditionSetsApiUpdateConditionSetRequest { + /** + * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). + */ + readonly conditionSetId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiUpdateConditionSet */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiUpdateConditionSet */ readonly envId: string; - /** - * Either the unique id of the condition set, or the URL-friendly key of the condition set (i.e: the \"slug\"). - * @type {string} - * @memberof ConditionSetsApiUpdateConditionSet - */ - readonly conditionSetId: string; - - /** - * - * @type {ConditionSetUpdate} - * @memberof ConditionSetsApiUpdateConditionSet - */ readonly conditionSetUpdate: ConditionSetUpdate; } /** * ConditionSetsApi - object-oriented interface - * @export - * @class ConditionSetsApi - * @extends {BaseAPI} */ export class ConditionSetsApi extends BaseAPI { /** @@ -1254,12 +1116,11 @@ export class ConditionSetsApi extends BaseAPI { * @summary Create Condition Set * @param {ConditionSetsApiCreateConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public createConditionSet( requestParameters: ConditionSetsApiCreateConditionSetRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .createConditionSet( @@ -1272,22 +1133,21 @@ export class ConditionSetsApi extends BaseAPI { } /** - * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set rules). + * Deletes a condition set and all its related data. This includes any permissions granted to said condition set (i.e: any matching condition set users_with_role). * @summary Delete Condition Set * @param {ConditionSetsApiDeleteConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public deleteConditionSet( requestParameters: ConditionSetsApiDeleteConditionSetRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .deleteConditionSet( + requestParameters.conditionSetId, requestParameters.projId, requestParameters.envId, - requestParameters.conditionSetId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1298,18 +1158,17 @@ export class ConditionSetsApi extends BaseAPI { * @summary Get Condition Set * @param {ConditionSetsApiGetConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public getConditionSet( requestParameters: ConditionSetsApiGetConditionSetRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .getConditionSet( + requestParameters.conditionSetId, requestParameters.projId, requestParameters.envId, - requestParameters.conditionSetId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1320,18 +1179,17 @@ export class ConditionSetsApi extends BaseAPI { * @summary Get Condition Set Ancestors * @param {ConditionSetsApiGetConditionSetAncestorsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public getConditionSetAncestors( requestParameters: ConditionSetsApiGetConditionSetAncestorsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .getConditionSetAncestors( + requestParameters.conditionSetId, requestParameters.projId, requestParameters.envId, - requestParameters.conditionSetId, requestParameters.page, requestParameters.perPage, options, @@ -1344,42 +1202,17 @@ export class ConditionSetsApi extends BaseAPI { * @summary Get Condition Set Descendants * @param {ConditionSetsApiGetConditionSetDescendantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public getConditionSetDescendants( requestParameters: ConditionSetsApiGetConditionSetDescendantsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .getConditionSetDescendants( - requestParameters.projId, - requestParameters.envId, requestParameters.conditionSetId, - requestParameters.page, - requestParameters.perPage, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Condition Set Possible Parents - * @param {ConditionSetsApiGetConditionSetPossibleParentsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi - */ - public getConditionSetPossibleParents( - requestParameters: ConditionSetsApiGetConditionSetPossibleParentsRequest, - options?: AxiosRequestConfig, - ) { - return ConditionSetsApiFp(this.configuration) - .getConditionSetPossibleParents( requestParameters.projId, requestParameters.envId, - requestParameters.conditionSetId, requestParameters.page, requestParameters.perPage, options, @@ -1392,18 +1225,19 @@ export class ConditionSetsApi extends BaseAPI { * @summary List Condition Sets * @param {ConditionSetsApiListConditionSetsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public listConditionSets( requestParameters: ConditionSetsApiListConditionSetsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .listConditionSets( requestParameters.projId, requestParameters.envId, + requestParameters.search, requestParameters.type, + requestParameters.includeTotalCount, requestParameters.page, requestParameters.perPage, options, @@ -1416,18 +1250,17 @@ export class ConditionSetsApi extends BaseAPI { * @summary Update Condition Set * @param {ConditionSetsApiUpdateConditionSetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ConditionSetsApi + * @throws If a required parameter is missing. */ public updateConditionSet( requestParameters: ConditionSetsApiUpdateConditionSetRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ConditionSetsApiFp(this.configuration) .updateConditionSet( + requestParameters.conditionSetId, requestParameters.projId, requestParameters.envId, - requestParameters.conditionSetId, requestParameters.conditionSetUpdate, options, ) diff --git a/src/openapi/api/data-export-api.ts b/src/openapi/api/data-export-api.ts new file mode 100644 index 00000000..30b65e0a --- /dev/null +++ b/src/openapi/api/data-export-api.ts @@ -0,0 +1,263 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { TaskResultOrgExportResult } from '../types'; +/** + * DataExportApi - axios parameter creator + */ +export const DataExportApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Poll an export started by `POST /v2/data-export`. While it runs the status is `processing`; on `success` the `result` carries a short-lived presigned `download_url`; on `failure` the `error` explains why (e.g. the org is too large for the self-service export). Only exports of your own organization are visible. + * @summary Get the status / download URL of an export + * @param {string} taskId The export task id from the POST response + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getOrganizationExport: async ( + taskId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'taskId' is not null or undefined + assertParamExists('getOrganizationExport', 'taskId', taskId); + const localVarPath = `/v2/data-export/{task_id}`.replace( + '{task_id}', + encodeURIComponent(String(taskId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Start a background export of **your** organization\'s data and return a task id. Poll `GET /v2/data-export/{task_id}` until it succeeds to get a short-lived download URL for the `permit-org-export--.tar.gz` (one `data/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .csv` per table + `manifest.json`). Requires an Organization API key with ADMIN access; write/read-only keys are rejected. The organization is taken from the key, so this only ever exports your own organization. The archive contains your plaintext API-key secrets (so a self-hosted import keeps working without re-issuing keys) — treat the download URL and the file as credentials. + * @summary Start an export of your organization\'s data + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + startOrganizationExport: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v2/data-export`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * DataExportApi - functional programming interface + */ +export const DataExportApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = DataExportApiAxiosParamCreator(configuration); + return { + /** + * Poll an export started by `POST /v2/data-export`. While it runs the status is `processing`; on `success` the `result` carries a short-lived presigned `download_url`; on `failure` the `error` explains why (e.g. the org is too large for the self-service export). Only exports of your own organization are visible. + * @summary Get the status / download URL of an export + * @param {string} taskId The export task id from the POST response + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getOrganizationExport( + taskId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationExport( + taskId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DataExportApi.getOrganizationExport']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Start a background export of **your** organization\'s data and return a task id. Poll `GET /v2/data-export/{task_id}` until it succeeds to get a short-lived download URL for the `permit-org-export--.tar.gz` (one `data/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .csv` per table + `manifest.json`). Requires an Organization API key with ADMIN access; write/read-only keys are rejected. The organization is taken from the key, so this only ever exports your own organization. The archive contains your plaintext API-key secrets (so a self-hosted import keeps working without re-issuing keys) — treat the download URL and the file as credentials. + * @summary Start an export of your organization\'s data + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async startOrganizationExport( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.startOrganizationExport(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DataExportApi.startOrganizationExport']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * DataExportApi - factory interface + */ +export const DataExportApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = DataExportApiFp(configuration); + return { + /** + * Poll an export started by `POST /v2/data-export`. While it runs the status is `processing`; on `success` the `result` carries a short-lived presigned `download_url`; on `failure` the `error` explains why (e.g. the org is too large for the self-service export). Only exports of your own organization are visible. + * @summary Get the status / download URL of an export + * @param {DataExportApiGetOrganizationExportRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getOrganizationExport( + requestParameters: DataExportApiGetOrganizationExportRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getOrganizationExport(requestParameters.taskId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Start a background export of **your** organization\'s data and return a task id. Poll `GET /v2/data-export/{task_id}` until it succeeds to get a short-lived download URL for the `permit-org-export--.tar.gz` (one `data/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .csv` per table + `manifest.json`). Requires an Organization API key with ADMIN access; write/read-only keys are rejected. The organization is taken from the key, so this only ever exports your own organization. The archive contains your plaintext API-key secrets (so a self-hosted import keeps working without re-issuing keys) — treat the download URL and the file as credentials. + * @summary Start an export of your organization\'s data + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + startOrganizationExport( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .startOrganizationExport(options) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getOrganizationExport operation in DataExportApi. + */ +export interface DataExportApiGetOrganizationExportRequest { + /** + * The export task id from the POST response + */ + readonly taskId: string; +} + +/** + * DataExportApi - object-oriented interface + */ +export class DataExportApi extends BaseAPI { + /** + * Poll an export started by `POST /v2/data-export`. While it runs the status is `processing`; on `success` the `result` carries a short-lived presigned `download_url`; on `failure` the `error` explains why (e.g. the org is too large for the self-service export). Only exports of your own organization are visible. + * @summary Get the status / download URL of an export + * @param {DataExportApiGetOrganizationExportRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getOrganizationExport( + requestParameters: DataExportApiGetOrganizationExportRequest, + options?: RawAxiosRequestConfig, + ) { + return DataExportApiFp(this.configuration) + .getOrganizationExport(requestParameters.taskId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Start a background export of **your** organization\'s data and return a task id. Poll `GET /v2/data-export/{task_id}` until it succeeds to get a short-lived download URL for the `permit-org-export--.tar.gz` (one `data/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .csv` per table + `manifest.json`). Requires an Organization API key with ADMIN access; write/read-only keys are rejected. The organization is taken from the key, so this only ever exports your own organization. The archive contains your plaintext API-key secrets (so a self-hosted import keeps working without re-issuing keys) — treat the download URL and the file as credentials. + * @summary Start an export of your organization\'s data + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public startOrganizationExport(options?: RawAxiosRequestConfig) { + return DataExportApiFp(this.configuration) + .startOrganizationExport(options) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/decision-logs-api.ts b/src/openapi/api/decision-logs-api.ts deleted file mode 100644 index a47bab99..00000000 --- a/src/openapi/api/decision-logs-api.ts +++ /dev/null @@ -1,368 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultOPADecisionLog } from '../types'; -/** - * DecisionLogsApi - axios parameter creator - * @export - */ -export const DecisionLogsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary List PDP Decisions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} pdpId The unique id of the pdp - * @param {Array} [users] List of user IDs to filter by - * @param {boolean} [approved] Filter by approved decisions - * @param {Array} [resources] Filter by resources - * @param {number} [timestampFrom] Filter by timestamp from - * @param {number} [timestampTo] Filter by timestamp to - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listPdpDecisionLogs: async ( - projId: string, - envId: string, - pdpId: string, - users?: Array, - approved?: boolean, - resources?: Array, - timestampFrom?: number, - timestampTo?: number, - page?: number, - perPage?: number, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('listPdpDecisionLogs', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('listPdpDecisionLogs', 'envId', envId); - // verify required parameter 'pdpId' is not null or undefined - assertParamExists('listPdpDecisionLogs', 'pdpId', pdpId); - const localVarPath = `/v2/pdps/{proj_id}/{env_id}/decision-logs/{pdp_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'pdp_id'}}`, encodeURIComponent(String(pdpId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - if (users) { - localVarQueryParameter['users'] = users; - } - - if (approved !== undefined) { - localVarQueryParameter['approved'] = approved; - } - - if (resources) { - localVarQueryParameter['resources'] = resources; - } - - if (timestampFrom !== undefined) { - localVarQueryParameter['timestamp_from'] = timestampFrom; - } - - if (timestampTo !== undefined) { - localVarQueryParameter['timestamp_to'] = timestampTo; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; -}; - -/** - * DecisionLogsApi - functional programming interface - * @export - */ -export const DecisionLogsApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = DecisionLogsApiAxiosParamCreator(configuration); - return { - /** - * - * @summary List PDP Decisions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} pdpId The unique id of the pdp - * @param {Array} [users] List of user IDs to filter by - * @param {boolean} [approved] Filter by approved decisions - * @param {Array} [resources] Filter by resources - * @param {number} [timestampFrom] Filter by timestamp from - * @param {number} [timestampTo] Filter by timestamp to - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listPdpDecisionLogs( - projId: string, - envId: string, - pdpId: string, - users?: Array, - approved?: boolean, - resources?: Array, - timestampFrom?: number, - timestampTo?: number, - page?: number, - perPage?: number, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listPdpDecisionLogs( - projId, - envId, - pdpId, - users, - approved, - resources, - timestampFrom, - timestampTo, - page, - perPage, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - }; -}; - -/** - * DecisionLogsApi - factory interface - * @export - */ -export const DecisionLogsApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = DecisionLogsApiFp(configuration); - return { - /** - * - * @summary List PDP Decisions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} pdpId The unique id of the pdp - * @param {Array} [users] List of user IDs to filter by - * @param {boolean} [approved] Filter by approved decisions - * @param {Array} [resources] Filter by resources - * @param {number} [timestampFrom] Filter by timestamp from - * @param {number} [timestampTo] Filter by timestamp to - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listPdpDecisionLogs( - projId: string, - envId: string, - pdpId: string, - users?: Array, - approved?: boolean, - resources?: Array, - timestampFrom?: number, - timestampTo?: number, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise { - return localVarFp - .listPdpDecisionLogs( - projId, - envId, - pdpId, - users, - approved, - resources, - timestampFrom, - timestampTo, - page, - perPage, - options, - ) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for listPdpDecisionLogs operation in DecisionLogsApi. - * @export - * @interface DecisionLogsApiListPdpDecisionLogsRequest - */ -export interface DecisionLogsApiListPdpDecisionLogsRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly envId: string; - - /** - * The unique id of the pdp - * @type {string} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly pdpId: string; - - /** - * List of user IDs to filter by - * @type {Array} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly users?: Array; - - /** - * Filter by approved decisions - * @type {boolean} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly approved?: boolean; - - /** - * Filter by resources - * @type {Array} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly resources?: Array; - - /** - * Filter by timestamp from - * @type {number} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly timestampFrom?: number; - - /** - * Filter by timestamp to - * @type {number} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly timestampTo?: number; - - /** - * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly page?: number; - - /** - * The number of results per page (max 100). - * @type {number} - * @memberof DecisionLogsApiListPdpDecisionLogs - */ - readonly perPage?: number; -} - -/** - * DecisionLogsApi - object-oriented interface - * @export - * @class DecisionLogsApi - * @extends {BaseAPI} - */ -export class DecisionLogsApi extends BaseAPI { - /** - * - * @summary List PDP Decisions - * @param {DecisionLogsApiListPdpDecisionLogsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DecisionLogsApi - */ - public listPdpDecisionLogs( - requestParameters: DecisionLogsApiListPdpDecisionLogsRequest, - options?: AxiosRequestConfig, - ) { - return DecisionLogsApiFp(this.configuration) - .listPdpDecisionLogs( - requestParameters.projId, - requestParameters.envId, - requestParameters.pdpId, - requestParameters.users, - requestParameters.approved, - requestParameters.resources, - requestParameters.timestampFrom, - requestParameters.timestampTo, - requestParameters.page, - requestParameters.perPage, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } -} diff --git a/src/openapi/api/decision-logs-ingress-api.ts b/src/openapi/api/decision-logs-ingress-api.ts deleted file mode 100644 index e2884f0b..00000000 --- a/src/openapi/api/decision-logs-ingress-api.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -/** - * DecisionLogsIngressApi - axios parameter creator - * @export - */ -export const DecisionLogsIngressApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * This ingress endpoint captures OPA decision logs. - * @summary OPA Decision Logs Ingress - * @param {Array} requestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertOpaDecisionLogs: async ( - requestBody: Array, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('insertOpaDecisionLogs', 'requestBody', requestBody); - const localVarPath = `/v2/decision-logs/ingress`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - requestBody, - localVarRequestOptions, - configuration, - ); - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; -}; - -/** - * DecisionLogsIngressApi - functional programming interface - * @export - */ -export const DecisionLogsIngressApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = DecisionLogsIngressApiAxiosParamCreator(configuration); - return { - /** - * This ingress endpoint captures OPA decision logs. - * @summary OPA Decision Logs Ingress - * @param {Array} requestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async insertOpaDecisionLogs( - requestBody: Array, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.insertOpaDecisionLogs( - requestBody, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - }; -}; - -/** - * DecisionLogsIngressApi - factory interface - * @export - */ -export const DecisionLogsIngressApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = DecisionLogsIngressApiFp(configuration); - return { - /** - * This ingress endpoint captures OPA decision logs. - * @summary OPA Decision Logs Ingress - * @param {Array} requestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertOpaDecisionLogs(requestBody: Array, options?: any): AxiosPromise { - return localVarFp - .insertOpaDecisionLogs(requestBody, options) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for insertOpaDecisionLogs operation in DecisionLogsIngressApi. - * @export - * @interface DecisionLogsIngressApiInsertOpaDecisionLogsRequest - */ -export interface DecisionLogsIngressApiInsertOpaDecisionLogsRequest { - /** - * - * @type {Array} - * @memberof DecisionLogsIngressApiInsertOpaDecisionLogs - */ - readonly requestBody: Array; -} - -/** - * DecisionLogsIngressApi - object-oriented interface - * @export - * @class DecisionLogsIngressApi - * @extends {BaseAPI} - */ -export class DecisionLogsIngressApi extends BaseAPI { - /** - * This ingress endpoint captures OPA decision logs. - * @summary OPA Decision Logs Ingress - * @param {DecisionLogsIngressApiInsertOpaDecisionLogsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DecisionLogsIngressApi - */ - public insertOpaDecisionLogs( - requestParameters: DecisionLogsIngressApiInsertOpaDecisionLogsRequest, - options?: AxiosRequestConfig, - ) { - return DecisionLogsIngressApiFp(this.configuration) - .insertOpaDecisionLogs(requestParameters.requestBody, options) - .then((request) => request(this.axios, this.basePath)); - } -} diff --git a/src/openapi/api/default-api.ts b/src/openapi/api/default-api.ts index eddafda7..bf6f575e 100644 --- a/src/openapi/api/default-api.ts +++ b/src/openapi/api/default-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,42 +10,46 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { OrganizationRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { + APIHistoryEventFullRead, + PaginatedResultAPIHistoryEventRead, + PaginatedResultActivityLogEventRead, +} from '../types'; /** * DefaultApi - axios parameter creator - * @export */ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * - * @summary Dummy + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {string} eventId * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - dummy: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/stress/dummy`; + getApiEvent: async ( + eventId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'eventId' is not null or undefined + assertParamExists('getApiEvent', 'eventId', eventId); + const localVarPath = `/v2/deprecated/history/{event_id}`.replace( + '{event_id}', + encodeURIComponent(String(eventId)), + ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -59,6 +61,12 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -74,12 +82,22 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @summary Dummy Db + * @summary Get Request Body + * @param {string} eventId * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - dummyDb: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/stress/db/dummy`; + getRequestBody: async ( + eventId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'eventId' is not null or undefined + assertParamExists('getRequestBody', 'eventId', eventId); + const localVarPath = `/v2/deprecated/history/{event_id}/request`.replace( + '{event_id}', + encodeURIComponent(String(eventId)), + ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -91,6 +109,12 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -106,14 +130,22 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @summary Get Organization + * @summary Get Response Body + * @param {string} eventId * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - getOrganizationV2StressDbOrganizationGet: async ( - options: AxiosRequestConfig = {}, + getResponseBody: async ( + eventId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/v2/stress/db/organization`; + // verify required parameter 'eventId' is not null or undefined + assertParamExists('getResponseBody', 'eventId', eventId); + const localVarPath = `/v2/deprecated/history/{event_id}/response`.replace( + '{event_id}', + encodeURIComponent(String(eventId)), + ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -125,6 +157,12 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -139,13 +177,34 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * - * @summary Get Organization With Authn + * Fetches all API History events for given filters. + * @summary List Activity Events + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - getOrganizationWithAuthn: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/stress/db/organization_auth`; + listActivityEventsV2DeprecatedActivityGet: async ( + actorId?: Array, + actorDisplayName?: string, + actorType?: Array, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/v2/deprecated/activity`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -161,6 +220,44 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (actorId) { + localVarQueryParameter['actor_id'] = actorId; + } + + if (actorDisplayName !== undefined) { + localVarQueryParameter['actor_display_name'] = actorDisplayName; + } + + if (actorType) { + localVarQueryParameter['actor_type'] = actorType; + } + + if (projectId) { + localVarQueryParameter['project_id'] = projectId; + } + + if (envId) { + localVarQueryParameter['env_id'] = envId; + } + + if (timestampFrom !== undefined) { + localVarQueryParameter['timestamp_from'] = timestampFrom; + } + + if (timestampUntil !== undefined) { + localVarQueryParameter['timestamp_until'] = timestampUntil; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -176,12 +273,15 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @summary Get Organization With Authz + * @summary List Activity Types * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - getOrganizationWithAuthz: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v2/stress/db/organization_authz`; + listActivityTypesV2DeprecatedActivityTypesGet: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/v2/deprecated/activity/types`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -197,6 +297,133 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches all API History events for given filters. + * @summary List Api Events + * @param {Array} [method] HTTP methods to include in search + * @param {Array} [path] API paths to include in search + * @param {boolean} [success] Filter by API request success/failure + * @param {Array} [statusCode] HTTP status codes to include in search + * @param {Array} [clientIp] IPs of clients to include in search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + listApiEvents: async ( + method?: Array, + path?: Array, + success?: boolean, + statusCode?: Array, + clientIp?: Array, + actorType?: Array, + actorId?: Array, + actorDisplayName?: string, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/v2/deprecated/history`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (method) { + localVarQueryParameter['method'] = method; + } + + if (path) { + localVarQueryParameter['path'] = path; + } + + if (success !== undefined) { + localVarQueryParameter['success'] = success; + } + + if (statusCode) { + localVarQueryParameter['status_code'] = statusCode; + } + + if (clientIp) { + localVarQueryParameter['client_ip'] = clientIp; + } + + if (actorType) { + localVarQueryParameter['actor_type'] = actorType; + } + + if (actorId) { + localVarQueryParameter['actor_id'] = actorId; + } + + if (actorDisplayName !== undefined) { + localVarQueryParameter['actor_display_name'] = actorDisplayName; + } + + if (projectId) { + localVarQueryParameter['project_id'] = projectId; + } + + if (envId) { + localVarQueryParameter['env_id'] = envId; + } + + if (timestampFrom !== undefined) { + localVarQueryParameter['timestamp_from'] = timestampFrom; + } + + if (timestampUntil !== undefined) { + localVarQueryParameter['timestamp_until'] = timestampUntil; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -215,78 +442,241 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati /** * DefaultApi - functional programming interface - * @export */ export const DefaultApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration); return { /** - * - * @summary Dummy + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {string} eventId * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - async dummy( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.dummy(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getApiEvent( + eventId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getApiEvent(eventId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.getApiEvent']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary Dummy Db + * @summary Get Request Body + * @param {string} eventId * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - async dummyDb( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.dummyDb(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getRequestBody( + eventId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRequestBody(eventId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.getRequestBody']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary Get Organization + * @summary Get Response Body + * @param {string} eventId + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + async getResponseBody( + eventId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResponseBody(eventId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.getResponseBody']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all API History events for given filters. + * @summary List Activity Events + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - async getOrganizationV2StressDbOrganizationGet( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async listActivityEventsV2DeprecatedActivityGet( + actorId?: Array, + actorDisplayName?: string, + actorType?: Array, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { const localVarAxiosArgs = - await localVarAxiosParamCreator.getOrganizationV2StressDbOrganizationGet(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + await localVarAxiosParamCreator.listActivityEventsV2DeprecatedActivityGet( + actorId, + actorDisplayName, + actorType, + projectId, + envId, + timestampFrom, + timestampUntil, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.listActivityEventsV2DeprecatedActivityGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary Get Organization With Authn + * @summary List Activity Types * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - async getOrganizationWithAuthn( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationWithAuthn(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async listActivityTypesV2DeprecatedActivityTypesGet( + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listActivityTypesV2DeprecatedActivityTypesGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.listActivityTypesV2DeprecatedActivityTypesGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Get Organization With Authz + * Fetches all API History events for given filters. + * @summary List Api Events + * @param {Array} [method] HTTP methods to include in search + * @param {Array} [path] API paths to include in search + * @param {boolean} [success] Filter by API request success/failure + * @param {Array} [statusCode] HTTP status codes to include in search + * @param {Array} [clientIp] IPs of clients to include in search + * @param {Array} [actorType] Actor type to search (member, user, api_key) + * @param {Array} [actorId] Actor ID to search + * @param {string} [actorDisplayName] Actor display name to search + * @param {Array} [projectId] Projects to include in search + * @param {Array} [envId] Environments to include in search + * @param {number} [timestampFrom] Retrieve only events after this timestamp (seconds since epoch) + * @param {number} [timestampUntil] Retrieve only events before this timestamp (seconds since epoch) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - async getOrganizationWithAuthz( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationWithAuthz(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async listApiEvents( + method?: Array, + path?: Array, + success?: boolean, + statusCode?: Array, + clientIp?: Array, + actorType?: Array, + actorId?: Array, + actorDisplayName?: string, + projectId?: Array, + envId?: Array, + timestampFrom?: number, + timestampUntil?: number, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listApiEvents( + method, + path, + success, + statusCode, + clientIp, + actorType, + actorId, + actorDisplayName, + projectId, + envId, + timestampFrom, + timestampUntil, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.listApiEvents']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * DefaultApi - factory interface - * @export */ export const DefaultApiFactory = function ( configuration?: Configuration, @@ -296,128 +686,401 @@ export const DefaultApiFactory = function ( const localVarFp = DefaultApiFp(configuration); return { /** - * - * @summary Dummy + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {DefaultApiGetApiEventRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - dummy(options?: any): AxiosPromise { - return localVarFp.dummy(options).then((request) => request(axios, basePath)); + getApiEvent( + requestParameters: DefaultApiGetApiEventRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getApiEvent(requestParameters.eventId, options) + .then((request) => request(axios, basePath)); }, /** * - * @summary Dummy Db + * @summary Get Request Body + * @param {DefaultApiGetRequestBodyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - dummyDb(options?: any): AxiosPromise { - return localVarFp.dummyDb(options).then((request) => request(axios, basePath)); + getRequestBody( + requestParameters: DefaultApiGetRequestBodyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getRequestBody(requestParameters.eventId, options) + .then((request) => request(axios, basePath)); }, /** * - * @summary Get Organization + * @summary Get Response Body + * @param {DefaultApiGetResponseBodyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - getOrganizationV2StressDbOrganizationGet(options?: any): AxiosPromise { + getResponseBody( + requestParameters: DefaultApiGetResponseBodyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getOrganizationV2StressDbOrganizationGet(options) + .getResponseBody(requestParameters.eventId, options) .then((request) => request(axios, basePath)); }, /** - * - * @summary Get Organization With Authn + * Fetches all API History events for given filters. + * @summary List Activity Events + * @param {DefaultApiListActivityEventsV2DeprecatedActivityGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - getOrganizationWithAuthn(options?: any): AxiosPromise { + listActivityEventsV2DeprecatedActivityGet( + requestParameters: DefaultApiListActivityEventsV2DeprecatedActivityGetRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getOrganizationWithAuthn(options) + .listActivityEventsV2DeprecatedActivityGet( + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.actorType, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * - * @summary Get Organization With Authz + * @summary List Activity Types + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + listActivityTypesV2DeprecatedActivityTypesGet( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listActivityTypesV2DeprecatedActivityTypesGet(options) + .then((request) => request(axios, basePath)); + }, + /** + * Fetches all API History events for given filters. + * @summary List Api Events + * @param {DefaultApiListApiEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @deprecated + * @throws If a required parameter is missing. */ - getOrganizationWithAuthz(options?: any): AxiosPromise { + listApiEvents( + requestParameters: DefaultApiListApiEventsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getOrganizationWithAuthz(options) + .listApiEvents( + requestParameters.method, + requestParameters.path, + requestParameters.success, + requestParameters.statusCode, + requestParameters.clientIp, + requestParameters.actorType, + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, }; }; +/** + * Request parameters for getApiEvent operation in DefaultApi. + */ +export interface DefaultApiGetApiEventRequest { + readonly eventId: string; +} + +/** + * Request parameters for getRequestBody operation in DefaultApi. + */ +export interface DefaultApiGetRequestBodyRequest { + readonly eventId: string; +} + +/** + * Request parameters for getResponseBody operation in DefaultApi. + */ +export interface DefaultApiGetResponseBodyRequest { + readonly eventId: string; +} + +/** + * Request parameters for listActivityEventsV2DeprecatedActivityGet operation in DefaultApi. + */ +export interface DefaultApiListActivityEventsV2DeprecatedActivityGetRequest { + /** + * Actor ID to search + */ + readonly actorId?: Array; + + /** + * Actor display name to search + */ + readonly actorDisplayName?: string; + + /** + * Actor type to search (member, user, api_key) + */ + readonly actorType?: Array; + + /** + * Projects to include in search + */ + readonly projectId?: Array; + + /** + * Environments to include in search + */ + readonly envId?: Array; + + /** + * Retrieve only events after this timestamp (seconds since epoch) + */ + readonly timestampFrom?: number; + + /** + * Retrieve only events before this timestamp (seconds since epoch) + */ + readonly timestampUntil?: number; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listApiEvents operation in DefaultApi. + */ +export interface DefaultApiListApiEventsRequest { + /** + * HTTP methods to include in search + */ + readonly method?: Array; + + /** + * API paths to include in search + */ + readonly path?: Array; + + /** + * Filter by API request success/failure + */ + readonly success?: boolean; + + /** + * HTTP status codes to include in search + */ + readonly statusCode?: Array; + + /** + * IPs of clients to include in search + */ + readonly clientIp?: Array; + + /** + * Actor type to search (member, user, api_key) + */ + readonly actorType?: Array; + + /** + * Actor ID to search + */ + readonly actorId?: Array; + + /** + * Actor display name to search + */ + readonly actorDisplayName?: string; + + /** + * Projects to include in search + */ + readonly projectId?: Array; + + /** + * Environments to include in search + */ + readonly envId?: Array; + + /** + * Retrieve only events after this timestamp (seconds since epoch) + */ + readonly timestampFrom?: number; + + /** + * Retrieve only events before this timestamp (seconds since epoch) + */ + readonly timestampUntil?: number; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + /** * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} */ export class DefaultApi extends BaseAPI { /** - * - * @summary Dummy + * Returns full information, including request and response bodies, for one event. + * @summary Get Api Event + * @param {DefaultApiGetApiEventRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi + * @deprecated + * @throws If a required parameter is missing. */ - public dummy(options?: AxiosRequestConfig) { + public getApiEvent( + requestParameters: DefaultApiGetApiEventRequest, + options?: RawAxiosRequestConfig, + ) { return DefaultApiFp(this.configuration) - .dummy(options) + .getApiEvent(requestParameters.eventId, options) .then((request) => request(this.axios, this.basePath)); } /** * - * @summary Dummy Db + * @summary Get Request Body + * @param {DefaultApiGetRequestBodyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi + * @deprecated + * @throws If a required parameter is missing. */ - public dummyDb(options?: AxiosRequestConfig) { + public getRequestBody( + requestParameters: DefaultApiGetRequestBodyRequest, + options?: RawAxiosRequestConfig, + ) { return DefaultApiFp(this.configuration) - .dummyDb(options) + .getRequestBody(requestParameters.eventId, options) .then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get Organization + * @summary Get Response Body + * @param {DefaultApiGetResponseBodyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi + * @deprecated + * @throws If a required parameter is missing. */ - public getOrganizationV2StressDbOrganizationGet(options?: AxiosRequestConfig) { + public getResponseBody( + requestParameters: DefaultApiGetResponseBodyRequest, + options?: RawAxiosRequestConfig, + ) { return DefaultApiFp(this.configuration) - .getOrganizationV2StressDbOrganizationGet(options) + .getResponseBody(requestParameters.eventId, options) .then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get Organization With Authn + * Fetches all API History events for given filters. + * @summary List Activity Events + * @param {DefaultApiListActivityEventsV2DeprecatedActivityGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi + * @deprecated + * @throws If a required parameter is missing. */ - public getOrganizationWithAuthn(options?: AxiosRequestConfig) { + public listActivityEventsV2DeprecatedActivityGet( + requestParameters: DefaultApiListActivityEventsV2DeprecatedActivityGetRequest = {}, + options?: RawAxiosRequestConfig, + ) { return DefaultApiFp(this.configuration) - .getOrganizationWithAuthn(options) + .listActivityEventsV2DeprecatedActivityGet( + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.actorType, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get Organization With Authz + * @summary List Activity Types + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + public listActivityTypesV2DeprecatedActivityTypesGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration) + .listActivityTypesV2DeprecatedActivityTypesGet(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches all API History events for given filters. + * @summary List Api Events + * @param {DefaultApiListApiEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi + * @deprecated + * @throws If a required parameter is missing. */ - public getOrganizationWithAuthz(options?: AxiosRequestConfig) { + public listApiEvents( + requestParameters: DefaultApiListApiEventsRequest = {}, + options?: RawAxiosRequestConfig, + ) { return DefaultApiFp(this.configuration) - .getOrganizationWithAuthz(options) + .listApiEvents( + requestParameters.method, + requestParameters.path, + requestParameters.success, + requestParameters.statusCode, + requestParameters.clientIp, + requestParameters.actorType, + requestParameters.actorId, + requestParameters.actorDisplayName, + requestParameters.projectId, + requestParameters.envId, + requestParameters.timestampFrom, + requestParameters.timestampUntil, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(this.axios, this.basePath)); } } diff --git a/src/openapi/api/elements-configs-api.ts b/src/openapi/api/elements-configs-eapapi.ts similarity index 53% rename from src/openapi/api/elements-configs-api.ts rename to src/openapi/api/elements-configs-eapapi.ts index 3893c867..c2372c94 100644 --- a/src/openapi/api/elements-configs-api.ts +++ b/src/openapi/api/elements-configs-eapapi.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,47 +10,30 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { ElementsConfigCreate } from '../types'; -// @ts-ignore -import { ElementsConfigRead } from '../types'; -// @ts-ignore -import { ElementsConfigRuntimeRead } from '../types'; -// @ts-ignore -import { ElementsConfigUpdate } from '../types'; -// @ts-ignore -import { ElementsEnvTypeRead } from '../types'; -// @ts-ignore -import { ElementsEnvTypeUpdate } from '../types'; -// @ts-ignore -import { ElementsType } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultElementsConfigRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ElementsConfigCreate, + ElementsConfigRead, + ElementsConfigRuntimeRead, + ElementsConfigUpdate, + ResponseListElementsConfigsV2ElementsProjIdEnvIdConfigGet, +} from '../types'; /** - * ElementsConfigsApi - axios parameter creator - * @export + * ElementsConfigsEAPApi - axios parameter creator */ -export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Configuration) { +export const ElementsConfigsEAPApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new elements_config under the active organization. @@ -61,13 +42,13 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsConfigCreate} elementsConfigCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createElementsConfig: async ( projId: string, envId: string, elementsConfigCreate: ElementsConfigCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createElementsConfig', 'projId', projId); @@ -76,8 +57,8 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'elementsConfigCreate' is not null or undefined assertParamExists('createElementsConfig', 'elementsConfigCreate', elementsConfigCreate); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -94,6 +75,7 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -120,13 +102,13 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteElementsConfig: async ( elementsConfigId: string, projId: string, envId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'elementsConfigId' is not null or undefined assertParamExists('deleteElementsConfig', 'elementsConfigId', elementsConfigId); @@ -135,9 +117,9 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'envId' is not null or undefined assertParamExists('deleteElementsConfig', 'envId', envId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/{elements_config_id}` - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -153,6 +135,8 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -169,28 +153,28 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getElementsConfig: async ( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('getElementsConfig', 'elementsConfigId', elementsConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('getElementsConfig', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getElementsConfig', 'envId', envId); - // verify required parameter 'elementsConfigId' is not null or undefined - assertParamExists('getElementsConfig', 'elementsConfigId', elementsConfigId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -206,6 +190,8 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -222,28 +208,30 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config Runtime + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getElementsConfigRuntime: async ( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('getElementsConfigRuntime', 'elementsConfigId', elementsConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('getElementsConfigRuntime', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getElementsConfigRuntime', 'envId', envId); - // verify required parameter 'elementsConfigId' is not null or undefined - assertParamExists('getElementsConfigRuntime', 'elementsConfigId', elementsConfigId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/runtime` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -259,58 +247,11 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Elements Type Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsType} elementType Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getElementsTypeConfig: async ( - projId: string, - envId: string, - elementType: ElementsType, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('getElementsTypeConfig', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getElementsTypeConfig', 'envId', envId); - // verify required parameter 'elementType' is not null or undefined - assertParamExists('getElementsTypeConfig', 'elementType', elementType); - const localVarPath = `/v2/elements/{proj_id}/{env_id}/{element_type}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'element_type'}}`, encodeURIComponent(String(elementType))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -333,22 +274,22 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listElementsConfigs: async ( projId: string, envId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listElementsConfigs', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listElementsConfigs', 'envId', envId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -372,6 +313,8 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -393,14 +336,14 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsConfigUpdate} elementsConfigUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateElementsConfig: async ( elementsConfigId: string, projId: string, envId: string, elementsConfigUpdate: ElementsConfigUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'elementsConfigId' is not null or undefined assertParamExists('updateElementsConfig', 'elementsConfigId', elementsConfigId); @@ -411,9 +354,9 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'elementsConfigUpdate' is not null or undefined assertParamExists('updateElementsConfig', 'elementsConfigUpdate', elementsConfigUpdate); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}` - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -430,6 +373,7 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -444,74 +388,6 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con configuration, ); - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Update Elements Type Permissions - * @param {ElementsType} elementType Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsEnvTypeUpdate} elementsEnvTypeUpdate - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateElementsTypePermissions: async ( - elementType: ElementsType, - projId: string, - envId: string, - elementsEnvTypeUpdate: ElementsEnvTypeUpdate, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'elementType' is not null or undefined - assertParamExists('updateElementsTypePermissions', 'elementType', elementType); - // verify required parameter 'projId' is not null or undefined - assertParamExists('updateElementsTypePermissions', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('updateElementsTypePermissions', 'envId', envId); - // verify required parameter 'elementsEnvTypeUpdate' is not null or undefined - assertParamExists( - 'updateElementsTypePermissions', - 'elementsEnvTypeUpdate', - elementsEnvTypeUpdate, - ); - const localVarPath = `/v2/elements/{proj_id}/{env_id}/{element_type}` - .replace(`{${'element_type'}}`, encodeURIComponent(String(elementType))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - elementsEnvTypeUpdate, - localVarRequestOptions, - configuration, - ); - return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -521,11 +397,10 @@ export const ElementsConfigsApiAxiosParamCreator = function (configuration?: Con }; /** - * ElementsConfigsApi - functional programming interface - * @export + * ElementsConfigsEAPApi - functional programming interface */ -export const ElementsConfigsApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = ElementsConfigsApiAxiosParamCreator(configuration); +export const ElementsConfigsEAPApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ElementsConfigsEAPApiAxiosParamCreator(configuration); return { /** * Creates a new elements_config under the active organization. @@ -534,13 +409,13 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsConfigCreate} elementsConfigCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createElementsConfig( projId: string, envId: string, elementsConfigCreate: ElementsConfigCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createElementsConfig( projId, @@ -548,7 +423,18 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { elementsConfigCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ElementsConfigsEAPApi.createElementsConfig']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the elements_config and all its related data. @@ -557,13 +443,13 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteElementsConfig( elementsConfigId: string, projId: string, envId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteElementsConfig( elementsConfigId, @@ -571,78 +457,91 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ElementsConfigsEAPApi.deleteElementsConfig']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getElementsConfig( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getElementsConfig( + elementsConfigId, projId, envId, - elementsConfigId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ElementsConfigsEAPApi.getElementsConfig']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config Runtime + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getElementsConfigRuntime( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, - options?: AxiosRequestConfig, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getElementsConfigRuntime( - projId, - envId, elementsConfigId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Elements Type Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsType} elementType Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getElementsTypeConfig( - projId: string, - envId: string, - elementType: ElementsType, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getElementsTypeConfig( projId, envId, - elementType, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ElementsConfigsEAPApi.getElementsConfigRuntime']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the elements_configs under the active organization. @@ -652,16 +551,19 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listElementsConfigs( projId: string, envId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listElementsConfigs( projId, @@ -670,7 +572,18 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ElementsConfigsEAPApi.listElementsConfigs']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the elements_config. @@ -680,14 +593,14 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsConfigUpdate} elementsConfigUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateElementsConfig( elementsConfigId: string, projId: string, envId: string, elementsConfigUpdate: ElementsConfigUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateElementsConfig( elementsConfigId, @@ -696,474 +609,303 @@ export const ElementsConfigsApiFp = function (configuration?: Configuration) { elementsConfigUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Update Elements Type Permissions - * @param {ElementsType} elementType Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsEnvTypeUpdate} elementsEnvTypeUpdate - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateElementsTypePermissions( - elementType: ElementsType, - projId: string, - envId: string, - elementsEnvTypeUpdate: ElementsEnvTypeUpdate, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateElementsTypePermissions( - elementType, - projId, - envId, - elementsEnvTypeUpdate, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ElementsConfigsEAPApi.updateElementsConfig']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** - * ElementsConfigsApi - factory interface - * @export + * ElementsConfigsEAPApi - factory interface */ -export const ElementsConfigsApiFactory = function ( +export const ElementsConfigsEAPApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { - const localVarFp = ElementsConfigsApiFp(configuration); + const localVarFp = ElementsConfigsEAPApiFp(configuration); return { /** * Creates a new elements_config under the active organization. * @summary Create Elements Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsConfigCreate} elementsConfigCreate + * @param {ElementsConfigsEAPApiCreateElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createElementsConfig( - projId: string, - envId: string, - elementsConfigCreate: ElementsConfigCreate, - options?: any, + requestParameters: ElementsConfigsEAPApiCreateElementsConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createElementsConfig(projId, envId, elementsConfigCreate, options) + .createElementsConfig( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the elements_config and all its related data. * @summary Delete Elements Config - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsConfigsEAPApiDeleteElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteElementsConfig( - elementsConfigId: string, - projId: string, - envId: string, - options?: any, + requestParameters: ElementsConfigsEAPApiDeleteElementsConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteElementsConfig(elementsConfigId, projId, envId, options) + .deleteElementsConfig( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {ElementsConfigsEAPApiGetElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getElementsConfig( - projId: string, - envId: string, - elementsConfigId: string, - options?: any, + requestParameters: ElementsConfigsEAPApiGetElementsConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getElementsConfig(projId, envId, elementsConfigId, options) + .getElementsConfig( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config Runtime - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {ElementsConfigsEAPApiGetElementsConfigRuntimeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getElementsConfigRuntime( - projId: string, - envId: string, - elementsConfigId: string, - options?: any, + requestParameters: ElementsConfigsEAPApiGetElementsConfigRuntimeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getElementsConfigRuntime(projId, envId, elementsConfigId, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Elements Type Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsType} elementType Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getElementsTypeConfig( - projId: string, - envId: string, - elementType: ElementsType, - options?: any, - ): AxiosPromise { - return localVarFp - .getElementsTypeConfig(projId, envId, elementType, options) + .getElementsConfigRuntime( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceInstanceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the elements_configs under the active organization. * @summary List Elements Configs - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ElementsConfigsEAPApiListElementsConfigsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listElementsConfigs( - projId: string, - envId: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise { + requestParameters: ElementsConfigsEAPApiListElementsConfigsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listElementsConfigs(projId, envId, page, perPage, options) + .listElementsConfigs( + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Updates the elements_config. * @summary Update Elements Config - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsConfigUpdate} elementsConfigUpdate + * @param {ElementsConfigsEAPApiUpdateElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateElementsConfig( - elementsConfigId: string, - projId: string, - envId: string, - elementsConfigUpdate: ElementsConfigUpdate, - options?: any, + requestParameters: ElementsConfigsEAPApiUpdateElementsConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateElementsConfig(elementsConfigId, projId, envId, elementsConfigUpdate, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Update Elements Type Permissions - * @param {ElementsType} elementType Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ElementsEnvTypeUpdate} elementsEnvTypeUpdate - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateElementsTypePermissions( - elementType: ElementsType, - projId: string, - envId: string, - elementsEnvTypeUpdate: ElementsEnvTypeUpdate, - options?: any, - ): AxiosPromise { - return localVarFp - .updateElementsTypePermissions(elementType, projId, envId, elementsEnvTypeUpdate, options) + .updateElementsConfig( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for createElementsConfig operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiCreateElementsConfigRequest + * Request parameters for createElementsConfig operation in ElementsConfigsEAPApi. */ -export interface ElementsConfigsApiCreateElementsConfigRequest { +export interface ElementsConfigsEAPApiCreateElementsConfigRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiCreateElementsConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiCreateElementsConfig */ readonly envId: string; - /** - * - * @type {ElementsConfigCreate} - * @memberof ElementsConfigsApiCreateElementsConfig - */ readonly elementsConfigCreate: ElementsConfigCreate; } /** - * Request parameters for deleteElementsConfig operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiDeleteElementsConfigRequest + * Request parameters for deleteElementsConfig operation in ElementsConfigsEAPApi. */ -export interface ElementsConfigsApiDeleteElementsConfigRequest { +export interface ElementsConfigsEAPApiDeleteElementsConfigRequest { /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiDeleteElementsConfig */ readonly elementsConfigId: string; /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiDeleteElementsConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiDeleteElementsConfig */ readonly envId: string; } /** - * Request parameters for getElementsConfig operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiGetElementsConfigRequest + * Request parameters for getElementsConfig operation in ElementsConfigsEAPApi. */ -export interface ElementsConfigsApiGetElementsConfigRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsConfig - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsConfig - */ - readonly envId: string; - +export interface ElementsConfigsEAPApiGetElementsConfigRequest { /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsConfig */ readonly elementsConfigId: string; -} -/** - * Request parameters for getElementsConfigRuntime operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiGetElementsConfigRuntimeRequest - */ -export interface ElementsConfigsApiGetElementsConfigRuntimeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsConfigRuntime */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsConfigRuntime */ readonly envId: string; +} +/** + * Request parameters for getElementsConfigRuntime operation in ElementsConfigsEAPApi. + */ +export interface ElementsConfigsEAPApiGetElementsConfigRuntimeRequest { /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsConfigRuntime */ readonly elementsConfigId: string; -} -/** - * Request parameters for getElementsTypeConfig operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiGetElementsTypeConfigRequest - */ -export interface ElementsConfigsApiGetElementsTypeConfigRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsTypeConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiGetElementsTypeConfig */ readonly envId: string; /** - * Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @type {ElementsType} - * @memberof ElementsConfigsApiGetElementsTypeConfig + * For ReBAC Elements, the resource instance ID or key to work on */ - readonly elementType: ElementsType; + readonly resourceInstanceId?: string; } /** - * Request parameters for listElementsConfigs operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiListElementsConfigsRequest + * Request parameters for listElementsConfigs operation in ElementsConfigsEAPApi. */ -export interface ElementsConfigsApiListElementsConfigsRequest { +export interface ElementsConfigsEAPApiListElementsConfigsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiListElementsConfigs */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiListElementsConfigs */ readonly envId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ElementsConfigsApiListElementsConfigs */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ElementsConfigsApiListElementsConfigs */ readonly perPage?: number; } /** - * Request parameters for updateElementsConfig operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiUpdateElementsConfigRequest + * Request parameters for updateElementsConfig operation in ElementsConfigsEAPApi. */ -export interface ElementsConfigsApiUpdateElementsConfigRequest { +export interface ElementsConfigsEAPApiUpdateElementsConfigRequest { /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiUpdateElementsConfig */ readonly elementsConfigId: string; /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiUpdateElementsConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiUpdateElementsConfig */ readonly envId: string; - /** - * - * @type {ElementsConfigUpdate} - * @memberof ElementsConfigsApiUpdateElementsConfig - */ readonly elementsConfigUpdate: ElementsConfigUpdate; } /** - * Request parameters for updateElementsTypePermissions operation in ElementsConfigsApi. - * @export - * @interface ElementsConfigsApiUpdateElementsTypePermissionsRequest + * ElementsConfigsEAPApi - object-oriented interface */ -export interface ElementsConfigsApiUpdateElementsTypePermissionsRequest { - /** - * Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the \"slug\"). - * @type {ElementsType} - * @memberof ElementsConfigsApiUpdateElementsTypePermissions - */ - readonly elementType: ElementsType; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiUpdateElementsTypePermissions - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ElementsConfigsApiUpdateElementsTypePermissions - */ - readonly envId: string; - - /** - * - * @type {ElementsEnvTypeUpdate} - * @memberof ElementsConfigsApiUpdateElementsTypePermissions - */ - readonly elementsEnvTypeUpdate: ElementsEnvTypeUpdate; -} - -/** - * ElementsConfigsApi - object-oriented interface - * @export - * @class ElementsConfigsApi - * @extends {BaseAPI} - */ -export class ElementsConfigsApi extends BaseAPI { +export class ElementsConfigsEAPApi extends BaseAPI { /** * Creates a new elements_config under the active organization. * @summary Create Elements Config - * @param {ElementsConfigsApiCreateElementsConfigRequest} requestParameters Request parameters. + * @param {ElementsConfigsEAPApiCreateElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi + * @throws If a required parameter is missing. */ public createElementsConfig( - requestParameters: ElementsConfigsApiCreateElementsConfigRequest, - options?: AxiosRequestConfig, + requestParameters: ElementsConfigsEAPApiCreateElementsConfigRequest, + options?: RawAxiosRequestConfig, ) { - return ElementsConfigsApiFp(this.configuration) + return ElementsConfigsEAPApiFp(this.configuration) .createElementsConfig( requestParameters.projId, requestParameters.envId, @@ -1176,16 +918,15 @@ export class ElementsConfigsApi extends BaseAPI { /** * Deletes the elements_config and all its related data. * @summary Delete Elements Config - * @param {ElementsConfigsApiDeleteElementsConfigRequest} requestParameters Request parameters. + * @param {ElementsConfigsEAPApiDeleteElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi + * @throws If a required parameter is missing. */ public deleteElementsConfig( - requestParameters: ElementsConfigsApiDeleteElementsConfigRequest, - options?: AxiosRequestConfig, + requestParameters: ElementsConfigsEAPApiDeleteElementsConfigRequest, + options?: RawAxiosRequestConfig, ) { - return ElementsConfigsApiFp(this.configuration) + return ElementsConfigsEAPApiFp(this.configuration) .deleteElementsConfig( requestParameters.elementsConfigId, requestParameters.projId, @@ -1198,20 +939,19 @@ export class ElementsConfigsApi extends BaseAPI { /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config - * @param {ElementsConfigsApiGetElementsConfigRequest} requestParameters Request parameters. + * @param {ElementsConfigsEAPApiGetElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi + * @throws If a required parameter is missing. */ public getElementsConfig( - requestParameters: ElementsConfigsApiGetElementsConfigRequest, - options?: AxiosRequestConfig, + requestParameters: ElementsConfigsEAPApiGetElementsConfigRequest, + options?: RawAxiosRequestConfig, ) { - return ElementsConfigsApiFp(this.configuration) + return ElementsConfigsEAPApiFp(this.configuration) .getElementsConfig( + requestParameters.elementsConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.elementsConfigId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1220,42 +960,20 @@ export class ElementsConfigsApi extends BaseAPI { /** * Gets a single elements_config matching the given elements_config_id, if such elements_config exists. * @summary Get Elements Config Runtime - * @param {ElementsConfigsApiGetElementsConfigRuntimeRequest} requestParameters Request parameters. + * @param {ElementsConfigsEAPApiGetElementsConfigRuntimeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi + * @throws If a required parameter is missing. */ public getElementsConfigRuntime( - requestParameters: ElementsConfigsApiGetElementsConfigRuntimeRequest, - options?: AxiosRequestConfig, + requestParameters: ElementsConfigsEAPApiGetElementsConfigRuntimeRequest, + options?: RawAxiosRequestConfig, ) { - return ElementsConfigsApiFp(this.configuration) + return ElementsConfigsEAPApiFp(this.configuration) .getElementsConfigRuntime( - requestParameters.projId, - requestParameters.envId, requestParameters.elementsConfigId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Elements Type Config - * @param {ElementsConfigsApiGetElementsTypeConfigRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi - */ - public getElementsTypeConfig( - requestParameters: ElementsConfigsApiGetElementsTypeConfigRequest, - options?: AxiosRequestConfig, - ) { - return ElementsConfigsApiFp(this.configuration) - .getElementsTypeConfig( requestParameters.projId, requestParameters.envId, - requestParameters.elementType, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1264,16 +982,15 @@ export class ElementsConfigsApi extends BaseAPI { /** * Lists all the elements_configs under the active organization. * @summary List Elements Configs - * @param {ElementsConfigsApiListElementsConfigsRequest} requestParameters Request parameters. + * @param {ElementsConfigsEAPApiListElementsConfigsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi + * @throws If a required parameter is missing. */ public listElementsConfigs( - requestParameters: ElementsConfigsApiListElementsConfigsRequest, - options?: AxiosRequestConfig, + requestParameters: ElementsConfigsEAPApiListElementsConfigsRequest, + options?: RawAxiosRequestConfig, ) { - return ElementsConfigsApiFp(this.configuration) + return ElementsConfigsEAPApiFp(this.configuration) .listElementsConfigs( requestParameters.projId, requestParameters.envId, @@ -1287,16 +1004,15 @@ export class ElementsConfigsApi extends BaseAPI { /** * Updates the elements_config. * @summary Update Elements Config - * @param {ElementsConfigsApiUpdateElementsConfigRequest} requestParameters Request parameters. + * @param {ElementsConfigsEAPApiUpdateElementsConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi + * @throws If a required parameter is missing. */ public updateElementsConfig( - requestParameters: ElementsConfigsApiUpdateElementsConfigRequest, - options?: AxiosRequestConfig, + requestParameters: ElementsConfigsEAPApiUpdateElementsConfigRequest, + options?: RawAxiosRequestConfig, ) { - return ElementsConfigsApiFp(this.configuration) + return ElementsConfigsEAPApiFp(this.configuration) .updateElementsConfig( requestParameters.elementsConfigId, requestParameters.projId, @@ -1306,27 +1022,4 @@ export class ElementsConfigsApi extends BaseAPI { ) .then((request) => request(this.axios, this.basePath)); } - - /** - * - * @summary Update Elements Type Permissions - * @param {ElementsConfigsApiUpdateElementsTypePermissionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ElementsConfigsApi - */ - public updateElementsTypePermissions( - requestParameters: ElementsConfigsApiUpdateElementsTypePermissionsRequest, - options?: AxiosRequestConfig, - ) { - return ElementsConfigsApiFp(this.configuration) - .updateElementsTypePermissions( - requestParameters.elementType, - requestParameters.projId, - requestParameters.envId, - requestParameters.elementsEnvTypeUpdate, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } } diff --git a/src/openapi/api/email-configurations-api.ts b/src/openapi/api/email-configurations-api.ts new file mode 100644 index 00000000..6e2ad399 --- /dev/null +++ b/src/openapi/api/email-configurations-api.ts @@ -0,0 +1,494 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { EmailConfigurationCreate, EmailConfigurationRead } from '../types'; +/** + * EmailConfigurationsApi - axios parameter creator + */ +export const EmailConfigurationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create new configuration or updates the email configuration + * @summary Create Or Update Email Configuration + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailConfigurationCreate} emailConfigurationCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createOrUpdateEmailConfiguration: async ( + projId: string, + envId: string, + emailConfigurationCreate: EmailConfigurationCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('createOrUpdateEmailConfiguration', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('createOrUpdateEmailConfiguration', 'envId', envId); + // verify required parameter 'emailConfigurationCreate' is not null or undefined + assertParamExists( + 'createOrUpdateEmailConfiguration', + 'emailConfigurationCreate', + emailConfigurationCreate, + ); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/email_configurations` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + emailConfigurationCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets the email configuration defined within an environment. + * @summary Get Email Configuration + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getEmailConfiguration: async ( + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('getEmailConfiguration', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getEmailConfiguration', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/email_configurations` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a test email to the email address defined in the user. + * @summary Send Test Email + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailConfigurationCreate} emailConfigurationCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + sendTestEmail: async ( + projId: string, + envId: string, + emailConfigurationCreate: EmailConfigurationCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('sendTestEmail', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('sendTestEmail', 'envId', envId); + // verify required parameter 'emailConfigurationCreate' is not null or undefined + assertParamExists('sendTestEmail', 'emailConfigurationCreate', emailConfigurationCreate); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/email_configurations/send_test_email` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + emailConfigurationCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * EmailConfigurationsApi - functional programming interface + */ +export const EmailConfigurationsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = EmailConfigurationsApiAxiosParamCreator(configuration); + return { + /** + * Create new configuration or updates the email configuration + * @summary Create Or Update Email Configuration + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailConfigurationCreate} emailConfigurationCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createOrUpdateEmailConfiguration( + projId: string, + envId: string, + emailConfigurationCreate: EmailConfigurationCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateEmailConfiguration( + projId, + envId, + emailConfigurationCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailConfigurationsApi.createOrUpdateEmailConfiguration']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Gets the email configuration defined within an environment. + * @summary Get Email Configuration + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getEmailConfiguration( + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailConfiguration( + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailConfigurationsApi.getEmailConfiguration']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Sends a test email to the email address defined in the user. + * @summary Send Test Email + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailConfigurationCreate} emailConfigurationCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async sendTestEmail( + projId: string, + envId: string, + emailConfigurationCreate: EmailConfigurationCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.sendTestEmail( + projId, + envId, + emailConfigurationCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailConfigurationsApi.sendTestEmail']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * EmailConfigurationsApi - factory interface + */ +export const EmailConfigurationsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = EmailConfigurationsApiFp(configuration); + return { + /** + * Create new configuration or updates the email configuration + * @summary Create Or Update Email Configuration + * @param {EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createOrUpdateEmailConfiguration( + requestParameters: EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createOrUpdateEmailConfiguration( + requestParameters.projId, + requestParameters.envId, + requestParameters.emailConfigurationCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Gets the email configuration defined within an environment. + * @summary Get Email Configuration + * @param {EmailConfigurationsApiGetEmailConfigurationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getEmailConfiguration( + requestParameters: EmailConfigurationsApiGetEmailConfigurationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getEmailConfiguration(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Sends a test email to the email address defined in the user. + * @summary Send Test Email + * @param {EmailConfigurationsApiSendTestEmailRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + sendTestEmail( + requestParameters: EmailConfigurationsApiSendTestEmailRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .sendTestEmail( + requestParameters.projId, + requestParameters.envId, + requestParameters.emailConfigurationCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for createOrUpdateEmailConfiguration operation in EmailConfigurationsApi. + */ +export interface EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly emailConfigurationCreate: EmailConfigurationCreate; +} + +/** + * Request parameters for getEmailConfiguration operation in EmailConfigurationsApi. + */ +export interface EmailConfigurationsApiGetEmailConfigurationRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; +} + +/** + * Request parameters for sendTestEmail operation in EmailConfigurationsApi. + */ +export interface EmailConfigurationsApiSendTestEmailRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly emailConfigurationCreate: EmailConfigurationCreate; +} + +/** + * EmailConfigurationsApi - object-oriented interface + */ +export class EmailConfigurationsApi extends BaseAPI { + /** + * Create new configuration or updates the email configuration + * @summary Create Or Update Email Configuration + * @param {EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createOrUpdateEmailConfiguration( + requestParameters: EmailConfigurationsApiCreateOrUpdateEmailConfigurationRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailConfigurationsApiFp(this.configuration) + .createOrUpdateEmailConfiguration( + requestParameters.projId, + requestParameters.envId, + requestParameters.emailConfigurationCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets the email configuration defined within an environment. + * @summary Get Email Configuration + * @param {EmailConfigurationsApiGetEmailConfigurationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getEmailConfiguration( + requestParameters: EmailConfigurationsApiGetEmailConfigurationRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailConfigurationsApiFp(this.configuration) + .getEmailConfiguration(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a test email to the email address defined in the user. + * @summary Send Test Email + * @param {EmailConfigurationsApiSendTestEmailRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public sendTestEmail( + requestParameters: EmailConfigurationsApiSendTestEmailRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailConfigurationsApiFp(this.configuration) + .sendTestEmail( + requestParameters.projId, + requestParameters.envId, + requestParameters.emailConfigurationCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/email-templates-api.ts b/src/openapi/api/email-templates-api.ts new file mode 100644 index 00000000..11074599 --- /dev/null +++ b/src/openapi/api/email-templates-api.ts @@ -0,0 +1,700 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { EmailTemplateRead, EmailTemplateType, EmailTemplateUpdate } from '../types'; +/** + * EmailTemplatesApi - axios parameter creator + */ +export const EmailTemplatesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Lists all the email configurations defined within an environment. + * @summary Get Template By Type + * @param {EmailTemplateType} templateType + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getTemplateByType: async ( + templateType: EmailTemplateType, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateType' is not null or undefined + assertParamExists('getTemplateByType', 'templateType', templateType); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getTemplateByType', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getTemplateByType', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}` + .replace('{template_type}', encodeURIComponent(String(templateType))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists all the email configurations defined within an environment. + * @summary List Templates + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listTemplates: async ( + projId: string, + envId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listTemplates', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listTemplates', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/email_templates/` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Send Test Email By Type + * @param {EmailTemplateType} templateType + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailTemplateUpdate} emailTemplateUpdate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + sendTestEmailByType: async ( + templateType: EmailTemplateType, + projId: string, + envId: string, + emailTemplateUpdate: EmailTemplateUpdate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateType' is not null or undefined + assertParamExists('sendTestEmailByType', 'templateType', templateType); + // verify required parameter 'projId' is not null or undefined + assertParamExists('sendTestEmailByType', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('sendTestEmailByType', 'envId', envId); + // verify required parameter 'emailTemplateUpdate' is not null or undefined + assertParamExists('sendTestEmailByType', 'emailTemplateUpdate', emailTemplateUpdate); + const localVarPath = + `/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}/send_test_email` + .replace('{template_type}', encodeURIComponent(String(templateType))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + emailTemplateUpdate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates an email template by a given type. + * @summary Update Template By Type + * @param {EmailTemplateType} templateType + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailTemplateUpdate} emailTemplateUpdate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateTemplateByType: async ( + templateType: EmailTemplateType, + projId: string, + envId: string, + emailTemplateUpdate: EmailTemplateUpdate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateType' is not null or undefined + assertParamExists('updateTemplateByType', 'templateType', templateType); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateTemplateByType', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateTemplateByType', 'envId', envId); + // verify required parameter 'emailTemplateUpdate' is not null or undefined + assertParamExists('updateTemplateByType', 'emailTemplateUpdate', emailTemplateUpdate); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/email_templates/{template_type}` + .replace('{template_type}', encodeURIComponent(String(templateType))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + emailTemplateUpdate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * EmailTemplatesApi - functional programming interface + */ +export const EmailTemplatesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = EmailTemplatesApiAxiosParamCreator(configuration); + return { + /** + * Lists all the email configurations defined within an environment. + * @summary Get Template By Type + * @param {EmailTemplateType} templateType + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getTemplateByType( + templateType: EmailTemplateType, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTemplateByType( + templateType, + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailTemplatesApi.getTemplateByType']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists all the email configurations defined within an environment. + * @summary List Templates + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listTemplates( + projId: string, + envId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTemplates( + projId, + envId, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailTemplatesApi.listTemplates']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Send Test Email By Type + * @param {EmailTemplateType} templateType + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailTemplateUpdate} emailTemplateUpdate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async sendTestEmailByType( + templateType: EmailTemplateType, + projId: string, + envId: string, + emailTemplateUpdate: EmailTemplateUpdate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.sendTestEmailByType( + templateType, + projId, + envId, + emailTemplateUpdate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailTemplatesApi.sendTestEmailByType']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates an email template by a given type. + * @summary Update Template By Type + * @param {EmailTemplateType} templateType + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EmailTemplateUpdate} emailTemplateUpdate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async updateTemplateByType( + templateType: EmailTemplateType, + projId: string, + envId: string, + emailTemplateUpdate: EmailTemplateUpdate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTemplateByType( + templateType, + projId, + envId, + emailTemplateUpdate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EmailTemplatesApi.updateTemplateByType']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * EmailTemplatesApi - factory interface + */ +export const EmailTemplatesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = EmailTemplatesApiFp(configuration); + return { + /** + * Lists all the email configurations defined within an environment. + * @summary Get Template By Type + * @param {EmailTemplatesApiGetTemplateByTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getTemplateByType( + requestParameters: EmailTemplatesApiGetTemplateByTypeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTemplateByType( + requestParameters.templateType, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Lists all the email configurations defined within an environment. + * @summary List Templates + * @param {EmailTemplatesApiListTemplatesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listTemplates( + requestParameters: EmailTemplatesApiListTemplatesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listTemplates( + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Send Test Email By Type + * @param {EmailTemplatesApiSendTestEmailByTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + sendTestEmailByType( + requestParameters: EmailTemplatesApiSendTestEmailByTypeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .sendTestEmailByType( + requestParameters.templateType, + requestParameters.projId, + requestParameters.envId, + requestParameters.emailTemplateUpdate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Updates an email template by a given type. + * @summary Update Template By Type + * @param {EmailTemplatesApiUpdateTemplateByTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateTemplateByType( + requestParameters: EmailTemplatesApiUpdateTemplateByTypeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateTemplateByType( + requestParameters.templateType, + requestParameters.projId, + requestParameters.envId, + requestParameters.emailTemplateUpdate, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getTemplateByType operation in EmailTemplatesApi. + */ +export interface EmailTemplatesApiGetTemplateByTypeRequest { + readonly templateType: EmailTemplateType; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; +} + +/** + * Request parameters for listTemplates operation in EmailTemplatesApi. + */ +export interface EmailTemplatesApiListTemplatesRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for sendTestEmailByType operation in EmailTemplatesApi. + */ +export interface EmailTemplatesApiSendTestEmailByTypeRequest { + readonly templateType: EmailTemplateType; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly emailTemplateUpdate: EmailTemplateUpdate; +} + +/** + * Request parameters for updateTemplateByType operation in EmailTemplatesApi. + */ +export interface EmailTemplatesApiUpdateTemplateByTypeRequest { + readonly templateType: EmailTemplateType; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly emailTemplateUpdate: EmailTemplateUpdate; +} + +/** + * EmailTemplatesApi - object-oriented interface + */ +export class EmailTemplatesApi extends BaseAPI { + /** + * Lists all the email configurations defined within an environment. + * @summary Get Template By Type + * @param {EmailTemplatesApiGetTemplateByTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getTemplateByType( + requestParameters: EmailTemplatesApiGetTemplateByTypeRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailTemplatesApiFp(this.configuration) + .getTemplateByType( + requestParameters.templateType, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists all the email configurations defined within an environment. + * @summary List Templates + * @param {EmailTemplatesApiListTemplatesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listTemplates( + requestParameters: EmailTemplatesApiListTemplatesRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailTemplatesApiFp(this.configuration) + .listTemplates( + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Send Test Email By Type + * @param {EmailTemplatesApiSendTestEmailByTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public sendTestEmailByType( + requestParameters: EmailTemplatesApiSendTestEmailByTypeRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailTemplatesApiFp(this.configuration) + .sendTestEmailByType( + requestParameters.templateType, + requestParameters.projId, + requestParameters.envId, + requestParameters.emailTemplateUpdate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an email template by a given type. + * @summary Update Template By Type + * @param {EmailTemplatesApiUpdateTemplateByTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public updateTemplateByType( + requestParameters: EmailTemplatesApiUpdateTemplateByTypeRequest, + options?: RawAxiosRequestConfig, + ) { + return EmailTemplatesApiFp(this.configuration) + .updateTemplateByType( + requestParameters.templateType, + requestParameters.projId, + requestParameters.envId, + requestParameters.emailTemplateUpdate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/environments-api.ts b/src/openapi/api/environments-api.ts index db5b99f3..f11c69ea 100644 --- a/src/openapi/api/environments-api.ts +++ b/src/openapi/api/environments-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,39 +10,30 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { EnvironmentCopy } from '../types'; -// @ts-ignore -import { EnvironmentCreate } from '../types'; -// @ts-ignore -import { EnvironmentRead } from '../types'; -// @ts-ignore -import { EnvironmentStats } from '../types'; -// @ts-ignore -import { EnvironmentUpdate } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; +import type { Configuration } from '../configuration'; +import type { + EnvironmentCopy, + EnvironmentCreate, + EnvironmentRead, + EnvironmentReadWithEmailConfig, + EnvironmentStats, + EnvironmentUpdate, + TaskResultEnvironmentRead, +} from '../types'; /** * EnvironmentsApi - axios parameter creator - * @export */ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -55,13 +44,13 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {EnvironmentCopy} environmentCopy * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ copyEnvironment: async ( projId: string, envId: string, environmentCopy: EnvironmentCopy, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('copyEnvironment', 'projId', projId); @@ -70,8 +59,70 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // verify required parameter 'environmentCopy' is not null or undefined assertParamExists('copyEnvironment', 'environmentCopy', environmentCopy); const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}/copy` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + environmentCopy, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. + * @summary Copy Environment Async + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EnvironmentCopy} environmentCopy + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + copyEnvironmentAsync: async ( + projId: string, + envId: string, + environmentCopy: EnvironmentCopy, + wait?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('copyEnvironmentAsync', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('copyEnvironmentAsync', 'envId', envId); + // verify required parameter 'environmentCopy' is not null or undefined + assertParamExists('copyEnvironmentAsync', 'environmentCopy', environmentCopy); + const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}/copy/async` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -87,7 +138,12 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (wait !== undefined) { + localVarQueryParameter['wait'] = wait; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -113,19 +169,19 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {EnvironmentCreate} environmentCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createEnvironment: async ( projId: string, environmentCreate: EnvironmentCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createEnvironment', 'projId', projId); // verify required parameter 'environmentCreate' is not null or undefined assertParamExists('createEnvironment', 'environmentCreate', environmentCreate); const localVarPath = `/v2/projects/{proj_id}/envs`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -144,6 +200,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -169,20 +226,20 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteEnvironment: async ( projId: string, envId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('deleteEnvironment', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteEnvironment', 'envId', envId); const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -198,6 +255,69 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the result of a copy environment task. + * @summary Get Copy Environment Task Result + * @param {string} taskId The unique id of the task. + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getCopyEnvironmentAsyncResult: async ( + taskId: string, + projId: string, + envId: string, + wait?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'taskId' is not null or undefined + assertParamExists('getCopyEnvironmentAsyncResult', 'taskId', taskId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getCopyEnvironmentAsyncResult', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getCopyEnvironmentAsyncResult', 'envId', envId); + const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}/copy/async/{task_id}/result` + .replace('{task_id}', encodeURIComponent(String(taskId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (wait !== undefined) { + localVarQueryParameter['wait'] = wait; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -217,20 +337,20 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getEnvironment: async ( projId: string, envId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getEnvironment', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getEnvironment', 'envId', envId); const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -246,6 +366,8 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -266,18 +388,18 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listEnvironments: async ( projId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listEnvironments', 'projId', projId); const localVarPath = `/v2/projects/{proj_id}/envs`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -303,6 +425,8 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -322,20 +446,20 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ statsEnvironments: async ( projId: string, envId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('statsEnvironments', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('statsEnvironments', 'envId', envId); const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}/stats` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -351,6 +475,64 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Test Jwks Url. + * @summary Test Jwks By Url + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [url] URL of JWKs to test + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + testJwksByUrl: async ( + projId: string, + envId: string, + url?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('testJwksByUrl', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('testJwksByUrl', 'envId', envId); + const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}/test_jwks` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (url !== undefined) { + localVarQueryParameter['url'] = url; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -371,13 +553,13 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {EnvironmentUpdate} environmentUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateEnvironment: async ( projId: string, envId: string, environmentUpdate: EnvironmentUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('updateEnvironment', 'projId', projId); @@ -386,8 +568,8 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // verify required parameter 'environmentUpdate' is not null or undefined assertParamExists('updateEnvironment', 'environmentUpdate', environmentUpdate); const localVarPath = `/v2/projects/{proj_id}/envs/{env_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -404,6 +586,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -428,7 +611,6 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config /** * EnvironmentsApi - functional programming interface - * @export */ export const EnvironmentsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = EnvironmentsApiAxiosParamCreator(configuration); @@ -440,13 +622,13 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {EnvironmentCopy} environmentCopy * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async copyEnvironment( projId: string, envId: string, environmentCopy: EnvironmentCopy, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.copyEnvironment( projId, @@ -454,7 +636,54 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { environmentCopy, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.copyEnvironment']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. + * @summary Copy Environment Async + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EnvironmentCopy} environmentCopy + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async copyEnvironmentAsync( + projId: string, + envId: string, + environmentCopy: EnvironmentCopy, + wait?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.copyEnvironmentAsync( + projId, + envId, + environmentCopy, + wait, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.copyEnvironmentAsync']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new environment under a given project. @@ -462,19 +691,29 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {EnvironmentCreate} environmentCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createEnvironment( projId: string, environmentCreate: EnvironmentCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createEnvironment( projId, environmentCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.createEnvironment']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes an environment and all its related data. @@ -482,19 +721,68 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteEnvironment( projId: string, envId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEnvironment( projId, envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.deleteEnvironment']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get the result of a copy environment task. + * @summary Get Copy Environment Task Result + * @param {string} taskId The unique id of the task. + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getCopyEnvironmentAsyncResult( + taskId: string, + projId: string, + envId: string, + wait?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCopyEnvironmentAsyncResult( + taskId, + projId, + envId, + wait, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.getCopyEnvironmentAsyncResult']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single environment matching the given env_id, if such environment exists. @@ -502,19 +790,30 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getEnvironment( projId: string, envId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { const localVarAxiosArgs = await localVarAxiosParamCreator.getEnvironment( projId, envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.getEnvironment']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the environments under a given project. @@ -523,21 +822,35 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listEnvironments( projId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { const localVarAxiosArgs = await localVarAxiosParamCreator.listEnvironments( projId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.listEnvironments']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * @@ -545,19 +858,61 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async statsEnvironments( projId: string, envId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.statsEnvironments( projId, envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.statsEnvironments']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Test Jwks Url. + * @summary Test Jwks By Url + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [url] URL of JWKs to test + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async testJwksByUrl( + projId: string, + envId: string, + url?: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testJwksByUrl( + projId, + envId, + url, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.testJwksByUrl']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the environment. @@ -566,13 +921,13 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {EnvironmentUpdate} environmentUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateEnvironment( projId: string, envId: string, environmentUpdate: EnvironmentUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateEnvironment( projId, @@ -580,14 +935,23 @@ export const EnvironmentsApiFp = function (configuration?: Configuration) { environmentUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['EnvironmentsApi.updateEnvironment']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * EnvironmentsApi - factory interface - * @export */ export const EnvironmentsApiFactory = function ( configuration?: Configuration, @@ -599,118 +963,183 @@ export const EnvironmentsApiFactory = function ( /** * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. * @summary Copy Environment - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {EnvironmentCopy} environmentCopy + * @param {EnvironmentsApiCopyEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ copyEnvironment( - projId: string, - envId: string, - environmentCopy: EnvironmentCopy, - options?: any, + requestParameters: EnvironmentsApiCopyEnvironmentRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .copyEnvironment(projId, envId, environmentCopy, options) + .copyEnvironment( + requestParameters.projId, + requestParameters.envId, + requestParameters.environmentCopy, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. + * @summary Copy Environment Async + * @param {EnvironmentsApiCopyEnvironmentAsyncRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + copyEnvironmentAsync( + requestParameters: EnvironmentsApiCopyEnvironmentAsyncRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .copyEnvironmentAsync( + requestParameters.projId, + requestParameters.envId, + requestParameters.environmentCopy, + requestParameters.wait, + options, + ) .then((request) => request(axios, basePath)); }, /** * Creates a new environment under a given project. * @summary Create Environment - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {EnvironmentCreate} environmentCreate + * @param {EnvironmentsApiCreateEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createEnvironment( - projId: string, - environmentCreate: EnvironmentCreate, - options?: any, + requestParameters: EnvironmentsApiCreateEnvironmentRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createEnvironment(projId, environmentCreate, options) + .createEnvironment(requestParameters.projId, requestParameters.environmentCreate, options) .then((request) => request(axios, basePath)); }, /** * Deletes an environment and all its related data. * @summary Delete Environment - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EnvironmentsApiDeleteEnvironmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deleteEnvironment( + requestParameters: EnvironmentsApiDeleteEnvironmentRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteEnvironment(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Get the result of a copy environment task. + * @summary Get Copy Environment Task Result + * @param {EnvironmentsApiGetCopyEnvironmentAsyncResultRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteEnvironment(projId: string, envId: string, options?: any): AxiosPromise { + getCopyEnvironmentAsyncResult( + requestParameters: EnvironmentsApiGetCopyEnvironmentAsyncResultRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .deleteEnvironment(projId, envId, options) + .getCopyEnvironmentAsyncResult( + requestParameters.taskId, + requestParameters.projId, + requestParameters.envId, + requestParameters.wait, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single environment matching the given env_id, if such environment exists. * @summary Get Environment - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EnvironmentsApiGetEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getEnvironment(projId: string, envId: string, options?: any): AxiosPromise { + getEnvironment( + requestParameters: EnvironmentsApiGetEnvironmentRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getEnvironment(projId, envId, options) + .getEnvironment(requestParameters.projId, requestParameters.envId, options) .then((request) => request(axios, basePath)); }, /** * Lists all the environments under a given project. * @summary List Environments - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {EnvironmentsApiListEnvironmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listEnvironments( - projId: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + requestParameters: EnvironmentsApiListEnvironmentsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { return localVarFp - .listEnvironments(projId, page, perPage, options) + .listEnvironments( + requestParameters.projId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Stats Environments - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {EnvironmentsApiStatsEnvironmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ statsEnvironments( - projId: string, - envId: string, - options?: any, + requestParameters: EnvironmentsApiStatsEnvironmentsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .statsEnvironments(projId, envId, options) + .statsEnvironments(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Test Jwks Url. + * @summary Test Jwks By Url + * @param {EnvironmentsApiTestJwksByUrlRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + testJwksByUrl( + requestParameters: EnvironmentsApiTestJwksByUrlRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .testJwksByUrl( + requestParameters.projId, + requestParameters.envId, + requestParameters.url, + options, + ) .then((request) => request(axios, basePath)); }, /** * Updates the environment. * @summary Update Environment - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {EnvironmentUpdate} environmentUpdate + * @param {EnvironmentsApiUpdateEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateEnvironment( - projId: string, - envId: string, - environmentUpdate: EnvironmentUpdate, - options?: any, + requestParameters: EnvironmentsApiUpdateEnvironmentRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateEnvironment(projId, envId, environmentUpdate, options) + .updateEnvironment( + requestParameters.projId, + requestParameters.envId, + requestParameters.environmentUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -718,177 +1147,184 @@ export const EnvironmentsApiFactory = function ( /** * Request parameters for copyEnvironment operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiCopyEnvironmentRequest */ export interface EnvironmentsApiCopyEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiCopyEnvironment */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiCopyEnvironment */ readonly envId: string; + readonly environmentCopy: EnvironmentCopy; +} + +/** + * Request parameters for copyEnvironmentAsync operation in EnvironmentsApi. + */ +export interface EnvironmentsApiCopyEnvironmentAsyncRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + /** - * - * @type {EnvironmentCopy} - * @memberof EnvironmentsApiCopyEnvironment + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ + readonly envId: string; + readonly environmentCopy: EnvironmentCopy; + + /** + * Time in seconds to wait for the task to complete. Default is 0, means no wait. + */ + readonly wait?: number; } /** * Request parameters for createEnvironment operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiCreateEnvironmentRequest */ export interface EnvironmentsApiCreateEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiCreateEnvironment */ readonly projId: string; - /** - * - * @type {EnvironmentCreate} - * @memberof EnvironmentsApiCreateEnvironment - */ readonly environmentCreate: EnvironmentCreate; } /** * Request parameters for deleteEnvironment operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiDeleteEnvironmentRequest */ export interface EnvironmentsApiDeleteEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiDeleteEnvironment */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiDeleteEnvironment */ readonly envId: string; } +/** + * Request parameters for getCopyEnvironmentAsyncResult operation in EnvironmentsApi. + */ +export interface EnvironmentsApiGetCopyEnvironmentAsyncResultRequest { + /** + * The unique id of the task. + */ + readonly taskId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Time in seconds to wait for the task to complete. Default is 0, means no wait. + */ + readonly wait?: number; +} + /** * Request parameters for getEnvironment operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiGetEnvironmentRequest */ export interface EnvironmentsApiGetEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiGetEnvironment */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiGetEnvironment */ readonly envId: string; } /** * Request parameters for listEnvironments operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiListEnvironmentsRequest */ export interface EnvironmentsApiListEnvironmentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiListEnvironments */ readonly projId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof EnvironmentsApiListEnvironments */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof EnvironmentsApiListEnvironments */ readonly perPage?: number; } /** * Request parameters for statsEnvironments operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiStatsEnvironmentsRequest */ export interface EnvironmentsApiStatsEnvironmentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiStatsEnvironments */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiStatsEnvironments */ readonly envId: string; } /** - * Request parameters for updateEnvironment operation in EnvironmentsApi. - * @export - * @interface EnvironmentsApiUpdateEnvironmentRequest + * Request parameters for testJwksByUrl operation in EnvironmentsApi. */ -export interface EnvironmentsApiUpdateEnvironmentRequest { +export interface EnvironmentsApiTestJwksByUrlRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiUpdateEnvironment */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof EnvironmentsApiUpdateEnvironment */ readonly envId: string; /** - * - * @type {EnvironmentUpdate} - * @memberof EnvironmentsApiUpdateEnvironment + * URL of JWKs to test + */ + readonly url?: string; +} + +/** + * Request parameters for updateEnvironment operation in EnvironmentsApi. + */ +export interface EnvironmentsApiUpdateEnvironmentRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ + readonly envId: string; + readonly environmentUpdate: EnvironmentUpdate; } /** * EnvironmentsApi - object-oriented interface - * @export - * @class EnvironmentsApi - * @extends {BaseAPI} */ export class EnvironmentsApi extends BaseAPI { /** @@ -896,12 +1332,11 @@ export class EnvironmentsApi extends BaseAPI { * @summary Copy Environment * @param {EnvironmentsApiCopyEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public copyEnvironment( requestParameters: EnvironmentsApiCopyEnvironmentRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .copyEnvironment( @@ -913,17 +1348,38 @@ export class EnvironmentsApi extends BaseAPI { .then((request) => request(this.axios, this.basePath)); } + /** + * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. + * @summary Copy Environment Async + * @param {EnvironmentsApiCopyEnvironmentAsyncRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public copyEnvironmentAsync( + requestParameters: EnvironmentsApiCopyEnvironmentAsyncRequest, + options?: RawAxiosRequestConfig, + ) { + return EnvironmentsApiFp(this.configuration) + .copyEnvironmentAsync( + requestParameters.projId, + requestParameters.envId, + requestParameters.environmentCopy, + requestParameters.wait, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + /** * Creates a new environment under a given project. * @summary Create Environment * @param {EnvironmentsApiCreateEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public createEnvironment( requestParameters: EnvironmentsApiCreateEnvironmentRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .createEnvironment(requestParameters.projId, requestParameters.environmentCreate, options) @@ -935,29 +1391,49 @@ export class EnvironmentsApi extends BaseAPI { * @summary Delete Environment * @param {EnvironmentsApiDeleteEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public deleteEnvironment( requestParameters: EnvironmentsApiDeleteEnvironmentRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .deleteEnvironment(requestParameters.projId, requestParameters.envId, options) .then((request) => request(this.axios, this.basePath)); } + /** + * Get the result of a copy environment task. + * @summary Get Copy Environment Task Result + * @param {EnvironmentsApiGetCopyEnvironmentAsyncResultRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getCopyEnvironmentAsyncResult( + requestParameters: EnvironmentsApiGetCopyEnvironmentAsyncResultRequest, + options?: RawAxiosRequestConfig, + ) { + return EnvironmentsApiFp(this.configuration) + .getCopyEnvironmentAsyncResult( + requestParameters.taskId, + requestParameters.projId, + requestParameters.envId, + requestParameters.wait, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + /** * Gets a single environment matching the given env_id, if such environment exists. * @summary Get Environment * @param {EnvironmentsApiGetEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public getEnvironment( requestParameters: EnvironmentsApiGetEnvironmentRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .getEnvironment(requestParameters.projId, requestParameters.envId, options) @@ -969,12 +1445,11 @@ export class EnvironmentsApi extends BaseAPI { * @summary List Environments * @param {EnvironmentsApiListEnvironmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public listEnvironments( requestParameters: EnvironmentsApiListEnvironmentsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .listEnvironments( @@ -991,29 +1466,48 @@ export class EnvironmentsApi extends BaseAPI { * @summary Stats Environments * @param {EnvironmentsApiStatsEnvironmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public statsEnvironments( requestParameters: EnvironmentsApiStatsEnvironmentsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .statsEnvironments(requestParameters.projId, requestParameters.envId, options) .then((request) => request(this.axios, this.basePath)); } + /** + * Test Jwks Url. + * @summary Test Jwks By Url + * @param {EnvironmentsApiTestJwksByUrlRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public testJwksByUrl( + requestParameters: EnvironmentsApiTestJwksByUrlRequest, + options?: RawAxiosRequestConfig, + ) { + return EnvironmentsApiFp(this.configuration) + .testJwksByUrl( + requestParameters.projId, + requestParameters.envId, + requestParameters.url, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + /** * Updates the environment. * @summary Update Environment * @param {EnvironmentsApiUpdateEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EnvironmentsApi + * @throws If a required parameter is missing. */ public updateEnvironment( requestParameters: EnvironmentsApiUpdateEnvironmentRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return EnvironmentsApiFp(this.configuration) .updateEnvironment( diff --git a/src/openapi/api/groups-api.ts b/src/openapi/api/groups-api.ts new file mode 100644 index 00000000..2b8178c2 --- /dev/null +++ b/src/openapi/api/groups-api.ts @@ -0,0 +1,2860 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { + GroupAddRole, + GroupAssignUser, + GroupAssignment, + GroupCreate, + GroupRead, + GroupReadSchema, + PaginatedResultGroupReadSchema, + PaginatedResultGroupRoleReadSchema, + PaginatedResultGroupUserReadSchema, +} from '../types'; +/** + * GroupsApi - axios parameter creator + */ +export const GroupsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Assign a group to a group - This group will inherit the group\'s roles. + * @summary Assign Group To Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignment} groupAssignment + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + assignGroupToGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignment: GroupAssignment, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('assignGroupToGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('assignGroupToGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('assignGroupToGroup', 'groupInstanceKey', groupInstanceKey); + // verify required parameter 'groupAssignment' is not null or undefined + assertParamExists('assignGroupToGroup', 'groupAssignment', groupAssignment); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupAssignment, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Assign a role to a group - It will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role. + * @summary Assign Role To Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAddRole} groupAddRole + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + assignRoleToGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + groupAddRole: GroupAddRole, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('assignRoleToGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('assignRoleToGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('assignRoleToGroup', 'groupInstanceKey', groupInstanceKey); + // verify required parameter 'groupAddRole' is not null or undefined + assertParamExists('assignRoleToGroup', 'groupAddRole', groupAddRole); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupAddRole, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Assign a user to a group - This user will inherit the group\'s roles. + * @summary Assign User To Group + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignUser} groupAssignUser + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + assignUserToGroup: async ( + userId: string, + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignUser: GroupAssignUser, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('assignUserToGroup', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('assignUserToGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('assignUserToGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('assignUserToGroup', 'groupInstanceKey', groupInstanceKey); + // verify required parameter 'groupAssignUser' is not null or undefined + assertParamExists('assignUserToGroup', 'groupAssignUser', groupAssignUser); + const localVarPath = + `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}` + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupAssignUser, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new group. + * @summary Create Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {GroupCreate} groupCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createGroup: async ( + projId: string, + envId: string, + groupCreate: GroupCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('createGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('createGroup', 'envId', envId); + // verify required parameter 'groupCreate' is not null or undefined + assertParamExists('createGroup', 'groupCreate', groupCreate); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a group by its instance key. + * @summary Delete Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deleteGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('deleteGroup', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve a specific group by its instance key. + * @summary Get Direct Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getDirectGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('getDirectGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getDirectGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('getDirectGroup', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/direct/{group_instance_key}` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve a specific group by its instance key. + * @summary Get Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + getGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('getGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('getGroup', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Paginated list of groups with various filters. + * @summary List Direct Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [resource] The resource key or id to filter by + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [search] Text search for the object name or key + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listDirectGroup: async ( + projId: string, + envId: string, + tenant?: string, + resource?: string, + page?: number, + perPage?: number, + search?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listDirectGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listDirectGroup', 'envId', envId); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/direct` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (tenant !== undefined) { + localVarQueryParameter['tenant'] = tenant; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all groups. + * @summary List Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [resource] The resource key or id to filter by + * @param {boolean} [includeTotalCount] Include total count in response(will make the request slower) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [search] Text search for the object name or key + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + listGroup: async ( + projId: string, + envId: string, + tenant?: string, + resource?: string, + includeTotalCount?: boolean, + page?: number, + perPage?: number, + search?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listGroup', 'envId', envId); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (tenant !== undefined) { + localVarQueryParameter['tenant'] = tenant; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List group children of a specific group. + * @summary List group children (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupChildren: async ( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listGroupChildren', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listGroupChildren', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('listGroupChildren', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/children` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List group parents of a specific group. + * @summary List group parents (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupParents: async ( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listGroupParents', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listGroupParents', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('listGroupParents', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/parents` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Paginated list of all roles assigned to a group. + * @summary List group roles (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupRoles: async ( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listGroupRoles', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listGroupRoles', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('listGroupRoles', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Paginated list of all users in a group. + * @summary List group users (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupUsers: async ( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listGroupUsers', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listGroupUsers', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('listGroupUsers', 'groupInstanceKey', groupInstanceKey); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Remove a group from a group- This group will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove Group From Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignment} groupAssignment + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + removeGroupFromGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignment: GroupAssignment, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('removeGroupFromGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('removeGroupFromGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('removeGroupFromGroup', 'groupInstanceKey', groupInstanceKey); + // verify required parameter 'groupAssignment' is not null or undefined + assertParamExists('removeGroupFromGroup', 'groupAssignment', groupAssignment); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/assign_group` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupAssignment, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Remove a role from a group- It will remove the derivation from the member role to this role. + * @summary Remove Role From Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAddRole} groupAddRole + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + removeRoleFromGroup: async ( + projId: string, + envId: string, + groupInstanceKey: string, + groupAddRole: GroupAddRole, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('removeRoleFromGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('removeRoleFromGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('removeRoleFromGroup', 'groupInstanceKey', groupInstanceKey); + // verify required parameter 'groupAddRole' is not null or undefined + assertParamExists('removeRoleFromGroup', 'groupAddRole', groupAddRole); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupAddRole, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Remove a user from a group- This user will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove User From Group + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignUser} groupAssignUser + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + removeUserFromGroup: async ( + userId: string, + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignUser: GroupAssignUser, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('removeUserFromGroup', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('removeUserFromGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('removeUserFromGroup', 'envId', envId); + // verify required parameter 'groupInstanceKey' is not null or undefined + assertParamExists('removeUserFromGroup', 'groupInstanceKey', groupInstanceKey); + // verify required parameter 'groupAssignUser' is not null or undefined + assertParamExists('removeUserFromGroup', 'groupAssignUser', groupAssignUser); + const localVarPath = + `/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/users/{user_id}` + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{group_instance_key}', encodeURIComponent(String(groupInstanceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + groupAssignUser, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * GroupsApi - functional programming interface + */ +export const GroupsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = GroupsApiAxiosParamCreator(configuration); + return { + /** + * Assign a group to a group - This group will inherit the group\'s roles. + * @summary Assign Group To Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignment} groupAssignment + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async assignGroupToGroup( + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignment: GroupAssignment, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.assignGroupToGroup( + projId, + envId, + groupInstanceKey, + groupAssignment, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.assignGroupToGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Assign a role to a group - It will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role. + * @summary Assign Role To Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAddRole} groupAddRole + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async assignRoleToGroup( + projId: string, + envId: string, + groupInstanceKey: string, + groupAddRole: GroupAddRole, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.assignRoleToGroup( + projId, + envId, + groupInstanceKey, + groupAddRole, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.assignRoleToGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Assign a user to a group - This user will inherit the group\'s roles. + * @summary Assign User To Group + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignUser} groupAssignUser + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async assignUserToGroup( + userId: string, + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignUser: GroupAssignUser, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.assignUserToGroup( + userId, + projId, + envId, + groupInstanceKey, + groupAssignUser, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.assignUserToGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new group. + * @summary Create Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {GroupCreate} groupCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createGroup( + projId: string, + envId: string, + groupCreate: GroupCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGroup( + projId, + envId, + groupCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.createGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete a group by its instance key. + * @summary Delete Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async deleteGroup( + projId: string, + envId: string, + groupInstanceKey: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroup( + projId, + envId, + groupInstanceKey, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.deleteGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve a specific group by its instance key. + * @summary Get Direct Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getDirectGroup( + projId: string, + envId: string, + groupInstanceKey: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDirectGroup( + projId, + envId, + groupInstanceKey, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.getDirectGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve a specific group by its instance key. + * @summary Get Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + async getGroup( + projId: string, + envId: string, + groupInstanceKey: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGroup( + projId, + envId, + groupInstanceKey, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.getGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Paginated list of groups with various filters. + * @summary List Direct Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [resource] The resource key or id to filter by + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [search] Text search for the object name or key + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listDirectGroup( + projId: string, + envId: string, + tenant?: string, + resource?: string, + page?: number, + perPage?: number, + search?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listDirectGroup( + projId, + envId, + tenant, + resource, + page, + perPage, + search, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.listDirectGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all groups. + * @summary List Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [resource] The resource key or id to filter by + * @param {boolean} [includeTotalCount] Include total count in response(will make the request slower) + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [search] Text search for the object name or key + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + async listGroup( + projId: string, + envId: string, + tenant?: string, + resource?: string, + includeTotalCount?: boolean, + page?: number, + perPage?: number, + search?: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroup( + projId, + envId, + tenant, + resource, + includeTotalCount, + page, + perPage, + search, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.listGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List group children of a specific group. + * @summary List group children (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listGroupChildren( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroupChildren( + projId, + envId, + groupInstanceKey, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.listGroupChildren']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List group parents of a specific group. + * @summary List group parents (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listGroupParents( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroupParents( + projId, + envId, + groupInstanceKey, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.listGroupParents']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Paginated list of all roles assigned to a group. + * @summary List group roles (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listGroupRoles( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroupRoles( + projId, + envId, + groupInstanceKey, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.listGroupRoles']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Paginated list of all users in a group. + * @summary List group users (EAP) + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listGroupUsers( + projId: string, + envId: string, + groupInstanceKey: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroupUsers( + projId, + envId, + groupInstanceKey, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.listGroupUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Remove a group from a group- This group will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove Group From Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignment} groupAssignment + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async removeGroupFromGroup( + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignment: GroupAssignment, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeGroupFromGroup( + projId, + envId, + groupInstanceKey, + groupAssignment, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.removeGroupFromGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Remove a role from a group- It will remove the derivation from the member role to this role. + * @summary Remove Role From Group + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAddRole} groupAddRole + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async removeRoleFromGroup( + projId: string, + envId: string, + groupInstanceKey: string, + groupAddRole: GroupAddRole, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeRoleFromGroup( + projId, + envId, + groupInstanceKey, + groupAddRole, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.removeRoleFromGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Remove a user from a group- This user will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove User From Group + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} groupInstanceKey Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {GroupAssignUser} groupAssignUser + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async removeUserFromGroup( + userId: string, + projId: string, + envId: string, + groupInstanceKey: string, + groupAssignUser: GroupAssignUser, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeUserFromGroup( + userId, + projId, + envId, + groupInstanceKey, + groupAssignUser, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['GroupsApi.removeUserFromGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * GroupsApi - factory interface + */ +export const GroupsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = GroupsApiFp(configuration); + return { + /** + * Assign a group to a group - This group will inherit the group\'s roles. + * @summary Assign Group To Group + * @param {GroupsApiAssignGroupToGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + assignGroupToGroup( + requestParameters: GroupsApiAssignGroupToGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .assignGroupToGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignment, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Assign a role to a group - It will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role. + * @summary Assign Role To Group + * @param {GroupsApiAssignRoleToGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + assignRoleToGroup( + requestParameters: GroupsApiAssignRoleToGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .assignRoleToGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAddRole, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Assign a user to a group - This user will inherit the group\'s roles. + * @summary Assign User To Group + * @param {GroupsApiAssignUserToGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + assignUserToGroup( + requestParameters: GroupsApiAssignUserToGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .assignUserToGroup( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignUser, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Create a new group. + * @summary Create Group + * @param {GroupsApiCreateGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createGroup( + requestParameters: GroupsApiCreateGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Delete a group by its instance key. + * @summary Delete Group + * @param {GroupsApiDeleteGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deleteGroup( + requestParameters: GroupsApiDeleteGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Retrieve a specific group by its instance key. + * @summary Get Direct Group + * @param {GroupsApiGetDirectGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getDirectGroup( + requestParameters: GroupsApiGetDirectGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getDirectGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Retrieve a specific group by its instance key. + * @summary Get Group + * @param {GroupsApiGetGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + getGroup( + requestParameters: GroupsApiGetGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Paginated list of groups with various filters. + * @summary List Direct Group + * @param {GroupsApiListDirectGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listDirectGroup( + requestParameters: GroupsApiListDirectGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listDirectGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * List all groups. + * @summary List Group + * @param {GroupsApiListGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + listGroup( + requestParameters: GroupsApiListGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * List group children of a specific group. + * @summary List group children (EAP) + * @param {GroupsApiListGroupChildrenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupChildren( + requestParameters: GroupsApiListGroupChildrenRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listGroupChildren( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * List group parents of a specific group. + * @summary List group parents (EAP) + * @param {GroupsApiListGroupParentsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupParents( + requestParameters: GroupsApiListGroupParentsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listGroupParents( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Paginated list of all roles assigned to a group. + * @summary List group roles (EAP) + * @param {GroupsApiListGroupRolesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupRoles( + requestParameters: GroupsApiListGroupRolesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listGroupRoles( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Paginated list of all users in a group. + * @summary List group users (EAP) + * @param {GroupsApiListGroupUsersRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listGroupUsers( + requestParameters: GroupsApiListGroupUsersRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listGroupUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Remove a group from a group- This group will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove Group From Group + * @param {GroupsApiRemoveGroupFromGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + removeGroupFromGroup( + requestParameters: GroupsApiRemoveGroupFromGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .removeGroupFromGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignment, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Remove a role from a group- It will remove the derivation from the member role to this role. + * @summary Remove Role From Group + * @param {GroupsApiRemoveRoleFromGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + removeRoleFromGroup( + requestParameters: GroupsApiRemoveRoleFromGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .removeRoleFromGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAddRole, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Remove a user from a group- This user will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove User From Group + * @param {GroupsApiRemoveUserFromGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + removeUserFromGroup( + requestParameters: GroupsApiRemoveUserFromGroupRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .removeUserFromGroup( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignUser, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for assignGroupToGroup operation in GroupsApi. + */ +export interface GroupsApiAssignGroupToGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + readonly groupAssignment: GroupAssignment; +} + +/** + * Request parameters for assignRoleToGroup operation in GroupsApi. + */ +export interface GroupsApiAssignRoleToGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + readonly groupAddRole: GroupAddRole; +} + +/** + * Request parameters for assignUserToGroup operation in GroupsApi. + */ +export interface GroupsApiAssignUserToGroupRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + readonly groupAssignUser: GroupAssignUser; +} + +/** + * Request parameters for createGroup operation in GroupsApi. + */ +export interface GroupsApiCreateGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly groupCreate: GroupCreate; +} + +/** + * Request parameters for deleteGroup operation in GroupsApi. + */ +export interface GroupsApiDeleteGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; +} + +/** + * Request parameters for getDirectGroup operation in GroupsApi. + */ +export interface GroupsApiGetDirectGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; +} + +/** + * Request parameters for getGroup operation in GroupsApi. + */ +export interface GroupsApiGetGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; +} + +/** + * Request parameters for listDirectGroup operation in GroupsApi. + */ +export interface GroupsApiListDirectGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * The tenant key or id to filter by + */ + readonly tenant?: string; + + /** + * The resource key or id to filter by + */ + readonly resource?: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * Text search for the object name or key + */ + readonly search?: string; +} + +/** + * Request parameters for listGroup operation in GroupsApi. + */ +export interface GroupsApiListGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * The tenant key or id to filter by + */ + readonly tenant?: string; + + /** + * The resource key or id to filter by + */ + readonly resource?: string; + + /** + * Include total count in response(will make the request slower) + */ + readonly includeTotalCount?: boolean; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * Text search for the object name or key + */ + readonly search?: string; +} + +/** + * Request parameters for listGroupChildren operation in GroupsApi. + */ +export interface GroupsApiListGroupChildrenRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listGroupParents operation in GroupsApi. + */ +export interface GroupsApiListGroupParentsRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listGroupRoles operation in GroupsApi. + */ +export interface GroupsApiListGroupRolesRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listGroupUsers operation in GroupsApi. + */ +export interface GroupsApiListGroupUsersRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for removeGroupFromGroup operation in GroupsApi. + */ +export interface GroupsApiRemoveGroupFromGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + readonly groupAssignment: GroupAssignment; +} + +/** + * Request parameters for removeRoleFromGroup operation in GroupsApi. + */ +export interface GroupsApiRemoveRoleFromGroupRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + readonly groupAddRole: GroupAddRole; +} + +/** + * Request parameters for removeUserFromGroup operation in GroupsApi. + */ +export interface GroupsApiRemoveUserFromGroupRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + */ + readonly groupInstanceKey: string; + + readonly groupAssignUser: GroupAssignUser; +} + +/** + * GroupsApi - object-oriented interface + */ +export class GroupsApi extends BaseAPI { + /** + * Assign a group to a group - This group will inherit the group\'s roles. + * @summary Assign Group To Group + * @param {GroupsApiAssignGroupToGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public assignGroupToGroup( + requestParameters: GroupsApiAssignGroupToGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .assignGroupToGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignment, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Assign a role to a group - It will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role. + * @summary Assign Role To Group + * @param {GroupsApiAssignRoleToGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public assignRoleToGroup( + requestParameters: GroupsApiAssignRoleToGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .assignRoleToGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAddRole, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Assign a user to a group - This user will inherit the group\'s roles. + * @summary Assign User To Group + * @param {GroupsApiAssignUserToGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public assignUserToGroup( + requestParameters: GroupsApiAssignUserToGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .assignUserToGroup( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignUser, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new group. + * @summary Create Group + * @param {GroupsApiCreateGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createGroup( + requestParameters: GroupsApiCreateGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .createGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a group by its instance key. + * @summary Delete Group + * @param {GroupsApiDeleteGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public deleteGroup( + requestParameters: GroupsApiDeleteGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .deleteGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve a specific group by its instance key. + * @summary Get Direct Group + * @param {GroupsApiGetDirectGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getDirectGroup( + requestParameters: GroupsApiGetDirectGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .getDirectGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve a specific group by its instance key. + * @summary Get Group + * @param {GroupsApiGetGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + public getGroup(requestParameters: GroupsApiGetGroupRequest, options?: RawAxiosRequestConfig) { + return GroupsApiFp(this.configuration) + .getGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Paginated list of groups with various filters. + * @summary List Direct Group + * @param {GroupsApiListDirectGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listDirectGroup( + requestParameters: GroupsApiListDirectGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .listDirectGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * List all groups. + * @summary List Group + * @param {GroupsApiListGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @deprecated + * @throws If a required parameter is missing. + */ + public listGroup(requestParameters: GroupsApiListGroupRequest, options?: RawAxiosRequestConfig) { + return GroupsApiFp(this.configuration) + .listGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * List group children of a specific group. + * @summary List group children (EAP) + * @param {GroupsApiListGroupChildrenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listGroupChildren( + requestParameters: GroupsApiListGroupChildrenRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .listGroupChildren( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * List group parents of a specific group. + * @summary List group parents (EAP) + * @param {GroupsApiListGroupParentsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listGroupParents( + requestParameters: GroupsApiListGroupParentsRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .listGroupParents( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Paginated list of all roles assigned to a group. + * @summary List group roles (EAP) + * @param {GroupsApiListGroupRolesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listGroupRoles( + requestParameters: GroupsApiListGroupRolesRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .listGroupRoles( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Paginated list of all users in a group. + * @summary List group users (EAP) + * @param {GroupsApiListGroupUsersRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listGroupUsers( + requestParameters: GroupsApiListGroupUsersRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .listGroupUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Remove a group from a group- This group will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove Group From Group + * @param {GroupsApiRemoveGroupFromGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public removeGroupFromGroup( + requestParameters: GroupsApiRemoveGroupFromGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .removeGroupFromGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignment, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Remove a role from a group- It will remove the derivation from the member role to this role. + * @summary Remove Role From Group + * @param {GroupsApiRemoveRoleFromGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public removeRoleFromGroup( + requestParameters: GroupsApiRemoveRoleFromGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .removeRoleFromGroup( + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAddRole, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Remove a user from a group- This user will be removed from the member role of the group, and will no longer inherit the group\'s roles. + * @summary Remove User From Group + * @param {GroupsApiRemoveUserFromGroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public removeUserFromGroup( + requestParameters: GroupsApiRemoveUserFromGroupRequest, + options?: RawAxiosRequestConfig, + ) { + return GroupsApiFp(this.configuration) + .removeUserFromGroup( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.groupInstanceKey, + requestParameters.groupAssignUser, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/implicit-grants-api.ts b/src/openapi/api/implicit-grants-api.ts index 84827080..caf1549e 100644 --- a/src/openapi/api/implicit-grants-api.ts +++ b/src/openapi/api/implicit-grants-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,75 +10,65 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { DerivedRoleRuleCreate } from '../types'; -// @ts-ignore -import { DerivedRoleRuleDelete } from '../types'; -// @ts-ignore -import { DerivedRoleRuleRead } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings } from '../types'; +import type { Configuration } from '../configuration'; +import type { + DerivedRoleRuleCreate, + DerivedRoleRuleDelete, + DerivedRoleRuleRead, + PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, +} from '../types'; /** * ImplicitGrantsApi - axios parameter creator - * @export */ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates an implicit grant on a given role * @summary Create Implicit Grant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {DerivedRoleRuleCreate} derivedRoleRuleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createImplicitGrant: async ( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, derivedRoleRuleCreate: DerivedRoleRuleCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('createImplicitGrant', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('createImplicitGrant', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('createImplicitGrant', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined assertParamExists('createImplicitGrant', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('createImplicitGrant', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('createImplicitGrant', 'envId', envId); // verify required parameter 'derivedRoleRuleCreate' is not null or undefined assertParamExists('createImplicitGrant', 'derivedRoleRuleCreate', derivedRoleRuleCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -97,6 +85,7 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -119,38 +108,38 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf /** * Deletes an implicit grant on a given role * @summary Delete Implicit Grant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {DerivedRoleRuleDelete} derivedRoleRuleDelete * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteImplicitGrant: async ( - projId: string, - envId: string, roleId: string, resourceId: string, + projId: string, + envId: string, derivedRoleRuleDelete: DerivedRoleRuleDelete, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteImplicitGrant', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteImplicitGrant', 'envId', envId); // verify required parameter 'roleId' is not null or undefined assertParamExists('deleteImplicitGrant', 'roleId', roleId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('deleteImplicitGrant', 'resourceId', resourceId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteImplicitGrant', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteImplicitGrant', 'envId', envId); // verify required parameter 'derivedRoleRuleDelete' is not null or undefined assertParamExists('deleteImplicitGrant', 'derivedRoleRuleDelete', derivedRoleRuleDelete); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -167,6 +156,7 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -189,42 +179,42 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf /** * Update the `when` for implicit grants on a given role * @summary Update Implicit Grants Conditions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings} permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings} permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateImplicitGrantsConditions: async ( - projId: string, - envId: string, resourceId: string, roleId: string, - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('updateImplicitGrantsConditions', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('updateImplicitGrantsConditions', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('updateImplicitGrantsConditions', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined assertParamExists('updateImplicitGrantsConditions', 'roleId', roleId); - // verify required parameter 'permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings' is not null or undefined + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateImplicitGrantsConditions', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateImplicitGrantsConditions', 'envId', envId); + // verify required parameter 'permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings' is not null or undefined assertParamExists( 'updateImplicitGrantsConditions', - 'permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings', - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, + 'permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings', + permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/implicit_grants/conditions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -241,6 +231,7 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -250,7 +241,7 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, + permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, localVarRequestOptions, configuration, ); @@ -265,7 +256,6 @@ export const ImplicitGrantsApiAxiosParamCreator = function (configuration?: Conf /** * ImplicitGrantsApi - functional programming interface - * @export */ export const ImplicitGrantsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ImplicitGrantsApiAxiosParamCreator(configuration); @@ -273,101 +263,131 @@ export const ImplicitGrantsApiFp = function (configuration?: Configuration) { /** * Creates an implicit grant on a given role * @summary Create Implicit Grant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {DerivedRoleRuleCreate} derivedRoleRuleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createImplicitGrant( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, derivedRoleRuleCreate: DerivedRoleRuleCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createImplicitGrant( - projId, - envId, resourceId, roleId, + projId, + envId, derivedRoleRuleCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ImplicitGrantsApi.createImplicitGrant']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes an implicit grant on a given role * @summary Delete Implicit Grant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {DerivedRoleRuleDelete} derivedRoleRuleDelete * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteImplicitGrant( - projId: string, - envId: string, roleId: string, resourceId: string, + projId: string, + envId: string, derivedRoleRuleDelete: DerivedRoleRuleDelete, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteImplicitGrant( - projId, - envId, roleId, resourceId, + projId, + envId, derivedRoleRuleDelete, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ImplicitGrantsApi.deleteImplicitGrant']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Update the `when` for implicit grants on a given role * @summary Update Implicit Grants Conditions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings} permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings} permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateImplicitGrantsConditions( - projId: string, - envId: string, resourceId: string, roleId: string, - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, - options?: AxiosRequestConfig, + projId: string, + envId: string, + permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, + options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.updateImplicitGrantsConditions( - projId, - envId, resourceId, roleId, - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, + projId, + envId, + permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ImplicitGrantsApi.updateImplicitGrantsConditions']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ImplicitGrantsApi - factory interface - * @export */ export const ImplicitGrantsApiFactory = function ( configuration?: Configuration, @@ -379,75 +399,65 @@ export const ImplicitGrantsApiFactory = function ( /** * Creates an implicit grant on a given role * @summary Create Implicit Grant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {DerivedRoleRuleCreate} derivedRoleRuleCreate + * @param {ImplicitGrantsApiCreateImplicitGrantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createImplicitGrant( - projId: string, - envId: string, - resourceId: string, - roleId: string, - derivedRoleRuleCreate: DerivedRoleRuleCreate, - options?: any, + requestParameters: ImplicitGrantsApiCreateImplicitGrantRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createImplicitGrant(projId, envId, resourceId, roleId, derivedRoleRuleCreate, options) + .createImplicitGrant( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.derivedRoleRuleCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes an implicit grant on a given role * @summary Delete Implicit Grant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {DerivedRoleRuleDelete} derivedRoleRuleDelete + * @param {ImplicitGrantsApiDeleteImplicitGrantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteImplicitGrant( - projId: string, - envId: string, - roleId: string, - resourceId: string, - derivedRoleRuleDelete: DerivedRoleRuleDelete, - options?: any, + requestParameters: ImplicitGrantsApiDeleteImplicitGrantRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteImplicitGrant(projId, envId, roleId, resourceId, derivedRoleRuleDelete, options) + .deleteImplicitGrant( + requestParameters.roleId, + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.derivedRoleRuleDelete, + options, + ) .then((request) => request(axios, basePath)); }, /** * Update the `when` for implicit grants on a given role * @summary Update Implicit Grants Conditions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings} permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings + * @param {ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateImplicitGrantsConditions( - projId: string, - envId: string, - resourceId: string, - roleId: string, - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, - options?: any, - ): AxiosPromise { + requestParameters: ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp .updateImplicitGrantsConditions( - projId, - envId, - resourceId, - roleId, - permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, options, ) .then((request) => request(axios, basePath)); @@ -457,135 +467,87 @@ export const ImplicitGrantsApiFactory = function ( /** * Request parameters for createImplicitGrant operation in ImplicitGrantsApi. - * @export - * @interface ImplicitGrantsApiCreateImplicitGrantRequest */ export interface ImplicitGrantsApiCreateImplicitGrantRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiCreateImplicitGrant - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiCreateImplicitGrant - */ - readonly envId: string; - /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiCreateImplicitGrant */ readonly resourceId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiCreateImplicitGrant */ readonly roleId: string; - /** - * - * @type {DerivedRoleRuleCreate} - * @memberof ImplicitGrantsApiCreateImplicitGrant - */ - readonly derivedRoleRuleCreate: DerivedRoleRuleCreate; -} - -/** - * Request parameters for deleteImplicitGrant operation in ImplicitGrantsApi. - * @export - * @interface ImplicitGrantsApiDeleteImplicitGrantRequest - */ -export interface ImplicitGrantsApiDeleteImplicitGrantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiDeleteImplicitGrant */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiDeleteImplicitGrant */ readonly envId: string; + readonly derivedRoleRuleCreate: DerivedRoleRuleCreate; +} + +/** + * Request parameters for deleteImplicitGrant operation in ImplicitGrantsApi. + */ +export interface ImplicitGrantsApiDeleteImplicitGrantRequest { /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiDeleteImplicitGrant */ readonly roleId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiDeleteImplicitGrant */ readonly resourceId: string; - /** - * - * @type {DerivedRoleRuleDelete} - * @memberof ImplicitGrantsApiDeleteImplicitGrant - */ - readonly derivedRoleRuleDelete: DerivedRoleRuleDelete; -} - -/** - * Request parameters for updateImplicitGrantsConditions operation in ImplicitGrantsApi. - * @export - * @interface ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest - */ -export interface ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiUpdateImplicitGrantsConditions */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiUpdateImplicitGrantsConditions */ readonly envId: string; + readonly derivedRoleRuleDelete: DerivedRoleRuleDelete; +} + +/** + * Request parameters for updateImplicitGrantsConditions operation in ImplicitGrantsApi. + */ +export interface ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiUpdateImplicitGrantsConditions */ readonly resourceId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ImplicitGrantsApiUpdateImplicitGrantsConditions */ readonly roleId: string; /** - * - * @type {PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings} - * @memberof ImplicitGrantsApiUpdateImplicitGrantsConditions + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings; + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings; } /** * ImplicitGrantsApi - object-oriented interface - * @export - * @class ImplicitGrantsApi - * @extends {BaseAPI} */ export class ImplicitGrantsApi extends BaseAPI { /** @@ -593,19 +555,18 @@ export class ImplicitGrantsApi extends BaseAPI { * @summary Create Implicit Grant * @param {ImplicitGrantsApiCreateImplicitGrantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ImplicitGrantsApi + * @throws If a required parameter is missing. */ public createImplicitGrant( requestParameters: ImplicitGrantsApiCreateImplicitGrantRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ImplicitGrantsApiFp(this.configuration) .createImplicitGrant( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, requestParameters.derivedRoleRuleCreate, options, ) @@ -617,19 +578,18 @@ export class ImplicitGrantsApi extends BaseAPI { * @summary Delete Implicit Grant * @param {ImplicitGrantsApiDeleteImplicitGrantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ImplicitGrantsApi + * @throws If a required parameter is missing. */ public deleteImplicitGrant( requestParameters: ImplicitGrantsApiDeleteImplicitGrantRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ImplicitGrantsApiFp(this.configuration) .deleteImplicitGrant( - requestParameters.projId, - requestParameters.envId, requestParameters.roleId, requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, requestParameters.derivedRoleRuleDelete, options, ) @@ -641,20 +601,19 @@ export class ImplicitGrantsApi extends BaseAPI { * @summary Update Implicit Grants Conditions * @param {ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ImplicitGrantsApi + * @throws If a required parameter is missing. */ public updateImplicitGrantsConditions( requestParameters: ImplicitGrantsApiUpdateImplicitGrantsConditionsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ImplicitGrantsApiFp(this.configuration) .updateImplicitGrantsConditions( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.roleId, - requestParameters.permitBackendSchemasSchemaDerivedRoleDerivedRoleSettings, + requestParameters.projId, + requestParameters.envId, + requestParameters.permitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, options, ) .then((request) => request(this.axios, this.basePath)); diff --git a/src/openapi/api/instructions-api.ts b/src/openapi/api/instructions-api.ts deleted file mode 100644 index 5ca7243f..00000000 --- a/src/openapi/api/instructions-api.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { LanguageInstructions } from '../types'; -/** - * InstructionsApi - axios parameter creator - * @export - */ -export const InstructionsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Lists pending organization invites - * @summary List Language Instructions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listLanguageInstructions: async ( - projId: string, - envId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('listLanguageInstructions', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('listLanguageInstructions', 'envId', envId); - const localVarPath = `/v2/{proj_id}/{env_id}/get_instructions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; -}; - -/** - * InstructionsApi - functional programming interface - * @export - */ -export const InstructionsApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = InstructionsApiAxiosParamCreator(configuration); - return { - /** - * Lists pending organization invites - * @summary List Language Instructions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listLanguageInstructions( - projId: string, - envId: string, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listLanguageInstructions( - projId, - envId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - }; -}; - -/** - * InstructionsApi - factory interface - * @export - */ -export const InstructionsApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = InstructionsApiFp(configuration); - return { - /** - * Lists pending organization invites - * @summary List Language Instructions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listLanguageInstructions( - projId: string, - envId: string, - options?: any, - ): AxiosPromise> { - return localVarFp - .listLanguageInstructions(projId, envId, options) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for listLanguageInstructions operation in InstructionsApi. - * @export - * @interface InstructionsApiListLanguageInstructionsRequest - */ -export interface InstructionsApiListLanguageInstructionsRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof InstructionsApiListLanguageInstructions - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof InstructionsApiListLanguageInstructions - */ - readonly envId: string; -} - -/** - * InstructionsApi - object-oriented interface - * @export - * @class InstructionsApi - * @extends {BaseAPI} - */ -export class InstructionsApi extends BaseAPI { - /** - * Lists pending organization invites - * @summary List Language Instructions - * @param {InstructionsApiListLanguageInstructionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InstructionsApi - */ - public listLanguageInstructions( - requestParameters: InstructionsApiListLanguageInstructionsRequest, - options?: AxiosRequestConfig, - ) { - return InstructionsApiFp(this.configuration) - .listLanguageInstructions(requestParameters.projId, requestParameters.envId, options) - .then((request) => request(this.axios, this.basePath)); - } -} diff --git a/src/openapi/api/invites-api.ts b/src/openapi/api/invites-api.ts new file mode 100644 index 00000000..fb3ceb64 --- /dev/null +++ b/src/openapi/api/invites-api.ts @@ -0,0 +1,502 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { InviteCreate, InviteRead, MultiInviteResult } from '../types'; +/** + * InvitesApi - axios parameter creator + */ +export const InvitesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Cancels an invite that was sent to a new member. + * @summary Cancel Invite + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} inviteId Id of the invite to cancel + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelInvite: async ( + orgId: string, + inviteId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('cancelInvite', 'orgId', orgId); + // verify required parameter 'inviteId' is not null or undefined + assertParamExists('cancelInvite', 'inviteId', inviteId); + const localVarPath = `/v2/orgs/{org_id}/invites/{invite_id}` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{invite_id}', encodeURIComponent(String(inviteId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Invite new members into the organization. + * @summary Invite Members To Organization + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {Array} inviteCreate + * @param {string} [inviterName] + * @param {string} [inviterEmail] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + inviteMembersToOrganization: async ( + orgId: string, + inviteCreate: Array, + inviterName?: string, + inviterEmail?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('inviteMembersToOrganization', 'orgId', orgId); + // verify required parameter 'inviteCreate' is not null or undefined + assertParamExists('inviteMembersToOrganization', 'inviteCreate', inviteCreate); + const localVarPath = `/v2/orgs/{org_id}/invites`.replace( + '{org_id}', + encodeURIComponent(String(orgId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (inviterName !== undefined) { + localVarQueryParameter['inviter_name'] = inviterName; + } + + if (inviterEmail !== undefined) { + localVarQueryParameter['inviter_email'] = inviterEmail; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + inviteCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists pending organization invites + * @summary List Organization Invites + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listOrganizationInvites: async ( + orgId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('listOrganizationInvites', 'orgId', orgId); + const localVarPath = `/v2/orgs/{org_id}/invites`.replace( + '{org_id}', + encodeURIComponent(String(orgId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * InvitesApi - functional programming interface + */ +export const InvitesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = InvitesApiAxiosParamCreator(configuration); + return { + /** + * Cancels an invite that was sent to a new member. + * @summary Cancel Invite + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} inviteId Id of the invite to cancel + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async cancelInvite( + orgId: string, + inviteId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelInvite( + orgId, + inviteId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['InvitesApi.cancelInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Invite new members into the organization. + * @summary Invite Members To Organization + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {Array} inviteCreate + * @param {string} [inviterName] + * @param {string} [inviterEmail] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async inviteMembersToOrganization( + orgId: string, + inviteCreate: Array, + inviterName?: string, + inviterEmail?: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.inviteMembersToOrganization( + orgId, + inviteCreate, + inviterName, + inviterEmail, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['InvitesApi.inviteMembersToOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists pending organization invites + * @summary List Organization Invites + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listOrganizationInvites( + orgId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizationInvites( + orgId, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['InvitesApi.listOrganizationInvites']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * InvitesApi - factory interface + */ +export const InvitesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = InvitesApiFp(configuration); + return { + /** + * Cancels an invite that was sent to a new member. + * @summary Cancel Invite + * @param {InvitesApiCancelInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelInvite( + requestParameters: InvitesApiCancelInviteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .cancelInvite(requestParameters.orgId, requestParameters.inviteId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Invite new members into the organization. + * @summary Invite Members To Organization + * @param {InvitesApiInviteMembersToOrganizationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + inviteMembersToOrganization( + requestParameters: InvitesApiInviteMembersToOrganizationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .inviteMembersToOrganization( + requestParameters.orgId, + requestParameters.inviteCreate, + requestParameters.inviterName, + requestParameters.inviterEmail, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Lists pending organization invites + * @summary List Organization Invites + * @param {InvitesApiListOrganizationInvitesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listOrganizationInvites( + requestParameters: InvitesApiListOrganizationInvitesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listOrganizationInvites( + requestParameters.orgId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for cancelInvite operation in InvitesApi. + */ +export interface InvitesApiCancelInviteRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Id of the invite to cancel + */ + readonly inviteId: string; +} + +/** + * Request parameters for inviteMembersToOrganization operation in InvitesApi. + */ +export interface InvitesApiInviteMembersToOrganizationRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + readonly inviteCreate: Array; + + readonly inviterName?: string; + + readonly inviterEmail?: string; +} + +/** + * Request parameters for listOrganizationInvites operation in InvitesApi. + */ +export interface InvitesApiListOrganizationInvitesRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * InvitesApi - object-oriented interface + */ +export class InvitesApi extends BaseAPI { + /** + * Cancels an invite that was sent to a new member. + * @summary Cancel Invite + * @param {InvitesApiCancelInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public cancelInvite( + requestParameters: InvitesApiCancelInviteRequest, + options?: RawAxiosRequestConfig, + ) { + return InvitesApiFp(this.configuration) + .cancelInvite(requestParameters.orgId, requestParameters.inviteId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Invite new members into the organization. + * @summary Invite Members To Organization + * @param {InvitesApiInviteMembersToOrganizationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public inviteMembersToOrganization( + requestParameters: InvitesApiInviteMembersToOrganizationRequest, + options?: RawAxiosRequestConfig, + ) { + return InvitesApiFp(this.configuration) + .inviteMembersToOrganization( + requestParameters.orgId, + requestParameters.inviteCreate, + requestParameters.inviterName, + requestParameters.inviterEmail, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists pending organization invites + * @summary List Organization Invites + * @param {InvitesApiListOrganizationInvitesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listOrganizationInvites( + requestParameters: InvitesApiListOrganizationInvitesRequest, + options?: RawAxiosRequestConfig, + ) { + return InvitesApiFp(this.configuration) + .listOrganizationInvites( + requestParameters.orgId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/members-api.ts b/src/openapi/api/members-api.ts index 06a68f4d..82214ae3 100644 --- a/src/openapi/api/members-api.ts +++ b/src/openapi/api/members-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,54 +10,44 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { OrgMemberCreate } from '../types'; -// @ts-ignore -import { OrgMemberReadWithGrants } from '../types'; -// @ts-ignore -import { OrgMemberRemovePermissions } from '../types'; -// @ts-ignore -import { OrgMemberUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + OrgMemberCreate, + OrgMemberReadWithGrants, + OrgMemberRemovePermissions, + OrgMemberUpdate, +} from '../types'; /** * MembersApi - axios parameter creator - * @export */ export const MembersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Create an organization member if needed, and grant it permissions. The member can be specified either by ID (for an existing member), or by email (for either an existing member or a new one). For a new member, an invite will be sent. - * @summary Create Organization Members + * @summary Invite new members * @param {OrgMemberCreate} orgMemberCreate * @param {string} [inviterName] * @param {string} [inviterEmail] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createOrganizationMembers: async ( orgMemberCreate: OrgMemberCreate, inviterName?: string, inviterEmail?: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'orgMemberCreate' is not null or undefined assertParamExists('createOrganizationMembers', 'orgMemberCreate', orgMemberCreate); @@ -88,6 +76,7 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati } localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -109,19 +98,19 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati }, /** * Deletes an account member matching the given id or email address. The member will be removed from the active account in permit.io. If the member is the only member in its account (organization), returns 400 (bad request), due to nobody remains with access to the account, meaning deletion of the entire account (org). To completely remove an account, call DELETE `/orgs/{org}`. - * @summary Delete Organization Member + * @summary Remove member * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteOrganizationMember: async ( memberId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'memberId' is not null or undefined assertParamExists('deleteOrganizationMember', 'memberId', memberId); const localVarPath = `/v2/members/{member_id}`.replace( - `{${'member_id'}}`, + '{member_id}', encodeURIComponent(String(memberId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -139,6 +128,8 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -154,14 +145,14 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati }, /** * Remove permissions from a member. If the last permissions a member has are removed, the member is also deleted. - * @summary Delete Organization Permissions + * @summary Remove permission * @param {OrgMemberRemovePermissions} orgMemberRemovePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteOrganizationPermissions: async ( orgMemberRemovePermissions: OrgMemberRemovePermissions, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'orgMemberRemovePermissions' is not null or undefined assertParamExists( @@ -186,6 +177,7 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -209,9 +201,9 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati * Gets the authenticated account member\'s details. * @summary Get the authenticated account member * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getAuthenticatedMember: async (options: AxiosRequestConfig = {}): Promise => { + getAuthenticatedMember: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/v2/members/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -228,6 +220,8 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -246,16 +240,16 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati * @summary Get Organization Member * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getOrganizationMember: async ( memberId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'memberId' is not null or undefined assertParamExists('getOrganizationMember', 'memberId', memberId); const localVarPath = `/v2/members/{member_id}`.replace( - `{${'member_id'}}`, + '{member_id}', encodeURIComponent(String(memberId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -273,6 +267,8 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -294,14 +290,14 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listOrganizationMembers: async ( projectId?: string, envId?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/v2/members`; // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -335,6 +331,8 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -350,23 +348,23 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati }, /** * Updates an account member\'s settings. - * @summary Update Organization Member + * @summary Edit members * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. * @param {OrgMemberUpdate} orgMemberUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateOrganizationMember: async ( memberId: string, orgMemberUpdate: OrgMemberUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'memberId' is not null or undefined assertParamExists('updateOrganizationMember', 'memberId', memberId); // verify required parameter 'orgMemberUpdate' is not null or undefined assertParamExists('updateOrganizationMember', 'orgMemberUpdate', orgMemberUpdate); const localVarPath = `/v2/members/{member_id}`.replace( - `{${'member_id'}}`, + '{member_id}', encodeURIComponent(String(memberId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -385,6 +383,7 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -409,25 +408,24 @@ export const MembersApiAxiosParamCreator = function (configuration?: Configurati /** * MembersApi - functional programming interface - * @export */ export const MembersApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = MembersApiAxiosParamCreator(configuration); return { /** * Create an organization member if needed, and grant it permissions. The member can be specified either by ID (for an existing member), or by email (for either an existing member or a new one). For a new member, an invite will be sent. - * @summary Create Organization Members + * @summary Invite new members * @param {OrgMemberCreate} orgMemberCreate * @param {string} [inviterName] * @param {string} [inviterEmail] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createOrganizationMembers( orgMemberCreate: OrgMemberCreate, inviterName?: string, inviterEmail?: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -437,66 +435,107 @@ export const MembersApiFp = function (configuration?: Configuration) { inviterEmail, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.createOrganizationMembers']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes an account member matching the given id or email address. The member will be removed from the active account in permit.io. If the member is the only member in its account (organization), returns 400 (bad request), due to nobody remains with access to the account, meaning deletion of the entire account (org). To completely remove an account, call DELETE `/orgs/{org}`. - * @summary Delete Organization Member + * @summary Remove member * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteOrganizationMember( memberId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationMember( memberId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.deleteOrganizationMember']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Remove permissions from a member. If the last permissions a member has are removed, the member is also deleted. - * @summary Delete Organization Permissions + * @summary Remove permission * @param {OrgMemberRemovePermissions} orgMemberRemovePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteOrganizationPermissions( orgMemberRemovePermissions: OrgMemberRemovePermissions, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationPermissions( orgMemberRemovePermissions, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.deleteOrganizationPermissions']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets the authenticated account member\'s details. * @summary Get the authenticated account member * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getAuthenticatedMember( - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthenticatedMember(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.getAuthenticatedMember']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single account member by its id or email address. matching the given member, if no such member exists under the current active account (organization), returns 404. * @summary Get Organization Member * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getOrganizationMember( memberId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -504,7 +543,16 @@ export const MembersApiFp = function (configuration?: Configuration) { memberId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.getOrganizationMember']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the account members that current active account has access to, optionally filtering by project or environment. The active account/organization is determined by the API Key used or by the authenticated session id. @@ -514,14 +562,14 @@ export const MembersApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listOrganizationMembers( projectId?: string, envId?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { @@ -532,20 +580,30 @@ export const MembersApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.listOrganizationMembers']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Updates an account member\'s settings. - * @summary Update Organization Member + * @summary Edit members * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. * @param {OrgMemberUpdate} orgMemberUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateOrganizationMember( memberId: string, orgMemberUpdate: OrgMemberUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -554,14 +612,23 @@ export const MembersApiFp = function (configuration?: Configuration) { orgMemberUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['MembersApi.updateOrganizationMember']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * MembersApi - factory interface - * @export */ export const MembersApiFactory = function ( configuration?: Configuration, @@ -572,107 +639,116 @@ export const MembersApiFactory = function ( return { /** * Create an organization member if needed, and grant it permissions. The member can be specified either by ID (for an existing member), or by email (for either an existing member or a new one). For a new member, an invite will be sent. - * @summary Create Organization Members - * @param {OrgMemberCreate} orgMemberCreate - * @param {string} [inviterName] - * @param {string} [inviterEmail] + * @summary Invite new members + * @param {MembersApiCreateOrganizationMembersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createOrganizationMembers( - orgMemberCreate: OrgMemberCreate, - inviterName?: string, - inviterEmail?: string, - options?: any, + requestParameters: MembersApiCreateOrganizationMembersRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createOrganizationMembers(orgMemberCreate, inviterName, inviterEmail, options) + .createOrganizationMembers( + requestParameters.orgMemberCreate, + requestParameters.inviterName, + requestParameters.inviterEmail, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes an account member matching the given id or email address. The member will be removed from the active account in permit.io. If the member is the only member in its account (organization), returns 400 (bad request), due to nobody remains with access to the account, meaning deletion of the entire account (org). To completely remove an account, call DELETE `/orgs/{org}`. - * @summary Delete Organization Member - * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. + * @summary Remove member + * @param {MembersApiDeleteOrganizationMemberRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteOrganizationMember(memberId: string, options?: any): AxiosPromise { + deleteOrganizationMember( + requestParameters: MembersApiDeleteOrganizationMemberRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .deleteOrganizationMember(memberId, options) + .deleteOrganizationMember(requestParameters.memberId, options) .then((request) => request(axios, basePath)); }, /** * Remove permissions from a member. If the last permissions a member has are removed, the member is also deleted. - * @summary Delete Organization Permissions - * @param {OrgMemberRemovePermissions} orgMemberRemovePermissions + * @summary Remove permission + * @param {MembersApiDeleteOrganizationPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteOrganizationPermissions( - orgMemberRemovePermissions: OrgMemberRemovePermissions, - options?: any, + requestParameters: MembersApiDeleteOrganizationPermissionsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteOrganizationPermissions(orgMemberRemovePermissions, options) + .deleteOrganizationPermissions(requestParameters.orgMemberRemovePermissions, options) .then((request) => request(axios, basePath)); }, /** * Gets the authenticated account member\'s details. * @summary Get the authenticated account member * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getAuthenticatedMember(options?: any): AxiosPromise { + getAuthenticatedMember(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getAuthenticatedMember(options).then((request) => request(axios, basePath)); }, /** * Gets a single account member by its id or email address. matching the given member, if no such member exists under the current active account (organization), returns 404. * @summary Get Organization Member - * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. + * @param {MembersApiGetOrganizationMemberRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getOrganizationMember(memberId: string, options?: any): AxiosPromise { + getOrganizationMember( + requestParameters: MembersApiGetOrganizationMemberRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getOrganizationMember(memberId, options) + .getOrganizationMember(requestParameters.memberId, options) .then((request) => request(axios, basePath)); }, /** * Lists all the account members that current active account has access to, optionally filtering by project or environment. The active account/organization is determined by the API Key used or by the authenticated session id. * @summary List Organization Members - * @param {string} [projectId] - * @param {string} [envId] - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {MembersApiListOrganizationMembersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listOrganizationMembers( - projectId?: string, - envId?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: MembersApiListOrganizationMembersRequest = {}, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listOrganizationMembers(projectId, envId, page, perPage, options) + .listOrganizationMembers( + requestParameters.projectId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Updates an account member\'s settings. - * @summary Update Organization Member - * @param {string} memberId Either the unique id (UUID) of the account member, or the email address of the account member. - * @param {OrgMemberUpdate} orgMemberUpdate + * @summary Edit members + * @param {MembersApiUpdateOrganizationMemberRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateOrganizationMember( - memberId: string, - orgMemberUpdate: OrgMemberUpdate, - options?: any, + requestParameters: MembersApiUpdateOrganizationMemberRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateOrganizationMember(memberId, orgMemberUpdate, options) + .updateOrganizationMember( + requestParameters.memberId, + requestParameters.orgMemberUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -680,148 +756,87 @@ export const MembersApiFactory = function ( /** * Request parameters for createOrganizationMembers operation in MembersApi. - * @export - * @interface MembersApiCreateOrganizationMembersRequest */ export interface MembersApiCreateOrganizationMembersRequest { - /** - * - * @type {OrgMemberCreate} - * @memberof MembersApiCreateOrganizationMembers - */ readonly orgMemberCreate: OrgMemberCreate; - /** - * - * @type {string} - * @memberof MembersApiCreateOrganizationMembers - */ readonly inviterName?: string; - /** - * - * @type {string} - * @memberof MembersApiCreateOrganizationMembers - */ readonly inviterEmail?: string; } /** * Request parameters for deleteOrganizationMember operation in MembersApi. - * @export - * @interface MembersApiDeleteOrganizationMemberRequest */ export interface MembersApiDeleteOrganizationMemberRequest { /** * Either the unique id (UUID) of the account member, or the email address of the account member. - * @type {string} - * @memberof MembersApiDeleteOrganizationMember */ readonly memberId: string; } /** * Request parameters for deleteOrganizationPermissions operation in MembersApi. - * @export - * @interface MembersApiDeleteOrganizationPermissionsRequest */ export interface MembersApiDeleteOrganizationPermissionsRequest { - /** - * - * @type {OrgMemberRemovePermissions} - * @memberof MembersApiDeleteOrganizationPermissions - */ readonly orgMemberRemovePermissions: OrgMemberRemovePermissions; } /** * Request parameters for getOrganizationMember operation in MembersApi. - * @export - * @interface MembersApiGetOrganizationMemberRequest */ export interface MembersApiGetOrganizationMemberRequest { /** * Either the unique id (UUID) of the account member, or the email address of the account member. - * @type {string} - * @memberof MembersApiGetOrganizationMember */ readonly memberId: string; } /** * Request parameters for listOrganizationMembers operation in MembersApi. - * @export - * @interface MembersApiListOrganizationMembersRequest */ export interface MembersApiListOrganizationMembersRequest { - /** - * - * @type {string} - * @memberof MembersApiListOrganizationMembers - */ readonly projectId?: string; - /** - * - * @type {string} - * @memberof MembersApiListOrganizationMembers - */ readonly envId?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof MembersApiListOrganizationMembers */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof MembersApiListOrganizationMembers */ readonly perPage?: number; } /** * Request parameters for updateOrganizationMember operation in MembersApi. - * @export - * @interface MembersApiUpdateOrganizationMemberRequest */ export interface MembersApiUpdateOrganizationMemberRequest { /** * Either the unique id (UUID) of the account member, or the email address of the account member. - * @type {string} - * @memberof MembersApiUpdateOrganizationMember */ readonly memberId: string; - /** - * - * @type {OrgMemberUpdate} - * @memberof MembersApiUpdateOrganizationMember - */ readonly orgMemberUpdate: OrgMemberUpdate; } /** * MembersApi - object-oriented interface - * @export - * @class MembersApi - * @extends {BaseAPI} */ export class MembersApi extends BaseAPI { /** * Create an organization member if needed, and grant it permissions. The member can be specified either by ID (for an existing member), or by email (for either an existing member or a new one). For a new member, an invite will be sent. - * @summary Create Organization Members + * @summary Invite new members * @param {MembersApiCreateOrganizationMembersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ public createOrganizationMembers( requestParameters: MembersApiCreateOrganizationMembersRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return MembersApiFp(this.configuration) .createOrganizationMembers( @@ -835,15 +850,14 @@ export class MembersApi extends BaseAPI { /** * Deletes an account member matching the given id or email address. The member will be removed from the active account in permit.io. If the member is the only member in its account (organization), returns 400 (bad request), due to nobody remains with access to the account, meaning deletion of the entire account (org). To completely remove an account, call DELETE `/orgs/{org}`. - * @summary Delete Organization Member + * @summary Remove member * @param {MembersApiDeleteOrganizationMemberRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ public deleteOrganizationMember( requestParameters: MembersApiDeleteOrganizationMemberRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return MembersApiFp(this.configuration) .deleteOrganizationMember(requestParameters.memberId, options) @@ -852,15 +866,14 @@ export class MembersApi extends BaseAPI { /** * Remove permissions from a member. If the last permissions a member has are removed, the member is also deleted. - * @summary Delete Organization Permissions + * @summary Remove permission * @param {MembersApiDeleteOrganizationPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ public deleteOrganizationPermissions( requestParameters: MembersApiDeleteOrganizationPermissionsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return MembersApiFp(this.configuration) .deleteOrganizationPermissions(requestParameters.orgMemberRemovePermissions, options) @@ -871,10 +884,9 @@ export class MembersApi extends BaseAPI { * Gets the authenticated account member\'s details. * @summary Get the authenticated account member * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ - public getAuthenticatedMember(options?: AxiosRequestConfig) { + public getAuthenticatedMember(options?: RawAxiosRequestConfig) { return MembersApiFp(this.configuration) .getAuthenticatedMember(options) .then((request) => request(this.axios, this.basePath)); @@ -885,12 +897,11 @@ export class MembersApi extends BaseAPI { * @summary Get Organization Member * @param {MembersApiGetOrganizationMemberRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ public getOrganizationMember( requestParameters: MembersApiGetOrganizationMemberRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return MembersApiFp(this.configuration) .getOrganizationMember(requestParameters.memberId, options) @@ -902,12 +913,11 @@ export class MembersApi extends BaseAPI { * @summary List Organization Members * @param {MembersApiListOrganizationMembersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ public listOrganizationMembers( requestParameters: MembersApiListOrganizationMembersRequest = {}, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return MembersApiFp(this.configuration) .listOrganizationMembers( @@ -922,15 +932,14 @@ export class MembersApi extends BaseAPI { /** * Updates an account member\'s settings. - * @summary Update Organization Member + * @summary Edit members * @param {MembersApiUpdateOrganizationMemberRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi + * @throws If a required parameter is missing. */ public updateOrganizationMember( requestParameters: MembersApiUpdateOrganizationMemberRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return MembersApiFp(this.configuration) .updateOrganizationMember( diff --git a/src/openapi/api/opaldata-api.ts b/src/openapi/api/opaldata-api.ts deleted file mode 100644 index 18f9a1a5..00000000 --- a/src/openapi/api/opaldata-api.ts +++ /dev/null @@ -1,1273 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { FullData } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResponseGetDataForConditionSetV2InternalOpalDataOrgIdProjIdEnvIdConditionSetsConditionSetIdGet } from '../types'; -// @ts-ignore -import { ResponseGetDataForResourceV2InternalOpalDataOrgIdProjIdEnvIdResourceTypesResourceIdGet } from '../types'; -// @ts-ignore -import { ResponseGetDataForRoleV2InternalOpalDataOrgIdProjIdEnvIdRolesRoleIdGet } from '../types'; -// @ts-ignore -import { ResponseGetDataForTenantV2InternalOpalDataOrgIdProjIdEnvIdTenantsTenantIdGet } from '../types'; -// @ts-ignore -import { ResponseGetDataForUserV2InternalOpalDataOrgIdProjIdEnvIdUsersUserIdGet } from '../types'; -/** - * OPALDataApi - axios parameter creator - * @export - */ -export const OPALDataApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get All Data - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {boolean} [internalUpdateCache] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAllData: async ( - orgId: string, - projId: string, - envId: string, - internalUpdateCache?: boolean, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getAllData', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getAllData', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getAllData', 'envId', envId); - const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - if (internalUpdateCache !== undefined) { - localVarQueryParameter['__internal_update_cache'] = internalUpdateCache; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Data For Condition Set - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForConditionSet: async ( - orgId: string, - projId: string, - envId: string, - conditionSetId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getDataForConditionSet', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getDataForConditionSet', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getDataForConditionSet', 'envId', envId); - // verify required parameter 'conditionSetId' is not null or undefined - assertParamExists('getDataForConditionSet', 'conditionSetId', conditionSetId); - const localVarPath = - `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_sets/{condition_set_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'condition_set_id'}}`, encodeURIComponent(String(conditionSetId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Data For Resource - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForResource: async ( - orgId: string, - projId: string, - envId: string, - resourceId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getDataForResource', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getDataForResource', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getDataForResource', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('getDataForResource', 'resourceId', resourceId); - const localVarPath = - `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_types/{resource_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Data For Role - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForRole: async ( - orgId: string, - projId: string, - envId: string, - roleId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getDataForRole', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getDataForRole', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getDataForRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('getDataForRole', 'roleId', roleId); - const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/roles/{role_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * return permission assignment data between user sets and resource sets (i.e: condition set rules data) - * @summary Get Data For Set Rule - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userSetId - * @param {string} resourceSetId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForSetRule: async ( - orgId: string, - projId: string, - envId: string, - userSetId: string, - resourceSetId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getDataForSetRule', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getDataForSetRule', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getDataForSetRule', 'envId', envId); - // verify required parameter 'userSetId' is not null or undefined - assertParamExists('getDataForSetRule', 'userSetId', userSetId); - // verify required parameter 'resourceSetId' is not null or undefined - assertParamExists('getDataForSetRule', 'resourceSetId', resourceSetId); - const localVarPath = - `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_set_rules/{user_set_id}/{resource_set_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_set_id'}}`, encodeURIComponent(String(userSetId))) - .replace(`{${'resource_set_id'}}`, encodeURIComponent(String(resourceSetId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Data For Tenant - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForTenant: async ( - orgId: string, - projId: string, - envId: string, - tenantId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getDataForTenant', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getDataForTenant', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getDataForTenant', 'envId', envId); - // verify required parameter 'tenantId' is not null or undefined - assertParamExists('getDataForTenant', 'tenantId', tenantId); - const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/tenants/{tenant_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'tenant_id'}}`, encodeURIComponent(String(tenantId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Data For User - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForUser: async ( - orgId: string, - projId: string, - envId: string, - userId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('getDataForUser', 'orgId', orgId); - // verify required parameter 'projId' is not null or undefined - assertParamExists('getDataForUser', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getDataForUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('getDataForUser', 'userId', userId); - const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users/{user_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; -}; - -/** - * OPALDataApi - functional programming interface - * @export - */ -export const OPALDataApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = OPALDataApiAxiosParamCreator(configuration); - return { - /** - * - * @summary Get All Data - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {boolean} [internalUpdateCache] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAllData( - orgId: string, - projId: string, - envId: string, - internalUpdateCache?: boolean, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAllData( - orgId, - projId, - envId, - internalUpdateCache, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Data For Condition Set - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDataForConditionSet( - orgId: string, - projId: string, - envId: string, - conditionSetId: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataForConditionSet( - orgId, - projId, - envId, - conditionSetId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Data For Resource - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDataForResource( - orgId: string, - projId: string, - envId: string, - resourceId: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataForResource( - orgId, - projId, - envId, - resourceId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Data For Role - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDataForRole( - orgId: string, - projId: string, - envId: string, - roleId: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataForRole( - orgId, - projId, - envId, - roleId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * return permission assignment data between user sets and resource sets (i.e: condition set rules data) - * @summary Get Data For Set Rule - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userSetId - * @param {string} resourceSetId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDataForSetRule( - orgId: string, - projId: string, - envId: string, - userSetId: string, - resourceSetId: string, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: Array }> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataForSetRule( - orgId, - projId, - envId, - userSetId, - resourceSetId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Data For Tenant - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDataForTenant( - orgId: string, - projId: string, - envId: string, - tenantId: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataForTenant( - orgId, - projId, - envId, - tenantId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Data For User - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDataForUser( - orgId: string, - projId: string, - envId: string, - userId: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataForUser( - orgId, - projId, - envId, - userId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - }; -}; - -/** - * OPALDataApi - factory interface - * @export - */ -export const OPALDataApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = OPALDataApiFp(configuration); - return { - /** - * - * @summary Get All Data - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {boolean} [internalUpdateCache] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAllData( - orgId: string, - projId: string, - envId: string, - internalUpdateCache?: boolean, - options?: any, - ): AxiosPromise { - return localVarFp - .getAllData(orgId, projId, envId, internalUpdateCache, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Data For Condition Set - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} conditionSetId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForConditionSet( - orgId: string, - projId: string, - envId: string, - conditionSetId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getDataForConditionSet(orgId, projId, envId, conditionSetId, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Data For Resource - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForResource( - orgId: string, - projId: string, - envId: string, - resourceId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getDataForResource(orgId, projId, envId, resourceId, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Data For Role - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForRole( - orgId: string, - projId: string, - envId: string, - roleId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getDataForRole(orgId, projId, envId, roleId, options) - .then((request) => request(axios, basePath)); - }, - /** - * return permission assignment data between user sets and resource sets (i.e: condition set rules data) - * @summary Get Data For Set Rule - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userSetId - * @param {string} resourceSetId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForSetRule( - orgId: string, - projId: string, - envId: string, - userSetId: string, - resourceSetId: string, - options?: any, - ): AxiosPromise<{ [key: string]: Array }> { - return localVarFp - .getDataForSetRule(orgId, projId, envId, userSetId, resourceSetId, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Data For Tenant - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForTenant( - orgId: string, - projId: string, - envId: string, - tenantId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getDataForTenant(orgId, projId, envId, tenantId, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Data For User - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDataForUser( - orgId: string, - projId: string, - envId: string, - userId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getDataForUser(orgId, projId, envId, userId, options) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for getAllData operation in OPALDataApi. - * @export - * @interface OPALDataApiGetAllDataRequest - */ -export interface OPALDataApiGetAllDataRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetAllData - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetAllData - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetAllData - */ - readonly envId: string; - - /** - * - * @type {boolean} - * @memberof OPALDataApiGetAllData - */ - readonly internalUpdateCache?: boolean; -} - -/** - * Request parameters for getDataForConditionSet operation in OPALDataApi. - * @export - * @interface OPALDataApiGetDataForConditionSetRequest - */ -export interface OPALDataApiGetDataForConditionSetRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForConditionSet - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForConditionSet - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForConditionSet - */ - readonly envId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForConditionSet - */ - readonly conditionSetId: string; -} - -/** - * Request parameters for getDataForResource operation in OPALDataApi. - * @export - * @interface OPALDataApiGetDataForResourceRequest - */ -export interface OPALDataApiGetDataForResourceRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForResource - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForResource - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForResource - */ - readonly envId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForResource - */ - readonly resourceId: string; -} - -/** - * Request parameters for getDataForRole operation in OPALDataApi. - * @export - * @interface OPALDataApiGetDataForRoleRequest - */ -export interface OPALDataApiGetDataForRoleRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForRole - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForRole - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForRole - */ - readonly envId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForRole - */ - readonly roleId: string; -} - -/** - * Request parameters for getDataForSetRule operation in OPALDataApi. - * @export - * @interface OPALDataApiGetDataForSetRuleRequest - */ -export interface OPALDataApiGetDataForSetRuleRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForSetRule - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForSetRule - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForSetRule - */ - readonly envId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForSetRule - */ - readonly userSetId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForSetRule - */ - readonly resourceSetId: string; -} - -/** - * Request parameters for getDataForTenant operation in OPALDataApi. - * @export - * @interface OPALDataApiGetDataForTenantRequest - */ -export interface OPALDataApiGetDataForTenantRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForTenant - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForTenant - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForTenant - */ - readonly envId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForTenant - */ - readonly tenantId: string; -} - -/** - * Request parameters for getDataForUser operation in OPALDataApi. - * @export - * @interface OPALDataApiGetDataForUserRequest - */ -export interface OPALDataApiGetDataForUserRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForUser - */ - readonly orgId: string; - - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForUser - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof OPALDataApiGetDataForUser - */ - readonly envId: string; - - /** - * - * @type {string} - * @memberof OPALDataApiGetDataForUser - */ - readonly userId: string; -} - -/** - * OPALDataApi - object-oriented interface - * @export - * @class OPALDataApi - * @extends {BaseAPI} - */ -export class OPALDataApi extends BaseAPI { - /** - * - * @summary Get All Data - * @param {OPALDataApiGetAllDataRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getAllData(requestParameters: OPALDataApiGetAllDataRequest, options?: AxiosRequestConfig) { - return OPALDataApiFp(this.configuration) - .getAllData( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.internalUpdateCache, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Data For Condition Set - * @param {OPALDataApiGetDataForConditionSetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getDataForConditionSet( - requestParameters: OPALDataApiGetDataForConditionSetRequest, - options?: AxiosRequestConfig, - ) { - return OPALDataApiFp(this.configuration) - .getDataForConditionSet( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.conditionSetId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Data For Resource - * @param {OPALDataApiGetDataForResourceRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getDataForResource( - requestParameters: OPALDataApiGetDataForResourceRequest, - options?: AxiosRequestConfig, - ) { - return OPALDataApiFp(this.configuration) - .getDataForResource( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.resourceId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Data For Role - * @param {OPALDataApiGetDataForRoleRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getDataForRole( - requestParameters: OPALDataApiGetDataForRoleRequest, - options?: AxiosRequestConfig, - ) { - return OPALDataApiFp(this.configuration) - .getDataForRole( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.roleId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * return permission assignment data between user sets and resource sets (i.e: condition set rules data) - * @summary Get Data For Set Rule - * @param {OPALDataApiGetDataForSetRuleRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getDataForSetRule( - requestParameters: OPALDataApiGetDataForSetRuleRequest, - options?: AxiosRequestConfig, - ) { - return OPALDataApiFp(this.configuration) - .getDataForSetRule( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.userSetId, - requestParameters.resourceSetId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Data For Tenant - * @param {OPALDataApiGetDataForTenantRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getDataForTenant( - requestParameters: OPALDataApiGetDataForTenantRequest, - options?: AxiosRequestConfig, - ) { - return OPALDataApiFp(this.configuration) - .getDataForTenant( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.tenantId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Data For User - * @param {OPALDataApiGetDataForUserRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OPALDataApi - */ - public getDataForUser( - requestParameters: OPALDataApiGetDataForUserRequest, - options?: AxiosRequestConfig, - ) { - return OPALDataApiFp(this.configuration) - .getDataForUser( - requestParameters.orgId, - requestParameters.projId, - requestParameters.envId, - requestParameters.userId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } -} diff --git a/src/openapi/api/opaldata-eapapi.ts b/src/openapi/api/opaldata-eapapi.ts new file mode 100644 index 00000000..a5b72e4a --- /dev/null +++ b/src/openapi/api/opaldata-eapapi.ts @@ -0,0 +1,1159 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + replaceWithSerializableTypeIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { + PermitBackendSchemasSchemaOpalDataFullData, + ResponseGetAllDataV2InternalOpalDataOrgIdProjIdEnvIdGet, + ResponseGetAllResourceInstancesDataV2InternalOpalDataOrgIdProjIdEnvIdResourceInstancesGet, + ResponseGetAllUsersDataV2InternalOpalDataOrgIdProjIdEnvIdUsersGet, +} from '../types'; +/** + * OPALDataEAPApi - axios parameter creator + */ +export const OPALDataEAPApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Get All Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllData: async ( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('getAllData', 'orgId', orgId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAllData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAllData', 'envId', envId); + const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (timeout !== undefined) { + localVarQueryParameter['timeout'] = timeout; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get All Data Optimized + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllDataOptimized: async ( + orgId: string, + projId: string, + envId: string, + xShardID?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('getAllDataOptimized', 'orgId', orgId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAllDataOptimized', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAllDataOptimized', 'envId', envId); + const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/optimized` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get All Relationships Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllRelationshipsData: async ( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('getAllRelationshipsData', 'orgId', orgId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAllRelationshipsData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAllRelationshipsData', 'envId', envId); + const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/relationships` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (timeout !== undefined) { + localVarQueryParameter['timeout'] = timeout; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get All Resource Instances Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllResourceInstancesData: async ( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('getAllResourceInstancesData', 'orgId', orgId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAllResourceInstancesData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAllResourceInstancesData', 'envId', envId); + const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/resource_instances` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (timeout !== undefined) { + localVarQueryParameter['timeout'] = timeout; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get All Role Assignments Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllRoleAssignmentsData: async ( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('getAllRoleAssignmentsData', 'orgId', orgId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAllRoleAssignmentsData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAllRoleAssignmentsData', 'envId', envId); + const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/role_assignments` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (timeout !== undefined) { + localVarQueryParameter['timeout'] = timeout; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get All Users Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllUsersData: async ( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'orgId' is not null or undefined + assertParamExists('getAllUsersData', 'orgId', orgId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getAllUsersData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getAllUsersData', 'envId', envId); + const localVarPath = `/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users` + .replace('{org_id}', encodeURIComponent(String(orgId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (timeout !== undefined) { + localVarQueryParameter['timeout'] = timeout; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * OPALDataEAPApi - functional programming interface + */ +export const OPALDataEAPApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = OPALDataEAPApiAxiosParamCreator(configuration); + return { + /** + * + * @summary Get All Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAllData( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllData( + orgId, + projId, + envId, + timeout, + xShardID, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OPALDataEAPApi.getAllData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get All Data Optimized + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAllDataOptimized( + orgId: string, + projId: string, + envId: string, + xShardID?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllDataOptimized( + orgId, + projId, + envId, + xShardID, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OPALDataEAPApi.getAllDataOptimized']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get All Relationships Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAllRelationshipsData( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: { [key: string]: { [key: string]: Array } } }> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllRelationshipsData( + orgId, + projId, + envId, + timeout, + xShardID, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OPALDataEAPApi.getAllRelationshipsData']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get All Resource Instances Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAllResourceInstancesData( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllResourceInstancesData( + orgId, + projId, + envId, + timeout, + xShardID, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OPALDataEAPApi.getAllResourceInstancesData']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get All Role Assignments Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAllRoleAssignmentsData( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: { [key: string]: Array } }> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllRoleAssignmentsData( + orgId, + projId, + envId, + timeout, + xShardID, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OPALDataEAPApi.getAllRoleAssignmentsData']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get All Users Data + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [timeout] Timeout for the data generation in the new data generation mode + * @param {number} [xShardID] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getAllUsersData( + orgId: string, + projId: string, + envId: string, + timeout?: number, + xShardID?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllUsersData( + orgId, + projId, + envId, + timeout, + xShardID, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OPALDataEAPApi.getAllUsersData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * OPALDataEAPApi - factory interface + */ +export const OPALDataEAPApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = OPALDataEAPApiFp(configuration); + return { + /** + * + * @summary Get All Data + * @param {OPALDataEAPApiGetAllDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllData( + requestParameters: OPALDataEAPApiGetAllDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getAllData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get All Data Optimized + * @param {OPALDataEAPApiGetAllDataOptimizedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllDataOptimized( + requestParameters: OPALDataEAPApiGetAllDataOptimizedRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getAllDataOptimized( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.xShardID, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get All Relationships Data + * @param {OPALDataEAPApiGetAllRelationshipsDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllRelationshipsData( + requestParameters: OPALDataEAPApiGetAllRelationshipsDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: { [key: string]: { [key: string]: Array } } }> { + return localVarFp + .getAllRelationshipsData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get All Resource Instances Data + * @param {OPALDataEAPApiGetAllResourceInstancesDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllResourceInstancesData( + requestParameters: OPALDataEAPApiGetAllResourceInstancesDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getAllResourceInstancesData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get All Role Assignments Data + * @param {OPALDataEAPApiGetAllRoleAssignmentsDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllRoleAssignmentsData( + requestParameters: OPALDataEAPApiGetAllRoleAssignmentsDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: { [key: string]: Array } }> { + return localVarFp + .getAllRoleAssignmentsData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get All Users Data + * @param {OPALDataEAPApiGetAllUsersDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getAllUsersData( + requestParameters: OPALDataEAPApiGetAllUsersDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getAllUsersData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getAllData operation in OPALDataEAPApi. + */ +export interface OPALDataEAPApiGetAllDataRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Timeout for the data generation in the new data generation mode + */ + readonly timeout?: number; + + readonly xShardID?: number; +} + +/** + * Request parameters for getAllDataOptimized operation in OPALDataEAPApi. + */ +export interface OPALDataEAPApiGetAllDataOptimizedRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly xShardID?: number; +} + +/** + * Request parameters for getAllRelationshipsData operation in OPALDataEAPApi. + */ +export interface OPALDataEAPApiGetAllRelationshipsDataRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Timeout for the data generation in the new data generation mode + */ + readonly timeout?: number; + + readonly xShardID?: number; +} + +/** + * Request parameters for getAllResourceInstancesData operation in OPALDataEAPApi. + */ +export interface OPALDataEAPApiGetAllResourceInstancesDataRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Timeout for the data generation in the new data generation mode + */ + readonly timeout?: number; + + readonly xShardID?: number; +} + +/** + * Request parameters for getAllRoleAssignmentsData operation in OPALDataEAPApi. + */ +export interface OPALDataEAPApiGetAllRoleAssignmentsDataRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Timeout for the data generation in the new data generation mode + */ + readonly timeout?: number; + + readonly xShardID?: number; +} + +/** + * Request parameters for getAllUsersData operation in OPALDataEAPApi. + */ +export interface OPALDataEAPApiGetAllUsersDataRequest { + /** + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + */ + readonly orgId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Timeout for the data generation in the new data generation mode + */ + readonly timeout?: number; + + readonly xShardID?: number; +} + +/** + * OPALDataEAPApi - object-oriented interface + */ +export class OPALDataEAPApi extends BaseAPI { + /** + * + * @summary Get All Data + * @param {OPALDataEAPApiGetAllDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAllData( + requestParameters: OPALDataEAPApiGetAllDataRequest, + options?: RawAxiosRequestConfig, + ) { + return OPALDataEAPApiFp(this.configuration) + .getAllData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get All Data Optimized + * @param {OPALDataEAPApiGetAllDataOptimizedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAllDataOptimized( + requestParameters: OPALDataEAPApiGetAllDataOptimizedRequest, + options?: RawAxiosRequestConfig, + ) { + return OPALDataEAPApiFp(this.configuration) + .getAllDataOptimized( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.xShardID, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get All Relationships Data + * @param {OPALDataEAPApiGetAllRelationshipsDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAllRelationshipsData( + requestParameters: OPALDataEAPApiGetAllRelationshipsDataRequest, + options?: RawAxiosRequestConfig, + ) { + return OPALDataEAPApiFp(this.configuration) + .getAllRelationshipsData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get All Resource Instances Data + * @param {OPALDataEAPApiGetAllResourceInstancesDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAllResourceInstancesData( + requestParameters: OPALDataEAPApiGetAllResourceInstancesDataRequest, + options?: RawAxiosRequestConfig, + ) { + return OPALDataEAPApiFp(this.configuration) + .getAllResourceInstancesData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get All Role Assignments Data + * @param {OPALDataEAPApiGetAllRoleAssignmentsDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAllRoleAssignmentsData( + requestParameters: OPALDataEAPApiGetAllRoleAssignmentsDataRequest, + options?: RawAxiosRequestConfig, + ) { + return OPALDataEAPApiFp(this.configuration) + .getAllRoleAssignmentsData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get All Users Data + * @param {OPALDataEAPApiGetAllUsersDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getAllUsersData( + requestParameters: OPALDataEAPApiGetAllUsersDataRequest, + options?: RawAxiosRequestConfig, + ) { + return OPALDataEAPApiFp(this.configuration) + .getAllUsersData( + requestParameters.orgId, + requestParameters.projId, + requestParameters.envId, + requestParameters.timeout, + requestParameters.xShardID, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/operation-approval-eapapi.ts b/src/openapi/api/operation-approval-eapapi.ts new file mode 100644 index 00000000..21a064bf --- /dev/null +++ b/src/openapi/api/operation-approval-eapapi.ts @@ -0,0 +1,1412 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { + OperationApprovalApproved, + OperationApprovalCanceled, + OperationApprovalDenied, + OperationApprovalRead, + OperationApprovalReview, + OperationApprovalUserCreate, + PaginatedResultOperationApprovalList, + RequestStatus, +} from '../types'; +/** + * OperationApprovalEAPApi - axios parameter creator + */ +export const OperationApprovalEAPApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Approve Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalReview} operationApprovalReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveOperationApproval: async ( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalReview: OperationApprovalReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'operationApprovalId' is not null or undefined + assertParamExists('approveOperationApproval', 'operationApprovalId', operationApprovalId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('approveOperationApproval', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('approveOperationApproval', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('approveOperationApproval', 'elementsConfigId', elementsConfigId); + // verify required parameter 'operationApprovalReview' is not null or undefined + assertParamExists( + 'approveOperationApproval', + 'operationApprovalReview', + operationApprovalReview, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/approve` + .replace('{operation_approval_id}', encodeURIComponent(String(operationApprovalId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + operationApprovalReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Cancel Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelOperationApproval: async ( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'operationApprovalId' is not null or undefined + assertParamExists('cancelOperationApproval', 'operationApprovalId', operationApprovalId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('cancelOperationApproval', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('cancelOperationApproval', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('cancelOperationApproval', 'elementsConfigId', elementsConfigId); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/cancel` + .replace('{operation_approval_id}', encodeURIComponent(String(operationApprovalId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create Operation Approval + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalUserCreate} operationApprovalUserCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createOperationApproval: async ( + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalUserCreate: OperationApprovalUserCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('createOperationApproval', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('createOperationApproval', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('createOperationApproval', 'elementsConfigId', elementsConfigId); + // verify required parameter 'operationApprovalUserCreate' is not null or undefined + assertParamExists( + 'createOperationApproval', + 'operationApprovalUserCreate', + operationApprovalUserCreate, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + operationApprovalUserCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deny Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalReview} operationApprovalReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + denyOperationApproval: async ( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalReview: OperationApprovalReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'operationApprovalId' is not null or undefined + assertParamExists('denyOperationApproval', 'operationApprovalId', operationApprovalId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('denyOperationApproval', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('denyOperationApproval', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('denyOperationApproval', 'elementsConfigId', elementsConfigId); + // verify required parameter 'operationApprovalReview' is not null or undefined + assertParamExists( + 'denyOperationApproval', + 'operationApprovalReview', + operationApprovalReview, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/deny` + .replace('{operation_approval_id}', encodeURIComponent(String(operationApprovalId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + operationApprovalReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getOperationApproval: async ( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'operationApprovalId' is not null or undefined + assertParamExists('getOperationApproval', 'operationApprovalId', operationApprovalId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getOperationApproval', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getOperationApproval', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('getOperationApproval', 'elementsConfigId', elementsConfigId); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}` + .replace('{operation_approval_id}', encodeURIComponent(String(operationApprovalId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List Operation Approvals + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {RequestStatus} [status] Optional status filter, will only return access requests with this status. + * @param {string} [resource] Optional resource filter, will only return access request granted in that resource. + * @param {string} [resourceInstance] Optional resource instance filter, will only return access request granted in that resource instance. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listOperationApprovals: async ( + projId: string, + envId: string, + elementsConfigId: string, + status?: RequestStatus, + resource?: string, + resourceInstance?: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listOperationApprovals', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listOperationApprovals', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('listOperationApprovals', 'elementsConfigId', elementsConfigId); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (resourceInstance !== undefined) { + localVarQueryParameter['resource_instance'] = resourceInstance; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update Operation Approval Reviewer + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalReview} operationApprovalReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateOperationApprovalReviewer: async ( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalReview: OperationApprovalReview, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'operationApprovalId' is not null or undefined + assertParamExists( + 'updateOperationApprovalReviewer', + 'operationApprovalId', + operationApprovalId, + ); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateOperationApprovalReviewer', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateOperationApprovalReviewer', 'envId', envId); + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('updateOperationApprovalReviewer', 'elementsConfigId', elementsConfigId); + // verify required parameter 'operationApprovalReview' is not null or undefined + assertParamExists( + 'updateOperationApprovalReviewer', + 'operationApprovalReview', + operationApprovalReview, + ); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/operation_approval/{operation_approval_id}/reviewer` + .replace('{operation_approval_id}', encodeURIComponent(String(operationApprovalId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + operationApprovalReview, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * OperationApprovalEAPApi - functional programming interface + */ +export const OperationApprovalEAPApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = OperationApprovalEAPApiAxiosParamCreator(configuration); + return { + /** + * + * @summary Approve Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalReview} operationApprovalReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async approveOperationApproval( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalReview: OperationApprovalReview, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.approveOperationApproval( + operationApprovalId, + projId, + envId, + elementsConfigId, + operationApprovalReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.approveOperationApproval']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Cancel Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async cancelOperationApproval( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOperationApproval( + operationApprovalId, + projId, + envId, + elementsConfigId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.cancelOperationApproval']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Create Operation Approval + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalUserCreate} operationApprovalUserCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createOperationApproval( + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalUserCreate: OperationApprovalUserCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOperationApproval( + projId, + envId, + elementsConfigId, + operationApprovalUserCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.createOperationApproval']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Deny Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalReview} operationApprovalReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async denyOperationApproval( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalReview: OperationApprovalReview, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.denyOperationApproval( + operationApprovalId, + projId, + envId, + elementsConfigId, + operationApprovalReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.denyOperationApproval']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Operation Approval + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getOperationApproval( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOperationApproval( + operationApprovalId, + projId, + envId, + elementsConfigId, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.getOperationApproval']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List Operation Approvals + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {RequestStatus} [status] Optional status filter, will only return access requests with this status. + * @param {string} [resource] Optional resource filter, will only return access request granted in that resource. + * @param {string} [resourceInstance] Optional resource instance filter, will only return access request granted in that resource instance. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listOperationApprovals( + projId: string, + envId: string, + elementsConfigId: string, + status?: RequestStatus, + resource?: string, + resourceInstance?: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOperationApprovals( + projId, + envId, + elementsConfigId, + status, + resource, + resourceInstance, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.listOperationApprovals']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Update Operation Approval Reviewer + * @param {string} operationApprovalId Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {OperationApprovalReview} operationApprovalReview + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async updateOperationApprovalReviewer( + operationApprovalId: string, + projId: string, + envId: string, + elementsConfigId: string, + operationApprovalReview: OperationApprovalReview, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateOperationApprovalReviewer( + operationApprovalId, + projId, + envId, + elementsConfigId, + operationApprovalReview, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OperationApprovalEAPApi.updateOperationApprovalReviewer']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * OperationApprovalEAPApi - factory interface + */ +export const OperationApprovalEAPApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = OperationApprovalEAPApiFp(configuration); + return { + /** + * + * @summary Approve Operation Approval + * @param {OperationApprovalEAPApiApproveOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveOperationApproval( + requestParameters: OperationApprovalEAPApiApproveOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .approveOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Cancel Operation Approval + * @param {OperationApprovalEAPApiCancelOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + cancelOperationApproval( + requestParameters: OperationApprovalEAPApiCancelOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .cancelOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create Operation Approval + * @param {OperationApprovalEAPApiCreateOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createOperationApproval( + requestParameters: OperationApprovalEAPApiCreateOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createOperationApproval( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalUserCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deny Operation Approval + * @param {OperationApprovalEAPApiDenyOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + denyOperationApproval( + requestParameters: OperationApprovalEAPApiDenyOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .denyOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Operation Approval + * @param {OperationApprovalEAPApiGetOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getOperationApproval( + requestParameters: OperationApprovalEAPApiGetOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Operation Approvals + * @param {OperationApprovalEAPApiListOperationApprovalsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listOperationApprovals( + requestParameters: OperationApprovalEAPApiListOperationApprovalsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listOperationApprovals( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.status, + requestParameters.resource, + requestParameters.resourceInstance, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update Operation Approval Reviewer + * @param {OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateOperationApprovalReviewer( + requestParameters: OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateOperationApprovalReviewer( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalReview, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for approveOperationApproval operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiApproveOperationApprovalRequest { + /** + * Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + */ + readonly operationApprovalId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly operationApprovalReview: OperationApprovalReview; +} + +/** + * Request parameters for cancelOperationApproval operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiCancelOperationApprovalRequest { + /** + * Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + */ + readonly operationApprovalId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; +} + +/** + * Request parameters for createOperationApproval operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiCreateOperationApprovalRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly operationApprovalUserCreate: OperationApprovalUserCreate; +} + +/** + * Request parameters for denyOperationApproval operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiDenyOperationApprovalRequest { + /** + * Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + */ + readonly operationApprovalId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly operationApprovalReview: OperationApprovalReview; +} + +/** + * Request parameters for getOperationApproval operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiGetOperationApprovalRequest { + /** + * Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + */ + readonly operationApprovalId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listOperationApprovals operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiListOperationApprovalsRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Optional status filter, will only return access requests with this status. + */ + readonly status?: RequestStatus; + + /** + * Optional resource filter, will only return access request granted in that resource. + */ + readonly resource?: string; + + /** + * Optional resource instance filter, will only return access request granted in that resource instance. + */ + readonly resourceInstance?: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for updateOperationApprovalReviewer operation in OperationApprovalEAPApi. + */ +export interface OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest { + /** + * Either the unique id of the operation_approval, or the URL-friendly key of the operation_approval (i.e: the \"slug\"). + */ + readonly operationApprovalId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + readonly operationApprovalReview: OperationApprovalReview; +} + +/** + * OperationApprovalEAPApi - object-oriented interface + */ +export class OperationApprovalEAPApi extends BaseAPI { + /** + * + * @summary Approve Operation Approval + * @param {OperationApprovalEAPApiApproveOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public approveOperationApproval( + requestParameters: OperationApprovalEAPApiApproveOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .approveOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Cancel Operation Approval + * @param {OperationApprovalEAPApiCancelOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public cancelOperationApproval( + requestParameters: OperationApprovalEAPApiCancelOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .cancelOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create Operation Approval + * @param {OperationApprovalEAPApiCreateOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createOperationApproval( + requestParameters: OperationApprovalEAPApiCreateOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .createOperationApproval( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalUserCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deny Operation Approval + * @param {OperationApprovalEAPApiDenyOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public denyOperationApproval( + requestParameters: OperationApprovalEAPApiDenyOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .denyOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Operation Approval + * @param {OperationApprovalEAPApiGetOperationApprovalRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getOperationApproval( + requestParameters: OperationApprovalEAPApiGetOperationApprovalRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .getOperationApproval( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List Operation Approvals + * @param {OperationApprovalEAPApiListOperationApprovalsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listOperationApprovals( + requestParameters: OperationApprovalEAPApiListOperationApprovalsRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .listOperationApprovals( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.status, + requestParameters.resource, + requestParameters.resourceInstance, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update Operation Approval Reviewer + * @param {OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public updateOperationApprovalReviewer( + requestParameters: OperationApprovalEAPApiUpdateOperationApprovalReviewerRequest, + options?: RawAxiosRequestConfig, + ) { + return OperationApprovalEAPApiFp(this.configuration) + .updateOperationApprovalReviewer( + requestParameters.operationApprovalId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.operationApprovalReview, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/organizations-api.ts b/src/openapi/api/organizations-api.ts index 8cd9d39f..672952dc 100644 --- a/src/openapi/api/organizations-api.ts +++ b/src/openapi/api/organizations-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,104 +10,45 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { InviteCreate } from '../types'; -// @ts-ignore -import { InviteRead } from '../types'; -// @ts-ignore -import { MultiInviteResult } from '../types'; -// @ts-ignore -import { OrganizationCreate } from '../types'; -// @ts-ignore -import { OrganizationRead } from '../types'; -// @ts-ignore -import { OrganizationReadWithAPIKey } from '../types'; -// @ts-ignore -import { OrganizationUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + OrganizationCreate, + OrganizationRead, + OrganizationReadWithAPIKey, + OrganizationScheduleDeleteResponse, + OrganizationStats, + OrganizationUpdate, + Search, +} from '../types'; /** * OrganizationsApi - axios parameter creator - * @export */ export const OrganizationsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Cancels an invite that was sent to a new member. - * @summary Cancel Invite - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} inviteId Id of the invite to cancel - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cancelInvite: async ( - orgId: string, - inviteId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('cancelInvite', 'orgId', orgId); - // verify required parameter 'inviteId' is not null or undefined - assertParamExists('cancelInvite', 'inviteId', inviteId); - const localVarPath = `/v2/orgs/{org_id}/invites/{invite_id}` - .replace(`{${'org_id'}}`, encodeURIComponent(String(orgId))) - .replace(`{${'invite_id'}}`, encodeURIComponent(String(inviteId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Creates a new organization that will be owned by the authenticated actor (i.e: human team member or api key). + * If you want to create org via API, reach out to us and we will add the permission to your API token * @summary Create Organization * @param {OrganizationCreate} organizationCreate + * @param {string} [pageFullUrl] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createOrganization: async ( organizationCreate: OrganizationCreate, - options: AxiosRequestConfig = {}, + pageFullUrl?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'organizationCreate' is not null or undefined assertParamExists('createOrganization', 'organizationCreate', organizationCreate); @@ -130,6 +69,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -150,20 +90,20 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Deletes an organization (Permit.io account) and all its related data. + * Schedules an organization (Permit.io account) for permanent deletion. Effective immediately, the organization disappears from `GET /v2/orgs` (list) and direct lookups (`GET /v2/orgs/{id}`); subsequent `PATCH` and `DELETE` calls on it return 404. To preserve recoverability during the grace period, member grants and existing API keys are intentionally retained — support can restore the organization until the cutoff is reached. After the grace period the organization and all of its data are permanently removed. **Contract change:** This endpoint previously returned `204 No Content` with an empty body and an immediate hard-delete. It now returns `202 Accepted` with a JSON body describing when the permanent deletion will occur. Existing clients that branched on `status == 204` need to be updated. Error responses are documented in the OpenAPI ``responses`` block above. * @summary Delete Organization * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteOrganization: async ( orgId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'orgId' is not null or undefined assertParamExists('deleteOrganization', 'orgId', orgId); const localVarPath = `/v2/orgs/{org_id}`.replace( - `{${'org_id'}}`, + '{org_id}', encodeURIComponent(String(orgId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -181,6 +121,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -198,9 +140,9 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor. * @summary Get Active Organization * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getActiveOrganization: async (options: AxiosRequestConfig = {}): Promise => { + getActiveOrganization: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/v2/orgs/active/org`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -217,6 +159,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -235,16 +179,16 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @summary Get Organization * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getOrganization: async ( orgId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'orgId' is not null or undefined assertParamExists('getOrganization', 'orgId', orgId); const localVarPath = `/v2/orgs/{org_id}`.replace( - `{${'org_id'}}`, + '{org_id}', encodeURIComponent(String(orgId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -262,6 +206,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -276,30 +222,21 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Invite new members into the organization. - * @summary Invite Members To Organization - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {Array} inviteCreate - * @param {string} [inviterName] - * @param {string} [inviterEmail] + * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). + * @summary List Organizations + * @param {Search} [search] Text search for the org name or key or id + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - inviteMembersToOrganization: async ( - orgId: string, - inviteCreate: Array, - inviterName?: string, - inviterEmail?: string, - options: AxiosRequestConfig = {}, + listOrganizations: async ( + search?: Search, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'orgId' is not null or undefined - assertParamExists('inviteMembersToOrganization', 'orgId', orgId); - // verify required parameter 'inviteCreate' is not null or undefined - assertParamExists('inviteMembersToOrganization', 'inviteCreate', inviteCreate); - const localVarPath = `/v2/orgs/{org_id}/invites`.replace( - `{${'org_id'}}`, - encodeURIComponent(String(orgId)), - ); + const localVarPath = `/v2/orgs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -307,7 +244,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -315,15 +252,21 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - if (inviterName !== undefined) { - localVarQueryParameter['inviter_name'] = inviterName; + if (search !== undefined) { + for (const [key, value] of Object.entries(search)) { + localVarQueryParameter[key] = value; + } } - if (inviterEmail !== undefined) { - localVarQueryParameter['inviter_email'] = inviterEmail; + if (page !== undefined) { + localVarQueryParameter['page'] = page; } - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -332,11 +275,6 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi ...headersFromBaseOptions, ...options.headers, }; - localVarRequestOptions.data = serializeDataIfNeeded( - inviteCreate, - localVarRequestOptions, - configuration, - ); return { url: toPathString(localVarUrlObj), @@ -344,24 +282,20 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Lists pending organization invites - * @summary List Organization Invites - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * Restores a soft-deleted organization. Superuser-only endpoint. Clears the deleted_at timestamp so the organization becomes visible again. UUID-only: slug lookup is not accepted because org keys are only unique among active orgs (partial unique index on `key WHERE deleted_at IS NULL`). Idempotent: calling restore on an already-active org returns the current row. Returns 403 if the caller is not a superuser. Returns 404 if no organization with the given id exists. Returns 409 if another active org has reused this org\'s key while it was soft-deleted — the key must be freed before this org can be restored. Returns 422 if org_id is not a valid UUID. + * @summary Restore Organization + * @param {string} orgId Organization UUID (slug not accepted) * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listOrganizationInvites: async ( + restoreOrganization: async ( orgId: string, - page?: number, - perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'orgId' is not null or undefined - assertParamExists('listOrganizationInvites', 'orgId', orgId); - const localVarPath = `/v2/orgs/{org_id}/invites`.replace( - `{${'org_id'}}`, + assertParamExists('restoreOrganization', 'orgId', orgId); + const localVarPath = `/v2/orgs/{org_id}/restore`.replace( + '{org_id}', encodeURIComponent(String(orgId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -371,7 +305,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -379,13 +313,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage; - } + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -401,19 +329,22 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). - * @summary List Organizations - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * + * @summary Stats Organization + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listOrganizations: async ( - page?: number, - perPage?: number, - options: AxiosRequestConfig = {}, + statsOrganization: async ( + orgId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/v2/orgs`; + // verify required parameter 'orgId' is not null or undefined + assertParamExists('statsOrganization', 'orgId', orgId); + const localVarPath = `/v2/orgs/{org_id}/stats`.replace( + '{org_id}', + encodeURIComponent(String(orgId)), + ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -429,13 +360,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage; - } + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -456,19 +381,19 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {OrganizationUpdate} organizationUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateOrganization: async ( orgId: string, organizationUpdate: OrganizationUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'orgId' is not null or undefined assertParamExists('updateOrganization', 'orgId', orgId); // verify required parameter 'organizationUpdate' is not null or undefined assertParamExists('updateOrganization', 'organizationUpdate', organizationUpdate); const localVarPath = `/v2/orgs/{org_id}`.replace( - `{${'org_id'}}`, + '{org_id}', encodeURIComponent(String(orgId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -487,6 +412,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -511,160 +437,195 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi /** * OrganizationsApi - functional programming interface - * @export */ export const OrganizationsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = OrganizationsApiAxiosParamCreator(configuration); return { /** - * Cancels an invite that was sent to a new member. - * @summary Cancel Invite - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} inviteId Id of the invite to cancel - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async cancelInvite( - orgId: string, - inviteId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cancelInvite( - orgId, - inviteId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Creates a new organization that will be owned by the authenticated actor (i.e: human team member or api key). + * If you want to create org via API, reach out to us and we will add the permission to your API token * @summary Create Organization * @param {OrganizationCreate} organizationCreate + * @param {string} [pageFullUrl] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createOrganization( organizationCreate: OrganizationCreate, - options?: AxiosRequestConfig, + pageFullUrl?: string, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createOrganization( organizationCreate, + pageFullUrl, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.createOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Deletes an organization (Permit.io account) and all its related data. + * Schedules an organization (Permit.io account) for permanent deletion. Effective immediately, the organization disappears from `GET /v2/orgs` (list) and direct lookups (`GET /v2/orgs/{id}`); subsequent `PATCH` and `DELETE` calls on it return 404. To preserve recoverability during the grace period, member grants and existing API keys are intentionally retained — support can restore the organization until the cutoff is reached. After the grace period the organization and all of its data are permanently removed. **Contract change:** This endpoint previously returned `204 No Content` with an empty body and an immediate hard-delete. It now returns `202 Accepted` with a JSON body describing when the permanent deletion will occur. Existing clients that branched on `status == 204` need to be updated. Error responses are documented in the OpenAPI ``responses`` block above. * @summary Delete Organization * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteOrganization( orgId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganization(orgId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.deleteOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor. * @summary Get Active Organization * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getActiveOrganization( - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getActiveOrganization(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.getActiveOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor. * @summary Get Organization * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getOrganization( orgId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(orgId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Invite new members into the organization. - * @summary Invite Members To Organization - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {Array} inviteCreate - * @param {string} [inviterName] - * @param {string} [inviterEmail] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async inviteMembersToOrganization( - orgId: string, - inviteCreate: Array, - inviterName?: string, - inviterEmail?: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.inviteMembersToOrganization( - orgId, - inviteCreate, - inviterName, - inviterEmail, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Lists pending organization invites - * @summary List Organization Invites - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listOrganizationInvites( - orgId: string, - page?: number, - perPage?: number, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizationInvites( - orgId, - page, - perPage, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.getOrganization']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). * @summary List Organizations + * @param {Search} [search] Text search for the org name or key or id * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listOrganizations( + search?: Search, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizations( + search, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.listOrganizations']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Restores a soft-deleted organization. Superuser-only endpoint. Clears the deleted_at timestamp so the organization becomes visible again. UUID-only: slug lookup is not accepted because org keys are only unique among active orgs (partial unique index on `key WHERE deleted_at IS NULL`). Idempotent: calling restore on an already-active org returns the current row. Returns 403 if the caller is not a superuser. Returns 404 if no organization with the given id exists. Returns 409 if another active org has reused this org\'s key while it was soft-deleted — the key must be freed before this org can be restored. Returns 422 if org_id is not a valid UUID. + * @summary Restore Organization + * @param {string} orgId Organization UUID (slug not accepted) + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async restoreOrganization( + orgId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.restoreOrganization(orgId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.restoreOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Stats Organization + * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async statsOrganization( + orgId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.statsOrganization(orgId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.statsOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the organization\'s profile. @@ -672,26 +633,35 @@ export const OrganizationsApiFp = function (configuration?: Configuration) { * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). * @param {OrganizationUpdate} organizationUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateOrganization( orgId: string, organizationUpdate: OrganizationUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization( orgId, organizationUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['OrganizationsApi.updateOrganization']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * OrganizationsApi - factory interface - * @export */ export const OrganizationsApiFactory = function ( configuration?: Configuration, @@ -701,361 +671,246 @@ export const OrganizationsApiFactory = function ( const localVarFp = OrganizationsApiFp(configuration); return { /** - * Cancels an invite that was sent to a new member. - * @summary Cancel Invite - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {string} inviteId Id of the invite to cancel - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cancelInvite(orgId: string, inviteId: string, options?: any): AxiosPromise { - return localVarFp - .cancelInvite(orgId, inviteId, options) - .then((request) => request(axios, basePath)); - }, - /** - * Creates a new organization that will be owned by the authenticated actor (i.e: human team member or api key). + * If you want to create org via API, reach out to us and we will add the permission to your API token * @summary Create Organization - * @param {OrganizationCreate} organizationCreate + * @param {OrganizationsApiCreateOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createOrganization( - organizationCreate: OrganizationCreate, - options?: any, + requestParameters: OrganizationsApiCreateOrganizationRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createOrganization(organizationCreate, options) + .createOrganization( + requestParameters.organizationCreate, + requestParameters.pageFullUrl, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Deletes an organization (Permit.io account) and all its related data. + * Schedules an organization (Permit.io account) for permanent deletion. Effective immediately, the organization disappears from `GET /v2/orgs` (list) and direct lookups (`GET /v2/orgs/{id}`); subsequent `PATCH` and `DELETE` calls on it return 404. To preserve recoverability during the grace period, member grants and existing API keys are intentionally retained — support can restore the organization until the cutoff is reached. After the grace period the organization and all of its data are permanently removed. **Contract change:** This endpoint previously returned `204 No Content` with an empty body and an immediate hard-delete. It now returns `202 Accepted` with a JSON body describing when the permanent deletion will occur. Existing clients that branched on `status == 204` need to be updated. Error responses are documented in the OpenAPI ``responses`` block above. * @summary Delete Organization - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteOrganization(orgId: string, options?: any): AxiosPromise { + deleteOrganization( + requestParameters: OrganizationsApiDeleteOrganizationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .deleteOrganization(orgId, options) + .deleteOrganization(requestParameters.orgId, options) .then((request) => request(axios, basePath)); }, /** * Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor. * @summary Get Active Organization * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getActiveOrganization(options?: any): AxiosPromise { + getActiveOrganization(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getActiveOrganization(options).then((request) => request(axios, basePath)); }, /** * Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor. * @summary Get Organization - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). + * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getOrganization(orgId: string, options?: any): AxiosPromise { - return localVarFp.getOrganization(orgId, options).then((request) => request(axios, basePath)); + getOrganization( + requestParameters: OrganizationsApiGetOrganizationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getOrganization(requestParameters.orgId, options) + .then((request) => request(axios, basePath)); }, /** - * Invite new members into the organization. - * @summary Invite Members To Organization - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {Array} inviteCreate - * @param {string} [inviterName] - * @param {string} [inviterEmail] + * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). + * @summary List Organizations + * @param {OrganizationsApiListOrganizationsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - inviteMembersToOrganization( - orgId: string, - inviteCreate: Array, - inviterName?: string, - inviterEmail?: string, - options?: any, - ): AxiosPromise { + listOrganizations( + requestParameters: OrganizationsApiListOrganizationsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { return localVarFp - .inviteMembersToOrganization(orgId, inviteCreate, inviterName, inviterEmail, options) + .listOrganizations( + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Lists pending organization invites - * @summary List Organization Invites - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * Restores a soft-deleted organization. Superuser-only endpoint. Clears the deleted_at timestamp so the organization becomes visible again. UUID-only: slug lookup is not accepted because org keys are only unique among active orgs (partial unique index on `key WHERE deleted_at IS NULL`). Idempotent: calling restore on an already-active org returns the current row. Returns 403 if the caller is not a superuser. Returns 404 if no organization with the given id exists. Returns 409 if another active org has reused this org\'s key while it was soft-deleted — the key must be freed before this org can be restored. Returns 422 if org_id is not a valid UUID. + * @summary Restore Organization + * @param {OrganizationsApiRestoreOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listOrganizationInvites( - orgId: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + restoreOrganization( + requestParameters: OrganizationsApiRestoreOrganizationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listOrganizationInvites(orgId, page, perPage, options) + .restoreOrganization(requestParameters.orgId, options) .then((request) => request(axios, basePath)); }, /** - * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). - * @summary List Organizations - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * + * @summary Stats Organization + * @param {OrganizationsApiStatsOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listOrganizations( - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + statsOrganization( + requestParameters: OrganizationsApiStatsOrganizationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listOrganizations(page, perPage, options) + .statsOrganization(requestParameters.orgId, options) .then((request) => request(axios, basePath)); }, /** * Updates the organization\'s profile. * @summary Update Organization - * @param {string} orgId Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @param {OrganizationUpdate} organizationUpdate + * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateOrganization( - orgId: string, - organizationUpdate: OrganizationUpdate, - options?: any, + requestParameters: OrganizationsApiUpdateOrganizationRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateOrganization(orgId, organizationUpdate, options) + .updateOrganization(requestParameters.orgId, requestParameters.organizationUpdate, options) .then((request) => request(axios, basePath)); }, }; }; -/** - * Request parameters for cancelInvite operation in OrganizationsApi. - * @export - * @interface OrganizationsApiCancelInviteRequest - */ -export interface OrganizationsApiCancelInviteRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OrganizationsApiCancelInvite - */ - readonly orgId: string; - - /** - * Id of the invite to cancel - * @type {string} - * @memberof OrganizationsApiCancelInvite - */ - readonly inviteId: string; -} - /** * Request parameters for createOrganization operation in OrganizationsApi. - * @export - * @interface OrganizationsApiCreateOrganizationRequest */ export interface OrganizationsApiCreateOrganizationRequest { - /** - * - * @type {OrganizationCreate} - * @memberof OrganizationsApiCreateOrganization - */ readonly organizationCreate: OrganizationCreate; + + readonly pageFullUrl?: string; } /** * Request parameters for deleteOrganization operation in OrganizationsApi. - * @export - * @interface OrganizationsApiDeleteOrganizationRequest */ export interface OrganizationsApiDeleteOrganizationRequest { /** * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OrganizationsApiDeleteOrganization */ readonly orgId: string; } /** * Request parameters for getOrganization operation in OrganizationsApi. - * @export - * @interface OrganizationsApiGetOrganizationRequest */ export interface OrganizationsApiGetOrganizationRequest { /** * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OrganizationsApiGetOrganization - */ - readonly orgId: string; -} - -/** - * Request parameters for inviteMembersToOrganization operation in OrganizationsApi. - * @export - * @interface OrganizationsApiInviteMembersToOrganizationRequest - */ -export interface OrganizationsApiInviteMembersToOrganizationRequest { - /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OrganizationsApiInviteMembersToOrganization */ readonly orgId: string; - - /** - * - * @type {Array} - * @memberof OrganizationsApiInviteMembersToOrganization - */ - readonly inviteCreate: Array; - - /** - * - * @type {string} - * @memberof OrganizationsApiInviteMembersToOrganization - */ - readonly inviterName?: string; - - /** - * - * @type {string} - * @memberof OrganizationsApiInviteMembersToOrganization - */ - readonly inviterEmail?: string; } /** - * Request parameters for listOrganizationInvites operation in OrganizationsApi. - * @export - * @interface OrganizationsApiListOrganizationInvitesRequest + * Request parameters for listOrganizations operation in OrganizationsApi. */ -export interface OrganizationsApiListOrganizationInvitesRequest { +export interface OrganizationsApiListOrganizationsRequest { /** - * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OrganizationsApiListOrganizationInvites + * Text search for the org name or key or id */ - readonly orgId: string; + readonly search?: Search; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof OrganizationsApiListOrganizationInvites */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof OrganizationsApiListOrganizationInvites */ readonly perPage?: number; } /** - * Request parameters for listOrganizations operation in OrganizationsApi. - * @export - * @interface OrganizationsApiListOrganizationsRequest + * Request parameters for restoreOrganization operation in OrganizationsApi. */ -export interface OrganizationsApiListOrganizationsRequest { +export interface OrganizationsApiRestoreOrganizationRequest { /** - * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof OrganizationsApiListOrganizations + * Organization UUID (slug not accepted) */ - readonly page?: number; + readonly orgId: string; +} +/** + * Request parameters for statsOrganization operation in OrganizationsApi. + */ +export interface OrganizationsApiStatsOrganizationRequest { /** - * The number of results per page (max 100). - * @type {number} - * @memberof OrganizationsApiListOrganizations + * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). */ - readonly perPage?: number; + readonly orgId: string; } /** * Request parameters for updateOrganization operation in OrganizationsApi. - * @export - * @interface OrganizationsApiUpdateOrganizationRequest */ export interface OrganizationsApiUpdateOrganizationRequest { /** * Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\"). - * @type {string} - * @memberof OrganizationsApiUpdateOrganization */ readonly orgId: string; - /** - * - * @type {OrganizationUpdate} - * @memberof OrganizationsApiUpdateOrganization - */ readonly organizationUpdate: OrganizationUpdate; } /** * OrganizationsApi - object-oriented interface - * @export - * @class OrganizationsApi - * @extends {BaseAPI} */ export class OrganizationsApi extends BaseAPI { /** - * Cancels an invite that was sent to a new member. - * @summary Cancel Invite - * @param {OrganizationsApiCancelInviteRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - public cancelInvite( - requestParameters: OrganizationsApiCancelInviteRequest, - options?: AxiosRequestConfig, - ) { - return OrganizationsApiFp(this.configuration) - .cancelInvite(requestParameters.orgId, requestParameters.inviteId, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * Creates a new organization that will be owned by the authenticated actor (i.e: human team member or api key). + * If you want to create org via API, reach out to us and we will add the permission to your API token * @summary Create Organization * @param {OrganizationsApiCreateOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ public createOrganization( requestParameters: OrganizationsApiCreateOrganizationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) - .createOrganization(requestParameters.organizationCreate, options) + .createOrganization( + requestParameters.organizationCreate, + requestParameters.pageFullUrl, + options, + ) .then((request) => request(this.axios, this.basePath)); } /** - * Deletes an organization (Permit.io account) and all its related data. + * Schedules an organization (Permit.io account) for permanent deletion. Effective immediately, the organization disappears from `GET /v2/orgs` (list) and direct lookups (`GET /v2/orgs/{id}`); subsequent `PATCH` and `DELETE` calls on it return 404. To preserve recoverability during the grace period, member grants and existing API keys are intentionally retained — support can restore the organization until the cutoff is reached. After the grace period the organization and all of its data are permanently removed. **Contract change:** This endpoint previously returned `204 No Content` with an empty body and an immediate hard-delete. It now returns `202 Accepted` with a JSON body describing when the permanent deletion will occur. Existing clients that branched on `status == 204` need to be updated. Error responses are documented in the OpenAPI ``responses`` block above. * @summary Delete Organization * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ public deleteOrganization( requestParameters: OrganizationsApiDeleteOrganizationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) .deleteOrganization(requestParameters.orgId, options) @@ -1066,10 +921,9 @@ export class OrganizationsApi extends BaseAPI { * Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor. * @summary Get Active Organization * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ - public getActiveOrganization(options?: AxiosRequestConfig) { + public getActiveOrganization(options?: RawAxiosRequestConfig) { return OrganizationsApiFp(this.configuration) .getActiveOrganization(options) .then((request) => request(this.axios, this.basePath)); @@ -1080,12 +934,11 @@ export class OrganizationsApi extends BaseAPI { * @summary Get Organization * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ public getOrganization( requestParameters: OrganizationsApiGetOrganizationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) .getOrganization(requestParameters.orgId, options) @@ -1093,64 +946,55 @@ export class OrganizationsApi extends BaseAPI { } /** - * Invite new members into the organization. - * @summary Invite Members To Organization - * @param {OrganizationsApiInviteMembersToOrganizationRequest} requestParameters Request parameters. + * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). + * @summary List Organizations + * @param {OrganizationsApiListOrganizationsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ - public inviteMembersToOrganization( - requestParameters: OrganizationsApiInviteMembersToOrganizationRequest, - options?: AxiosRequestConfig, + public listOrganizations( + requestParameters: OrganizationsApiListOrganizationsRequest = {}, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) - .inviteMembersToOrganization( - requestParameters.orgId, - requestParameters.inviteCreate, - requestParameters.inviterName, - requestParameters.inviterEmail, + .listOrganizations( + requestParameters.search, + requestParameters.page, + requestParameters.perPage, options, ) .then((request) => request(this.axios, this.basePath)); } /** - * Lists pending organization invites - * @summary List Organization Invites - * @param {OrganizationsApiListOrganizationInvitesRequest} requestParameters Request parameters. + * Restores a soft-deleted organization. Superuser-only endpoint. Clears the deleted_at timestamp so the organization becomes visible again. UUID-only: slug lookup is not accepted because org keys are only unique among active orgs (partial unique index on `key WHERE deleted_at IS NULL`). Idempotent: calling restore on an already-active org returns the current row. Returns 403 if the caller is not a superuser. Returns 404 if no organization with the given id exists. Returns 409 if another active org has reused this org\'s key while it was soft-deleted — the key must be freed before this org can be restored. Returns 422 if org_id is not a valid UUID. + * @summary Restore Organization + * @param {OrganizationsApiRestoreOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ - public listOrganizationInvites( - requestParameters: OrganizationsApiListOrganizationInvitesRequest, - options?: AxiosRequestConfig, + public restoreOrganization( + requestParameters: OrganizationsApiRestoreOrganizationRequest, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) - .listOrganizationInvites( - requestParameters.orgId, - requestParameters.page, - requestParameters.perPage, - options, - ) + .restoreOrganization(requestParameters.orgId, options) .then((request) => request(this.axios, this.basePath)); } /** - * Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key). - * @summary List Organizations - * @param {OrganizationsApiListOrganizationsRequest} requestParameters Request parameters. + * + * @summary Stats Organization + * @param {OrganizationsApiStatsOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ - public listOrganizations( - requestParameters: OrganizationsApiListOrganizationsRequest = {}, - options?: AxiosRequestConfig, + public statsOrganization( + requestParameters: OrganizationsApiStatsOrganizationRequest, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) - .listOrganizations(requestParameters.page, requestParameters.perPage, options) + .statsOrganization(requestParameters.orgId, options) .then((request) => request(this.axios, this.basePath)); } @@ -1159,12 +1003,11 @@ export class OrganizationsApi extends BaseAPI { * @summary Update Organization * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi + * @throws If a required parameter is missing. */ public updateOrganization( requestParameters: OrganizationsApiUpdateOrganizationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return OrganizationsApiFp(this.configuration) .updateOrganization(requestParameters.orgId, requestParameters.organizationUpdate, options) diff --git a/src/openapi/api/policy-api.ts b/src/openapi/api/policy-api.ts deleted file mode 100644 index 26314514..00000000 --- a/src/openapi/api/policy-api.ts +++ /dev/null @@ -1,289 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PermitBackendOpalApiDataDataSourceConfig } from '../types'; -/** - * PolicyApi - axios parameter creator - * @export - */ -export const PolicyApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get Opal Data Sources - * @param {string} [token] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpalDataSources: async ( - token?: string, - options: AxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/v2/opal/data/config`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (token !== undefined) { - localVarQueryParameter['token'] = token; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get Opal Data Sources - * @param {string} [token] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpalDataSourcesOpalDataConfigGet: async ( - token?: string, - options: AxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/opal/data/config`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (token !== undefined) { - localVarQueryParameter['token'] = token; - } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; -}; - -/** - * PolicyApi - functional programming interface - * @export - */ -export const PolicyApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = PolicyApiAxiosParamCreator(configuration); - return { - /** - * - * @summary Get Opal Data Sources - * @param {string} [token] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOpalDataSources( - token?: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOpalDataSources(token, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get Opal Data Sources - * @param {string} [token] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOpalDataSourcesOpalDataConfigGet( - token?: string, - options?: AxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOpalDataSourcesOpalDataConfigGet( - token, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - }; -}; - -/** - * PolicyApi - factory interface - * @export - */ -export const PolicyApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = PolicyApiFp(configuration); - return { - /** - * - * @summary Get Opal Data Sources - * @param {string} [token] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpalDataSources( - token?: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getOpalDataSources(token, options) - .then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get Opal Data Sources - * @param {string} [token] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpalDataSourcesOpalDataConfigGet( - token?: string, - options?: any, - ): AxiosPromise { - return localVarFp - .getOpalDataSourcesOpalDataConfigGet(token, options) - .then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for getOpalDataSources operation in PolicyApi. - * @export - * @interface PolicyApiGetOpalDataSourcesRequest - */ -export interface PolicyApiGetOpalDataSourcesRequest { - /** - * - * @type {string} - * @memberof PolicyApiGetOpalDataSources - */ - readonly token?: string; -} - -/** - * Request parameters for getOpalDataSourcesOpalDataConfigGet operation in PolicyApi. - * @export - * @interface PolicyApiGetOpalDataSourcesOpalDataConfigGetRequest - */ -export interface PolicyApiGetOpalDataSourcesOpalDataConfigGetRequest { - /** - * - * @type {string} - * @memberof PolicyApiGetOpalDataSourcesOpalDataConfigGet - */ - readonly token?: string; -} - -/** - * PolicyApi - object-oriented interface - * @export - * @class PolicyApi - * @extends {BaseAPI} - */ -export class PolicyApi extends BaseAPI { - /** - * - * @summary Get Opal Data Sources - * @param {PolicyApiGetOpalDataSourcesRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyApi - */ - public getOpalDataSources( - requestParameters: PolicyApiGetOpalDataSourcesRequest = {}, - options?: AxiosRequestConfig, - ) { - return PolicyApiFp(this.configuration) - .getOpalDataSources(requestParameters.token, options) - .then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get Opal Data Sources - * @param {PolicyApiGetOpalDataSourcesOpalDataConfigGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyApi - */ - public getOpalDataSourcesOpalDataConfigGet( - requestParameters: PolicyApiGetOpalDataSourcesOpalDataConfigGetRequest = {}, - options?: AxiosRequestConfig, - ) { - return PolicyApiFp(this.configuration) - .getOpalDataSourcesOpalDataConfigGet(requestParameters.token, options) - .then((request) => request(this.axios, this.basePath)); - } -} diff --git a/src/openapi/api/policy-decision-points-api.ts b/src/openapi/api/policy-decision-points-api.ts index d09a86c8..d3a13f03 100644 --- a/src/openapi/api/policy-decision-points-api.ts +++ b/src/openapi/api/policy-decision-points-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,54 +10,57 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + replaceWithSerializableTypeIfNeeded, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { DataUpdateReport } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PDPConfigRead } from '../types'; -// @ts-ignore -import { PDPStateUpdate } from '../types'; -// @ts-ignore -import { RemoteConfig } from '../types'; +import type { Configuration } from '../configuration'; +import type { + PDPConfigRead, + PDPDataRefreshRequest, + PDPDataRefreshResponse, + PDPShardMigration, + RemoteConfig, +} from '../types'; /** * PolicyDecisionPointsApi - axios parameter creator - * @export */ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration and push state - * @param {PDPStateUpdate} pDPStateUpdate + * Disabled debug audit logs for the PDP container with id `pdp_id`. + * @summary Disable debug audit logs + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} pdpId The unique id of the pdp * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getAuthenticatingPdpConfigValues: async ( - pDPStateUpdate: PDPStateUpdate, - options: AxiosRequestConfig = {}, + disableDebugAuditLogs: async ( + projId: string, + envId: string, + pdpId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'pDPStateUpdate' is not null or undefined - assertParamExists('getAuthenticatingPdpConfigValues', 'pDPStateUpdate', pDPStateUpdate); - const localVarPath = `/v2/pdps/me/config`; + // verify required parameter 'projId' is not null or undefined + assertParamExists('disableDebugAuditLogs', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('disableDebugAuditLogs', 'envId', envId); + // verify required parameter 'pdpId' is not null or undefined + assertParamExists('disableDebugAuditLogs', 'pdpId', pdpId); + const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/disable` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{pdp_id}', encodeURIComponent(String(pdpId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -67,7 +68,7 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -75,7 +76,7 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -84,11 +85,6 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? ...headersFromBaseOptions, ...options.headers, }; - localVarRequestOptions.data = serializeDataIfNeeded( - pDPStateUpdate, - localVarRequestOptions, - configuration, - ); return { url: toPathString(localVarUrlObj), @@ -96,15 +92,30 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? }; }, /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration + * Enables debug audit logs for the PDP container with id `pdp_id`. + * @summary Enable debug audit logs + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} pdpId The unique id of the pdp * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getAuthenticatingPdpConfigValuesLegacy: async ( - options: AxiosRequestConfig = {}, + enableDebugAuditLogs: async ( + projId: string, + envId: string, + pdpId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/v2/pdps/me/config`; + // verify required parameter 'projId' is not null or undefined + assertParamExists('enableDebugAuditLogs', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('enableDebugAuditLogs', 'envId', envId); + // verify required parameter 'pdpId' is not null or undefined + assertParamExists('enableDebugAuditLogs', 'pdpId', pdpId); + const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/debug-audit-logs/enable` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{pdp_id}', encodeURIComponent(String(pdpId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -112,7 +123,7 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -120,6 +131,8 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -139,14 +152,16 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} pdpId The unique id of the pdp + * @param {number} [xShardID] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getPdpConfigValues: async ( projId: string, envId: string, pdpId: string, - options: AxiosRequestConfig = {}, + xShardID?: number, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getPdpConfigValues', 'projId', projId); @@ -155,9 +170,9 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // verify required parameter 'pdpId' is not null or undefined assertParamExists('getPdpConfigValues', 'pdpId', pdpId); const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/values` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'pdp_id'}}`, encodeURIComponent(String(pdpId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{pdp_id}', encodeURIComponent(String(pdpId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -173,6 +188,14 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + + if (xShardID != null) { + localVarHeaderParameter['X-Shard-ID'] = + typeof xShardID === 'string' + ? xShardID + : JSON.stringify(xShardID, replaceWithSerializableTypeIfNeeded); + } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -194,22 +217,22 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listPdpConfigs: async ( projId: string, envId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listPdpConfigs', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listPdpConfigs', 'envId', envId); const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -233,6 +256,8 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -247,23 +272,29 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? }; }, /** - * - * @summary Accept a PDP data callback - * @param {string} xPermitInstanceId - * @param {DataUpdateReport} dataUpdateReport + * The migration process is as followed: 1. Perform request to this endpoint with the new number of shards 2. A new PDP Config will be created with the new number of shards and a new api-key 3. Create a new PDP cluster with the same instances as the number of shards defined in the new PDP Config 4. Wait for the new PDP cluster to be ready 5. Update your PDP load balancer to point to the new PDP cluster More info can be found here https://docs.permit.io/concepts/pdp-sharding + * @summary Migrate PDP Config number of shards + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {PDPShardMigration} pDPShardMigration * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - opalDataCallback: async ( - xPermitInstanceId: string, - dataUpdateReport: DataUpdateReport, - options: AxiosRequestConfig = {}, + migrateShards: async ( + projId: string, + envId: string, + pDPShardMigration: PDPShardMigration, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'xPermitInstanceId' is not null or undefined - assertParamExists('opalDataCallback', 'xPermitInstanceId', xPermitInstanceId); - // verify required parameter 'dataUpdateReport' is not null or undefined - assertParamExists('opalDataCallback', 'dataUpdateReport', dataUpdateReport); - const localVarPath = `/v2/pdps/me/opal_data_callback`; + // verify required parameter 'projId' is not null or undefined + assertParamExists('migrateShards', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('migrateShards', 'envId', envId); + // verify required parameter 'pDPShardMigration' is not null or undefined + assertParamExists('migrateShards', 'pDPShardMigration', pDPShardMigration); + const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/migrate-shards` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -279,11 +310,66 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - if (xPermitInstanceId != null) { - localVarHeaderParameter['x-permit-instance-id'] = String(xPermitInstanceId); + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + pDPShardMigration, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Triggers an out-of-band data refresh for **all** PDPs in the environment. Publishes an OPAL data update instructing each PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. Use this to propagate external-data-source-backed changes in realtime. `shard_id` is not accepted here: sharding is a per-PDP topology, so a single shard target is meaningless across a heterogeneous environment. Target a shard via the single-PDP endpoint (`POST .../configs/{pdp_id}/refresh`) instead. + * @summary Refresh data for all PDPs in the environment + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {PDPDataRefreshRequest} [pDPDataRefreshRequest] + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + refreshEnvironmentPdpData: async ( + projId: string, + envId: string, + pDPDataRefreshRequest?: PDPDataRefreshRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('refreshEnvironmentPdpData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('refreshEnvironmentPdpData', 'envId', envId); + const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/refresh` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -293,7 +379,7 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( - dataUpdateReport, + pDPDataRefreshRequest, localVarRequestOptions, configuration, ); @@ -304,19 +390,32 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? }; }, /** - * Push a PDP state update. - * @summary Push PDP state - * @param {PDPStateUpdate} pDPStateUpdate + * Triggers an out-of-band data refresh for the PDP container with id `pdp_id`. Publishes an OPAL data update instructing the PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. + * @summary Refresh PDP data + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} pdpId The unique id of the pdp + * @param {PDPDataRefreshRequest} [pDPDataRefreshRequest] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - pushPdpState: async ( - pDPStateUpdate: PDPStateUpdate, - options: AxiosRequestConfig = {}, + refreshPdpData: async ( + projId: string, + envId: string, + pdpId: string, + pDPDataRefreshRequest?: PDPDataRefreshRequest, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'pDPStateUpdate' is not null or undefined - assertParamExists('pushPdpState', 'pDPStateUpdate', pDPStateUpdate); - const localVarPath = `/v2/pdps/me/state`; + // verify required parameter 'projId' is not null or undefined + assertParamExists('refreshPdpData', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('refreshPdpData', 'envId', envId); + // verify required parameter 'pdpId' is not null or undefined + assertParamExists('refreshPdpData', 'pdpId', pdpId); + const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/refresh` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{pdp_id}', encodeURIComponent(String(pdpId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -333,6 +432,7 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -342,7 +442,7 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( - pDPStateUpdate, + pDPDataRefreshRequest, localVarRequestOptions, configuration, ); @@ -353,19 +453,19 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? }; }, /** - * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. + * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. For the per-environment PDP v3 credentials row this rotates the environment\'s NATS credentials instead of minting a token: every EdgePDP in the environment is revoked and fresh bootstrap credentials are minted (PER-15666). That runs as an awaited Celery task, so this call can take up to `NATS_ROTATION_TIMEOUT_SECONDS`. * @summary Rotate PDP API Key * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} pdpId The unique id of the pdp * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ rotatePdpApiKey: async ( projId: string, envId: string, pdpId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('rotatePdpApiKey', 'projId', projId); @@ -374,9 +474,9 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // verify required parameter 'pdpId' is not null or undefined assertParamExists('rotatePdpApiKey', 'pdpId', pdpId); const localVarPath = `/v2/pdps/{proj_id}/{env_id}/configs/{pdp_id}/rotate-api-key` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'pdp_id'}}`, encodeURIComponent(String(pdpId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{pdp_id}', encodeURIComponent(String(pdpId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -392,6 +492,8 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -410,40 +512,77 @@ export const PolicyDecisionPointsApiAxiosParamCreator = function (configuration? /** * PolicyDecisionPointsApi - functional programming interface - * @export */ export const PolicyDecisionPointsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = PolicyDecisionPointsApiAxiosParamCreator(configuration); return { /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration and push state - * @param {PDPStateUpdate} pDPStateUpdate + * Disabled debug audit logs for the PDP container with id `pdp_id`. + * @summary Disable debug audit logs + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} pdpId The unique id of the pdp * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - async getAuthenticatingPdpConfigValues( - pDPStateUpdate: PDPStateUpdate, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthenticatingPdpConfigValues( - pDPStateUpdate, + async disableDebugAuditLogs( + projId: string, + envId: string, + pdpId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.disableDebugAuditLogs( + projId, + envId, + pdpId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.disableDebugAuditLogs']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration + * Enables debug audit logs for the PDP container with id `pdp_id`. + * @summary Enable debug audit logs + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} pdpId The unique id of the pdp * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - async getAuthenticatingPdpConfigValuesLegacy( - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getAuthenticatingPdpConfigValuesLegacy(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async enableDebugAuditLogs( + projId: string, + envId: string, + pdpId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.enableDebugAuditLogs( + projId, + envId, + pdpId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.enableDebugAuditLogs']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets the configuration values for the PDP container with id `pdp_id`. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. @@ -451,22 +590,36 @@ export const PolicyDecisionPointsApiFp = function (configuration?: Configuration * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} pdpId The unique id of the pdp + * @param {number} [xShardID] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getPdpConfigValues( projId: string, envId: string, pdpId: string, - options?: AxiosRequestConfig, + xShardID?: number, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPdpConfigValues( projId, envId, pdpId, + xShardID, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.getPdpConfigValues']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * @@ -476,14 +629,14 @@ export const PolicyDecisionPointsApiFp = function (configuration?: Configuration * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listPdpConfigs( projId: string, envId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listPdpConfigs( projId, @@ -492,59 +645,135 @@ export const PolicyDecisionPointsApiFp = function (configuration?: Configuration perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.listPdpConfigs']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Accept a PDP data callback - * @param {string} xPermitInstanceId - * @param {DataUpdateReport} dataUpdateReport + * The migration process is as followed: 1. Perform request to this endpoint with the new number of shards 2. A new PDP Config will be created with the new number of shards and a new api-key 3. Create a new PDP cluster with the same instances as the number of shards defined in the new PDP Config 4. Wait for the new PDP cluster to be ready 5. Update your PDP load balancer to point to the new PDP cluster More info can be found here https://docs.permit.io/concepts/pdp-sharding + * @summary Migrate PDP Config number of shards + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {PDPShardMigration} pDPShardMigration + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async migrateShards( + projId: string, + envId: string, + pDPShardMigration: PDPShardMigration, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.migrateShards( + projId, + envId, + pDPShardMigration, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.migrateShards']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Triggers an out-of-band data refresh for **all** PDPs in the environment. Publishes an OPAL data update instructing each PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. Use this to propagate external-data-source-backed changes in realtime. `shard_id` is not accepted here: sharding is a per-PDP topology, so a single shard target is meaningless across a heterogeneous environment. Target a shard via the single-PDP endpoint (`POST .../configs/{pdp_id}/refresh`) instead. + * @summary Refresh data for all PDPs in the environment + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {PDPDataRefreshRequest} [pDPDataRefreshRequest] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - async opalDataCallback( - xPermitInstanceId: string, - dataUpdateReport: DataUpdateReport, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.opalDataCallback( - xPermitInstanceId, - dataUpdateReport, + async refreshEnvironmentPdpData( + projId: string, + envId: string, + pDPDataRefreshRequest?: PDPDataRefreshRequest, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.refreshEnvironmentPdpData( + projId, + envId, + pDPDataRefreshRequest, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.refreshEnvironmentPdpData']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Push a PDP state update. - * @summary Push PDP state - * @param {PDPStateUpdate} pDPStateUpdate + * Triggers an out-of-band data refresh for the PDP container with id `pdp_id`. Publishes an OPAL data update instructing the PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. + * @summary Refresh PDP data + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} pdpId The unique id of the pdp + * @param {PDPDataRefreshRequest} [pDPDataRefreshRequest] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - async pushPdpState( - pDPStateUpdate: PDPStateUpdate, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.pushPdpState( - pDPStateUpdate, + async refreshPdpData( + projId: string, + envId: string, + pdpId: string, + pDPDataRefreshRequest?: PDPDataRefreshRequest, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.refreshPdpData( + projId, + envId, + pdpId, + pDPDataRefreshRequest, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.refreshPdpData']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. + * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. For the per-environment PDP v3 credentials row this rotates the environment\'s NATS credentials instead of minting a token: every EdgePDP in the environment is revoked and fresh bootstrap credentials are minted (PER-15666). That runs as an awaited Celery task, so this call can take up to `NATS_ROTATION_TIMEOUT_SECONDS`. * @summary Rotate PDP API Key * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} pdpId The unique id of the pdp * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async rotatePdpApiKey( projId: string, envId: string, pdpId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.rotatePdpApiKey( projId, @@ -552,14 +781,24 @@ export const PolicyDecisionPointsApiFp = function (configuration?: Configuration pdpId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyDecisionPointsApi.rotatePdpApiKey']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * PolicyDecisionPointsApi - factory interface - * @export */ export const PolicyDecisionPointsApiFactory = function ( configuration?: Configuration, @@ -569,296 +808,377 @@ export const PolicyDecisionPointsApiFactory = function ( const localVarFp = PolicyDecisionPointsApiFp(configuration); return { /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration and push state - * @param {PDPStateUpdate} pDPStateUpdate + * Disabled debug audit logs for the PDP container with id `pdp_id`. + * @summary Disable debug audit logs + * @param {PolicyDecisionPointsApiDisableDebugAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getAuthenticatingPdpConfigValues( - pDPStateUpdate: PDPStateUpdate, - options?: any, - ): AxiosPromise { + disableDebugAuditLogs( + requestParameters: PolicyDecisionPointsApiDisableDebugAuditLogsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getAuthenticatingPdpConfigValues(pDPStateUpdate, options) + .disableDebugAuditLogs( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration + * Enables debug audit logs for the PDP container with id `pdp_id`. + * @summary Enable debug audit logs + * @param {PolicyDecisionPointsApiEnableDebugAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getAuthenticatingPdpConfigValuesLegacy(options?: any): AxiosPromise { + enableDebugAuditLogs( + requestParameters: PolicyDecisionPointsApiEnableDebugAuditLogsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getAuthenticatingPdpConfigValuesLegacy(options) + .enableDebugAuditLogs( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets the configuration values for the PDP container with id `pdp_id`. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. * @summary Get PDP configuration - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} pdpId The unique id of the pdp + * @param {PolicyDecisionPointsApiGetPdpConfigValuesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getPdpConfigValues( - projId: string, - envId: string, - pdpId: string, - options?: any, + requestParameters: PolicyDecisionPointsApiGetPdpConfigValuesRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getPdpConfigValues(projId, envId, pdpId, options) + .getPdpConfigValues( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + requestParameters.xShardID, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary List PDP configurations - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {PolicyDecisionPointsApiListPdpConfigsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listPdpConfigs( - projId: string, - envId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: PolicyDecisionPointsApiListPdpConfigsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listPdpConfigs(projId, envId, page, perPage, options) + .listPdpConfigs( + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** - * - * @summary Accept a PDP data callback - * @param {string} xPermitInstanceId - * @param {DataUpdateReport} dataUpdateReport + * The migration process is as followed: 1. Perform request to this endpoint with the new number of shards 2. A new PDP Config will be created with the new number of shards and a new api-key 3. Create a new PDP cluster with the same instances as the number of shards defined in the new PDP Config 4. Wait for the new PDP cluster to be ready 5. Update your PDP load balancer to point to the new PDP cluster More info can be found here https://docs.permit.io/concepts/pdp-sharding + * @summary Migrate PDP Config number of shards + * @param {PolicyDecisionPointsApiMigrateShardsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - opalDataCallback( - xPermitInstanceId: string, - dataUpdateReport: DataUpdateReport, - options?: any, - ): AxiosPromise { + migrateShards( + requestParameters: PolicyDecisionPointsApiMigrateShardsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .opalDataCallback(xPermitInstanceId, dataUpdateReport, options) + .migrateShards( + requestParameters.projId, + requestParameters.envId, + requestParameters.pDPShardMigration, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Push a PDP state update. - * @summary Push PDP state - * @param {PDPStateUpdate} pDPStateUpdate + * Triggers an out-of-band data refresh for **all** PDPs in the environment. Publishes an OPAL data update instructing each PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. Use this to propagate external-data-source-backed changes in realtime. `shard_id` is not accepted here: sharding is a per-PDP topology, so a single shard target is meaningless across a heterogeneous environment. Target a shard via the single-PDP endpoint (`POST .../configs/{pdp_id}/refresh`) instead. + * @summary Refresh data for all PDPs in the environment + * @param {PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - pushPdpState(pDPStateUpdate: PDPStateUpdate, options?: any): AxiosPromise { + refreshEnvironmentPdpData( + requestParameters: PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .pushPdpState(pDPStateUpdate, options) + .refreshEnvironmentPdpData( + requestParameters.projId, + requestParameters.envId, + requestParameters.pDPDataRefreshRequest, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. + * Triggers an out-of-band data refresh for the PDP container with id `pdp_id`. Publishes an OPAL data update instructing the PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. + * @summary Refresh PDP data + * @param {PolicyDecisionPointsApiRefreshPdpDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + refreshPdpData( + requestParameters: PolicyDecisionPointsApiRefreshPdpDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .refreshPdpData( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + requestParameters.pDPDataRefreshRequest, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. For the per-environment PDP v3 credentials row this rotates the environment\'s NATS credentials instead of minting a token: every EdgePDP in the environment is revoked and fresh bootstrap credentials are minted (PER-15666). That runs as an awaited Celery task, so this call can take up to `NATS_ROTATION_TIMEOUT_SECONDS`. * @summary Rotate PDP API Key - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} pdpId The unique id of the pdp + * @param {PolicyDecisionPointsApiRotatePdpApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ rotatePdpApiKey( - projId: string, - envId: string, - pdpId: string, - options?: any, + requestParameters: PolicyDecisionPointsApiRotatePdpApiKeyRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .rotatePdpApiKey(projId, envId, pdpId, options) + .rotatePdpApiKey( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + options, + ) .then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for getAuthenticatingPdpConfigValues operation in PolicyDecisionPointsApi. - * @export - * @interface PolicyDecisionPointsApiGetAuthenticatingPdpConfigValuesRequest + * Request parameters for disableDebugAuditLogs operation in PolicyDecisionPointsApi. */ -export interface PolicyDecisionPointsApiGetAuthenticatingPdpConfigValuesRequest { +export interface PolicyDecisionPointsApiDisableDebugAuditLogsRequest { /** - * - * @type {PDPStateUpdate} - * @memberof PolicyDecisionPointsApiGetAuthenticatingPdpConfigValues + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly pDPStateUpdate: PDPStateUpdate; + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * The unique id of the pdp + */ + readonly pdpId: string; +} + +/** + * Request parameters for enableDebugAuditLogs operation in PolicyDecisionPointsApi. + */ +export interface PolicyDecisionPointsApiEnableDebugAuditLogsRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * The unique id of the pdp + */ + readonly pdpId: string; } /** * Request parameters for getPdpConfigValues operation in PolicyDecisionPointsApi. - * @export - * @interface PolicyDecisionPointsApiGetPdpConfigValuesRequest */ export interface PolicyDecisionPointsApiGetPdpConfigValuesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyDecisionPointsApiGetPdpConfigValues */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyDecisionPointsApiGetPdpConfigValues */ readonly envId: string; /** * The unique id of the pdp - * @type {string} - * @memberof PolicyDecisionPointsApiGetPdpConfigValues */ readonly pdpId: string; + + readonly xShardID?: number; } /** * Request parameters for listPdpConfigs operation in PolicyDecisionPointsApi. - * @export - * @interface PolicyDecisionPointsApiListPdpConfigsRequest */ export interface PolicyDecisionPointsApiListPdpConfigsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyDecisionPointsApiListPdpConfigs */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyDecisionPointsApiListPdpConfigs */ readonly envId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof PolicyDecisionPointsApiListPdpConfigs */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof PolicyDecisionPointsApiListPdpConfigs */ readonly perPage?: number; } /** - * Request parameters for opalDataCallback operation in PolicyDecisionPointsApi. - * @export - * @interface PolicyDecisionPointsApiOpalDataCallbackRequest + * Request parameters for migrateShards operation in PolicyDecisionPointsApi. */ -export interface PolicyDecisionPointsApiOpalDataCallbackRequest { +export interface PolicyDecisionPointsApiMigrateShardsRequest { /** - * - * @type {string} - * @memberof PolicyDecisionPointsApiOpalDataCallback + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly xPermitInstanceId: string; + readonly projId: string; /** - * - * @type {DataUpdateReport} - * @memberof PolicyDecisionPointsApiOpalDataCallback + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly dataUpdateReport: DataUpdateReport; + readonly envId: string; + + readonly pDPShardMigration: PDPShardMigration; } /** - * Request parameters for pushPdpState operation in PolicyDecisionPointsApi. - * @export - * @interface PolicyDecisionPointsApiPushPdpStateRequest + * Request parameters for refreshEnvironmentPdpData operation in PolicyDecisionPointsApi. */ -export interface PolicyDecisionPointsApiPushPdpStateRequest { +export interface PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest { /** - * - * @type {PDPStateUpdate} - * @memberof PolicyDecisionPointsApiPushPdpState + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly pDPDataRefreshRequest?: PDPDataRefreshRequest; +} + +/** + * Request parameters for refreshPdpData operation in PolicyDecisionPointsApi. + */ +export interface PolicyDecisionPointsApiRefreshPdpDataRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * The unique id of the pdp */ - readonly pDPStateUpdate: PDPStateUpdate; + readonly pdpId: string; + + readonly pDPDataRefreshRequest?: PDPDataRefreshRequest; } /** * Request parameters for rotatePdpApiKey operation in PolicyDecisionPointsApi. - * @export - * @interface PolicyDecisionPointsApiRotatePdpApiKeyRequest */ export interface PolicyDecisionPointsApiRotatePdpApiKeyRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyDecisionPointsApiRotatePdpApiKey */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyDecisionPointsApiRotatePdpApiKey */ readonly envId: string; /** * The unique id of the pdp - * @type {string} - * @memberof PolicyDecisionPointsApiRotatePdpApiKey */ readonly pdpId: string; } /** * PolicyDecisionPointsApi - object-oriented interface - * @export - * @class PolicyDecisionPointsApi - * @extends {BaseAPI} */ export class PolicyDecisionPointsApi extends BaseAPI { /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration and push state - * @param {PolicyDecisionPointsApiGetAuthenticatingPdpConfigValuesRequest} requestParameters Request parameters. + * Disabled debug audit logs for the PDP container with id `pdp_id`. + * @summary Disable debug audit logs + * @param {PolicyDecisionPointsApiDisableDebugAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ - public getAuthenticatingPdpConfigValues( - requestParameters: PolicyDecisionPointsApiGetAuthenticatingPdpConfigValuesRequest, - options?: AxiosRequestConfig, + public disableDebugAuditLogs( + requestParameters: PolicyDecisionPointsApiDisableDebugAuditLogsRequest, + options?: RawAxiosRequestConfig, ) { return PolicyDecisionPointsApiFp(this.configuration) - .getAuthenticatingPdpConfigValues(requestParameters.pDPStateUpdate, options) + .disableDebugAuditLogs( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + options, + ) .then((request) => request(this.axios, this.basePath)); } /** - * Gets the configuration values for the currently authenticated PDP container. The PDP authenticates with an API key scoped to a given Permit.io environment. The system identifies the PDP via its API key and then returns all the configuration values required for the container to run correctly. The config values returned are considered \"overrides\", meaning they are overriding any default values given to the container by the user. - * @summary Get connected PDP configuration + * Enables debug audit logs for the PDP container with id `pdp_id`. + * @summary Enable debug audit logs + * @param {PolicyDecisionPointsApiEnableDebugAuditLogsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ - public getAuthenticatingPdpConfigValuesLegacy(options?: AxiosRequestConfig) { + public enableDebugAuditLogs( + requestParameters: PolicyDecisionPointsApiEnableDebugAuditLogsRequest, + options?: RawAxiosRequestConfig, + ) { return PolicyDecisionPointsApiFp(this.configuration) - .getAuthenticatingPdpConfigValuesLegacy(options) + .enableDebugAuditLogs( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + options, + ) .then((request) => request(this.axios, this.basePath)); } @@ -867,18 +1187,18 @@ export class PolicyDecisionPointsApi extends BaseAPI { * @summary Get PDP configuration * @param {PolicyDecisionPointsApiGetPdpConfigValuesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ public getPdpConfigValues( requestParameters: PolicyDecisionPointsApiGetPdpConfigValuesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyDecisionPointsApiFp(this.configuration) .getPdpConfigValues( requestParameters.projId, requestParameters.envId, requestParameters.pdpId, + requestParameters.xShardID, options, ) .then((request) => request(this.axios, this.basePath)); @@ -889,12 +1209,11 @@ export class PolicyDecisionPointsApi extends BaseAPI { * @summary List PDP configurations * @param {PolicyDecisionPointsApiListPdpConfigsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ public listPdpConfigs( requestParameters: PolicyDecisionPointsApiListPdpConfigsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyDecisionPointsApiFp(this.configuration) .listPdpConfigs( @@ -908,54 +1227,79 @@ export class PolicyDecisionPointsApi extends BaseAPI { } /** - * - * @summary Accept a PDP data callback - * @param {PolicyDecisionPointsApiOpalDataCallbackRequest} requestParameters Request parameters. + * The migration process is as followed: 1. Perform request to this endpoint with the new number of shards 2. A new PDP Config will be created with the new number of shards and a new api-key 3. Create a new PDP cluster with the same instances as the number of shards defined in the new PDP Config 4. Wait for the new PDP cluster to be ready 5. Update your PDP load balancer to point to the new PDP cluster More info can be found here https://docs.permit.io/concepts/pdp-sharding + * @summary Migrate PDP Config number of shards + * @param {PolicyDecisionPointsApiMigrateShardsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public migrateShards( + requestParameters: PolicyDecisionPointsApiMigrateShardsRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyDecisionPointsApiFp(this.configuration) + .migrateShards( + requestParameters.projId, + requestParameters.envId, + requestParameters.pDPShardMigration, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Triggers an out-of-band data refresh for **all** PDPs in the environment. Publishes an OPAL data update instructing each PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. Use this to propagate external-data-source-backed changes in realtime. `shard_id` is not accepted here: sharding is a per-PDP topology, so a single shard target is meaningless across a heterogeneous environment. Target a shard via the single-PDP endpoint (`POST .../configs/{pdp_id}/refresh`) instead. + * @summary Refresh data for all PDPs in the environment + * @param {PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ - public opalDataCallback( - requestParameters: PolicyDecisionPointsApiOpalDataCallbackRequest, - options?: AxiosRequestConfig, + public refreshEnvironmentPdpData( + requestParameters: PolicyDecisionPointsApiRefreshEnvironmentPdpDataRequest, + options?: RawAxiosRequestConfig, ) { return PolicyDecisionPointsApiFp(this.configuration) - .opalDataCallback( - requestParameters.xPermitInstanceId, - requestParameters.dataUpdateReport, + .refreshEnvironmentPdpData( + requestParameters.projId, + requestParameters.envId, + requestParameters.pDPDataRefreshRequest, options, ) .then((request) => request(this.axios, this.basePath)); } /** - * Push a PDP state update. - * @summary Push PDP state - * @param {PolicyDecisionPointsApiPushPdpStateRequest} requestParameters Request parameters. + * Triggers an out-of-band data refresh for the PDP container with id `pdp_id`. Publishes an OPAL data update instructing the PDP to immediately re-pull its full authorization data, instead of waiting for the next periodic poll. + * @summary Refresh PDP data + * @param {PolicyDecisionPointsApiRefreshPdpDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ - public pushPdpState( - requestParameters: PolicyDecisionPointsApiPushPdpStateRequest, - options?: AxiosRequestConfig, + public refreshPdpData( + requestParameters: PolicyDecisionPointsApiRefreshPdpDataRequest, + options?: RawAxiosRequestConfig, ) { return PolicyDecisionPointsApiFp(this.configuration) - .pushPdpState(requestParameters.pDPStateUpdate, options) + .refreshPdpData( + requestParameters.projId, + requestParameters.envId, + requestParameters.pdpId, + requestParameters.pDPDataRefreshRequest, + options, + ) .then((request) => request(this.axios, this.basePath)); } /** - * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. + * Rotates the API key of the PDP container with id `pdp_id`. The rotation of the API key revokes the old API key and issues a new API key to the PDP. For the per-environment PDP v3 credentials row this rotates the environment\'s NATS credentials instead of minting a token: every EdgePDP in the environment is revoked and fresh bootstrap credentials are minted (PER-15666). That runs as an awaited Celery task, so this call can take up to `NATS_ROTATION_TIMEOUT_SECONDS`. * @summary Rotate PDP API Key * @param {PolicyDecisionPointsApiRotatePdpApiKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyDecisionPointsApi + * @throws If a required parameter is missing. */ public rotatePdpApiKey( requestParameters: PolicyDecisionPointsApiRotatePdpApiKeyRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyDecisionPointsApiFp(this.configuration) .rotatePdpApiKey( diff --git a/src/openapi/api/policy-git-repositories-api.ts b/src/openapi/api/policy-git-repositories-api.ts index d7959c62..2ca998be 100644 --- a/src/openapi/api/policy-git-repositories-api.ts +++ b/src/openapi/api/policy-git-repositories-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,22 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PolicyRepoCreate } from '../types'; -// @ts-ignore -import { PolicyRepoRead } from '../types'; -// @ts-ignore -import { ProjectRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { PolicyRepoCreate, PolicyRepoRead, ProjectRead } from '../types'; /** * PolicyGitRepositoriesApi - axios parameter creator - * @export */ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -50,20 +35,20 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ activatePolicyRepo: async ( projId: string, repoId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('activatePolicyRepo', 'projId', projId); // verify required parameter 'repoId' is not null or undefined assertParamExists('activatePolicyRepo', 'repoId', repoId); const localVarPath = `/v2/projects/{proj_id}/repos/{repo_id}/activate` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'repo_id'}}`, encodeURIComponent(String(repoId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{repo_id}', encodeURIComponent(String(repoId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -79,6 +64,8 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -98,19 +85,19 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {PolicyRepoCreate} policyRepoCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createPolicyRepo: async ( projId: string, policyRepoCreate: PolicyRepoCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createPolicyRepo', 'projId', projId); // verify required parameter 'policyRepoCreate' is not null or undefined assertParamExists('createPolicyRepo', 'policyRepoCreate', policyRepoCreate); const localVarPath = `/v2/projects/{proj_id}/repos`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -129,6 +116,7 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -154,20 +142,20 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deletePolicyRepo: async ( projId: string, repoId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('deletePolicyRepo', 'projId', projId); // verify required parameter 'repoId' is not null or undefined assertParamExists('deletePolicyRepo', 'repoId', repoId); const localVarPath = `/v2/projects/{proj_id}/repos/{repo_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'repo_id'}}`, encodeURIComponent(String(repoId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{repo_id}', encodeURIComponent(String(repoId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -183,6 +171,8 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -201,16 +191,16 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @summary Disable Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ disableActivePolicyRepo: async ( projId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('disableActivePolicyRepo', 'projId', projId); const localVarPath = `/v2/projects/{proj_id}/repos/disable`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -228,6 +218,8 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -246,16 +238,16 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @summary Get Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getActivePolicyRepo: async ( projId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getActivePolicyRepo', 'projId', projId); const localVarPath = `/v2/projects/{proj_id}/repos/active`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -273,6 +265,8 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -292,20 +286,20 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getPolicyRepo: async ( projId: string, repoId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getPolicyRepo', 'projId', projId); // verify required parameter 'repoId' is not null or undefined assertParamExists('getPolicyRepo', 'repoId', repoId); const localVarPath = `/v2/projects/{proj_id}/repos/{repo_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'repo_id'}}`, encodeURIComponent(String(repoId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{repo_id}', encodeURIComponent(String(repoId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -321,6 +315,8 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -341,18 +337,18 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listPolicyRepos: async ( projId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listPolicyRepos', 'projId', projId); const localVarPath = `/v2/projects/{proj_id}/repos`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -378,6 +374,8 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -396,7 +394,6 @@ export const PolicyGitRepositoriesApiAxiosParamCreator = function (configuration /** * PolicyGitRepositoriesApi - functional programming interface - * @export */ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = PolicyGitRepositoriesApiAxiosParamCreator(configuration); @@ -407,19 +404,30 @@ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuratio * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async activatePolicyRepo( projId: string, repoId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.activatePolicyRepo( projId, repoId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.activatePolicyRepo']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new policy repository configuration under a given project. The given repository is created with status \'pending\', it will be changed and used as the \'active\' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote. @@ -427,19 +435,30 @@ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuratio * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {PolicyRepoCreate} policyRepoCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createPolicyRepo( projId: string, policyRepoCreate: PolicyRepoCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicyRepo( projId, policyRepoCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.createPolicyRepo']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes an environment and all its related data. @@ -447,53 +466,86 @@ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuratio * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deletePolicyRepo( projId: string, repoId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePolicyRepo( projId, repoId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.deletePolicyRepo']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Disable Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async disableActivePolicyRepo( projId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.disableActivePolicyRepo( projId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.disableActivePolicyRepo']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets the currently active repository, if such repository exists. * @summary Get Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getActivePolicyRepo( projId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getActivePolicyRepo( projId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.getActivePolicyRepo']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single repository matching the given repo_id, if such repository exists. @@ -501,19 +553,29 @@ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuratio * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getPolicyRepo( projId: string, repoId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicyRepo( projId, repoId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.getPolicyRepo']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the policy repositories under a given project. @@ -522,13 +584,13 @@ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuratio * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listPolicyRepos( projId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyRepos( projId, @@ -536,14 +598,24 @@ export const PolicyGitRepositoriesApiFp = function (configuration?: Configuratio perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGitRepositoriesApi.listPolicyRepos']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * PolicyGitRepositoriesApi - factory interface - * @export */ export const PolicyGitRepositoriesApiFactory = function ( configuration?: Configuration, @@ -555,100 +627,111 @@ export const PolicyGitRepositoriesApiFactory = function ( /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Activate Policy Repo - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). + * @param {PolicyGitRepositoriesApiActivatePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - activatePolicyRepo(projId: string, repoId: string, options?: any): AxiosPromise { + activatePolicyRepo( + requestParameters: PolicyGitRepositoriesApiActivatePolicyRepoRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .activatePolicyRepo(projId, repoId, options) + .activatePolicyRepo(requestParameters.projId, requestParameters.repoId, options) .then((request) => request(axios, basePath)); }, /** * Creates a new policy repository configuration under a given project. The given repository is created with status \'pending\', it will be changed and used as the \'active\' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote. * @summary Create Policy Repo - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {PolicyRepoCreate} policyRepoCreate + * @param {PolicyGitRepositoriesApiCreatePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createPolicyRepo( - projId: string, - policyRepoCreate: PolicyRepoCreate, - options?: any, + requestParameters: PolicyGitRepositoriesApiCreatePolicyRepoRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createPolicyRepo(projId, policyRepoCreate, options) + .createPolicyRepo(requestParameters.projId, requestParameters.policyRepoCreate, options) .then((request) => request(axios, basePath)); }, /** * Deletes an environment and all its related data. * @summary Delete Policy Repo - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). + * @param {PolicyGitRepositoriesApiDeletePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deletePolicyRepo(projId: string, repoId: string, options?: any): AxiosPromise { + deletePolicyRepo( + requestParameters: PolicyGitRepositoriesApiDeletePolicyRepoRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .deletePolicyRepo(projId, repoId, options) + .deletePolicyRepo(requestParameters.projId, requestParameters.repoId, options) .then((request) => request(axios, basePath)); }, /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Disable Active Policy Repo - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {PolicyGitRepositoriesApiDisableActivePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - disableActivePolicyRepo(projId: string, options?: any): AxiosPromise { + disableActivePolicyRepo( + requestParameters: PolicyGitRepositoriesApiDisableActivePolicyRepoRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .disableActivePolicyRepo(projId, options) + .disableActivePolicyRepo(requestParameters.projId, options) .then((request) => request(axios, basePath)); }, /** * Gets the currently active repository, if such repository exists. * @summary Get Active Policy Repo - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {PolicyGitRepositoriesApiGetActivePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getActivePolicyRepo(projId: string, options?: any): AxiosPromise { + getActivePolicyRepo( + requestParameters: PolicyGitRepositoriesApiGetActivePolicyRepoRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getActivePolicyRepo(projId, options) + .getActivePolicyRepo(requestParameters.projId, options) .then((request) => request(axios, basePath)); }, /** * Gets a single repository matching the given repo_id, if such repository exists. * @summary Get Policy Repo - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). + * @param {PolicyGitRepositoriesApiGetPolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getPolicyRepo(projId: string, repoId: string, options?: any): AxiosPromise { + getPolicyRepo( + requestParameters: PolicyGitRepositoriesApiGetPolicyRepoRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getPolicyRepo(projId, repoId, options) + .getPolicyRepo(requestParameters.projId, requestParameters.repoId, options) .then((request) => request(axios, basePath)); }, /** * Lists all the policy repositories under a given project. * @summary List Policy Repos - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {PolicyGitRepositoriesApiListPolicyReposRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listPolicyRepos( - projId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: PolicyGitRepositoriesApiListPolicyReposRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listPolicyRepos(projId, page, perPage, options) + .listPolicyRepos( + requestParameters.projId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -656,149 +739,103 @@ export const PolicyGitRepositoriesApiFactory = function ( /** * Request parameters for activatePolicyRepo operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiActivatePolicyRepoRequest */ export interface PolicyGitRepositoriesApiActivatePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiActivatePolicyRepo */ readonly projId: string; /** * Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiActivatePolicyRepo */ readonly repoId: string; } /** * Request parameters for createPolicyRepo operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiCreatePolicyRepoRequest */ export interface PolicyGitRepositoriesApiCreatePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiCreatePolicyRepo */ readonly projId: string; - /** - * - * @type {PolicyRepoCreate} - * @memberof PolicyGitRepositoriesApiCreatePolicyRepo - */ readonly policyRepoCreate: PolicyRepoCreate; } /** * Request parameters for deletePolicyRepo operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiDeletePolicyRepoRequest */ export interface PolicyGitRepositoriesApiDeletePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiDeletePolicyRepo */ readonly projId: string; /** * Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiDeletePolicyRepo */ readonly repoId: string; } /** * Request parameters for disableActivePolicyRepo operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiDisableActivePolicyRepoRequest */ export interface PolicyGitRepositoriesApiDisableActivePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiDisableActivePolicyRepo */ readonly projId: string; } /** * Request parameters for getActivePolicyRepo operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiGetActivePolicyRepoRequest */ export interface PolicyGitRepositoriesApiGetActivePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiGetActivePolicyRepo */ readonly projId: string; } /** * Request parameters for getPolicyRepo operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiGetPolicyRepoRequest */ export interface PolicyGitRepositoriesApiGetPolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiGetPolicyRepo */ readonly projId: string; /** * Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiGetPolicyRepo */ readonly repoId: string; } /** * Request parameters for listPolicyRepos operation in PolicyGitRepositoriesApi. - * @export - * @interface PolicyGitRepositoriesApiListPolicyReposRequest */ export interface PolicyGitRepositoriesApiListPolicyReposRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof PolicyGitRepositoriesApiListPolicyRepos */ readonly projId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof PolicyGitRepositoriesApiListPolicyRepos */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof PolicyGitRepositoriesApiListPolicyRepos */ readonly perPage?: number; } /** * PolicyGitRepositoriesApi - object-oriented interface - * @export - * @class PolicyGitRepositoriesApi - * @extends {BaseAPI} */ export class PolicyGitRepositoriesApi extends BaseAPI { /** @@ -806,12 +843,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary Activate Policy Repo * @param {PolicyGitRepositoriesApiActivatePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public activatePolicyRepo( requestParameters: PolicyGitRepositoriesApiActivatePolicyRepoRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .activatePolicyRepo(requestParameters.projId, requestParameters.repoId, options) @@ -823,12 +859,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary Create Policy Repo * @param {PolicyGitRepositoriesApiCreatePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public createPolicyRepo( requestParameters: PolicyGitRepositoriesApiCreatePolicyRepoRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .createPolicyRepo(requestParameters.projId, requestParameters.policyRepoCreate, options) @@ -840,12 +875,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary Delete Policy Repo * @param {PolicyGitRepositoriesApiDeletePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public deletePolicyRepo( requestParameters: PolicyGitRepositoriesApiDeletePolicyRepoRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .deletePolicyRepo(requestParameters.projId, requestParameters.repoId, options) @@ -857,12 +891,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary Disable Active Policy Repo * @param {PolicyGitRepositoriesApiDisableActivePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public disableActivePolicyRepo( requestParameters: PolicyGitRepositoriesApiDisableActivePolicyRepoRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .disableActivePolicyRepo(requestParameters.projId, options) @@ -874,12 +907,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary Get Active Policy Repo * @param {PolicyGitRepositoriesApiGetActivePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public getActivePolicyRepo( requestParameters: PolicyGitRepositoriesApiGetActivePolicyRepoRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .getActivePolicyRepo(requestParameters.projId, options) @@ -891,12 +923,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary Get Policy Repo * @param {PolicyGitRepositoriesApiGetPolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public getPolicyRepo( requestParameters: PolicyGitRepositoriesApiGetPolicyRepoRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .getPolicyRepo(requestParameters.projId, requestParameters.repoId, options) @@ -908,12 +939,11 @@ export class PolicyGitRepositoriesApi extends BaseAPI { * @summary List Policy Repos * @param {PolicyGitRepositoriesApiListPolicyReposRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PolicyGitRepositoriesApi + * @throws If a required parameter is missing. */ public listPolicyRepos( requestParameters: PolicyGitRepositoriesApiListPolicyReposRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return PolicyGitRepositoriesApiFp(this.configuration) .listPolicyRepos( diff --git a/src/openapi/api/policy-guards-eapapi.ts b/src/openapi/api/policy-guards-eapapi.ts new file mode 100644 index 00000000..9c14f4ba --- /dev/null +++ b/src/openapi/api/policy-guards-eapapi.ts @@ -0,0 +1,1302 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { + PolicyGuardRuleCreate, + PolicyGuardRuleItem, + PolicyGuardRuleRead, + PolicyGuardScopeAssociate, + PolicyGuardScopeCreate, + PolicyGuardScopeRead, + TaskResultPolicyGuardScopeRead, +} from '../types'; +/** + * PolicyGuardsEAPApi - axios parameter creator + */ +export const PolicyGuardsEAPApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * associate a project to a Policy guard scope. + * @summary Associate Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardScopeAssociate} policyGuardScopeAssociate + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + associatePolicyGuardScope: async ( + policyGuardScopeId: string, + policyGuardScopeAssociate: PolicyGuardScopeAssociate, + wait?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('associatePolicyGuardScope', 'policyGuardScopeId', policyGuardScopeId); + // verify required parameter 'policyGuardScopeAssociate' is not null or undefined + assertParamExists( + 'associatePolicyGuardScope', + 'policyGuardScopeAssociate', + policyGuardScopeAssociate, + ); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}/associate`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (wait !== undefined) { + localVarQueryParameter['wait'] = wait; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + policyGuardScopeAssociate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a policy guard rule. + * @summary Create Policy Guard Rule + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardRuleCreate} policyGuardRuleCreate + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createPolicyGuardRule: async ( + policyGuardScopeId: string, + policyGuardRuleCreate: PolicyGuardRuleCreate, + wait?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('createPolicyGuardRule', 'policyGuardScopeId', policyGuardScopeId); + // verify required parameter 'policyGuardRuleCreate' is not null or undefined + assertParamExists('createPolicyGuardRule', 'policyGuardRuleCreate', policyGuardRuleCreate); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}/rules`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (wait !== undefined) { + localVarQueryParameter['wait'] = wait; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + policyGuardRuleCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new Policy guard scope. + * @summary Create Policy Guard Scope + * @param {PolicyGuardScopeCreate} policyGuardScopeCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createPolicyGuardScope: async ( + policyGuardScopeCreate: PolicyGuardScopeCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeCreate' is not null or undefined + assertParamExists('createPolicyGuardScope', 'policyGuardScopeCreate', policyGuardScopeCreate); + const localVarPath = `/v2/policy_guards/scopes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + policyGuardScopeCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Remove a policy guard rule. + * @summary Delete Policy Guard Rule + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardRuleItem} policyGuardRuleItem + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deletePolicyGuardRule: async ( + policyGuardScopeId: string, + policyGuardRuleItem: PolicyGuardRuleItem, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('deletePolicyGuardRule', 'policyGuardScopeId', policyGuardScopeId); + // verify required parameter 'policyGuardRuleItem' is not null or undefined + assertParamExists('deletePolicyGuardRule', 'policyGuardRuleItem', policyGuardRuleItem); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}/rules`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + policyGuardRuleItem, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a Policy guard scope. + * @summary Delete Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deletePolicyGuardScope: async ( + policyGuardScopeId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('deletePolicyGuardScope', 'policyGuardScopeId', policyGuardScopeId); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Disassociate a project from a Policy guard scope. + * @summary Disassociate Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardScopeAssociate} policyGuardScopeAssociate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + disassociatePolicyGuardScope: async ( + policyGuardScopeId: string, + policyGuardScopeAssociate: PolicyGuardScopeAssociate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('disassociatePolicyGuardScope', 'policyGuardScopeId', policyGuardScopeId); + // verify required parameter 'policyGuardScopeAssociate' is not null or undefined + assertParamExists( + 'disassociatePolicyGuardScope', + 'policyGuardScopeAssociate', + policyGuardScopeAssociate, + ); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}/disassociate`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + policyGuardScopeAssociate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a Policy guard scope. + * @summary Get Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getPolicyGuardScope: async ( + policyGuardScopeId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('getPolicyGuardScope', 'policyGuardScopeId', policyGuardScopeId); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all rules for a Policy guard scope. + * @summary List Policy Guard Rules + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listPolicyGuardRules: async ( + policyGuardScopeId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'policyGuardScopeId' is not null or undefined + assertParamExists('listPolicyGuardRules', 'policyGuardScopeId', policyGuardScopeId); + const localVarPath = `/v2/policy_guards/scopes/{policy_guard_scope_id}/rules`.replace( + '{policy_guard_scope_id}', + encodeURIComponent(String(policyGuardScopeId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all guarding policies scopes. + * @summary List Policy Guard Scopes + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listPolicyGuardScopes: async ( + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/v2/policy_guards/scopes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * PolicyGuardsEAPApi - functional programming interface + */ +export const PolicyGuardsEAPApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PolicyGuardsEAPApiAxiosParamCreator(configuration); + return { + /** + * associate a project to a Policy guard scope. + * @summary Associate Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardScopeAssociate} policyGuardScopeAssociate + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async associatePolicyGuardScope( + policyGuardScopeId: string, + policyGuardScopeAssociate: PolicyGuardScopeAssociate, + wait?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.associatePolicyGuardScope( + policyGuardScopeId, + policyGuardScopeAssociate, + wait, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.associatePolicyGuardScope']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a policy guard rule. + * @summary Create Policy Guard Rule + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardRuleCreate} policyGuardRuleCreate + * @param {number} [wait] Time in seconds to wait for the task to complete. Default is 0, means no wait. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createPolicyGuardRule( + policyGuardScopeId: string, + policyGuardRuleCreate: PolicyGuardRuleCreate, + wait?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicyGuardRule( + policyGuardScopeId, + policyGuardRuleCreate, + wait, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.createPolicyGuardRule']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new Policy guard scope. + * @summary Create Policy Guard Scope + * @param {PolicyGuardScopeCreate} policyGuardScopeCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createPolicyGuardScope( + policyGuardScopeCreate: PolicyGuardScopeCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicyGuardScope( + policyGuardScopeCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.createPolicyGuardScope']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Remove a policy guard rule. + * @summary Delete Policy Guard Rule + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardRuleItem} policyGuardRuleItem + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async deletePolicyGuardRule( + policyGuardScopeId: string, + policyGuardRuleItem: PolicyGuardRuleItem, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePolicyGuardRule( + policyGuardScopeId, + policyGuardRuleItem, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.deletePolicyGuardRule']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete a Policy guard scope. + * @summary Delete Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async deletePolicyGuardScope( + policyGuardScopeId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePolicyGuardScope( + policyGuardScopeId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.deletePolicyGuardScope']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Disassociate a project from a Policy guard scope. + * @summary Disassociate Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {PolicyGuardScopeAssociate} policyGuardScopeAssociate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async disassociatePolicyGuardScope( + policyGuardScopeId: string, + policyGuardScopeAssociate: PolicyGuardScopeAssociate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.disassociatePolicyGuardScope( + policyGuardScopeId, + policyGuardScopeAssociate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.disassociatePolicyGuardScope']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a Policy guard scope. + * @summary Get Policy Guard Scope + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getPolicyGuardScope( + policyGuardScopeId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicyGuardScope( + policyGuardScopeId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.getPolicyGuardScope']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all rules for a Policy guard scope. + * @summary List Policy Guard Rules + * @param {string} policyGuardScopeId Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listPolicyGuardRules( + policyGuardScopeId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyGuardRules( + policyGuardScopeId, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.listPolicyGuardRules']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all guarding policies scopes. + * @summary List Policy Guard Scopes + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listPolicyGuardScopes( + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyGuardScopes( + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['PolicyGuardsEAPApi.listPolicyGuardScopes']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * PolicyGuardsEAPApi - factory interface + */ +export const PolicyGuardsEAPApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PolicyGuardsEAPApiFp(configuration); + return { + /** + * associate a project to a Policy guard scope. + * @summary Associate Policy Guard Scope + * @param {PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + associatePolicyGuardScope( + requestParameters: PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .associatePolicyGuardScope( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardScopeAssociate, + requestParameters.wait, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Create a policy guard rule. + * @summary Create Policy Guard Rule + * @param {PolicyGuardsEAPApiCreatePolicyGuardRuleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createPolicyGuardRule( + requestParameters: PolicyGuardsEAPApiCreatePolicyGuardRuleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createPolicyGuardRule( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardRuleCreate, + requestParameters.wait, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Create a new Policy guard scope. + * @summary Create Policy Guard Scope + * @param {PolicyGuardsEAPApiCreatePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createPolicyGuardScope( + requestParameters: PolicyGuardsEAPApiCreatePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createPolicyGuardScope(requestParameters.policyGuardScopeCreate, options) + .then((request) => request(axios, basePath)); + }, + /** + * Remove a policy guard rule. + * @summary Delete Policy Guard Rule + * @param {PolicyGuardsEAPApiDeletePolicyGuardRuleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deletePolicyGuardRule( + requestParameters: PolicyGuardsEAPApiDeletePolicyGuardRuleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletePolicyGuardRule( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardRuleItem, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Delete a Policy guard scope. + * @summary Delete Policy Guard Scope + * @param {PolicyGuardsEAPApiDeletePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deletePolicyGuardScope( + requestParameters: PolicyGuardsEAPApiDeletePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletePolicyGuardScope(requestParameters.policyGuardScopeId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Disassociate a project from a Policy guard scope. + * @summary Disassociate Policy Guard Scope + * @param {PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + disassociatePolicyGuardScope( + requestParameters: PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .disassociatePolicyGuardScope( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardScopeAssociate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Get a Policy guard scope. + * @summary Get Policy Guard Scope + * @param {PolicyGuardsEAPApiGetPolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getPolicyGuardScope( + requestParameters: PolicyGuardsEAPApiGetPolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getPolicyGuardScope(requestParameters.policyGuardScopeId, options) + .then((request) => request(axios, basePath)); + }, + /** + * List all rules for a Policy guard scope. + * @summary List Policy Guard Rules + * @param {PolicyGuardsEAPApiListPolicyGuardRulesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listPolicyGuardRules( + requestParameters: PolicyGuardsEAPApiListPolicyGuardRulesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listPolicyGuardRules( + requestParameters.policyGuardScopeId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * List all guarding policies scopes. + * @summary List Policy Guard Scopes + * @param {PolicyGuardsEAPApiListPolicyGuardScopesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listPolicyGuardScopes( + requestParameters: PolicyGuardsEAPApiListPolicyGuardScopesRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listPolicyGuardScopes(requestParameters.page, requestParameters.perPage, options) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for associatePolicyGuardScope operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; + + readonly policyGuardScopeAssociate: PolicyGuardScopeAssociate; + + /** + * Time in seconds to wait for the task to complete. Default is 0, means no wait. + */ + readonly wait?: number; +} + +/** + * Request parameters for createPolicyGuardRule operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiCreatePolicyGuardRuleRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; + + readonly policyGuardRuleCreate: PolicyGuardRuleCreate; + + /** + * Time in seconds to wait for the task to complete. Default is 0, means no wait. + */ + readonly wait?: number; +} + +/** + * Request parameters for createPolicyGuardScope operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiCreatePolicyGuardScopeRequest { + readonly policyGuardScopeCreate: PolicyGuardScopeCreate; +} + +/** + * Request parameters for deletePolicyGuardRule operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiDeletePolicyGuardRuleRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; + + readonly policyGuardRuleItem: PolicyGuardRuleItem; +} + +/** + * Request parameters for deletePolicyGuardScope operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiDeletePolicyGuardScopeRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; +} + +/** + * Request parameters for disassociatePolicyGuardScope operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; + + readonly policyGuardScopeAssociate: PolicyGuardScopeAssociate; +} + +/** + * Request parameters for getPolicyGuardScope operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiGetPolicyGuardScopeRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; +} + +/** + * Request parameters for listPolicyGuardRules operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiListPolicyGuardRulesRequest { + /** + * Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the \"slug\"). + */ + readonly policyGuardScopeId: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listPolicyGuardScopes operation in PolicyGuardsEAPApi. + */ +export interface PolicyGuardsEAPApiListPolicyGuardScopesRequest { + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * PolicyGuardsEAPApi - object-oriented interface + */ +export class PolicyGuardsEAPApi extends BaseAPI { + /** + * associate a project to a Policy guard scope. + * @summary Associate Policy Guard Scope + * @param {PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public associatePolicyGuardScope( + requestParameters: PolicyGuardsEAPApiAssociatePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .associatePolicyGuardScope( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardScopeAssociate, + requestParameters.wait, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a policy guard rule. + * @summary Create Policy Guard Rule + * @param {PolicyGuardsEAPApiCreatePolicyGuardRuleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createPolicyGuardRule( + requestParameters: PolicyGuardsEAPApiCreatePolicyGuardRuleRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .createPolicyGuardRule( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardRuleCreate, + requestParameters.wait, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new Policy guard scope. + * @summary Create Policy Guard Scope + * @param {PolicyGuardsEAPApiCreatePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createPolicyGuardScope( + requestParameters: PolicyGuardsEAPApiCreatePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .createPolicyGuardScope(requestParameters.policyGuardScopeCreate, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Remove a policy guard rule. + * @summary Delete Policy Guard Rule + * @param {PolicyGuardsEAPApiDeletePolicyGuardRuleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public deletePolicyGuardRule( + requestParameters: PolicyGuardsEAPApiDeletePolicyGuardRuleRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .deletePolicyGuardRule( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardRuleItem, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a Policy guard scope. + * @summary Delete Policy Guard Scope + * @param {PolicyGuardsEAPApiDeletePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public deletePolicyGuardScope( + requestParameters: PolicyGuardsEAPApiDeletePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .deletePolicyGuardScope(requestParameters.policyGuardScopeId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Disassociate a project from a Policy guard scope. + * @summary Disassociate Policy Guard Scope + * @param {PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public disassociatePolicyGuardScope( + requestParameters: PolicyGuardsEAPApiDisassociatePolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .disassociatePolicyGuardScope( + requestParameters.policyGuardScopeId, + requestParameters.policyGuardScopeAssociate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a Policy guard scope. + * @summary Get Policy Guard Scope + * @param {PolicyGuardsEAPApiGetPolicyGuardScopeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getPolicyGuardScope( + requestParameters: PolicyGuardsEAPApiGetPolicyGuardScopeRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .getPolicyGuardScope(requestParameters.policyGuardScopeId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * List all rules for a Policy guard scope. + * @summary List Policy Guard Rules + * @param {PolicyGuardsEAPApiListPolicyGuardRulesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listPolicyGuardRules( + requestParameters: PolicyGuardsEAPApiListPolicyGuardRulesRequest, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .listPolicyGuardRules( + requestParameters.policyGuardScopeId, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * List all guarding policies scopes. + * @summary List Policy Guard Scopes + * @param {PolicyGuardsEAPApiListPolicyGuardScopesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listPolicyGuardScopes( + requestParameters: PolicyGuardsEAPApiListPolicyGuardScopesRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return PolicyGuardsEAPApiFp(this.configuration) + .listPolicyGuardScopes(requestParameters.page, requestParameters.perPage, options) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/projects-api.ts b/src/openapi/api/projects-api.ts index b2f28486..c9746898 100644 --- a/src/openapi/api/projects-api.ts +++ b/src/openapi/api/projects-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,22 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ProjectCreate } from '../types'; -// @ts-ignore -import { ProjectRead } from '../types'; -// @ts-ignore -import { ProjectUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { ProjectCreate, ProjectRead, ProjectUpdate } from '../types'; /** * ProjectsApi - axios parameter creator - * @export */ export const ProjectsApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -49,11 +34,11 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @summary Create Project * @param {ProjectCreate} projectCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createProject: async ( projectCreate: ProjectCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projectCreate' is not null or undefined assertParamExists('createProject', 'projectCreate', projectCreate); @@ -74,6 +59,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -98,16 +84,16 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @summary Delete Project * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteProject: async ( projId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('deleteProject', 'projId', projId); const localVarPath = `/v2/projects/{proj_id}`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -125,6 +111,8 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -143,13 +131,16 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @summary Get Project * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getProject: async (projId: string, options: AxiosRequestConfig = {}): Promise => { + getProject: async ( + projId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getProject', 'projId', projId); const localVarPath = `/v2/projects/{proj_id}`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -167,6 +158,8 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -186,12 +179,12 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listProjects: async ( page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/v2/projects`; // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -217,6 +210,8 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -236,19 +231,19 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {ProjectUpdate} projectUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateProject: async ( projId: string, projectUpdate: ProjectUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('updateProject', 'projId', projId); // verify required parameter 'projectUpdate' is not null or undefined assertParamExists('updateProject', 'projectUpdate', projectUpdate); const localVarPath = `/v2/projects/{proj_id}`.replace( - `{${'proj_id'}}`, + '{proj_id}', encodeURIComponent(String(projId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -267,6 +262,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -291,7 +287,6 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat /** * ProjectsApi - functional programming interface - * @export */ export const ProjectsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ProjectsApiAxiosParamCreator(configuration); @@ -301,45 +296,72 @@ export const ProjectsApiFp = function (configuration?: Configuration) { * @summary Create Project * @param {ProjectCreate} projectCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createProject( projectCreate: ProjectCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createProject( projectCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProjectsApi.createProject']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the project and all its related data. * @summary Delete Project * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteProject( projId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProject(projId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProjectsApi.deleteProject']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single project matching the given proj_id, if such project exists. * @summary Get Project * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getProject( projId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProject(projId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProjectsApi.getProject']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the projects under the active organization. @@ -347,19 +369,28 @@ export const ProjectsApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listProjects( page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects( page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProjectsApi.listProjects']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the project. @@ -367,26 +398,34 @@ export const ProjectsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {ProjectUpdate} projectUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateProject( projId: string, projectUpdate: ProjectUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateProject( projId, projectUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProjectsApi.updateProject']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ProjectsApi - factory interface - * @export */ export const ProjectsApiFactory = function ( configuration?: Configuration, @@ -398,63 +437,76 @@ export const ProjectsApiFactory = function ( /** * Creates a new project under the active organization. * @summary Create Project - * @param {ProjectCreate} projectCreate + * @param {ProjectsApiCreateProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - createProject(projectCreate: ProjectCreate, options?: any): AxiosPromise { + createProject( + requestParameters: ProjectsApiCreateProjectRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .createProject(projectCreate, options) + .createProject(requestParameters.projectCreate, options) .then((request) => request(axios, basePath)); }, /** * Deletes the project and all its related data. * @summary Delete Project - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {ProjectsApiDeleteProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteProject(projId: string, options?: any): AxiosPromise { - return localVarFp.deleteProject(projId, options).then((request) => request(axios, basePath)); + deleteProject( + requestParameters: ProjectsApiDeleteProjectRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteProject(requestParameters.projId, options) + .then((request) => request(axios, basePath)); }, /** * Gets a single project matching the given proj_id, if such project exists. * @summary Get Project - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {ProjectsApiGetProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getProject(projId: string, options?: any): AxiosPromise { - return localVarFp.getProject(projId, options).then((request) => request(axios, basePath)); + getProject( + requestParameters: ProjectsApiGetProjectRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getProject(requestParameters.projId, options) + .then((request) => request(axios, basePath)); }, /** * Lists all the projects under the active organization. * @summary List Projects - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ProjectsApiListProjectsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listProjects(page?: number, perPage?: number, options?: any): AxiosPromise> { + listProjects( + requestParameters: ProjectsApiListProjectsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { return localVarFp - .listProjects(page, perPage, options) + .listProjects(requestParameters.page, requestParameters.perPage, options) .then((request) => request(axios, basePath)); }, /** * Updates the project. * @summary Update Project - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {ProjectUpdate} projectUpdate + * @param {ProjectsApiUpdateProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateProject( - projId: string, - projectUpdate: ProjectUpdate, - options?: any, + requestParameters: ProjectsApiUpdateProjectRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateProject(projId, projectUpdate, options) + .updateProject(requestParameters.projId, requestParameters.projectUpdate, options) .then((request) => request(axios, basePath)); }, }; @@ -462,93 +514,60 @@ export const ProjectsApiFactory = function ( /** * Request parameters for createProject operation in ProjectsApi. - * @export - * @interface ProjectsApiCreateProjectRequest */ export interface ProjectsApiCreateProjectRequest { - /** - * - * @type {ProjectCreate} - * @memberof ProjectsApiCreateProject - */ readonly projectCreate: ProjectCreate; } /** * Request parameters for deleteProject operation in ProjectsApi. - * @export - * @interface ProjectsApiDeleteProjectRequest */ export interface ProjectsApiDeleteProjectRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProjectsApiDeleteProject */ readonly projId: string; } /** * Request parameters for getProject operation in ProjectsApi. - * @export - * @interface ProjectsApiGetProjectRequest */ export interface ProjectsApiGetProjectRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProjectsApiGetProject */ readonly projId: string; } /** * Request parameters for listProjects operation in ProjectsApi. - * @export - * @interface ProjectsApiListProjectsRequest */ export interface ProjectsApiListProjectsRequest { /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ProjectsApiListProjects */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ProjectsApiListProjects */ readonly perPage?: number; } /** * Request parameters for updateProject operation in ProjectsApi. - * @export - * @interface ProjectsApiUpdateProjectRequest */ export interface ProjectsApiUpdateProjectRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProjectsApiUpdateProject */ readonly projId: string; - /** - * - * @type {ProjectUpdate} - * @memberof ProjectsApiUpdateProject - */ readonly projectUpdate: ProjectUpdate; } /** * ProjectsApi - object-oriented interface - * @export - * @class ProjectsApi - * @extends {BaseAPI} */ export class ProjectsApi extends BaseAPI { /** @@ -556,12 +575,11 @@ export class ProjectsApi extends BaseAPI { * @summary Create Project * @param {ProjectsApiCreateProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi + * @throws If a required parameter is missing. */ public createProject( requestParameters: ProjectsApiCreateProjectRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProjectsApiFp(this.configuration) .createProject(requestParameters.projectCreate, options) @@ -573,12 +591,11 @@ export class ProjectsApi extends BaseAPI { * @summary Delete Project * @param {ProjectsApiDeleteProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi + * @throws If a required parameter is missing. */ public deleteProject( requestParameters: ProjectsApiDeleteProjectRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProjectsApiFp(this.configuration) .deleteProject(requestParameters.projId, options) @@ -590,10 +607,12 @@ export class ProjectsApi extends BaseAPI { * @summary Get Project * @param {ProjectsApiGetProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi + * @throws If a required parameter is missing. */ - public getProject(requestParameters: ProjectsApiGetProjectRequest, options?: AxiosRequestConfig) { + public getProject( + requestParameters: ProjectsApiGetProjectRequest, + options?: RawAxiosRequestConfig, + ) { return ProjectsApiFp(this.configuration) .getProject(requestParameters.projId, options) .then((request) => request(this.axios, this.basePath)); @@ -604,12 +623,11 @@ export class ProjectsApi extends BaseAPI { * @summary List Projects * @param {ProjectsApiListProjectsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi + * @throws If a required parameter is missing. */ public listProjects( requestParameters: ProjectsApiListProjectsRequest = {}, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProjectsApiFp(this.configuration) .listProjects(requestParameters.page, requestParameters.perPage, options) @@ -621,12 +639,11 @@ export class ProjectsApi extends BaseAPI { * @summary Update Project * @param {ProjectsApiUpdateProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi + * @throws If a required parameter is missing. */ public updateProject( requestParameters: ProjectsApiUpdateProjectRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProjectsApiFp(this.configuration) .updateProject(requestParameters.projId, requestParameters.projectUpdate, options) diff --git a/src/openapi/api/proxy-config-api.ts b/src/openapi/api/proxy-config-api.ts index 6f78eb2b..088ef9f4 100644 --- a/src/openapi/api/proxy-config-api.ts +++ b/src/openapi/api/proxy-config-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,22 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ProxyConfigCreate } from '../types'; -// @ts-ignore -import { ProxyConfigRead } from '../types'; -// @ts-ignore -import { ProxyConfigUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { ProxyConfigCreate, ProxyConfigRead, ProxyConfigUpdate } from '../types'; /** * ProxyConfigApi - axios parameter creator - * @export */ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -51,13 +36,13 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ProxyConfigCreate} proxyConfigCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createProxyConfig: async ( projId: string, envId: string, proxyConfigCreate: ProxyConfigCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createProxyConfig', 'projId', projId); @@ -66,8 +51,8 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu // verify required parameter 'proxyConfigCreate' is not null or undefined assertParamExists('createProxyConfig', 'proxyConfigCreate', proxyConfigCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/proxy_configs` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -84,6 +69,7 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -106,28 +92,28 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu /** * Deletes the proxy config and all its related data. * @summary Delete Proxy Config + * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteProxyConfig: async ( + proxyConfigId: string, projId: string, envId: string, - proxyConfigId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'proxyConfigId' is not null or undefined + assertParamExists('deleteProxyConfig', 'proxyConfigId', proxyConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteProxyConfig', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteProxyConfig', 'envId', envId); - // verify required parameter 'proxyConfigId' is not null or undefined - assertParamExists('deleteProxyConfig', 'proxyConfigId', proxyConfigId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'proxy_config_id'}}`, encodeURIComponent(String(proxyConfigId))); + .replace('{proxy_config_id}', encodeURIComponent(String(proxyConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -143,6 +129,8 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -159,28 +147,28 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu /** * Gets a proxy config, if such proxy config exists. Otherwise returns 404. * @summary Get Proxy Config + * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getProxyConfig: async ( + proxyConfigId: string, projId: string, envId: string, - proxyConfigId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'proxyConfigId' is not null or undefined + assertParamExists('getProxyConfig', 'proxyConfigId', proxyConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('getProxyConfig', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getProxyConfig', 'envId', envId); - // verify required parameter 'proxyConfigId' is not null or undefined - assertParamExists('getProxyConfig', 'proxyConfigId', proxyConfigId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'proxy_config_id'}}`, encodeURIComponent(String(proxyConfigId))); + .replace('{proxy_config_id}', encodeURIComponent(String(proxyConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -196,6 +184,8 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -217,22 +207,22 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listProxyConfigs: async ( projId: string, envId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listProxyConfigs', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listProxyConfigs', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/proxy_configs` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -256,6 +246,8 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -272,32 +264,32 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu /** * Partially updates the proxy config definition. Fields that will be provided will be completely overwritten. * @summary Update Proxy Config + * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {ProxyConfigUpdate} proxyConfigUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateProxyConfig: async ( + proxyConfigId: string, projId: string, envId: string, - proxyConfigId: string, proxyConfigUpdate: ProxyConfigUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'proxyConfigId' is not null or undefined + assertParamExists('updateProxyConfig', 'proxyConfigId', proxyConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateProxyConfig', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateProxyConfig', 'envId', envId); - // verify required parameter 'proxyConfigId' is not null or undefined - assertParamExists('updateProxyConfig', 'proxyConfigId', proxyConfigId); // verify required parameter 'proxyConfigUpdate' is not null or undefined assertParamExists('updateProxyConfig', 'proxyConfigUpdate', proxyConfigUpdate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'proxy_config_id'}}`, encodeURIComponent(String(proxyConfigId))); + .replace('{proxy_config_id}', encodeURIComponent(String(proxyConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -314,6 +306,7 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -338,7 +331,6 @@ export const ProxyConfigApiAxiosParamCreator = function (configuration?: Configu /** * ProxyConfigApi - functional programming interface - * @export */ export const ProxyConfigApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ProxyConfigApiAxiosParamCreator(configuration); @@ -350,13 +342,13 @@ export const ProxyConfigApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ProxyConfigCreate} proxyConfigCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createProxyConfig( projId: string, envId: string, proxyConfigCreate: ProxyConfigCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createProxyConfig( projId, @@ -364,53 +356,80 @@ export const ProxyConfigApiFp = function (configuration?: Configuration) { proxyConfigCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProxyConfigApi.createProxyConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the proxy config and all its related data. * @summary Delete Proxy Config + * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteProxyConfig( + proxyConfigId: string, projId: string, envId: string, - proxyConfigId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProxyConfig( + proxyConfigId, projId, envId, - proxyConfigId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProxyConfigApi.deleteProxyConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a proxy config, if such proxy config exists. Otherwise returns 404. * @summary Get Proxy Config + * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getProxyConfig( + proxyConfigId: string, projId: string, envId: string, - proxyConfigId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProxyConfig( + proxyConfigId, projId, envId, - proxyConfigId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProxyConfigApi.getProxyConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the proxy configs defined within an environment. @@ -420,14 +439,14 @@ export const ProxyConfigApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listProxyConfigs( projId: string, envId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listProxyConfigs( projId, @@ -436,40 +455,57 @@ export const ProxyConfigApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProxyConfigApi.listProxyConfigs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the proxy config definition. Fields that will be provided will be completely overwritten. * @summary Update Proxy Config + * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). * @param {ProxyConfigUpdate} proxyConfigUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateProxyConfig( + proxyConfigId: string, projId: string, envId: string, - proxyConfigId: string, proxyConfigUpdate: ProxyConfigUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateProxyConfig( + proxyConfigId, projId, envId, - proxyConfigId, proxyConfigUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ProxyConfigApi.updateProxyConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ProxyConfigApi - factory interface - * @export */ export const ProxyConfigApiFactory = function ( configuration?: Configuration, @@ -481,100 +517,103 @@ export const ProxyConfigApiFactory = function ( /** * Creates a new proxy config inside the Permit.io system. If the proxy config is already created: will return 200 instead of 201, and will return the existing proxy config object in the response body. * @summary Create Proxy Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ProxyConfigCreate} proxyConfigCreate + * @param {ProxyConfigApiCreateProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createProxyConfig( - projId: string, - envId: string, - proxyConfigCreate: ProxyConfigCreate, - options?: any, + requestParameters: ProxyConfigApiCreateProxyConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createProxyConfig(projId, envId, proxyConfigCreate, options) + .createProxyConfig( + requestParameters.projId, + requestParameters.envId, + requestParameters.proxyConfigCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the proxy config and all its related data. * @summary Delete Proxy Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). + * @param {ProxyConfigApiDeleteProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteProxyConfig( - projId: string, - envId: string, - proxyConfigId: string, - options?: any, + requestParameters: ProxyConfigApiDeleteProxyConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteProxyConfig(projId, envId, proxyConfigId, options) + .deleteProxyConfig( + requestParameters.proxyConfigId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a proxy config, if such proxy config exists. Otherwise returns 404. * @summary Get Proxy Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). + * @param {ProxyConfigApiGetProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getProxyConfig( - projId: string, - envId: string, - proxyConfigId: string, - options?: any, + requestParameters: ProxyConfigApiGetProxyConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getProxyConfig(projId, envId, proxyConfigId, options) + .getProxyConfig( + requestParameters.proxyConfigId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the proxy configs defined within an environment. * @summary List Proxy Configs - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ProxyConfigApiListProxyConfigsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listProxyConfigs( - projId: string, - envId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ProxyConfigApiListProxyConfigsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listProxyConfigs(projId, envId, page, perPage, options) + .listProxyConfigs( + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the proxy config definition. Fields that will be provided will be completely overwritten. * @summary Update Proxy Config - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} proxyConfigId Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). - * @param {ProxyConfigUpdate} proxyConfigUpdate + * @param {ProxyConfigApiUpdateProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateProxyConfig( - projId: string, - envId: string, - proxyConfigId: string, - proxyConfigUpdate: ProxyConfigUpdate, - options?: any, + requestParameters: ProxyConfigApiUpdateProxyConfigRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateProxyConfig(projId, envId, proxyConfigId, proxyConfigUpdate, options) + .updateProxyConfig( + requestParameters.proxyConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.proxyConfigUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -582,163 +621,110 @@ export const ProxyConfigApiFactory = function ( /** * Request parameters for createProxyConfig operation in ProxyConfigApi. - * @export - * @interface ProxyConfigApiCreateProxyConfigRequest */ export interface ProxyConfigApiCreateProxyConfigRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiCreateProxyConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiCreateProxyConfig */ readonly envId: string; - /** - * - * @type {ProxyConfigCreate} - * @memberof ProxyConfigApiCreateProxyConfig - */ readonly proxyConfigCreate: ProxyConfigCreate; } /** * Request parameters for deleteProxyConfig operation in ProxyConfigApi. - * @export - * @interface ProxyConfigApiDeleteProxyConfigRequest */ export interface ProxyConfigApiDeleteProxyConfigRequest { + /** + * Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). + */ + readonly proxyConfigId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiDeleteProxyConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiDeleteProxyConfig */ readonly envId: string; - - /** - * Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiDeleteProxyConfig - */ - readonly proxyConfigId: string; } /** * Request parameters for getProxyConfig operation in ProxyConfigApi. - * @export - * @interface ProxyConfigApiGetProxyConfigRequest */ export interface ProxyConfigApiGetProxyConfigRequest { + /** + * Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). + */ + readonly proxyConfigId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiGetProxyConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiGetProxyConfig */ readonly envId: string; - - /** - * Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiGetProxyConfig - */ - readonly proxyConfigId: string; } /** * Request parameters for listProxyConfigs operation in ProxyConfigApi. - * @export - * @interface ProxyConfigApiListProxyConfigsRequest */ export interface ProxyConfigApiListProxyConfigsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiListProxyConfigs */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiListProxyConfigs */ readonly envId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ProxyConfigApiListProxyConfigs */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ProxyConfigApiListProxyConfigs */ readonly perPage?: number; } /** * Request parameters for updateProxyConfig operation in ProxyConfigApi. - * @export - * @interface ProxyConfigApiUpdateProxyConfigRequest */ export interface ProxyConfigApiUpdateProxyConfigRequest { + /** + * Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). + */ + readonly proxyConfigId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiUpdateProxyConfig */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiUpdateProxyConfig */ readonly envId: string; - /** - * Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the \"slug\"). - * @type {string} - * @memberof ProxyConfigApiUpdateProxyConfig - */ - readonly proxyConfigId: string; - - /** - * - * @type {ProxyConfigUpdate} - * @memberof ProxyConfigApiUpdateProxyConfig - */ readonly proxyConfigUpdate: ProxyConfigUpdate; } /** * ProxyConfigApi - object-oriented interface - * @export - * @class ProxyConfigApi - * @extends {BaseAPI} */ export class ProxyConfigApi extends BaseAPI { /** @@ -746,12 +732,11 @@ export class ProxyConfigApi extends BaseAPI { * @summary Create Proxy Config * @param {ProxyConfigApiCreateProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProxyConfigApi + * @throws If a required parameter is missing. */ public createProxyConfig( requestParameters: ProxyConfigApiCreateProxyConfigRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProxyConfigApiFp(this.configuration) .createProxyConfig( @@ -768,18 +753,17 @@ export class ProxyConfigApi extends BaseAPI { * @summary Delete Proxy Config * @param {ProxyConfigApiDeleteProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProxyConfigApi + * @throws If a required parameter is missing. */ public deleteProxyConfig( requestParameters: ProxyConfigApiDeleteProxyConfigRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProxyConfigApiFp(this.configuration) .deleteProxyConfig( + requestParameters.proxyConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.proxyConfigId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -790,18 +774,17 @@ export class ProxyConfigApi extends BaseAPI { * @summary Get Proxy Config * @param {ProxyConfigApiGetProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProxyConfigApi + * @throws If a required parameter is missing. */ public getProxyConfig( requestParameters: ProxyConfigApiGetProxyConfigRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProxyConfigApiFp(this.configuration) .getProxyConfig( + requestParameters.proxyConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.proxyConfigId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -812,12 +795,11 @@ export class ProxyConfigApi extends BaseAPI { * @summary List Proxy Configs * @param {ProxyConfigApiListProxyConfigsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProxyConfigApi + * @throws If a required parameter is missing. */ public listProxyConfigs( requestParameters: ProxyConfigApiListProxyConfigsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProxyConfigApiFp(this.configuration) .listProxyConfigs( @@ -835,18 +817,17 @@ export class ProxyConfigApi extends BaseAPI { * @summary Update Proxy Config * @param {ProxyConfigApiUpdateProxyConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProxyConfigApi + * @throws If a required parameter is missing. */ public updateProxyConfig( requestParameters: ProxyConfigApiUpdateProxyConfigRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ProxyConfigApiFp(this.configuration) .updateProxyConfig( + requestParameters.proxyConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.proxyConfigId, requestParameters.proxyConfigUpdate, options, ) diff --git a/src/openapi/api/relationship-tuples-api.ts b/src/openapi/api/relationship-tuples-api.ts index 773db3a6..c53bee2f 100644 --- a/src/openapi/api/relationship-tuples-api.ts +++ b/src/openapi/api/relationship-tuples-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,56 +10,47 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { RelationshipTupleCreate } from '../types'; -// @ts-ignore -import { RelationshipTupleCreateBulkOperation } from '../types'; -// @ts-ignore -import { RelationshipTupleDelete } from '../types'; -// @ts-ignore -import { RelationshipTupleDeleteBulkOperation } from '../types'; -// @ts-ignore -import { RelationshipTupleRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { + PaginatedResultRelationshipTupleDetailedRead, + RelationshipTupleCreate, + RelationshipTupleCreateBulkOperation, + RelationshipTupleDelete, + RelationshipTupleDeleteBulkOperation, + RelationshipTupleRead, + ResponseListRelationshipTuplesV2FactsProjIdEnvIdRelationshipTuplesGet, +} from '../types'; /** * RelationshipTuplesApi - axios parameter creator - * @export */ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * - * @summary Bulk create relationship tuples(EAP) - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @summary Bulk create relationship tuples + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleCreateBulkOperation} relationshipTupleCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkCreateRelationshipTuples: async ( - projId: any, - envId: any, + projId: string, + envId: string, relationshipTupleCreateBulkOperation: RelationshipTupleCreateBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkCreateRelationshipTuples', 'projId', projId); @@ -74,8 +63,8 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: relationshipTupleCreateBulkOperation, ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -92,6 +81,7 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -114,17 +104,17 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: /** * * @summary Bulk Delete Relationship Tuples - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleDeleteBulkOperation} relationshipTupleDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteRelationshipTuples: async ( - projId: any, - envId: any, + projId: string, + envId: string, relationshipTupleDeleteBulkOperation: RelationshipTupleDeleteBulkOperation, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkDeleteRelationshipTuples', 'projId', projId); @@ -137,8 +127,8 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: relationshipTupleDeleteBulkOperation, ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/relationship_tuples/bulk` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -155,6 +145,7 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -181,13 +172,13 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleCreate} relationshipTupleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createRelationshipTuple: async ( projId: string, envId: string, relationshipTupleCreate: RelationshipTupleCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createRelationshipTuple', 'projId', projId); @@ -200,8 +191,8 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: relationshipTupleCreate, ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/relationship_tuples` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -218,6 +209,7 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -244,13 +236,13 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleDelete} relationshipTupleDelete * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteRelationshipTuple: async ( projId: string, envId: string, relationshipTupleDelete: RelationshipTupleDelete, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('deleteRelationshipTuple', 'projId', projId); @@ -263,8 +255,8 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: relationshipTupleDelete, ); const localVarPath = `/v2/facts/{proj_id}/{env_id}/relationship_tuples` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -281,6 +273,7 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -305,19 +298,24 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: * @summary List Relationship Tuples * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {boolean} [detailed] If true, will return the full subject and object resource instances. + * @param {boolean} [includeTotalCount] If true, returns the list of resource instances and the total count. * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [subject] The subject to filter by, accepts either the resource instance id or resource_type:resource_instance * @param {string} [relation] The relation id or key to filter by * @param {string} [object] The object to filter by, accepts either the resource instance id or resource_type:resource_instance + * @param {string} [objectType] The object type to filter by, accepts resource type id or key + * @param {string} [subjectType] The subject type to filter by, accepts resource type id or key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listRelationshipTuples: async ( projId: string, envId: string, - detailed?: any, + detailed?: boolean, + includeTotalCount?: boolean, page?: number, perPage?: number, tenant?: string, @@ -326,15 +324,15 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: object?: string, objectType?: string, subjectType?: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listRelationshipTuples', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listRelationshipTuples', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/relationship_tuples` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -354,6 +352,108 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: localVarQueryParameter['detailed'] = detailed; } + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (tenant !== undefined) { + localVarQueryParameter['tenant'] = tenant; + } + + if (subject !== undefined) { + localVarQueryParameter['subject'] = subject; + } + + if (relation !== undefined) { + localVarQueryParameter['relation'] = relation; + } + + if (object !== undefined) { + localVarQueryParameter['object'] = object; + } + + if (objectType !== undefined) { + localVarQueryParameter['object_type'] = objectType; + } + + if (subjectType !== undefined) { + localVarQueryParameter['subject_type'] = subjectType; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists the relationship tuples defined within an environment. + * @summary List Relationship Tuples Detailed + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [subject] The subject to filter by, accepts either the resource instance id or resource_type:resource_instance + * @param {string} [relation] The relation id or key to filter by + * @param {string} [object] The object to filter by, accepts either the resource instance id or resource_type:resource_instance + * @param {string} [objectType] The object type to filter by, accepts resource type id or key + * @param {string} [subjectType] The subject type to filter by, accepts resource type id or key + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listRelationshipTuplesDetailed: async ( + projId: string, + envId: string, + page?: number, + perPage?: number, + tenant?: string, + subject?: string, + relation?: string, + object?: string, + objectType?: string, + subjectType?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listRelationshipTuplesDetailed', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listRelationshipTuplesDetailed', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/relationship_tuples/detailed` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -386,6 +486,8 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: localVarQueryParameter['subject_type'] = subjectType; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -404,56 +506,77 @@ export const RelationshipTuplesApiAxiosParamCreator = function (configuration?: /** * RelationshipTuplesApi - functional programming interface - * @export */ export const RelationshipTuplesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = RelationshipTuplesApiAxiosParamCreator(configuration); return { /** * - * @summary Bulk create relationship tuples(EAP) - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @summary Bulk create relationship tuples + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleCreateBulkOperation} relationshipTupleCreateBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkCreateRelationshipTuples( - projId: any, - envId: any, + projId: string, + envId: string, relationshipTupleCreateBulkOperation: RelationshipTupleCreateBulkOperation, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkCreateRelationshipTuples( projId, envId, relationshipTupleCreateBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RelationshipTuplesApi.bulkCreateRelationshipTuples']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Bulk Delete Relationship Tuples - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleDeleteBulkOperation} relationshipTupleDeleteBulkOperation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkDeleteRelationshipTuples( - projId: any, - envId: any, + projId: string, + envId: string, relationshipTupleDeleteBulkOperation: RelationshipTupleDeleteBulkOperation, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkDeleteRelationshipTuples( projId, envId, relationshipTupleDeleteBulkOperation, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RelationshipTuplesApi.bulkDeleteRelationshipTuples']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Create a relationship between two resource instances using a relation. @@ -462,13 +585,13 @@ export const RelationshipTuplesApiFp = function (configuration?: Configuration) * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleCreate} relationshipTupleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createRelationshipTuple( projId: string, envId: string, relationshipTupleCreate: RelationshipTupleCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRelationshipTuple( projId, @@ -476,7 +599,18 @@ export const RelationshipTuplesApiFp = function (configuration?: Configuration) relationshipTupleCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RelationshipTuplesApi.createRelationshipTuple']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Delete a relationship between two resource instances. @@ -485,13 +619,13 @@ export const RelationshipTuplesApiFp = function (configuration?: Configuration) * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RelationshipTupleDelete} relationshipTupleDelete * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteRelationshipTuple( projId: string, envId: string, relationshipTupleDelete: RelationshipTupleDelete, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRelationshipTuple( projId, @@ -499,26 +633,42 @@ export const RelationshipTuplesApiFp = function (configuration?: Configuration) relationshipTupleDelete, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RelationshipTuplesApi.deleteRelationshipTuple']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists the relationship tuples defined within an environment. * @summary List Relationship Tuples * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {boolean} [detailed] If true, will return the full subject and object resource instances. + * @param {boolean} [includeTotalCount] If true, returns the list of resource instances and the total count. * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [subject] The subject to filter by, accepts either the resource instance id or resource_type:resource_instance * @param {string} [relation] The relation id or key to filter by * @param {string} [object] The object to filter by, accepts either the resource instance id or resource_type:resource_instance + * @param {string} [objectType] The object type to filter by, accepts resource type id or key + * @param {string} [subjectType] The subject type to filter by, accepts resource type id or key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listRelationshipTuples( projId: string, envId: string, - detailed?: any, + detailed?: boolean, + includeTotalCount?: boolean, page?: number, perPage?: number, tenant?: string, @@ -527,14 +677,78 @@ export const RelationshipTuplesApiFp = function (configuration?: Configuration) object?: string, objectType?: string, subjectType?: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listRelationshipTuples( projId, envId, detailed, + includeTotalCount, + page, + perPage, + tenant, + subject, + relation, + object, + objectType, + subjectType, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RelationshipTuplesApi.listRelationshipTuples']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists the relationship tuples defined within an environment. + * @summary List Relationship Tuples Detailed + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [subject] The subject to filter by, accepts either the resource instance id or resource_type:resource_instance + * @param {string} [relation] The relation id or key to filter by + * @param {string} [object] The object to filter by, accepts either the resource instance id or resource_type:resource_instance + * @param {string} [objectType] The object type to filter by, accepts resource type id or key + * @param {string} [subjectType] The subject type to filter by, accepts resource type id or key + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listRelationshipTuplesDetailed( + projId: string, + envId: string, + page?: number, + perPage?: number, + tenant?: string, + subject?: string, + relation?: string, + object?: string, + objectType?: string, + subjectType?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRelationshipTuplesDetailed( + projId, + envId, page, perPage, tenant, @@ -545,14 +759,24 @@ export const RelationshipTuplesApiFp = function (configuration?: Configuration) subjectType, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RelationshipTuplesApi.listRelationshipTuplesDetailed']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * RelationshipTuplesApi - factory interface - * @export */ export const RelationshipTuplesApiFactory = function ( configuration?: Configuration, @@ -563,124 +787,136 @@ export const RelationshipTuplesApiFactory = function ( return { /** * - * @summary Bulk create relationship tuples(EAP) - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RelationshipTupleCreateBulkOperation} relationshipTupleCreateBulkOperation + * @summary Bulk create relationship tuples + * @param {RelationshipTuplesApiBulkCreateRelationshipTuplesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkCreateRelationshipTuples( - projId: any, - envId: any, - relationshipTupleCreateBulkOperation: RelationshipTupleCreateBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: RelationshipTuplesApiBulkCreateRelationshipTuplesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkCreateRelationshipTuples(projId, envId, relationshipTupleCreateBulkOperation, options) + .bulkCreateRelationshipTuples( + requestParameters.projId, + requestParameters.envId, + requestParameters.relationshipTupleCreateBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk Delete Relationship Tuples - * @param {any} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {any} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RelationshipTupleDeleteBulkOperation} relationshipTupleDeleteBulkOperation + * @param {RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkDeleteRelationshipTuples( - projId: any, - envId: any, - relationshipTupleDeleteBulkOperation: RelationshipTupleDeleteBulkOperation, - options?: any, - ): AxiosPromise { + requestParameters: RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .bulkDeleteRelationshipTuples(projId, envId, relationshipTupleDeleteBulkOperation, options) + .bulkDeleteRelationshipTuples( + requestParameters.projId, + requestParameters.envId, + requestParameters.relationshipTupleDeleteBulkOperation, + options, + ) .then((request) => request(axios, basePath)); }, /** * Create a relationship between two resource instances using a relation. * @summary Create Relationship Tuple - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RelationshipTupleCreate} relationshipTupleCreate + * @param {RelationshipTuplesApiCreateRelationshipTupleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createRelationshipTuple( - projId: string, - envId: string, - relationshipTupleCreate: RelationshipTupleCreate, - options?: any, + requestParameters: RelationshipTuplesApiCreateRelationshipTupleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createRelationshipTuple(projId, envId, relationshipTupleCreate, options) + .createRelationshipTuple( + requestParameters.projId, + requestParameters.envId, + requestParameters.relationshipTupleCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Delete a relationship between two resource instances. * @summary Delete Relationship Tuple - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RelationshipTupleDelete} relationshipTupleDelete + * @param {RelationshipTuplesApiDeleteRelationshipTupleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteRelationshipTuple( - projId: string, - envId: string, - relationshipTupleDelete: RelationshipTupleDelete, - options?: any, + requestParameters: RelationshipTuplesApiDeleteRelationshipTupleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteRelationshipTuple(projId, envId, relationshipTupleDelete, options) + .deleteRelationshipTuple( + requestParameters.projId, + requestParameters.envId, + requestParameters.relationshipTupleDelete, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists the relationship tuples defined within an environment. * @summary List Relationship Tuples - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [detailed] If true, will return the full subject and object resource instances. - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {string} [tenant] The tenant key or id to filter by - * @param {string} [subject] The subject to filter by, accepts either the resource instance id or resource_type:resource_instance - * @param {string} [relation] The relation id or key to filter by - * @param {string} [object] The object to filter by, accepts either the resource instance id or resource_type:resource_instance - * @param {string} [objectType] The object type to filter by, accepts resource type id or key - * @param {string} [subjectType] The subject type to filter by, accepts resource type id or key + * @param {RelationshipTuplesApiListRelationshipTuplesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listRelationshipTuples( - projId: string, - envId: string, - detailed?: any, - page?: number, - perPage?: number, - tenant?: string, - subject?: string, - relation?: string, - object?: string, - objectType?: string, - subjectType?: string, - options?: any, - ): AxiosPromise> { + requestParameters: RelationshipTuplesApiListRelationshipTuplesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp .listRelationshipTuples( - projId, - envId, - detailed, - page, - perPage, - tenant, - subject, - relation, - object, - objectType, - subjectType, + requestParameters.projId, + requestParameters.envId, + requestParameters.detailed, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.tenant, + requestParameters.subject, + requestParameters.relation, + requestParameters.object, + requestParameters.objectType, + requestParameters.subjectType, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Lists the relationship tuples defined within an environment. + * @summary List Relationship Tuples Detailed + * @param {RelationshipTuplesApiListRelationshipTuplesDetailedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listRelationshipTuplesDetailed( + requestParameters: RelationshipTuplesApiListRelationshipTuplesDetailedRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listRelationshipTuplesDetailed( + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + requestParameters.tenant, + requestParameters.subject, + requestParameters.relation, + requestParameters.object, + requestParameters.objectType, + requestParameters.subjectType, options, ) .then((request) => request(axios, basePath)); @@ -690,226 +926,215 @@ export const RelationshipTuplesApiFactory = function ( /** * Request parameters for bulkCreateRelationshipTuples operation in RelationshipTuplesApi. - * @export - * @interface RelationshipTuplesApiBulkCreateRelationshipTuplesRequest */ export interface RelationshipTuplesApiBulkCreateRelationshipTuplesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof RelationshipTuplesApiBulkCreateRelationshipTuples */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof RelationshipTuplesApiBulkCreateRelationshipTuples */ - readonly envId: any; + readonly envId: string; - /** - * - * @type {RelationshipTupleCreateBulkOperation} - * @memberof RelationshipTuplesApiBulkCreateRelationshipTuples - */ readonly relationshipTupleCreateBulkOperation: RelationshipTupleCreateBulkOperation; } /** * Request parameters for bulkDeleteRelationshipTuples operation in RelationshipTuplesApi. - * @export - * @interface RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest */ export interface RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {any} - * @memberof RelationshipTuplesApiBulkDeleteRelationshipTuples */ - readonly projId: any; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {any} - * @memberof RelationshipTuplesApiBulkDeleteRelationshipTuples */ - readonly envId: any; + readonly envId: string; - /** - * - * @type {RelationshipTupleDeleteBulkOperation} - * @memberof RelationshipTuplesApiBulkDeleteRelationshipTuples - */ readonly relationshipTupleDeleteBulkOperation: RelationshipTupleDeleteBulkOperation; } /** * Request parameters for createRelationshipTuple operation in RelationshipTuplesApi. - * @export - * @interface RelationshipTuplesApiCreateRelationshipTupleRequest */ export interface RelationshipTuplesApiCreateRelationshipTupleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RelationshipTuplesApiCreateRelationshipTuple */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RelationshipTuplesApiCreateRelationshipTuple */ readonly envId: string; - /** - * - * @type {RelationshipTupleCreate} - * @memberof RelationshipTuplesApiCreateRelationshipTuple - */ readonly relationshipTupleCreate: RelationshipTupleCreate; } /** * Request parameters for deleteRelationshipTuple operation in RelationshipTuplesApi. - * @export - * @interface RelationshipTuplesApiDeleteRelationshipTupleRequest */ export interface RelationshipTuplesApiDeleteRelationshipTupleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RelationshipTuplesApiDeleteRelationshipTuple */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RelationshipTuplesApiDeleteRelationshipTuple */ readonly envId: string; - /** - * - * @type {RelationshipTupleDelete} - * @memberof RelationshipTuplesApiDeleteRelationshipTuple - */ readonly relationshipTupleDelete: RelationshipTupleDelete; } /** * Request parameters for listRelationshipTuples operation in RelationshipTuplesApi. - * @export - * @interface RelationshipTuplesApiListRelationshipTuplesRequest */ export interface RelationshipTuplesApiListRelationshipTuplesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly envId: string; /** * If true, will return the full subject and object resource instances. - * @type {any} - * @memberof RelationshipTuplesApiListRelationshipTuples */ - readonly detailed?: any; + readonly detailed?: boolean; + + /** + * If true, returns the list of resource instances and the total count. + */ + readonly includeTotalCount?: boolean; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * The tenant key or id to filter by + */ + readonly tenant?: string; + + /** + * The subject to filter by, accepts either the resource instance id or resource_type:resource_instance + */ + readonly subject?: string; + + /** + * The relation id or key to filter by + */ + readonly relation?: string; + + /** + * The object to filter by, accepts either the resource instance id or resource_type:resource_instance + */ + readonly object?: string; + + /** + * The object type to filter by, accepts resource type id or key + */ + readonly objectType?: string; + + /** + * The subject type to filter by, accepts resource type id or key + */ + readonly subjectType?: string; +} + +/** + * Request parameters for listRelationshipTuplesDetailed operation in RelationshipTuplesApi. + */ +export interface RelationshipTuplesApiListRelationshipTuplesDetailedRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly perPage?: number; /** * The tenant key or id to filter by - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly tenant?: string; /** * The subject to filter by, accepts either the resource instance id or resource_type:resource_instance - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly subject?: string; /** * The relation id or key to filter by - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly relation?: string; /** * The object to filter by, accepts either the resource instance id or resource_type:resource_instance - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly object?: string; /** * The object type to filter by, accepts resource type id or key - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly objectType?: string; /** * The subject type to filter by, accepts resource type id or key - * @type {string} - * @memberof RelationshipTuplesApiListRelationshipTuples */ readonly subjectType?: string; } /** * RelationshipTuplesApi - object-oriented interface - * @export - * @class RelationshipTuplesApi - * @extends {BaseAPI} */ export class RelationshipTuplesApi extends BaseAPI { /** * - * @summary Bulk create relationship tuples(EAP) + * @summary Bulk create relationship tuples * @param {RelationshipTuplesApiBulkCreateRelationshipTuplesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RelationshipTuplesApi + * @throws If a required parameter is missing. */ - public async bulkCreateRelationshipTuples( + public bulkCreateRelationshipTuples( requestParameters: RelationshipTuplesApiBulkCreateRelationshipTuplesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { - let request = await RelationshipTuplesApiFp(this.configuration).bulkCreateRelationshipTuples( - requestParameters.projId, - requestParameters.envId, - requestParameters.relationshipTupleCreateBulkOperation, - options, - ); - return request(this.axios, this.basePath); + return RelationshipTuplesApiFp(this.configuration) + .bulkCreateRelationshipTuples( + requestParameters.projId, + requestParameters.envId, + requestParameters.relationshipTupleCreateBulkOperation, + options, + ) + .then((request) => request(this.axios, this.basePath)); } /** @@ -917,20 +1142,20 @@ export class RelationshipTuplesApi extends BaseAPI { * @summary Bulk Delete Relationship Tuples * @param {RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RelationshipTuplesApi + * @throws If a required parameter is missing. */ - public async bulkDeleteRelationshipTuples( + public bulkDeleteRelationshipTuples( requestParameters: RelationshipTuplesApiBulkDeleteRelationshipTuplesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { - let request = await RelationshipTuplesApiFp(this.configuration).bulkDeleteRelationshipTuples( - requestParameters.projId, - requestParameters.envId, - requestParameters.relationshipTupleDeleteBulkOperation, - options, - ); - return request(this.axios, this.basePath); + return RelationshipTuplesApiFp(this.configuration) + .bulkDeleteRelationshipTuples( + requestParameters.projId, + requestParameters.envId, + requestParameters.relationshipTupleDeleteBulkOperation, + options, + ) + .then((request) => request(this.axios, this.basePath)); } /** @@ -938,12 +1163,11 @@ export class RelationshipTuplesApi extends BaseAPI { * @summary Create Relationship Tuple * @param {RelationshipTuplesApiCreateRelationshipTupleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RelationshipTuplesApi + * @throws If a required parameter is missing. */ public createRelationshipTuple( requestParameters: RelationshipTuplesApiCreateRelationshipTupleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RelationshipTuplesApiFp(this.configuration) .createRelationshipTuple( @@ -960,12 +1184,11 @@ export class RelationshipTuplesApi extends BaseAPI { * @summary Delete Relationship Tuple * @param {RelationshipTuplesApiDeleteRelationshipTupleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RelationshipTuplesApi + * @throws If a required parameter is missing. */ public deleteRelationshipTuple( requestParameters: RelationshipTuplesApiDeleteRelationshipTupleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RelationshipTuplesApiFp(this.configuration) .deleteRelationshipTuple( @@ -982,18 +1205,46 @@ export class RelationshipTuplesApi extends BaseAPI { * @summary List Relationship Tuples * @param {RelationshipTuplesApiListRelationshipTuplesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RelationshipTuplesApi + * @throws If a required parameter is missing. */ public listRelationshipTuples( requestParameters: RelationshipTuplesApiListRelationshipTuplesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RelationshipTuplesApiFp(this.configuration) .listRelationshipTuples( requestParameters.projId, requestParameters.envId, requestParameters.detailed, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.tenant, + requestParameters.subject, + requestParameters.relation, + requestParameters.object, + requestParameters.objectType, + requestParameters.subjectType, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the relationship tuples defined within an environment. + * @summary List Relationship Tuples Detailed + * @param {RelationshipTuplesApiListRelationshipTuplesDetailedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listRelationshipTuplesDetailed( + requestParameters: RelationshipTuplesApiListRelationshipTuplesDetailedRequest, + options?: RawAxiosRequestConfig, + ) { + return RelationshipTuplesApiFp(this.configuration) + .listRelationshipTuplesDetailed( + requestParameters.projId, + requestParameters.envId, requestParameters.page, requestParameters.perPage, requestParameters.tenant, diff --git a/src/openapi/api/resource-action-groups-api.ts b/src/openapi/api/resource-action-groups-api.ts index f1df3cdd..c62623fb 100644 --- a/src/openapi/api/resource-action-groups-api.ts +++ b/src/openapi/api/resource-action-groups-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,61 +10,52 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResourceActionGroupCreate } from '../types'; -// @ts-ignore -import { ResourceActionGroupRead } from '../types'; -// @ts-ignore -import { ResourceActionGroupUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ResourceActionGroupCreate, + ResourceActionGroupRead, + ResourceActionGroupUpdate, +} from '../types'; /** * ResourceActionGroupsApi - axios parameter creator - * @export */ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new action group that can affect the resource. * @summary Create Resource Action Group + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceActionGroupCreate} resourceActionGroupCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceActionGroup: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceActionGroupCreate: ResourceActionGroupCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('createResourceActionGroup', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('createResourceActionGroup', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('createResourceActionGroup', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('createResourceActionGroup', 'resourceId', resourceId); // verify required parameter 'resourceActionGroupCreate' is not null or undefined assertParamExists( 'createResourceActionGroup', @@ -74,9 +63,9 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? resourceActionGroupCreate, ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -93,6 +82,7 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -115,34 +105,34 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceActionGroup: async ( - projId: string, - envId: string, resourceId: string, actionGroupId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteResourceActionGroup', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteResourceActionGroup', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('deleteResourceActionGroup', 'resourceId', resourceId); // verify required parameter 'actionGroupId' is not null or undefined assertParamExists('deleteResourceActionGroup', 'actionGroupId', actionGroupId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteResourceActionGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteResourceActionGroup', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'action_group_id'}}`, encodeURIComponent(String(actionGroupId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{action_group_id}', encodeURIComponent(String(actionGroupId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -158,6 +148,8 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -174,34 +166,34 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? /** * Gets a single action group defined on the resource, if such action exists. * @summary Get Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceActionGroup: async ( - projId: string, - envId: string, resourceId: string, actionGroupId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('getResourceActionGroup', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getResourceActionGroup', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('getResourceActionGroup', 'resourceId', resourceId); // verify required parameter 'actionGroupId' is not null or undefined assertParamExists('getResourceActionGroup', 'actionGroupId', actionGroupId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getResourceActionGroup', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getResourceActionGroup', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'action_group_id'}}`, encodeURIComponent(String(actionGroupId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{action_group_id}', encodeURIComponent(String(actionGroupId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -217,6 +209,8 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -233,32 +227,32 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? /** * Lists all the action groups defined on the resource. * @summary List Resource Action Groups + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceActionGroups: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('listResourceActionGroups', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('listResourceActionGroups', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResourceActionGroups', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('listResourceActionGroups', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -282,6 +276,8 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -304,7 +300,7 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceActionGroupUpdate} resourceActionGroupUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceActionGroup: async ( resourceId: string, @@ -312,7 +308,7 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? projId: string, envId: string, resourceActionGroupUpdate: ResourceActionGroupUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'resourceId' is not null or undefined assertParamExists('updateResourceActionGroup', 'resourceId', resourceId); @@ -330,10 +326,10 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/action_groups/{action_group_id}` - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'action_group_id'}}`, encodeURIComponent(String(actionGroupId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{action_group_id}', encodeURIComponent(String(actionGroupId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -350,6 +346,7 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -374,7 +371,6 @@ export const ResourceActionGroupsApiAxiosParamCreator = function (configuration? /** * ResourceActionGroupsApi - functional programming interface - * @export */ export const ResourceActionGroupsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourceActionGroupsApiAxiosParamCreator(configuration); @@ -382,115 +378,159 @@ export const ResourceActionGroupsApiFp = function (configuration?: Configuration /** * Creates a new action group that can affect the resource. * @summary Create Resource Action Group + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceActionGroupCreate} resourceActionGroupCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResourceActionGroup( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceActionGroupCreate: ResourceActionGroupCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createResourceActionGroup( + resourceId, projId, envId, - resourceId, resourceActionGroupCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionGroupsApi.createResourceActionGroup']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResourceActionGroup( - projId: string, - envId: string, resourceId: string, actionGroupId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResourceActionGroup( - projId, - envId, resourceId, actionGroupId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionGroupsApi.deleteResourceActionGroup']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single action group defined on the resource, if such action exists. * @summary Get Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResourceActionGroup( - projId: string, - envId: string, resourceId: string, actionGroupId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceActionGroup( - projId, - envId, resourceId, actionGroupId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionGroupsApi.getResourceActionGroup']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the action groups defined on the resource. * @summary List Resource Action Groups + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listResourceActionGroups( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceActionGroups( + resourceId, projId, envId, - resourceId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionGroupsApi.listResourceActionGroups']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. @@ -501,7 +541,7 @@ export const ResourceActionGroupsApiFp = function (configuration?: Configuration * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceActionGroupUpdate} resourceActionGroupUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateResourceActionGroup( resourceId: string, @@ -509,7 +549,7 @@ export const ResourceActionGroupsApiFp = function (configuration?: Configuration projId: string, envId: string, resourceActionGroupUpdate: ResourceActionGroupUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -521,14 +561,24 @@ export const ResourceActionGroupsApiFp = function (configuration?: Configuration resourceActionGroupUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionGroupsApi.updateResourceActionGroup']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourceActionGroupsApi - factory interface - * @export */ export const ResourceActionGroupsApiFactory = function ( configuration?: Configuration, @@ -540,115 +590,106 @@ export const ResourceActionGroupsApiFactory = function ( /** * Creates a new action group that can affect the resource. * @summary Create Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {ResourceActionGroupCreate} resourceActionGroupCreate + * @param {ResourceActionGroupsApiCreateResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceActionGroup( - projId: string, - envId: string, - resourceId: string, - resourceActionGroupCreate: ResourceActionGroupCreate, - options?: any, + requestParameters: ResourceActionGroupsApiCreateResourceActionGroupRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResourceActionGroup(projId, envId, resourceId, resourceActionGroupCreate, options) + .createResourceActionGroup( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceActionGroupCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). + * @param {ResourceActionGroupsApiDeleteResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceActionGroup( - projId: string, - envId: string, - resourceId: string, - actionGroupId: string, - options?: any, + requestParameters: ResourceActionGroupsApiDeleteResourceActionGroupRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResourceActionGroup(projId, envId, resourceId, actionGroupId, options) + .deleteResourceActionGroup( + requestParameters.resourceId, + requestParameters.actionGroupId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single action group defined on the resource, if such action exists. * @summary Get Resource Action Group - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). + * @param {ResourceActionGroupsApiGetResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceActionGroup( - projId: string, - envId: string, - resourceId: string, - actionGroupId: string, - options?: any, + requestParameters: ResourceActionGroupsApiGetResourceActionGroupRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResourceActionGroup(projId, envId, resourceId, actionGroupId, options) + .getResourceActionGroup( + requestParameters.resourceId, + requestParameters.actionGroupId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the action groups defined on the resource. * @summary List Resource Action Groups - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceActionGroupsApiListResourceActionGroupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceActionGroups( - projId: string, - envId: string, - resourceId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ResourceActionGroupsApiListResourceActionGroupsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listResourceActionGroups(projId, envId, resourceId, page, perPage, options) + .listResourceActionGroups( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action Group - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} actionGroupId Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ResourceActionGroupUpdate} resourceActionGroupUpdate + * @param {ResourceActionGroupsApiUpdateResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceActionGroup( - resourceId: string, - actionGroupId: string, - projId: string, - envId: string, - resourceActionGroupUpdate: ResourceActionGroupUpdate, - options?: any, + requestParameters: ResourceActionGroupsApiUpdateResourceActionGroupRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .updateResourceActionGroup( - resourceId, - actionGroupId, - projId, - envId, - resourceActionGroupUpdate, + requestParameters.resourceId, + requestParameters.actionGroupId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceActionGroupUpdate, options, ) .then((request) => request(axios, basePath)); @@ -658,198 +699,135 @@ export const ResourceActionGroupsApiFactory = function ( /** * Request parameters for createResourceActionGroup operation in ResourceActionGroupsApi. - * @export - * @interface ResourceActionGroupsApiCreateResourceActionGroupRequest */ export interface ResourceActionGroupsApiCreateResourceActionGroupRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiCreateResourceActionGroup */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiCreateResourceActionGroup */ readonly envId: string; + readonly resourceActionGroupCreate: ResourceActionGroupCreate; +} + +/** + * Request parameters for deleteResourceActionGroup operation in ResourceActionGroupsApi. + */ +export interface ResourceActionGroupsApiDeleteResourceActionGroupRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiCreateResourceActionGroup */ readonly resourceId: string; /** - * - * @type {ResourceActionGroupCreate} - * @memberof ResourceActionGroupsApiCreateResourceActionGroup + * Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). */ - readonly resourceActionGroupCreate: ResourceActionGroupCreate; -} + readonly actionGroupId: string; -/** - * Request parameters for deleteResourceActionGroup operation in ResourceActionGroupsApi. - * @export - * @interface ResourceActionGroupsApiDeleteResourceActionGroupRequest - */ -export interface ResourceActionGroupsApiDeleteResourceActionGroupRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiDeleteResourceActionGroup */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiDeleteResourceActionGroup */ readonly envId: string; +} +/** + * Request parameters for getResourceActionGroup operation in ResourceActionGroupsApi. + */ +export interface ResourceActionGroupsApiGetResourceActionGroupRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiDeleteResourceActionGroup */ readonly resourceId: string; /** * Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiDeleteResourceActionGroup */ readonly actionGroupId: string; -} -/** - * Request parameters for getResourceActionGroup operation in ResourceActionGroupsApi. - * @export - * @interface ResourceActionGroupsApiGetResourceActionGroupRequest - */ -export interface ResourceActionGroupsApiGetResourceActionGroupRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiGetResourceActionGroup */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiGetResourceActionGroup */ readonly envId: string; - - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiGetResourceActionGroup - */ - readonly resourceId: string; - - /** - * Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiGetResourceActionGroup - */ - readonly actionGroupId: string; } /** * Request parameters for listResourceActionGroups operation in ResourceActionGroupsApi. - * @export - * @interface ResourceActionGroupsApiListResourceActionGroupsRequest */ export interface ResourceActionGroupsApiListResourceActionGroupsRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiListResourceActionGroups */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiListResourceActionGroups */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiListResourceActionGroups - */ - readonly resourceId: string; - /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceActionGroupsApiListResourceActionGroups */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceActionGroupsApiListResourceActionGroups */ readonly perPage?: number; } /** * Request parameters for updateResourceActionGroup operation in ResourceActionGroupsApi. - * @export - * @interface ResourceActionGroupsApiUpdateResourceActionGroupRequest */ export interface ResourceActionGroupsApiUpdateResourceActionGroupRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiUpdateResourceActionGroup */ readonly resourceId: string; /** * Either the unique id of the action group, or the URL-friendly key of the action group (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiUpdateResourceActionGroup */ readonly actionGroupId: string; /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiUpdateResourceActionGroup */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionGroupsApiUpdateResourceActionGroup */ readonly envId: string; - /** - * - * @type {ResourceActionGroupUpdate} - * @memberof ResourceActionGroupsApiUpdateResourceActionGroup - */ readonly resourceActionGroupUpdate: ResourceActionGroupUpdate; } /** * ResourceActionGroupsApi - object-oriented interface - * @export - * @class ResourceActionGroupsApi - * @extends {BaseAPI} */ export class ResourceActionGroupsApi extends BaseAPI { /** @@ -857,18 +835,17 @@ export class ResourceActionGroupsApi extends BaseAPI { * @summary Create Resource Action Group * @param {ResourceActionGroupsApiCreateResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionGroupsApi + * @throws If a required parameter is missing. */ public createResourceActionGroup( requestParameters: ResourceActionGroupsApiCreateResourceActionGroupRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionGroupsApiFp(this.configuration) .createResourceActionGroup( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.resourceActionGroupCreate, options, ) @@ -880,19 +857,18 @@ export class ResourceActionGroupsApi extends BaseAPI { * @summary Delete Resource Action Group * @param {ResourceActionGroupsApiDeleteResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionGroupsApi + * @throws If a required parameter is missing. */ public deleteResourceActionGroup( requestParameters: ResourceActionGroupsApiDeleteResourceActionGroupRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionGroupsApiFp(this.configuration) .deleteResourceActionGroup( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.actionGroupId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -903,19 +879,18 @@ export class ResourceActionGroupsApi extends BaseAPI { * @summary Get Resource Action Group * @param {ResourceActionGroupsApiGetResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionGroupsApi + * @throws If a required parameter is missing. */ public getResourceActionGroup( requestParameters: ResourceActionGroupsApiGetResourceActionGroupRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionGroupsApiFp(this.configuration) .getResourceActionGroup( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.actionGroupId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -926,18 +901,17 @@ export class ResourceActionGroupsApi extends BaseAPI { * @summary List Resource Action Groups * @param {ResourceActionGroupsApiListResourceActionGroupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionGroupsApi + * @throws If a required parameter is missing. */ public listResourceActionGroups( requestParameters: ResourceActionGroupsApiListResourceActionGroupsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionGroupsApiFp(this.configuration) .listResourceActionGroups( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.page, requestParameters.perPage, options, @@ -950,12 +924,11 @@ export class ResourceActionGroupsApi extends BaseAPI { * @summary Update Resource Action Group * @param {ResourceActionGroupsApiUpdateResourceActionGroupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionGroupsApi + * @throws If a required parameter is missing. */ public updateResourceActionGroup( requestParameters: ResourceActionGroupsApiUpdateResourceActionGroupRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionGroupsApiFp(this.configuration) .updateResourceActionGroup( diff --git a/src/openapi/api/resource-actions-api.ts b/src/openapi/api/resource-actions-api.ts index e6c0f27f..23f98b56 100644 --- a/src/openapi/api/resource-actions-api.ts +++ b/src/openapi/api/resource-actions-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,67 +10,54 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResourceActionCreate } from '../types'; -// @ts-ignore -import { ResourceActionRead } from '../types'; -// @ts-ignore -import { ResourceActionUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { ResourceActionCreate, ResourceActionRead, ResourceActionUpdate } from '../types'; /** * ResourceActionsApi - axios parameter creator - * @export */ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new action that can affect the resource. * @summary Create Resource Action + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceActionCreate} resourceActionCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceAction: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceActionCreate: ResourceActionCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('createResourceAction', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('createResourceAction', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('createResourceAction', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('createResourceAction', 'resourceId', resourceId); // verify required parameter 'resourceActionCreate' is not null or undefined assertParamExists('createResourceAction', 'resourceActionCreate', resourceActionCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -89,6 +74,7 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -111,34 +97,34 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceAction: async ( - projId: string, - envId: string, resourceId: string, actionId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteResourceAction', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteResourceAction', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('deleteResourceAction', 'resourceId', resourceId); // verify required parameter 'actionId' is not null or undefined assertParamExists('deleteResourceAction', 'actionId', actionId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteResourceAction', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteResourceAction', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'action_id'}}`, encodeURIComponent(String(actionId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{action_id}', encodeURIComponent(String(actionId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -154,6 +140,8 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -170,34 +158,34 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceAction: async ( - projId: string, - envId: string, resourceId: string, actionId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('getResourceAction', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getResourceAction', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('getResourceAction', 'resourceId', resourceId); // verify required parameter 'actionId' is not null or undefined assertParamExists('getResourceAction', 'actionId', actionId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getResourceAction', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getResourceAction', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'action_id'}}`, encodeURIComponent(String(actionId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{action_id}', encodeURIComponent(String(actionId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -213,6 +201,8 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -229,32 +219,32 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con /** * Lists all the actions defined on the resource. * @summary List Resource Actions + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceActions: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('listResourceActions', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('listResourceActions', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResourceActions', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('listResourceActions', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -278,6 +268,8 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -294,38 +286,38 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceActionUpdate} resourceActionUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceAction: async ( - projId: string, - envId: string, resourceId: string, actionId: string, + projId: string, + envId: string, resourceActionUpdate: ResourceActionUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('updateResourceAction', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('updateResourceAction', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('updateResourceAction', 'resourceId', resourceId); // verify required parameter 'actionId' is not null or undefined assertParamExists('updateResourceAction', 'actionId', actionId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateResourceAction', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateResourceAction', 'envId', envId); // verify required parameter 'resourceActionUpdate' is not null or undefined assertParamExists('updateResourceAction', 'resourceActionUpdate', resourceActionUpdate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'action_id'}}`, encodeURIComponent(String(actionId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{action_id}', encodeURIComponent(String(actionId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -342,6 +334,7 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -366,7 +359,6 @@ export const ResourceActionsApiAxiosParamCreator = function (configuration?: Con /** * ResourceActionsApi - functional programming interface - * @export */ export const ResourceActionsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourceActionsApiAxiosParamCreator(configuration); @@ -374,147 +366,199 @@ export const ResourceActionsApiFp = function (configuration?: Configuration) { /** * Creates a new action that can affect the resource. * @summary Create Resource Action + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceActionCreate} resourceActionCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResourceAction( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceActionCreate: ResourceActionCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createResourceAction( + resourceId, projId, envId, - resourceId, resourceActionCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionsApi.createResourceAction']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResourceAction( - projId: string, - envId: string, resourceId: string, actionId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResourceAction( - projId, - envId, resourceId, actionId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionsApi.deleteResourceAction']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResourceAction( - projId: string, - envId: string, resourceId: string, actionId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceAction( - projId, - envId, resourceId, actionId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionsApi.getResourceAction']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the actions defined on the resource. * @summary List Resource Actions + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listResourceActions( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceActions( + resourceId, projId, envId, - resourceId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionsApi.listResourceActions']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceActionUpdate} resourceActionUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateResourceAction( - projId: string, - envId: string, resourceId: string, actionId: string, + projId: string, + envId: string, resourceActionUpdate: ResourceActionUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateResourceAction( - projId, - envId, resourceId, actionId, + projId, + envId, resourceActionUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceActionsApi.updateResourceAction']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourceActionsApi - factory interface - * @export */ export const ResourceActionsApiFactory = function ( configuration?: Configuration, @@ -526,110 +570,108 @@ export const ResourceActionsApiFactory = function ( /** * Creates a new action that can affect the resource. * @summary Create Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {ResourceActionCreate} resourceActionCreate + * @param {ResourceActionsApiCreateResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceAction( - projId: string, - envId: string, - resourceId: string, - resourceActionCreate: ResourceActionCreate, - options?: any, + requestParameters: ResourceActionsApiCreateResourceActionRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResourceAction(projId, envId, resourceId, resourceActionCreate, options) + .createResourceAction( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceActionCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {ResourceActionsApiDeleteResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceAction( - projId: string, - envId: string, - resourceId: string, - actionId: string, - options?: any, + requestParameters: ResourceActionsApiDeleteResourceActionRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResourceAction(projId, envId, resourceId, actionId, options) + .deleteResourceAction( + requestParameters.resourceId, + requestParameters.actionId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). + * @param {ResourceActionsApiGetResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceAction( - projId: string, - envId: string, - resourceId: string, - actionId: string, - options?: any, + requestParameters: ResourceActionsApiGetResourceActionRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResourceAction(projId, envId, resourceId, actionId, options) + .getResourceAction( + requestParameters.resourceId, + requestParameters.actionId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the actions defined on the resource. * @summary List Resource Actions - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceActionsApiListResourceActionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceActions( - projId: string, - envId: string, - resourceId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ResourceActionsApiListResourceActionsRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listResourceActions(projId, envId, resourceId, page, perPage, options) + .listResourceActions( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). - * @param {ResourceActionUpdate} resourceActionUpdate + * @param {ResourceActionsApiUpdateResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceAction( - projId: string, - envId: string, - resourceId: string, - actionId: string, - resourceActionUpdate: ResourceActionUpdate, - options?: any, + requestParameters: ResourceActionsApiUpdateResourceActionRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateResourceAction(projId, envId, resourceId, actionId, resourceActionUpdate, options) + .updateResourceAction( + requestParameters.resourceId, + requestParameters.actionId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceActionUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -637,198 +679,135 @@ export const ResourceActionsApiFactory = function ( /** * Request parameters for createResourceAction operation in ResourceActionsApi. - * @export - * @interface ResourceActionsApiCreateResourceActionRequest */ export interface ResourceActionsApiCreateResourceActionRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiCreateResourceAction */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiCreateResourceAction */ readonly envId: string; + readonly resourceActionCreate: ResourceActionCreate; +} + +/** + * Request parameters for deleteResourceAction operation in ResourceActionsApi. + */ +export interface ResourceActionsApiDeleteResourceActionRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiCreateResourceAction */ readonly resourceId: string; /** - * - * @type {ResourceActionCreate} - * @memberof ResourceActionsApiCreateResourceAction + * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). */ - readonly resourceActionCreate: ResourceActionCreate; -} + readonly actionId: string; -/** - * Request parameters for deleteResourceAction operation in ResourceActionsApi. - * @export - * @interface ResourceActionsApiDeleteResourceActionRequest - */ -export interface ResourceActionsApiDeleteResourceActionRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiDeleteResourceAction */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiDeleteResourceAction */ readonly envId: string; +} +/** + * Request parameters for getResourceAction operation in ResourceActionsApi. + */ +export interface ResourceActionsApiGetResourceActionRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiDeleteResourceAction */ readonly resourceId: string; /** * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiDeleteResourceAction */ readonly actionId: string; -} -/** - * Request parameters for getResourceAction operation in ResourceActionsApi. - * @export - * @interface ResourceActionsApiGetResourceActionRequest - */ -export interface ResourceActionsApiGetResourceActionRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiGetResourceAction */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiGetResourceAction */ readonly envId: string; - - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiGetResourceAction - */ - readonly resourceId: string; - - /** - * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiGetResourceAction - */ - readonly actionId: string; } /** * Request parameters for listResourceActions operation in ResourceActionsApi. - * @export - * @interface ResourceActionsApiListResourceActionsRequest */ export interface ResourceActionsApiListResourceActionsRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiListResourceActions */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiListResourceActions */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiListResourceActions - */ - readonly resourceId: string; - /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceActionsApiListResourceActions */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceActionsApiListResourceActions */ readonly perPage?: number; } /** * Request parameters for updateResourceAction operation in ResourceActionsApi. - * @export - * @interface ResourceActionsApiUpdateResourceActionRequest */ export interface ResourceActionsApiUpdateResourceActionRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiUpdateResourceAction - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiUpdateResourceAction - */ - readonly envId: string; - /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiUpdateResourceAction */ readonly resourceId: string; /** * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceActionsApiUpdateResourceAction */ readonly actionId: string; /** - * - * @type {ResourceActionUpdate} - * @memberof ResourceActionsApiUpdateResourceAction + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + readonly resourceActionUpdate: ResourceActionUpdate; } /** * ResourceActionsApi - object-oriented interface - * @export - * @class ResourceActionsApi - * @extends {BaseAPI} */ export class ResourceActionsApi extends BaseAPI { /** @@ -836,18 +815,17 @@ export class ResourceActionsApi extends BaseAPI { * @summary Create Resource Action * @param {ResourceActionsApiCreateResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionsApi + * @throws If a required parameter is missing. */ public createResourceAction( requestParameters: ResourceActionsApiCreateResourceActionRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionsApiFp(this.configuration) .createResourceAction( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.resourceActionCreate, options, ) @@ -859,19 +837,18 @@ export class ResourceActionsApi extends BaseAPI { * @summary Delete Resource Action * @param {ResourceActionsApiDeleteResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionsApi + * @throws If a required parameter is missing. */ public deleteResourceAction( requestParameters: ResourceActionsApiDeleteResourceActionRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionsApiFp(this.configuration) .deleteResourceAction( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.actionId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -882,19 +859,18 @@ export class ResourceActionsApi extends BaseAPI { * @summary Get Resource Action * @param {ResourceActionsApiGetResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionsApi + * @throws If a required parameter is missing. */ public getResourceAction( requestParameters: ResourceActionsApiGetResourceActionRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionsApiFp(this.configuration) .getResourceAction( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.actionId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -905,18 +881,17 @@ export class ResourceActionsApi extends BaseAPI { * @summary List Resource Actions * @param {ResourceActionsApiListResourceActionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionsApi + * @throws If a required parameter is missing. */ public listResourceActions( requestParameters: ResourceActionsApiListResourceActionsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionsApiFp(this.configuration) .listResourceActions( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.page, requestParameters.perPage, options, @@ -929,19 +904,18 @@ export class ResourceActionsApi extends BaseAPI { * @summary Update Resource Action * @param {ResourceActionsApiUpdateResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceActionsApi + * @throws If a required parameter is missing. */ public updateResourceAction( requestParameters: ResourceActionsApiUpdateResourceActionRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceActionsApiFp(this.configuration) .updateResourceAction( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.actionId, + requestParameters.projId, + requestParameters.envId, requestParameters.resourceActionUpdate, options, ) diff --git a/src/openapi/api/resource-attributes-api.ts b/src/openapi/api/resource-attributes-api.ts index a645e1b5..35e5fe73 100644 --- a/src/openapi/api/resource-attributes-api.ts +++ b/src/openapi/api/resource-attributes-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,61 +10,52 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResourceAttributeCreate } from '../types'; -// @ts-ignore -import { ResourceAttributeRead } from '../types'; -// @ts-ignore -import { ResourceAttributeUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ResourceAttributeCreate, + ResourceAttributeRead, + ResourceAttributeUpdate, +} from '../types'; /** * ResourceAttributesApi - axios parameter creator - * @export */ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceAttribute: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceAttributeCreate: ResourceAttributeCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('createResourceAttribute', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('createResourceAttribute', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('createResourceAttribute', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('createResourceAttribute', 'resourceId', resourceId); // verify required parameter 'resourceAttributeCreate' is not null or undefined assertParamExists( 'createResourceAttribute', @@ -74,9 +63,9 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: resourceAttributeCreate, ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -93,6 +82,7 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -115,38 +105,38 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceAttribute: async ( - projId: string, - envId: string, resourceId: string, attributeId: string, + projId: string, + envId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteResourceAttribute', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteResourceAttribute', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('deleteResourceAttribute', 'resourceId', resourceId); // verify required parameter 'attributeId' is not null or undefined assertParamExists('deleteResourceAttribute', 'attributeId', attributeId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteResourceAttribute', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteResourceAttribute', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'attribute_id'}}`, encodeURIComponent(String(attributeId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{attribute_id}', encodeURIComponent(String(attributeId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -170,6 +160,8 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -186,34 +178,34 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceAttribute: async ( - projId: string, - envId: string, resourceId: string, attributeId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('getResourceAttribute', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getResourceAttribute', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('getResourceAttribute', 'resourceId', resourceId); // verify required parameter 'attributeId' is not null or undefined assertParamExists('getResourceAttribute', 'attributeId', attributeId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getResourceAttribute', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getResourceAttribute', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'attribute_id'}}`, encodeURIComponent(String(attributeId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{attribute_id}', encodeURIComponent(String(attributeId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -229,6 +221,8 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -245,32 +239,32 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceAttributes: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('listResourceAttributes', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('listResourceAttributes', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResourceAttributes', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('listResourceAttributes', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -294,6 +288,8 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -310,30 +306,30 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceAttribute: async ( - projId: string, - envId: string, resourceId: string, attributeId: string, + projId: string, + envId: string, resourceAttributeUpdate: ResourceAttributeUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('updateResourceAttribute', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('updateResourceAttribute', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('updateResourceAttribute', 'resourceId', resourceId); // verify required parameter 'attributeId' is not null or undefined assertParamExists('updateResourceAttribute', 'attributeId', attributeId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateResourceAttribute', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateResourceAttribute', 'envId', envId); // verify required parameter 'resourceAttributeUpdate' is not null or undefined assertParamExists( 'updateResourceAttribute', @@ -342,10 +338,10 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/attributes/{attribute_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'attribute_id'}}`, encodeURIComponent(String(attributeId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{attribute_id}', encodeURIComponent(String(attributeId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -362,6 +358,7 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -386,7 +383,6 @@ export const ResourceAttributesApiAxiosParamCreator = function (configuration?: /** * ResourceAttributesApi - functional programming interface - * @export */ export const ResourceAttributesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourceAttributesApiAxiosParamCreator(configuration); @@ -394,153 +390,207 @@ export const ResourceAttributesApiFp = function (configuration?: Configuration) /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResourceAttribute( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceAttributeCreate: ResourceAttributeCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createResourceAttribute( + resourceId, projId, envId, - resourceId, resourceAttributeCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceAttributesApi.createResourceAttribute']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResourceAttribute( - projId: string, - envId: string, resourceId: string, attributeId: string, + projId: string, + envId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResourceAttribute( - projId, - envId, resourceId, attributeId, + projId, + envId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceAttributesApi.deleteResourceAttribute']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResourceAttribute( - projId: string, - envId: string, resourceId: string, attributeId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceAttribute( - projId, - envId, resourceId, attributeId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceAttributesApi.getResourceAttribute']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listResourceAttributes( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceAttributes( + resourceId, projId, envId, - resourceId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceAttributesApi.listResourceAttributes']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateResourceAttribute( - projId: string, - envId: string, resourceId: string, attributeId: string, + projId: string, + envId: string, resourceAttributeUpdate: ResourceAttributeUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateResourceAttribute( - projId, - envId, resourceId, attributeId, + projId, + envId, resourceAttributeUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceAttributesApi.updateResourceAttribute']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourceAttributesApi - factory interface - * @export */ export const ResourceAttributesApiFactory = function ( configuration?: Configuration, @@ -552,119 +602,108 @@ export const ResourceAttributesApiFactory = function ( /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {ResourceAttributeCreate} resourceAttributeCreate + * @param {ResourceAttributesApiCreateResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceAttribute( - projId: string, - envId: string, - resourceId: string, - resourceAttributeCreate: ResourceAttributeCreate, - options?: any, + requestParameters: ResourceAttributesApiCreateResourceAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResourceAttribute(projId, envId, resourceId, resourceAttributeCreate, options) + .createResourceAttribute( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceAttributeCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceAttributesApiDeleteResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceAttribute( - projId: string, - envId: string, - resourceId: string, - attributeId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ResourceAttributesApiDeleteResourceAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResourceAttribute(projId, envId, resourceId, attributeId, page, perPage, options) + .deleteResourceAttribute( + requestParameters.resourceId, + requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + * @param {ResourceAttributesApiGetResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceAttribute( - projId: string, - envId: string, - resourceId: string, - attributeId: string, - options?: any, + requestParameters: ResourceAttributesApiGetResourceAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResourceAttribute(projId, envId, resourceId, attributeId, options) + .getResourceAttribute( + requestParameters.resourceId, + requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceAttributesApiListResourceAttributesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceAttributes( - projId: string, - envId: string, - resourceId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ResourceAttributesApiListResourceAttributesRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listResourceAttributes(projId, envId, resourceId, page, perPage, options) + .listResourceAttributes( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @param {ResourceAttributeUpdate} resourceAttributeUpdate + * @param {ResourceAttributesApiUpdateResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceAttribute( - projId: string, - envId: string, - resourceId: string, - attributeId: string, - resourceAttributeUpdate: ResourceAttributeUpdate, - options?: any, + requestParameters: ResourceAttributesApiUpdateResourceAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .updateResourceAttribute( - projId, - envId, - resourceId, - attributeId, - resourceAttributeUpdate, + requestParameters.resourceId, + requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceAttributeUpdate, options, ) .then((request) => request(axios, basePath)); @@ -674,212 +713,145 @@ export const ResourceAttributesApiFactory = function ( /** * Request parameters for createResourceAttribute operation in ResourceAttributesApi. - * @export - * @interface ResourceAttributesApiCreateResourceAttributeRequest */ export interface ResourceAttributesApiCreateResourceAttributeRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiCreateResourceAttribute */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiCreateResourceAttribute */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiCreateResourceAttribute - */ - readonly resourceId: string; - - /** - * - * @type {ResourceAttributeCreate} - * @memberof ResourceAttributesApiCreateResourceAttribute - */ readonly resourceAttributeCreate: ResourceAttributeCreate; } /** * Request parameters for deleteResourceAttribute operation in ResourceAttributesApi. - * @export - * @interface ResourceAttributesApiDeleteResourceAttributeRequest */ export interface ResourceAttributesApiDeleteResourceAttributeRequest { /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiDeleteResourceAttribute + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). */ - readonly projId: string; + readonly resourceId: string; /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiDeleteResourceAttribute + * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). */ - readonly envId: string; + readonly attributeId: string; /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiDeleteResourceAttribute + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly resourceId: string; + readonly projId: string; /** - * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiDeleteResourceAttribute + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly attributeId: string; + readonly envId: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceAttributesApiDeleteResourceAttribute */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceAttributesApiDeleteResourceAttribute */ readonly perPage?: number; } /** * Request parameters for getResourceAttribute operation in ResourceAttributesApi. - * @export - * @interface ResourceAttributesApiGetResourceAttributeRequest */ export interface ResourceAttributesApiGetResourceAttributeRequest { /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiGetResourceAttribute + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). */ - readonly projId: string; + readonly resourceId: string; /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiGetResourceAttribute + * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). */ - readonly envId: string; + readonly attributeId: string; /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiGetResourceAttribute + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly resourceId: string; + readonly projId: string; /** - * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiGetResourceAttribute + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly attributeId: string; + readonly envId: string; } /** * Request parameters for listResourceAttributes operation in ResourceAttributesApi. - * @export - * @interface ResourceAttributesApiListResourceAttributesRequest */ export interface ResourceAttributesApiListResourceAttributesRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiListResourceAttributes */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiListResourceAttributes */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiListResourceAttributes - */ - readonly resourceId: string; - /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceAttributesApiListResourceAttributes */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceAttributesApiListResourceAttributes */ readonly perPage?: number; } /** * Request parameters for updateResourceAttribute operation in ResourceAttributesApi. - * @export - * @interface ResourceAttributesApiUpdateResourceAttributeRequest */ export interface ResourceAttributesApiUpdateResourceAttributeRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiUpdateResourceAttribute - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiUpdateResourceAttribute - */ - readonly envId: string; - /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiUpdateResourceAttribute */ readonly resourceId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceAttributesApiUpdateResourceAttribute */ readonly attributeId: string; /** - * - * @type {ResourceAttributeUpdate} - * @memberof ResourceAttributesApiUpdateResourceAttribute + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ + readonly envId: string; + readonly resourceAttributeUpdate: ResourceAttributeUpdate; } /** * ResourceAttributesApi - object-oriented interface - * @export - * @class ResourceAttributesApi - * @extends {BaseAPI} */ export class ResourceAttributesApi extends BaseAPI { /** @@ -887,18 +859,17 @@ export class ResourceAttributesApi extends BaseAPI { * @summary Create Resource Attribute * @param {ResourceAttributesApiCreateResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceAttributesApi + * @throws If a required parameter is missing. */ public createResourceAttribute( requestParameters: ResourceAttributesApiCreateResourceAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceAttributesApiFp(this.configuration) .createResourceAttribute( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.resourceAttributeCreate, options, ) @@ -910,19 +881,18 @@ export class ResourceAttributesApi extends BaseAPI { * @summary Delete Resource Attribute * @param {ResourceAttributesApiDeleteResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceAttributesApi + * @throws If a required parameter is missing. */ public deleteResourceAttribute( requestParameters: ResourceAttributesApiDeleteResourceAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceAttributesApiFp(this.configuration) .deleteResourceAttribute( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, requestParameters.page, requestParameters.perPage, options, @@ -935,19 +905,18 @@ export class ResourceAttributesApi extends BaseAPI { * @summary Get Resource Attribute * @param {ResourceAttributesApiGetResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceAttributesApi + * @throws If a required parameter is missing. */ public getResourceAttribute( requestParameters: ResourceAttributesApiGetResourceAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceAttributesApiFp(this.configuration) .getResourceAttribute( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -958,18 +927,17 @@ export class ResourceAttributesApi extends BaseAPI { * @summary List Resource Attributes * @param {ResourceAttributesApiListResourceAttributesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceAttributesApi + * @throws If a required parameter is missing. */ public listResourceAttributes( requestParameters: ResourceAttributesApiListResourceAttributesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceAttributesApiFp(this.configuration) .listResourceAttributes( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.page, requestParameters.perPage, options, @@ -982,19 +950,18 @@ export class ResourceAttributesApi extends BaseAPI { * @summary Update Resource Attribute * @param {ResourceAttributesApiUpdateResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceAttributesApi + * @throws If a required parameter is missing. */ public updateResourceAttribute( requestParameters: ResourceAttributesApiUpdateResourceAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceAttributesApiFp(this.configuration) .updateResourceAttribute( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, requestParameters.resourceAttributeUpdate, options, ) diff --git a/src/openapi/api/resource-instances-api.ts b/src/openapi/api/resource-instances-api.ts index adfd7565..4199754e 100644 --- a/src/openapi/api/resource-instances-api.ts +++ b/src/openapi/api/resource-instances-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,28 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResourceInstanceCreate } from '../types'; -// @ts-ignore -import { ResourceInstanceRead } from '../types'; -// @ts-ignore -import { ResourceInstanceUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + PaginatedResultResourceInstanceDetailedRead, + ResourceInstanceCreate, + ResourceInstanceRead, + ResourceInstanceUpdate, + ResponseListResourceInstancesV2FactsProjIdEnvIdResourceInstancesGet, +} from '../types'; /** * ResourceInstancesApi - axios parameter creator - * @export */ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -51,13 +42,13 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreate} resourceInstanceCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceInstance: async ( projId: string, envId: string, resourceInstanceCreate: ResourceInstanceCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createResourceInstance', 'projId', projId); @@ -66,8 +57,8 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C // verify required parameter 'resourceInstanceCreate' is not null or undefined assertParamExists('createResourceInstance', 'resourceInstanceCreate', resourceInstanceCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/resource_instances` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -84,6 +75,7 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -108,15 +100,15 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C * @summary Delete Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {string} instanceId f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceInstance: async ( projId: string, envId: string, instanceId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('deleteResourceInstance', 'projId', projId); @@ -125,9 +117,9 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C // verify required parameter 'instanceId' is not null or undefined assertParamExists('deleteResourceInstance', 'instanceId', instanceId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'instance_id'}}`, encodeURIComponent(String(instanceId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{instance_id}', encodeURIComponent(String(instanceId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -143,6 +135,8 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -161,15 +155,17 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C * @summary Get Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {string} instanceId f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' + * @param {boolean} [detailed] If true, will return the relationships of the resource instance. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceInstance: async ( projId: string, envId: string, instanceId: string, - options: AxiosRequestConfig = {}, + detailed?: boolean, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('getResourceInstance', 'projId', projId); @@ -178,9 +174,9 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C // verify required parameter 'instanceId' is not null or undefined assertParamExists('getResourceInstance', 'instanceId', instanceId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'instance_id'}}`, encodeURIComponent(String(instanceId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{instance_id}', encodeURIComponent(String(instanceId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -196,6 +192,12 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (detailed !== undefined) { + localVarQueryParameter['detailed'] = detailed; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -216,27 +218,121 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [resource] The resource key or id to filter by + * @param {Array} [search] The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2). Each value also matches partially against the key (case-insensitive), so a single value may match multiple instances — mind `per_page` when batching. Use the `/detailed` route when you have exact keys. + * @param {boolean} [detailed] If true, will return the relationships of the resource instance. + * @param {boolean} [includeTotalCount] Include total count in response(will make the request slower) * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceInstances: async ( projId: string, envId: string, tenant?: string, resource?: string, + search?: Array, + detailed?: boolean, + includeTotalCount?: boolean, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listResourceInstances', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResourceInstances', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/resource_instances` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (tenant !== undefined) { + localVarQueryParameter['tenant'] = tenant; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (search) { + localVarQueryParameter['search'] = search; + } + + if (detailed !== undefined) { + localVarQueryParameter['detailed'] = detailed; + } + + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists all the resource instances defined within an environment. + * @summary List Resource Instances Detailed + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [resource] The resource key or id to filter by + * @param {Array} [search] The resource instance key or id to filter by, matched exactly (supports multi-value like this url?search=key-1&search=key-2). Split larger key sets into successive requests of at most 100 values each. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listResourceInstancesDetailed: async ( + projId: string, + envId: string, + tenant?: string, + resource?: string, + search?: Array, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listResourceInstancesDetailed', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listResourceInstancesDetailed', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/resource_instances/detailed` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -260,6 +356,10 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['resource'] = resource; } + if (search) { + localVarQueryParameter['search'] = search; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -268,6 +368,8 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -286,17 +388,17 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C * @summary Update Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {string} instanceId f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' * @param {ResourceInstanceUpdate} resourceInstanceUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceInstance: async ( projId: string, envId: string, instanceId: string, resourceInstanceUpdate: ResourceInstanceUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('updateResourceInstance', 'projId', projId); @@ -307,9 +409,9 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C // verify required parameter 'resourceInstanceUpdate' is not null or undefined assertParamExists('updateResourceInstance', 'resourceInstanceUpdate', resourceInstanceUpdate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'instance_id'}}`, encodeURIComponent(String(instanceId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{instance_id}', encodeURIComponent(String(instanceId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -326,6 +428,7 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -350,7 +453,6 @@ export const ResourceInstancesApiAxiosParamCreator = function (configuration?: C /** * ResourceInstancesApi - functional programming interface - * @export */ export const ResourceInstancesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourceInstancesApiAxiosParamCreator(configuration); @@ -362,13 +464,13 @@ export const ResourceInstancesApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreate} resourceInstanceCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResourceInstance( projId: string, envId: string, resourceInstanceCreate: ResourceInstanceCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createResourceInstance( projId, @@ -376,22 +478,33 @@ export const ResourceInstancesApiFp = function (configuration?: Configuration) { resourceInstanceCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceInstancesApi.createResourceInstance']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the instance and all its related data. * @summary Delete Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {string} instanceId f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResourceInstance( projId: string, envId: string, instanceId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResourceInstance( projId, @@ -399,30 +512,55 @@ export const ResourceInstancesApiFp = function (configuration?: Configuration) { instanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceInstancesApi.deleteResourceInstance']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a instance, if such instance exists. Otherwise returns 404. * @summary Get Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {string} instanceId f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' + * @param {boolean} [detailed] If true, will return the relationships of the resource instance. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResourceInstance( projId: string, envId: string, instanceId: string, - options?: AxiosRequestConfig, + detailed?: boolean, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceInstance( projId, envId, instanceId, + detailed, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceInstancesApi.getResourceInstance']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the resource instances defined within an environment. @@ -431,49 +569,123 @@ export const ResourceInstancesApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [resource] The resource key or id to filter by + * @param {Array} [search] The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2). Each value also matches partially against the key (case-insensitive), so a single value may match multiple instances — mind `per_page` when batching. Use the `/detailed` route when you have exact keys. + * @param {boolean} [detailed] If true, will return the relationships of the resource instance. + * @param {boolean} [includeTotalCount] Include total count in response(will make the request slower) * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listResourceInstances( projId: string, envId: string, tenant?: string, resource?: string, + search?: Array, + detailed?: boolean, + includeTotalCount?: boolean, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceInstances( projId, envId, tenant, resource, + search, + detailed, + includeTotalCount, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceInstancesApi.listResourceInstances']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists all the resource instances defined within an environment. + * @summary List Resource Instances Detailed + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [tenant] The tenant key or id to filter by + * @param {string} [resource] The resource key or id to filter by + * @param {Array} [search] The resource instance key or id to filter by, matched exactly (supports multi-value like this url?search=key-1&search=key-2). Split larger key sets into successive requests of at most 100 values each. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listResourceInstancesDetailed( + projId: string, + envId: string, + tenant?: string, + resource?: string, + search?: Array, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceInstancesDetailed( + projId, + envId, + tenant, + resource, + search, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceInstancesApi.listResourceInstancesDetailed']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the instance definition. Fields that will be provided will be completely overwritten. * @summary Update Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {string} instanceId f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' * @param {ResourceInstanceUpdate} resourceInstanceUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateResourceInstance( projId: string, envId: string, instanceId: string, resourceInstanceUpdate: ResourceInstanceUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateResourceInstance( projId, @@ -482,14 +694,24 @@ export const ResourceInstancesApiFp = function (configuration?: Configuration) { resourceInstanceUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceInstancesApi.updateResourceInstance']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourceInstancesApi - factory interface - * @export */ export const ResourceInstancesApiFactory = function ( configuration?: Configuration, @@ -501,104 +723,133 @@ export const ResourceInstancesApiFactory = function ( /** * Creates a new instance inside the Permit.io system. If the instance is already created: will return 200 instead of 201, and will return the existing instance object in the response body. * @summary Create Resource Instance - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ResourceInstanceCreate} resourceInstanceCreate + * @param {ResourceInstancesApiCreateResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceInstance( - projId: string, - envId: string, - resourceInstanceCreate: ResourceInstanceCreate, - options?: any, + requestParameters: ResourceInstancesApiCreateResourceInstanceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResourceInstance(projId, envId, resourceInstanceCreate, options) + .createResourceInstance( + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceInstanceCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the instance and all its related data. * @summary Delete Resource Instance - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {ResourceInstancesApiDeleteResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceInstance( - projId: string, - envId: string, - instanceId: string, - options?: any, + requestParameters: ResourceInstancesApiDeleteResourceInstanceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResourceInstance(projId, envId, instanceId, options) + .deleteResourceInstance( + requestParameters.projId, + requestParameters.envId, + requestParameters.instanceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a instance, if such instance exists. Otherwise returns 404. * @summary Get Resource Instance - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). + * @param {ResourceInstancesApiGetResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceInstance( - projId: string, - envId: string, - instanceId: string, - options?: any, + requestParameters: ResourceInstancesApiGetResourceInstanceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResourceInstance(projId, envId, instanceId, options) + .getResourceInstance( + requestParameters.projId, + requestParameters.envId, + requestParameters.instanceId, + requestParameters.detailed, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the resource instances defined within an environment. * @summary List Resource Instances - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [tenant] The tenant key or id to filter by - * @param {string} [resource] The resource key or id to filter by - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceInstancesApiListResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceInstances( - projId: string, - envId: string, - tenant?: string, - resource?: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + requestParameters: ResourceInstancesApiListResourceInstancesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listResourceInstances(projId, envId, tenant, resource, page, perPage, options) + .listResourceInstances( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.search, + requestParameters.detailed, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Lists all the resource instances defined within an environment. + * @summary List Resource Instances Detailed + * @param {ResourceInstancesApiListResourceInstancesDetailedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listResourceInstancesDetailed( + requestParameters: ResourceInstancesApiListResourceInstancesDetailedRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listResourceInstancesDetailed( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the instance definition. Fields that will be provided will be completely overwritten. * @summary Update Resource Instance - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). - * @param {ResourceInstanceUpdate} resourceInstanceUpdate + * @param {ResourceInstancesApiUpdateResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceInstance( - projId: string, - envId: string, - instanceId: string, - resourceInstanceUpdate: ResourceInstanceUpdate, - options?: any, + requestParameters: ResourceInstancesApiUpdateResourceInstanceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateResourceInstance(projId, envId, instanceId, resourceInstanceUpdate, options) + .updateResourceInstance( + requestParameters.projId, + requestParameters.envId, + requestParameters.instanceId, + requestParameters.resourceInstanceUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -606,177 +857,180 @@ export const ResourceInstancesApiFactory = function ( /** * Request parameters for createResourceInstance operation in ResourceInstancesApi. - * @export - * @interface ResourceInstancesApiCreateResourceInstanceRequest */ export interface ResourceInstancesApiCreateResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiCreateResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiCreateResourceInstance */ readonly envId: string; - /** - * - * @type {ResourceInstanceCreate} - * @memberof ResourceInstancesApiCreateResourceInstance - */ readonly resourceInstanceCreate: ResourceInstanceCreate; } /** * Request parameters for deleteResourceInstance operation in ResourceInstancesApi. - * @export - * @interface ResourceInstancesApiDeleteResourceInstanceRequest */ export interface ResourceInstancesApiDeleteResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiDeleteResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiDeleteResourceInstance */ readonly envId: string; /** - * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiDeleteResourceInstance + * f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' */ readonly instanceId: string; } /** * Request parameters for getResourceInstance operation in ResourceInstancesApi. - * @export - * @interface ResourceInstancesApiGetResourceInstanceRequest */ export interface ResourceInstancesApiGetResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiGetResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiGetResourceInstance */ readonly envId: string; /** - * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiGetResourceInstance + * f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' */ readonly instanceId: string; + + /** + * If true, will return the relationships of the resource instance. + */ + readonly detailed?: boolean; } /** * Request parameters for listResourceInstances operation in ResourceInstancesApi. - * @export - * @interface ResourceInstancesApiListResourceInstancesRequest */ export interface ResourceInstancesApiListResourceInstancesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiListResourceInstances */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiListResourceInstances */ readonly envId: string; /** * The tenant key or id to filter by - * @type {string} - * @memberof ResourceInstancesApiListResourceInstances */ readonly tenant?: string; /** * The resource key or id to filter by - * @type {string} - * @memberof ResourceInstancesApiListResourceInstances */ readonly resource?: string; + /** + * The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2). Each value also matches partially against the key (case-insensitive), so a single value may match multiple instances — mind `per_page` when batching. Use the `/detailed` route when you have exact keys. + */ + readonly search?: Array; + + /** + * If true, will return the relationships of the resource instance. + */ + readonly detailed?: boolean; + + /** + * Include total count in response(will make the request slower) + */ + readonly includeTotalCount?: boolean; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listResourceInstancesDetailed operation in ResourceInstancesApi. + */ +export interface ResourceInstancesApiListResourceInstancesDetailedRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * The tenant key or id to filter by + */ + readonly tenant?: string; + + /** + * The resource key or id to filter by + */ + readonly resource?: string; + + /** + * The resource instance key or id to filter by, matched exactly (supports multi-value like this url?search=key-1&search=key-2). Split larger key sets into successive requests of at most 100 values each. + */ + readonly search?: Array; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceInstancesApiListResourceInstances */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceInstancesApiListResourceInstances */ readonly perPage?: number; } /** * Request parameters for updateResourceInstance operation in ResourceInstancesApi. - * @export - * @interface ResourceInstancesApiUpdateResourceInstanceRequest */ export interface ResourceInstancesApiUpdateResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiUpdateResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiUpdateResourceInstance */ readonly envId: string; /** - * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceInstancesApiUpdateResourceInstance + * f\'Either the unique id of the resource instance, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file.txt).\' */ readonly instanceId: string; - /** - * - * @type {ResourceInstanceUpdate} - * @memberof ResourceInstancesApiUpdateResourceInstance - */ readonly resourceInstanceUpdate: ResourceInstanceUpdate; } /** * ResourceInstancesApi - object-oriented interface - * @export - * @class ResourceInstancesApi - * @extends {BaseAPI} */ export class ResourceInstancesApi extends BaseAPI { /** @@ -784,12 +1038,11 @@ export class ResourceInstancesApi extends BaseAPI { * @summary Create Resource Instance * @param {ResourceInstancesApiCreateResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceInstancesApi + * @throws If a required parameter is missing. */ public createResourceInstance( requestParameters: ResourceInstancesApiCreateResourceInstanceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceInstancesApiFp(this.configuration) .createResourceInstance( @@ -806,12 +1059,11 @@ export class ResourceInstancesApi extends BaseAPI { * @summary Delete Resource Instance * @param {ResourceInstancesApiDeleteResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceInstancesApi + * @throws If a required parameter is missing. */ public deleteResourceInstance( requestParameters: ResourceInstancesApiDeleteResourceInstanceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceInstancesApiFp(this.configuration) .deleteResourceInstance( @@ -828,18 +1080,18 @@ export class ResourceInstancesApi extends BaseAPI { * @summary Get Resource Instance * @param {ResourceInstancesApiGetResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceInstancesApi + * @throws If a required parameter is missing. */ public getResourceInstance( requestParameters: ResourceInstancesApiGetResourceInstanceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceInstancesApiFp(this.configuration) .getResourceInstance( requestParameters.projId, requestParameters.envId, requestParameters.instanceId, + requestParameters.detailed, options, ) .then((request) => request(this.axios, this.basePath)); @@ -850,12 +1102,11 @@ export class ResourceInstancesApi extends BaseAPI { * @summary List Resource Instances * @param {ResourceInstancesApiListResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceInstancesApi + * @throws If a required parameter is missing. */ public listResourceInstances( requestParameters: ResourceInstancesApiListResourceInstancesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceInstancesApiFp(this.configuration) .listResourceInstances( @@ -863,6 +1114,34 @@ export class ResourceInstancesApi extends BaseAPI { requestParameters.envId, requestParameters.tenant, requestParameters.resource, + requestParameters.search, + requestParameters.detailed, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists all the resource instances defined within an environment. + * @summary List Resource Instances Detailed + * @param {ResourceInstancesApiListResourceInstancesDetailedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listResourceInstancesDetailed( + requestParameters: ResourceInstancesApiListResourceInstancesDetailedRequest, + options?: RawAxiosRequestConfig, + ) { + return ResourceInstancesApiFp(this.configuration) + .listResourceInstancesDetailed( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenant, + requestParameters.resource, + requestParameters.search, requestParameters.page, requestParameters.perPage, options, @@ -875,12 +1154,11 @@ export class ResourceInstancesApi extends BaseAPI { * @summary Update Resource Instance * @param {ResourceInstancesApiUpdateResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceInstancesApi + * @throws If a required parameter is missing. */ public updateResourceInstance( requestParameters: ResourceInstancesApiUpdateResourceInstanceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceInstancesApiFp(this.configuration) .updateResourceInstance( diff --git a/src/openapi/api/resource-relations-api.ts b/src/openapi/api/resource-relations-api.ts index caa0c09d..f424f69f 100644 --- a/src/openapi/api/resource-relations-api.ts +++ b/src/openapi/api/resource-relations-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,65 +10,54 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { RelationCreate } from '../types'; -// @ts-ignore -import { RelationRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { PaginatedResultRelationRead, RelationCreate, RelationRead } from '../types'; /** * ResourceRelationsApi - axios parameter creator - * @export */ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a resource relation to another resource * @summary Create Resource Relation + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {RelationCreate} relationCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceRelation: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, relationCreate: RelationCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('createResourceRelation', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('createResourceRelation', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('createResourceRelation', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('createResourceRelation', 'resourceId', resourceId); // verify required parameter 'relationCreate' is not null or undefined assertParamExists('createResourceRelation', 'relationCreate', relationCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -87,6 +74,7 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -109,34 +97,34 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C /** * Deletes a resource relation * @summary Delete Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceRelation: async ( - projId: string, - envId: string, resourceId: string, relationId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteResourceRelation', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteResourceRelation', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('deleteResourceRelation', 'resourceId', resourceId); // verify required parameter 'relationId' is not null or undefined assertParamExists('deleteResourceRelation', 'relationId', relationId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteResourceRelation', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteResourceRelation', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'relation_id'}}`, encodeURIComponent(String(relationId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{relation_id}', encodeURIComponent(String(relationId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -152,6 +140,8 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -168,34 +158,34 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C /** * Get a resource relation * @summary Get Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceRelation: async ( - projId: string, - envId: string, resourceId: string, relationId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('getResourceRelation', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('getResourceRelation', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('getResourceRelation', 'resourceId', resourceId); // verify required parameter 'relationId' is not null or undefined assertParamExists('getResourceRelation', 'relationId', relationId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getResourceRelation', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getResourceRelation', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'relation_id'}}`, encodeURIComponent(String(relationId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{relation_id}', encodeURIComponent(String(relationId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -211,6 +201,8 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -225,34 +217,34 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C }; }, /** - * Creates a resource relation to another resource + * List relations on a given resource * @summary List Resource Relations + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceRelations: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('listResourceRelations', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('listResourceRelations', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResourceRelations', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('listResourceRelations', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -276,6 +268,8 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -294,7 +288,6 @@ export const ResourceRelationsApiAxiosParamCreator = function (configuration?: C /** * ResourceRelationsApi - functional programming interface - * @export */ export const ResourceRelationsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourceRelationsApiAxiosParamCreator(configuration); @@ -302,116 +295,161 @@ export const ResourceRelationsApiFp = function (configuration?: Configuration) { /** * Creates a resource relation to another resource * @summary Create Resource Relation + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {RelationCreate} relationCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResourceRelation( + resourceId: string, projId: string, envId: string, - resourceId: string, relationCreate: RelationCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createResourceRelation( + resourceId, projId, envId, - resourceId, relationCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRelationsApi.createResourceRelation']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a resource relation * @summary Delete Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResourceRelation( - projId: string, - envId: string, resourceId: string, relationId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResourceRelation( - projId, - envId, resourceId, relationId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRelationsApi.deleteResourceRelation']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Get a resource relation * @summary Get Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResourceRelation( - projId: string, - envId: string, resourceId: string, relationId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceRelation( - projId, - envId, resourceId, relationId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRelationsApi.getResourceRelation']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Creates a resource relation to another resource + * List relations on a given resource * @summary List Resource Relations + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listResourceRelations( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceRelations( + resourceId, projId, envId, - resourceId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRelationsApi.listResourceRelations']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourceRelationsApi - factory interface - * @export */ export const ResourceRelationsApiFactory = function ( configuration?: Configuration, @@ -423,87 +461,86 @@ export const ResourceRelationsApiFactory = function ( /** * Creates a resource relation to another resource * @summary Create Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {RelationCreate} relationCreate + * @param {ResourceRelationsApiCreateResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceRelation( - projId: string, - envId: string, - resourceId: string, - relationCreate: RelationCreate, - options?: any, + requestParameters: ResourceRelationsApiCreateResourceRelationRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResourceRelation(projId, envId, resourceId, relationCreate, options) + .createResourceRelation( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.relationCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes a resource relation * @summary Delete Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). + * @param {ResourceRelationsApiDeleteResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceRelation( - projId: string, - envId: string, - resourceId: string, - relationId: string, - options?: any, + requestParameters: ResourceRelationsApiDeleteResourceRelationRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResourceRelation(projId, envId, resourceId, relationId, options) + .deleteResourceRelation( + requestParameters.resourceId, + requestParameters.relationId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Get a resource relation * @summary Get Resource Relation - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). + * @param {ResourceRelationsApiGetResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceRelation( - projId: string, - envId: string, - resourceId: string, - relationId: string, - options?: any, + requestParameters: ResourceRelationsApiGetResourceRelationRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResourceRelation(projId, envId, resourceId, relationId, options) + .getResourceRelation( + requestParameters.resourceId, + requestParameters.relationId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Creates a resource relation to another resource + * List relations on a given resource * @summary List Resource Relations - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceRelationsApiListResourceRelationsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceRelations( - projId: string, - envId: string, - resourceId: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + requestParameters: ResourceRelationsApiListResourceRelationsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listResourceRelations(projId, envId, resourceId, page, perPage, options) + .listResourceRelations( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -511,156 +548,108 @@ export const ResourceRelationsApiFactory = function ( /** * Request parameters for createResourceRelation operation in ResourceRelationsApi. - * @export - * @interface ResourceRelationsApiCreateResourceRelationRequest */ export interface ResourceRelationsApiCreateResourceRelationRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiCreateResourceRelation */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiCreateResourceRelation */ readonly envId: string; + readonly relationCreate: RelationCreate; +} + +/** + * Request parameters for deleteResourceRelation operation in ResourceRelationsApi. + */ +export interface ResourceRelationsApiDeleteResourceRelationRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiCreateResourceRelation */ readonly resourceId: string; /** - * - * @type {RelationCreate} - * @memberof ResourceRelationsApiCreateResourceRelation + * Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). */ - readonly relationCreate: RelationCreate; -} + readonly relationId: string; -/** - * Request parameters for deleteResourceRelation operation in ResourceRelationsApi. - * @export - * @interface ResourceRelationsApiDeleteResourceRelationRequest - */ -export interface ResourceRelationsApiDeleteResourceRelationRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly envId: string; +} +/** + * Request parameters for getResourceRelation operation in ResourceRelationsApi. + */ +export interface ResourceRelationsApiGetResourceRelationRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly resourceId: string; /** * Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly relationId: string; -} -/** - * Request parameters for getResourceRelation operation in ResourceRelationsApi. - * @export - * @interface ResourceRelationsApiGetResourceRelationRequest - */ -export interface ResourceRelationsApiGetResourceRelationRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiGetResourceRelation */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiGetResourceRelation */ readonly envId: string; - - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiGetResourceRelation - */ - readonly resourceId: string; - - /** - * Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiGetResourceRelation - */ - readonly relationId: string; } /** * Request parameters for listResourceRelations operation in ResourceRelationsApi. - * @export - * @interface ResourceRelationsApiListResourceRelationsRequest */ export interface ResourceRelationsApiListResourceRelationsRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiListResourceRelations */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiListResourceRelations */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRelationsApiListResourceRelations - */ - readonly resourceId: string; - /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceRelationsApiListResourceRelations */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceRelationsApiListResourceRelations */ readonly perPage?: number; } /** * ResourceRelationsApi - object-oriented interface - * @export - * @class ResourceRelationsApi - * @extends {BaseAPI} */ export class ResourceRelationsApi extends BaseAPI { /** @@ -668,18 +657,17 @@ export class ResourceRelationsApi extends BaseAPI { * @summary Create Resource Relation * @param {ResourceRelationsApiCreateResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRelationsApi + * @throws If a required parameter is missing. */ public createResourceRelation( requestParameters: ResourceRelationsApiCreateResourceRelationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRelationsApiFp(this.configuration) .createResourceRelation( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.relationCreate, options, ) @@ -691,19 +679,18 @@ export class ResourceRelationsApi extends BaseAPI { * @summary Delete Resource Relation * @param {ResourceRelationsApiDeleteResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRelationsApi + * @throws If a required parameter is missing. */ public deleteResourceRelation( requestParameters: ResourceRelationsApiDeleteResourceRelationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRelationsApiFp(this.configuration) .deleteResourceRelation( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.relationId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -714,41 +701,39 @@ export class ResourceRelationsApi extends BaseAPI { * @summary Get Resource Relation * @param {ResourceRelationsApiGetResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRelationsApi + * @throws If a required parameter is missing. */ public getResourceRelation( requestParameters: ResourceRelationsApiGetResourceRelationRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRelationsApiFp(this.configuration) .getResourceRelation( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.relationId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); } /** - * Creates a resource relation to another resource + * List relations on a given resource * @summary List Resource Relations * @param {ResourceRelationsApiListResourceRelationsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRelationsApi + * @throws If a required parameter is missing. */ public listResourceRelations( requestParameters: ResourceRelationsApiListResourceRelationsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRelationsApiFp(this.configuration) .listResourceRelations( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.page, requestParameters.perPage, options, diff --git a/src/openapi/api/resource-roles-api.ts b/src/openapi/api/resource-roles-api.ts index bbce813b..ad9b020d 100644 --- a/src/openapi/api/resource-roles-api.ts +++ b/src/openapi/api/resource-roles-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,69 +10,59 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { AddRolePermissions } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { RemoveRolePermissions } from '../types'; -// @ts-ignore -import { ResourceRoleCreate } from '../types'; -// @ts-ignore -import { ResourceRoleRead } from '../types'; -// @ts-ignore -import { ResourceRoleUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + AddRolePermissions, + RemoveRolePermissions, + ResourceRoleCreate, + ResourceRoleList, + ResourceRoleRead, + ResourceRoleUpdate, +} from '../types'; /** * ResourceRolesApi - axios parameter creator - * @export */ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions to Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignPermissionsToResourceRole: async ( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, addRolePermissions: AddRolePermissions, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('assignPermissionsToResourceRole', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('assignPermissionsToResourceRole', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('assignPermissionsToResourceRole', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined assertParamExists('assignPermissionsToResourceRole', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('assignPermissionsToResourceRole', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('assignPermissionsToResourceRole', 'envId', envId); // verify required parameter 'addRolePermissions' is not null or undefined assertParamExists( 'assignPermissionsToResourceRole', @@ -83,10 +71,10 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -103,6 +91,7 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -125,32 +114,32 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * Creates a new role associated with the resource. * @summary Create Resource Role + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceRoleCreate} resourceRoleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceRole: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceRoleCreate: ResourceRoleCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('createResourceRole', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('createResourceRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('createResourceRole', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('createResourceRole', 'resourceId', resourceId); // verify required parameter 'resourceRoleCreate' is not null or undefined assertParamExists('createResourceRole', 'resourceRoleCreate', resourceRoleCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -167,6 +156,7 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -189,33 +179,33 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * Deletes the role and all its related data. This includes any permissions granted to said role. * @summary Delete Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceRole: async ( - projId: string, - envId: string, resourceId: string, roleId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteResourceRole', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteResourceRole', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('deleteResourceRole', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined assertParamExists('deleteResourceRole', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteResourceRole', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteResourceRole', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -231,6 +221,8 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -247,33 +239,155 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * Gets a single role defined on the resource, if such role exists. * @summary Get Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceRole: async ( - projId: string, - envId: string, resourceId: string, roleId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('getResourceRole', 'resourceId', resourceId); + // verify required parameter 'roleId' is not null or undefined + assertParamExists('getResourceRole', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined assertParamExists('getResourceRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getResourceRole', 'envId', envId); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}` + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Resource Role Ancestors + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getResourceRoleAncestors: async ( + resourceId: string, + roleId: string, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { // verify required parameter 'resourceId' is not null or undefined - assertParamExists('getResourceRole', 'resourceId', resourceId); + assertParamExists('getResourceRoleAncestors', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined - assertParamExists('getResourceRole', 'roleId', roleId); - const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + assertParamExists('getResourceRoleAncestors', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getResourceRoleAncestors', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getResourceRoleAncestors', 'envId', envId); + const localVarPath = + `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/ancestors` + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Resource Role Descendants + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getResourceRoleDescendants: async ( + resourceId: string, + roleId: string, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('getResourceRoleDescendants', 'resourceId', resourceId); + // verify required parameter 'roleId' is not null or undefined + assertParamExists('getResourceRoleDescendants', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getResourceRoleDescendants', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getResourceRoleDescendants', 'envId', envId); + const localVarPath = + `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/descendants` + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -289,6 +403,8 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -305,32 +421,32 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * Lists all the roles defined on the resource. * @summary List Resource Roles + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceRoles: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('listResourceRoles', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('listResourceRoles', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResourceRoles', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('listResourceRoles', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -354,6 +470,8 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -370,30 +488,30 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions from Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ removePermissionsFromResourceRole: async ( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, removeRolePermissions: RemoveRolePermissions, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('removePermissionsFromResourceRole', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('removePermissionsFromResourceRole', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('removePermissionsFromResourceRole', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined assertParamExists('removePermissionsFromResourceRole', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('removePermissionsFromResourceRole', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('removePermissionsFromResourceRole', 'envId', envId); // verify required parameter 'removeRolePermissions' is not null or undefined assertParamExists( 'removePermissionsFromResourceRole', @@ -402,10 +520,10 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -422,6 +540,7 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -444,37 +563,37 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * Partially updates the role defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceRoleUpdate} resourceRoleUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceRole: async ( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, resourceRoleUpdate: ResourceRoleUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('updateResourceRole', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('updateResourceRole', 'envId', envId); // verify required parameter 'resourceId' is not null or undefined assertParamExists('updateResourceRole', 'resourceId', resourceId); // verify required parameter 'roleId' is not null or undefined assertParamExists('updateResourceRole', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateResourceRole', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateResourceRole', 'envId', envId); // verify required parameter 'resourceRoleUpdate' is not null or undefined assertParamExists('updateResourceRole', 'resourceRoleUpdate', resourceRoleUpdate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -491,6 +610,7 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -515,7 +635,6 @@ export const ResourceRolesApiAxiosParamCreator = function (configuration?: Confi /** * ResourceRolesApi - functional programming interface - * @export */ export const ResourceRolesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourceRolesApiAxiosParamCreator(configuration); @@ -523,205 +642,349 @@ export const ResourceRolesApiFp = function (configuration?: Configuration) { /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions to Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async assignPermissionsToResourceRole( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, addRolePermissions: AddRolePermissions, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.assignPermissionsToResourceRole( - projId, - envId, resourceId, roleId, + projId, + envId, addRolePermissions, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.assignPermissionsToResourceRole']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new role associated with the resource. * @summary Create Resource Role + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceRoleCreate} resourceRoleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResourceRole( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceRoleCreate: ResourceRoleCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createResourceRole( + resourceId, projId, envId, - resourceId, resourceRoleCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.createResourceRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the role and all its related data. This includes any permissions granted to said role. * @summary Delete Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResourceRole( - projId: string, - envId: string, resourceId: string, roleId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResourceRole( - projId, - envId, resourceId, roleId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.deleteResourceRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single role defined on the resource, if such role exists. * @summary Get Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResourceRole( - projId: string, - envId: string, resourceId: string, roleId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceRole( - projId, - envId, resourceId, roleId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.getResourceRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Lists all the roles defined on the resource. - * @summary List Resource Roles + * + * @summary Get Resource Role Ancestors + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - async listResourceRoles( + async getResourceRoleAncestors( + resourceId: string, + roleId: string, projId: string, envId: string, - resourceId: string, - page?: number, - perPage?: number, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceRoles( + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceRoleAncestors( + resourceId, + roleId, projId, envId, - resourceId, - page, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.getResourceRoleAncestors']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Resource Role Descendants + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getResourceRoleDescendants( + resourceId: string, + roleId: string, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceRoleDescendants( + resourceId, + roleId, + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.getResourceRoleDescendants']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists all the roles defined on the resource. + * @summary List Resource Roles + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listResourceRoles( + resourceId: string, + projId: string, + envId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listResourceRoles( + resourceId, + projId, + envId, + page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.listResourceRoles']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions from Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async removePermissionsFromResourceRole( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, removeRolePermissions: RemoveRolePermissions, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.removePermissionsFromResourceRole( - projId, - envId, resourceId, roleId, + projId, + envId, removeRolePermissions, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.removePermissionsFromResourceRole']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the role defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceRoleUpdate} resourceRoleUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateResourceRole( - projId: string, - envId: string, resourceId: string, roleId: string, + projId: string, + envId: string, resourceRoleUpdate: ResourceRoleUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateResourceRole( - projId, - envId, resourceId, roleId, + projId, + envId, resourceRoleUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourceRolesApi.updateResourceRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourceRolesApi - factory interface - * @export */ export const ResourceRolesApiFactory = function ( configuration?: Configuration, @@ -733,29 +996,21 @@ export const ResourceRolesApiFactory = function ( /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions to Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {AddRolePermissions} addRolePermissions + * @param {ResourceRolesApiAssignPermissionsToResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignPermissionsToResourceRole( - projId: string, - envId: string, - resourceId: string, - roleId: string, - addRolePermissions: AddRolePermissions, - options?: any, + requestParameters: ResourceRolesApiAssignPermissionsToResourceRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .assignPermissionsToResourceRole( - projId, - envId, - resourceId, - roleId, - addRolePermissions, + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.addRolePermissions, options, ) .then((request) => request(axios, basePath)); @@ -763,115 +1018,148 @@ export const ResourceRolesApiFactory = function ( /** * Creates a new role associated with the resource. * @summary Create Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {ResourceRoleCreate} resourceRoleCreate + * @param {ResourceRolesApiCreateResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResourceRole( - projId: string, - envId: string, - resourceId: string, - resourceRoleCreate: ResourceRoleCreate, - options?: any, + requestParameters: ResourceRolesApiCreateResourceRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResourceRole(projId, envId, resourceId, resourceRoleCreate, options) + .createResourceRole( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceRoleCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the role and all its related data. This includes any permissions granted to said role. * @summary Delete Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {ResourceRolesApiDeleteResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResourceRole( - projId: string, - envId: string, - resourceId: string, - roleId: string, - options?: any, + requestParameters: ResourceRolesApiDeleteResourceRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResourceRole(projId, envId, resourceId, roleId, options) + .deleteResourceRole( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single role defined on the resource, if such role exists. * @summary Get Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {ResourceRolesApiGetResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResourceRole( - projId: string, - envId: string, - resourceId: string, - roleId: string, - options?: any, + requestParameters: ResourceRolesApiGetResourceRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResourceRole(projId, envId, resourceId, roleId, options) + .getResourceRole( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Resource Role Ancestors + * @param {ResourceRolesApiGetResourceRoleAncestorsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getResourceRoleAncestors( + requestParameters: ResourceRolesApiGetResourceRoleAncestorsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResourceRoleAncestors( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Resource Role Descendants + * @param {ResourceRolesApiGetResourceRoleDescendantsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getResourceRoleDescendants( + requestParameters: ResourceRolesApiGetResourceRoleDescendantsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResourceRoleDescendants( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the roles defined on the resource. * @summary List Resource Roles - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {ResourceRolesApiListResourceRolesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResourceRoles( - projId: string, - envId: string, - resourceId: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: ResourceRolesApiListResourceRolesRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listResourceRoles(projId, envId, resourceId, page, perPage, options) + .listResourceRoles( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions from Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {RemoveRolePermissions} removeRolePermissions + * @param {ResourceRolesApiRemovePermissionsFromResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ removePermissionsFromResourceRole( - projId: string, - envId: string, - resourceId: string, - roleId: string, - removeRolePermissions: RemoveRolePermissions, - options?: any, + requestParameters: ResourceRolesApiRemovePermissionsFromResourceRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .removePermissionsFromResourceRole( - projId, - envId, - resourceId, - roleId, - removeRolePermissions, + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.removeRolePermissions, options, ) .then((request) => request(axios, basePath)); @@ -879,24 +1167,23 @@ export const ResourceRolesApiFactory = function ( /** * Partially updates the role defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {ResourceRoleUpdate} resourceRoleUpdate + * @param {ResourceRolesApiUpdateResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResourceRole( - projId: string, - envId: string, - resourceId: string, - roleId: string, - resourceRoleUpdate: ResourceRoleUpdate, - options?: any, + requestParameters: ResourceRolesApiUpdateResourceRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateResourceRole(projId, envId, resourceId, roleId, resourceRoleUpdate, options) + .updateResourceRole( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceRoleUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -904,282 +1191,239 @@ export const ResourceRolesApiFactory = function ( /** * Request parameters for assignPermissionsToResourceRole operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiAssignPermissionsToResourceRoleRequest */ export interface ResourceRolesApiAssignPermissionsToResourceRoleRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + + /** + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + */ + readonly roleId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiAssignPermissionsToResourceRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiAssignPermissionsToResourceRole */ readonly envId: string; + readonly addRolePermissions: AddRolePermissions; +} + +/** + * Request parameters for createResourceRole operation in ResourceRolesApi. + */ +export interface ResourceRolesApiCreateResourceRoleRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiAssignPermissionsToResourceRole */ readonly resourceId: string; /** - * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiAssignPermissionsToResourceRole + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly roleId: string; + readonly projId: string; /** - * - * @type {AddRolePermissions} - * @memberof ResourceRolesApiAssignPermissionsToResourceRole + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly addRolePermissions: AddRolePermissions; + readonly envId: string; + + readonly resourceRoleCreate: ResourceRoleCreate; } /** - * Request parameters for createResourceRole operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiCreateResourceRoleRequest + * Request parameters for deleteResourceRole operation in ResourceRolesApi. */ -export interface ResourceRolesApiCreateResourceRoleRequest { +export interface ResourceRolesApiDeleteResourceRoleRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + + /** + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + */ + readonly roleId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiCreateResourceRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiCreateResourceRole */ readonly envId: string; +} +/** + * Request parameters for getResourceRole operation in ResourceRolesApi. + */ +export interface ResourceRolesApiGetResourceRoleRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiCreateResourceRole */ readonly resourceId: string; /** - * - * @type {ResourceRoleCreate} - * @memberof ResourceRolesApiCreateResourceRole + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). */ - readonly resourceRoleCreate: ResourceRoleCreate; -} + readonly roleId: string; -/** - * Request parameters for deleteResourceRole operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiDeleteResourceRoleRequest - */ -export interface ResourceRolesApiDeleteResourceRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiDeleteResourceRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiDeleteResourceRole */ readonly envId: string; +} +/** + * Request parameters for getResourceRoleAncestors operation in ResourceRolesApi. + */ +export interface ResourceRolesApiGetResourceRoleAncestorsRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiDeleteResourceRole */ readonly resourceId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiDeleteResourceRole */ readonly roleId: string; -} -/** - * Request parameters for getResourceRole operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiGetResourceRoleRequest - */ -export interface ResourceRolesApiGetResourceRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiGetResourceRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiGetResourceRole */ readonly envId: string; +} +/** + * Request parameters for getResourceRoleDescendants operation in ResourceRolesApi. + */ +export interface ResourceRolesApiGetResourceRoleDescendantsRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiGetResourceRole */ readonly resourceId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiGetResourceRole */ readonly roleId: string; -} -/** - * Request parameters for listResourceRoles operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiListResourceRolesRequest - */ -export interface ResourceRolesApiListResourceRolesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiListResourceRoles */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiListResourceRoles */ readonly envId: string; +} +/** + * Request parameters for listResourceRoles operation in ResourceRolesApi. + */ +export interface ResourceRolesApiListResourceRolesRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiListResourceRoles */ readonly resourceId: string; + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourceRolesApiListResourceRoles */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourceRolesApiListResourceRoles */ readonly perPage?: number; } /** * Request parameters for removePermissionsFromResourceRole operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiRemovePermissionsFromResourceRoleRequest */ export interface ResourceRolesApiRemovePermissionsFromResourceRoleRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiRemovePermissionsFromResourceRole - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiRemovePermissionsFromResourceRole - */ - readonly envId: string; - /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiRemovePermissionsFromResourceRole */ readonly resourceId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiRemovePermissionsFromResourceRole */ readonly roleId: string; - /** - * - * @type {RemoveRolePermissions} - * @memberof ResourceRolesApiRemovePermissionsFromResourceRole - */ - readonly removeRolePermissions: RemoveRolePermissions; -} - -/** - * Request parameters for updateResourceRole operation in ResourceRolesApi. - * @export - * @interface ResourceRolesApiUpdateResourceRoleRequest - */ -export interface ResourceRolesApiUpdateResourceRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiUpdateResourceRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiUpdateResourceRole */ readonly envId: string; + readonly removeRolePermissions: RemoveRolePermissions; +} + +/** + * Request parameters for updateResourceRole operation in ResourceRolesApi. + */ +export interface ResourceRolesApiUpdateResourceRoleRequest { /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiUpdateResourceRole */ readonly resourceId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof ResourceRolesApiUpdateResourceRole */ readonly roleId: string; /** - * - * @type {ResourceRoleUpdate} - * @memberof ResourceRolesApiUpdateResourceRole + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ + readonly envId: string; + readonly resourceRoleUpdate: ResourceRoleUpdate; } /** * ResourceRolesApi - object-oriented interface - * @export - * @class ResourceRolesApi - * @extends {BaseAPI} */ export class ResourceRolesApi extends BaseAPI { /** @@ -1187,19 +1431,18 @@ export class ResourceRolesApi extends BaseAPI { * @summary Assign Permissions to Role * @param {ResourceRolesApiAssignPermissionsToResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public assignPermissionsToResourceRole( requestParameters: ResourceRolesApiAssignPermissionsToResourceRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .assignPermissionsToResourceRole( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, requestParameters.addRolePermissions, options, ) @@ -1211,18 +1454,17 @@ export class ResourceRolesApi extends BaseAPI { * @summary Create Resource Role * @param {ResourceRolesApiCreateResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public createResourceRole( requestParameters: ResourceRolesApiCreateResourceRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .createResourceRole( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.resourceRoleCreate, options, ) @@ -1234,19 +1476,18 @@ export class ResourceRolesApi extends BaseAPI { * @summary Delete Resource Role * @param {ResourceRolesApiDeleteResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public deleteResourceRole( requestParameters: ResourceRolesApiDeleteResourceRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .deleteResourceRole( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1257,19 +1498,62 @@ export class ResourceRolesApi extends BaseAPI { * @summary Get Resource Role * @param {ResourceRolesApiGetResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public getResourceRole( requestParameters: ResourceRolesApiGetResourceRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .getResourceRole( + requestParameters.resourceId, + requestParameters.roleId, requestParameters.projId, requestParameters.envId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Resource Role Ancestors + * @param {ResourceRolesApiGetResourceRoleAncestorsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getResourceRoleAncestors( + requestParameters: ResourceRolesApiGetResourceRoleAncestorsRequest, + options?: RawAxiosRequestConfig, + ) { + return ResourceRolesApiFp(this.configuration) + .getResourceRoleAncestors( requestParameters.resourceId, requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Resource Role Descendants + * @param {ResourceRolesApiGetResourceRoleDescendantsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getResourceRoleDescendants( + requestParameters: ResourceRolesApiGetResourceRoleDescendantsRequest, + options?: RawAxiosRequestConfig, + ) { + return ResourceRolesApiFp(this.configuration) + .getResourceRoleDescendants( + requestParameters.resourceId, + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1280,18 +1564,17 @@ export class ResourceRolesApi extends BaseAPI { * @summary List Resource Roles * @param {ResourceRolesApiListResourceRolesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public listResourceRoles( requestParameters: ResourceRolesApiListResourceRolesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .listResourceRoles( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.page, requestParameters.perPage, options, @@ -1304,19 +1587,18 @@ export class ResourceRolesApi extends BaseAPI { * @summary Remove Permissions from Role * @param {ResourceRolesApiRemovePermissionsFromResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public removePermissionsFromResourceRole( requestParameters: ResourceRolesApiRemovePermissionsFromResourceRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .removePermissionsFromResourceRole( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, requestParameters.removeRolePermissions, options, ) @@ -1328,19 +1610,18 @@ export class ResourceRolesApi extends BaseAPI { * @summary Update Resource Role * @param {ResourceRolesApiUpdateResourceRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourceRolesApi + * @throws If a required parameter is missing. */ public updateResourceRole( requestParameters: ResourceRolesApiUpdateResourceRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourceRolesApiFp(this.configuration) .updateResourceRole( - requestParameters.projId, - requestParameters.envId, requestParameters.resourceId, requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, requestParameters.resourceRoleUpdate, options, ) diff --git a/src/openapi/api/resources-api.ts b/src/openapi/api/resources-api.ts index 38b2ed24..0158a3e7 100644 --- a/src/openapi/api/resources-api.ts +++ b/src/openapi/api/resources-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,37 +10,28 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError, PaginatedResultResourceRead } from '../types'; -// @ts-ignore -import { ResourceCreate } from '../types'; -// @ts-ignore -import { ResourceRead } from '../types'; -// @ts-ignore -import { ResourceReplace } from '../types'; -// @ts-ignore -import { ResourceUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ResourceCreate, + ResourceRead, + ResourceReplace, + ResourceUpdate, + ResponseListResourcesV2SchemaProjIdEnvIdResourcesGet, +} from '../types'; /** * ResourcesApi - axios parameter creator - * @export */ export const ResourcesApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -53,13 +42,13 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceCreate} resourceCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResource: async ( projId: string, envId: string, resourceCreate: ResourceCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createResource', 'projId', projId); @@ -68,8 +57,8 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura // verify required parameter 'resourceCreate' is not null or undefined assertParamExists('createResource', 'resourceCreate', resourceCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -86,6 +75,7 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -108,28 +98,28 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura /** * Deletes the resource and all its related data. * @summary Delete Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResource: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('deleteResource', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteResource', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteResource', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('deleteResource', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -145,6 +135,8 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -161,28 +153,28 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura /** * Gets a single resource, if such resource exists. * @summary Get Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResource: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('getResource', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('getResource', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getResource', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('getResource', 'resourceId', resourceId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -198,6 +190,8 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -217,28 +211,30 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {boolean} [includeBuiltIn] Whether to include or exclude built-in resources, default is False + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). - * @param {includeTotalCount} [includeTotalCount] Include the total count of resources in the response, default is False + * @param {string} [search] Text search for the object name or key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResources: async ( projId: string, envId: string, includeBuiltIn?: boolean, + includeTotalCount?: boolean, page?: number, perPage?: number, - includeTotalCount?: boolean, - options: AxiosRequestConfig = {}, + search?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listResources', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listResources', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -258,6 +254,10 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['include_built_in'] = includeBuiltIn; } + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -266,10 +266,12 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['per_page'] = perPage; } - if (includeTotalCount !== undefined) { - localVarQueryParameter['include_total_count'] = includeTotalCount; + if (search !== undefined) { + localVarQueryParameter['search'] = search; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -284,34 +286,34 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Completely replaces the resource definition. - If the resource key is changed, all role and permissions assignments for the the resource will be revoked. - If the resource key is unchanged, but some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. TODO: we need to decide if we are auto-revoking, or if we are rejecting the PUT completely while there are permissions that can be affected. + * Replaces the resource definition, or creates it if it doesn\'t exist. - If some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. * @summary Replace Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceReplace} resourceReplace * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ replaceResource: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceReplace: ResourceReplace, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('replaceResource', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('replaceResource', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('replaceResource', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('replaceResource', 'resourceId', resourceId); // verify required parameter 'resourceReplace' is not null or undefined assertParamExists('replaceResource', 'resourceReplace', resourceReplace); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -328,6 +330,7 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -350,32 +353,32 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura /** * Partially updates the resource definition. Fields that will be provided will be completely overwritten. * @summary Update Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceUpdate} resourceUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResource: async ( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceUpdate: ResourceUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('updateResource', 'resourceId', resourceId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateResource', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateResource', 'envId', envId); - // verify required parameter 'resourceId' is not null or undefined - assertParamExists('updateResource', 'resourceId', resourceId); // verify required parameter 'resourceUpdate' is not null or undefined assertParamExists('updateResource', 'resourceUpdate', resourceUpdate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/resources/{resource_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'resource_id'}}`, encodeURIComponent(String(resourceId))); + .replace('{resource_id}', encodeURIComponent(String(resourceId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -392,6 +395,7 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -416,7 +420,6 @@ export const ResourcesApiAxiosParamCreator = function (configuration?: Configura /** * ResourcesApi - functional programming interface - * @export */ export const ResourcesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ResourcesApiAxiosParamCreator(configuration); @@ -428,13 +431,13 @@ export const ResourcesApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceCreate} resourceCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createResource( projId: string, envId: string, resourceCreate: ResourceCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createResource( projId, @@ -442,53 +445,80 @@ export const ResourcesApiFp = function (configuration?: Configuration) { resourceCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourcesApi.createResource']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the resource and all its related data. * @summary Delete Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteResource( + resourceId: string, projId: string, envId: string, - resourceId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteResource( + resourceId, projId, envId, - resourceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourcesApi.deleteResource']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single resource, if such resource exists. * @summary Get Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getResource( + resourceId: string, projId: string, envId: string, - resourceId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResource( + resourceId, projId, envId, - resourceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourcesApi.getResource']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the resources defined in your schema. @@ -496,95 +526,124 @@ export const ResourcesApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {boolean} [includeBuiltIn] Whether to include or exclude built-in resources, default is False + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). - * @param {includeTotalCount} [includeTotalCount] Include the total count of resources in the response, default is False + * @param {string} [search] Text search for the object name or key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listResources( projId: string, envId: string, includeBuiltIn?: boolean, + includeTotalCount?: boolean, page?: number, perPage?: number, - includeTotalCount?: boolean, - options?: AxiosRequestConfig, + search?: string, + options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise | PaginatedResultResourceRead> + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listResources( projId, envId, includeBuiltIn, + includeTotalCount, page, perPage, - includeTotalCount, + search, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourcesApi.listResources']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Completely replaces the resource definition. - If the resource key is changed, all role and permissions assignments for the the resource will be revoked. - If the resource key is unchanged, but some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. TODO: we need to decide if we are auto-revoking, or if we are rejecting the PUT completely while there are permissions that can be affected. + * Replaces the resource definition, or creates it if it doesn\'t exist. - If some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. * @summary Replace Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceReplace} resourceReplace * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async replaceResource( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceReplace: ResourceReplace, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.replaceResource( + resourceId, projId, envId, - resourceId, resourceReplace, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourcesApi.replaceResource']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the resource definition. Fields that will be provided will be completely overwritten. * @summary Update Resource + * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceUpdate} resourceUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateResource( + resourceId: string, projId: string, envId: string, - resourceId: string, resourceUpdate: ResourceUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateResource( + resourceId, projId, envId, - resourceId, resourceUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ResourcesApi.updateResource']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ResourcesApi - factory interface - * @export */ export const ResourcesApiFactory = function ( configuration?: Configuration, @@ -596,125 +655,127 @@ export const ResourcesApiFactory = function ( /** * Creates a new resource (a type of object you may protect with permissions). * @summary Create Resource - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ResourceCreate} resourceCreate + * @param {ResourcesApiCreateResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createResource( - projId: string, - envId: string, - resourceCreate: ResourceCreate, - options?: any, + requestParameters: ResourcesApiCreateResourceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createResource(projId, envId, resourceCreate, options) + .createResource( + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the resource and all its related data. * @summary Delete Resource - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {ResourcesApiDeleteResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteResource( - projId: string, - envId: string, - resourceId: string, - options?: any, + requestParameters: ResourcesApiDeleteResourceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteResource(projId, envId, resourceId, options) + .deleteResource( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single resource, if such resource exists. * @summary Get Resource - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + * @param {ResourcesApiGetResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getResource( - projId: string, - envId: string, - resourceId: string, - options?: any, + requestParameters: ResourcesApiGetResourceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getResource(projId, envId, resourceId, options) + .getResource( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the resources defined in your schema. * @summary List Resources - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {boolean} [includeBuiltIn] Whether to include or exclude built-in resources, default is False - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {includeTotalCount} [includeTotalCount] Include the total count of resources in the response, default is False + * @param {ResourcesApiListResourcesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listResources( - projId: string, - envId: string, - includeBuiltIn?: boolean, - page?: number, - perPage?: number, - includeTotalCount?: boolean, - options?: any, - ): AxiosPromise | PaginatedResultResourceRead> { + requestParameters: ResourcesApiListResourcesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listResources(projId, envId, includeBuiltIn, page, perPage, includeTotalCount, options) + .listResources( + requestParameters.projId, + requestParameters.envId, + requestParameters.includeBuiltIn, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Completely replaces the resource definition. - If the resource key is changed, all role and permissions assignments for the the resource will be revoked. - If the resource key is unchanged, but some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. TODO: we need to decide if we are auto-revoking, or if we are rejecting the PUT completely while there are permissions that can be affected. + * Replaces the resource definition, or creates it if it doesn\'t exist. - If some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. * @summary Replace Resource - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {ResourceReplace} resourceReplace + * @param {ResourcesApiReplaceResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ replaceResource( - projId: string, - envId: string, - resourceId: string, - resourceReplace: ResourceReplace, - options?: any, + requestParameters: ResourcesApiReplaceResourceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .replaceResource(projId, envId, resourceId, resourceReplace, options) + .replaceResource( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceReplace, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the resource definition. Fields that will be provided will be completely overwritten. * @summary Update Resource - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @param {ResourceUpdate} resourceUpdate + * @param {ResourcesApiUpdateResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateResource( - projId: string, - envId: string, - resourceId: string, - resourceUpdate: ResourceUpdate, - options?: any, + requestParameters: ResourcesApiUpdateResourceRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateResource(projId, envId, resourceId, resourceUpdate, options) + .updateResource( + requestParameters.resourceId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -722,213 +783,147 @@ export const ResourcesApiFactory = function ( /** * Request parameters for createResource operation in ResourcesApi. - * @export - * @interface ResourcesApiCreateResourceRequest */ export interface ResourcesApiCreateResourceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiCreateResource */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiCreateResource */ readonly envId: string; - /** - * - * @type {ResourceCreate} - * @memberof ResourcesApiCreateResource - */ readonly resourceCreate: ResourceCreate; } /** * Request parameters for deleteResource operation in ResourcesApi. - * @export - * @interface ResourcesApiDeleteResourceRequest */ export interface ResourcesApiDeleteResourceRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiDeleteResource */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiDeleteResource */ readonly envId: string; - - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiDeleteResource - */ - readonly resourceId: string; } /** * Request parameters for getResource operation in ResourcesApi. - * @export - * @interface ResourcesApiGetResourceRequest */ export interface ResourcesApiGetResourceRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiGetResource */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiGetResource */ readonly envId: string; - - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiGetResource - */ - readonly resourceId: string; } /** * Request parameters for listResources operation in ResourcesApi. - * @export - * @interface ResourcesApiListResourcesRequest */ export interface ResourcesApiListResourcesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiListResources */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiListResources */ readonly envId: string; /** * Whether to include or exclude built-in resources, default is False - * @type {boolean} - * @memberof ResourcesApiListResources */ readonly includeBuiltIn?: boolean; + /** + * Include total count in response + */ + readonly includeTotalCount?: boolean; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof ResourcesApiListResources */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof ResourcesApiListResources */ readonly perPage?: number; /** - * Include total count in response - * @type {boolean} - * @memberof RolesApiListRoles - * @default false + * Text search for the object name or key */ - readonly includeTotalCount?: boolean; + readonly search?: string; } /** * Request parameters for replaceResource operation in ResourcesApi. - * @export - * @interface ResourcesApiReplaceResourceRequest */ export interface ResourcesApiReplaceResourceRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiReplaceResource */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiReplaceResource */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiReplaceResource - */ - readonly resourceId: string; - - /** - * - * @type {ResourceReplace} - * @memberof ResourcesApiReplaceResource - */ readonly resourceReplace: ResourceReplace; } /** * Request parameters for updateResource operation in ResourcesApi. - * @export - * @interface ResourcesApiUpdateResourceRequest */ export interface ResourcesApiUpdateResourceRequest { + /** + * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). + */ + readonly resourceId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiUpdateResource */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiUpdateResource */ readonly envId: string; - /** - * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). - * @type {string} - * @memberof ResourcesApiUpdateResource - */ - readonly resourceId: string; - - /** - * - * @type {ResourceUpdate} - * @memberof ResourcesApiUpdateResource - */ readonly resourceUpdate: ResourceUpdate; } /** * ResourcesApi - object-oriented interface - * @export - * @class ResourcesApi - * @extends {BaseAPI} */ export class ResourcesApi extends BaseAPI { /** @@ -936,12 +931,11 @@ export class ResourcesApi extends BaseAPI { * @summary Create Resource * @param {ResourcesApiCreateResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourcesApi + * @throws If a required parameter is missing. */ public createResource( requestParameters: ResourcesApiCreateResourceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourcesApiFp(this.configuration) .createResource( @@ -958,18 +952,17 @@ export class ResourcesApi extends BaseAPI { * @summary Delete Resource * @param {ResourcesApiDeleteResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourcesApi + * @throws If a required parameter is missing. */ public deleteResource( requestParameters: ResourcesApiDeleteResourceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourcesApiFp(this.configuration) .deleteResource( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -980,18 +973,17 @@ export class ResourcesApi extends BaseAPI { * @summary Get Resource * @param {ResourcesApiGetResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourcesApi + * @throws If a required parameter is missing. */ public getResource( requestParameters: ResourcesApiGetResourceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourcesApiFp(this.configuration) .getResource( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1002,43 +994,42 @@ export class ResourcesApi extends BaseAPI { * @summary List Resources * @param {ResourcesApiListResourcesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourcesApi + * @throws If a required parameter is missing. */ public listResources( requestParameters: ResourcesApiListResourcesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourcesApiFp(this.configuration) .listResources( requestParameters.projId, requestParameters.envId, requestParameters.includeBuiltIn, + requestParameters.includeTotalCount, requestParameters.page, requestParameters.perPage, - requestParameters.includeTotalCount, + requestParameters.search, options, ) .then((request) => request(this.axios, this.basePath)); } /** - * Completely replaces the resource definition. - If the resource key is changed, all role and permissions assignments for the the resource will be revoked. - If the resource key is unchanged, but some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. TODO: we need to decide if we are auto-revoking, or if we are rejecting the PUT completely while there are permissions that can be affected. + * Replaces the resource definition, or creates it if it doesn\'t exist. - If some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. * @summary Replace Resource * @param {ResourcesApiReplaceResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourcesApi + * @throws If a required parameter is missing. */ public replaceResource( requestParameters: ResourcesApiReplaceResourceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourcesApiFp(this.configuration) .replaceResource( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.resourceReplace, options, ) @@ -1050,18 +1041,17 @@ export class ResourcesApi extends BaseAPI { * @summary Update Resource * @param {ResourcesApiUpdateResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResourcesApi + * @throws If a required parameter is missing. */ public updateResource( requestParameters: ResourcesApiUpdateResourceRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return ResourcesApiFp(this.configuration) .updateResource( + requestParameters.resourceId, requestParameters.projId, requestParameters.envId, - requestParameters.resourceId, requestParameters.resourceUpdate, options, ) diff --git a/src/openapi/api/role-assignments-api.ts b/src/openapi/api/role-assignments-api.ts index 59c91236..32a7de2f 100644 --- a/src/openapi/api/role-assignments-api.ts +++ b/src/openapi/api/role-assignments-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,45 +10,31 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { BulkRoleAssignmentReport } from '../types'; -// @ts-ignore -import { BulkRoleUnAssignmentReport } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { RoleAssignmentCreate } from '../types'; -// @ts-ignore -import { RoleAssignmentRead } from '../types'; -// @ts-ignore -import { RoleAssignmentDetailedRead } from '../types'; -// @ts-ignore -import { RoleAssignmentRemove } from '../types'; -// @ts-ignore -import { PaginatedResultRoleAssignmentRead } from '../types'; -// @ts-ignore -import { PaginatedResultRoleAssignmentDetailedRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { + BulkRoleAssignmentReport, + BulkRoleUnAssignmentReport, + MissingUserPolicy, + PaginatedResultRoleAssignmentDetailedRead, + ResponseListRoleAssignmentsV2FactsProjIdEnvIdRoleAssignmentsGet, + RoleAssignmentCreate, + RoleAssignmentRead, + RoleAssignmentRemove, +} from '../types'; /** * RoleAssignmentsApi - axios parameter creator - * @export */ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -61,13 +45,13 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RoleAssignmentCreate} roleAssignmentCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignRole: async ( projId: string, envId: string, roleAssignmentCreate: RoleAssignmentCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('assignRole', 'projId', projId); @@ -76,8 +60,8 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'roleAssignmentCreate' is not null or undefined assertParamExists('assignRole', 'roleAssignmentCreate', roleAssignmentCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -94,6 +78,7 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -115,18 +100,20 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con }, /** * - * @summary Bulk Assign Role + * @summary Bulk create role assignments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {Array} roleAssignmentCreate + * @param {MissingUserPolicy} [missingUserPolicy] Policy for missing users - \'fail\': Fail the entire operation if a user is missing; \'ignore\': Skip assignments for missing users; \'create\': Create missing users and continue with the operation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkAssignRole: async ( projId: string, envId: string, roleAssignmentCreate: Array, - options: AxiosRequestConfig = {}, + missingUserPolicy?: MissingUserPolicy, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkAssignRole', 'projId', projId); @@ -135,8 +122,8 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'roleAssignmentCreate' is not null or undefined assertParamExists('bulkAssignRole', 'roleAssignmentCreate', roleAssignmentCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments/bulk` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -152,7 +139,12 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (missingUserPolicy !== undefined) { + localVarQueryParameter['missing_user_policy'] = missingUserPolicy; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -179,13 +171,13 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {Array} roleAssignmentRemove * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkUnassignRole: async ( projId: string, envId: string, roleAssignmentRemove: Array, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('bulkUnassignRole', 'projId', projId); @@ -194,8 +186,8 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'roleAssignmentRemove' is not null or undefined assertParamExists('bulkUnassignRole', 'roleAssignmentRemove', roleAssignmentRemove); const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments/bulk` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -212,6 +204,7 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -236,39 +229,39 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con * @summary List Role Assignments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [user] optional user(s) filter, will only return role assignments granted to this user(s). - * @param {string} [role] optional role(s) filter, will only return role assignments granting this role(s). - * @param {string} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). + * @param {Array} [user] optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [role] optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`. * @param {string} [resource] optional resource **type** filter, will only return role assignments granted on that resource type. * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. * @param {boolean} [detailed] Whether to return full details about the user, tenant and role * @param {boolean} [includeTotalCount] If true, returns the list of role assignments and the total count. * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {number} [perPage] The number of results per page (max 1000). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listRoleAssignments: async ( projId: string, envId: string, - user?: string, - role?: string, - tenant?: string, + user?: Array, + role?: Array, + tenant?: Array, resource?: string, resourceInstance?: string, detailed?: boolean, includeTotalCount?: boolean, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listRoleAssignments', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listRoleAssignments', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -284,15 +277,15 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - if (user !== undefined) { + if (user) { localVarQueryParameter['user'] = user; } - if (role !== undefined) { + if (role) { localVarQueryParameter['role'] = role; } - if (tenant !== undefined) { + if (tenant) { localVarQueryParameter['tenant'] = tenant; } @@ -320,6 +313,100 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user (supports multiple). - If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple). - If the `role` filter is present, will only return role assignments that are granting that role (supports multiple). - If the `resource` filter is present, will only return role assignments for resource instances of that resource type. - If the `resource_instance` filter is present, will only return role assignments for that resource instance. Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant. If multiple tenants are received, the last tenant will be compared with the resource instance. + * @summary List Role Assignments Detailed + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {Array} [user] optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [role] optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`. + * @param {string} [resource] optional resource **type** filter, will only return role assignments granted on that resource type. + * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 1000). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listRoleAssignmentsDetailed: async ( + projId: string, + envId: string, + user?: Array, + role?: Array, + tenant?: Array, + resource?: string, + resourceInstance?: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listRoleAssignmentsDetailed', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listRoleAssignmentsDetailed', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments/detailed` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (user) { + localVarQueryParameter['user'] = user; + } + + if (role) { + localVarQueryParameter['role'] = role; + } + + if (tenant) { + localVarQueryParameter['tenant'] = tenant; + } + + if (resource !== undefined) { + localVarQueryParameter['resource'] = resource; + } + + if (resourceInstance !== undefined) { + localVarQueryParameter['resource_instance'] = resourceInstance; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -339,14 +426,16 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RoleAssignmentRemove} roleAssignmentRemove + * @param {boolean} [returnDeleted] Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ unassignRole: async ( projId: string, envId: string, roleAssignmentRemove: RoleAssignmentRemove, - options: AxiosRequestConfig = {}, + returnDeleted?: boolean, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('unassignRole', 'projId', projId); @@ -355,8 +444,8 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // verify required parameter 'roleAssignmentRemove' is not null or undefined assertParamExists('unassignRole', 'roleAssignmentRemove', roleAssignmentRemove); const localVarPath = `/v2/facts/{proj_id}/{env_id}/role_assignments` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -372,7 +461,12 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (returnDeleted !== undefined) { + localVarQueryParameter['return_deleted'] = returnDeleted; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -397,7 +491,6 @@ export const RoleAssignmentsApiAxiosParamCreator = function (configuration?: Con /** * RoleAssignmentsApi - functional programming interface - * @export */ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = RoleAssignmentsApiAxiosParamCreator(configuration); @@ -409,13 +502,13 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RoleAssignmentCreate} roleAssignmentCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async assignRole( projId: string, envId: string, roleAssignmentCreate: RoleAssignmentCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.assignRole( projId, @@ -423,22 +516,33 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { roleAssignmentCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RoleAssignmentsApi.assignRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary Bulk Assign Role + * @summary Bulk create role assignments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {Array} roleAssignmentCreate + * @param {MissingUserPolicy} [missingUserPolicy] Policy for missing users - \'fail\': Fail the entire operation if a user is missing; \'ignore\': Skip assignments for missing users; \'create\': Create missing users and continue with the operation * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkAssignRole( projId: string, envId: string, roleAssignmentCreate: Array, - options?: AxiosRequestConfig, + missingUserPolicy?: MissingUserPolicy, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -446,9 +550,20 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { projId, envId, roleAssignmentCreate, + missingUserPolicy, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RoleAssignmentsApi.bulkAssignRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * @@ -457,13 +572,13 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {Array} roleAssignmentRemove * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async bulkUnassignRole( projId: string, envId: string, roleAssignmentRemove: Array, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -473,48 +588,53 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { roleAssignmentRemove, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RoleAssignmentsApi.bulkUnassignRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user (supports multiple). - If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple). - If the `role` filter is present, will only return role assignments that are granting that role (supports multiple). - If the `resource` filter is present, will only return role assignments for resource instances of that resource type. - If the `resource_instance` filter is present, will only return role assignments for that resource instance. Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant. If multiple tenants are received, the last tenant will be compared with the resource instance. * @summary List Role Assignments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [user] optional user(s) filter, will only return role assignments granted to this user(s). - * @param {string} [role] optional role(s) filter, will only return role assignments granting this role(s). - * @param {string} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). + * @param {Array} [user] optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [role] optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`. * @param {string} [resource] optional resource **type** filter, will only return role assignments granted on that resource type. * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. * @param {boolean} [detailed] Whether to return full details about the user, tenant and role * @param {boolean} [includeTotalCount] If true, returns the list of role assignments and the total count. * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {number} [perPage] The number of results per page (max 1000). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listRoleAssignments( projId: string, envId: string, - user?: string, - role?: string, - tenant?: string, + user?: Array, + role?: Array, + tenant?: Array, resource?: string, resourceInstance?: string, detailed?: boolean, includeTotalCount?: boolean, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise< - | Array - | Array - | PaginatedResultRoleAssignmentRead - | PaginatedResultRoleAssignmentDetailedRead - > + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listRoleAssignments( projId, @@ -530,7 +650,74 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RoleAssignmentsApi.listRoleAssignments']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user (supports multiple). - If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple). - If the `role` filter is present, will only return role assignments that are granting that role (supports multiple). - If the `resource` filter is present, will only return role assignments for resource instances of that resource type. - If the `resource_instance` filter is present, will only return role assignments for that resource instance. Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant. If multiple tenants are received, the last tenant will be compared with the resource instance. + * @summary List Role Assignments Detailed + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {Array} [user] optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [role] optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each. + * @param {Array} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`. + * @param {string} [resource] optional resource **type** filter, will only return role assignments granted on that resource type. + * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 1000). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listRoleAssignmentsDetailed( + projId: string, + envId: string, + user?: Array, + role?: Array, + tenant?: Array, + resource?: string, + resourceInstance?: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRoleAssignmentsDetailed( + projId, + envId, + user, + role, + tenant, + resource, + resourceInstance, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RoleAssignmentsApi.listRoleAssignmentsDetailed']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. @@ -538,29 +725,40 @@ export const RoleAssignmentsApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RoleAssignmentRemove} roleAssignmentRemove + * @param {boolean} [returnDeleted] Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async unassignRole( projId: string, envId: string, roleAssignmentRemove: RoleAssignmentRemove, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + returnDeleted?: boolean, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.unassignRole( projId, envId, roleAssignmentRemove, + returnDeleted, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RoleAssignmentsApi.unassignRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * RoleAssignmentsApi - factory interface - * @export */ export const RoleAssignmentsApiFactory = function ( configuration?: Configuration, @@ -572,109 +770,114 @@ export const RoleAssignmentsApiFactory = function ( /** * Assigns a role to a user within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RoleAssignmentCreate} roleAssignmentCreate + * @param {RoleAssignmentsApiAssignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignRole( - projId: string, - envId: string, - roleAssignmentCreate: RoleAssignmentCreate, - options?: any, + requestParameters: RoleAssignmentsApiAssignRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .assignRole(projId, envId, roleAssignmentCreate, options) + .assignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * - * @summary Bulk Assign Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {Array} roleAssignmentCreate + * @summary Bulk create role assignments + * @param {RoleAssignmentsApiBulkAssignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkAssignRole( - projId: string, - envId: string, - roleAssignmentCreate: Array, - options?: any, + requestParameters: RoleAssignmentsApiBulkAssignRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .bulkAssignRole(projId, envId, roleAssignmentCreate, options) + .bulkAssignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentCreate, + requestParameters.missingUserPolicy, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk Unassign Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {Array} roleAssignmentRemove + * @param {RoleAssignmentsApiBulkUnassignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ bulkUnassignRole( - projId: string, - envId: string, - roleAssignmentRemove: Array, - options?: any, + requestParameters: RoleAssignmentsApiBulkUnassignRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .bulkUnassignRole(projId, envId, roleAssignmentRemove, options) + .bulkUnassignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentRemove, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user (supports multiple). - If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple). - If the `role` filter is present, will only return role assignments that are granting that role (supports multiple). - If the `resource` filter is present, will only return role assignments for resource instances of that resource type. - If the `resource_instance` filter is present, will only return role assignments for that resource instance. Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant. If multiple tenants are received, the last tenant will be compared with the resource instance. * @summary List Role Assignments - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [user] optional user(s) filter, will only return role assignments granted to this user(s). - * @param {string} [role] optional role(s) filter, will only return role assignments granting this role(s). - * @param {string} [tenant] optional tenant(s) filter, will only return role assignments granted in that tenant(s). - * @param {string} [resource] optional resource **type** filter, will only return role assignments granted on that resource type. - * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. - * @param {boolean} [detailed] Whether to return full details about the user, tenant and role - * @param {boolean} [includeTotalCount] If true, returns the list of role assignments and the total count. - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {RoleAssignmentsApiListRoleAssignmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listRoleAssignments( - projId: string, - envId: string, - user?: string, - role?: string, - tenant?: string, - resource?: string, - resourceInstance?: string, - detailed?: boolean, - includeTotalCount?: boolean, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise< - | Array - | Array - | PaginatedResultRoleAssignmentRead - | PaginatedResultRoleAssignmentDetailedRead - > { + requestParameters: RoleAssignmentsApiListRoleAssignmentsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp .listRoleAssignments( - projId, - envId, - user, - role, - tenant, - resource, - resourceInstance, - detailed, - includeTotalCount, - page, - perPage, + requestParameters.projId, + requestParameters.envId, + requestParameters.user, + requestParameters.role, + requestParameters.tenant, + requestParameters.resource, + requestParameters.resourceInstance, + requestParameters.detailed, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user (supports multiple). - If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple). - If the `role` filter is present, will only return role assignments that are granting that role (supports multiple). - If the `resource` filter is present, will only return role assignments for resource instances of that resource type. - If the `resource_instance` filter is present, will only return role assignments for that resource instance. Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant. If multiple tenants are received, the last tenant will be compared with the resource instance. + * @summary List Role Assignments Detailed + * @param {RoleAssignmentsApiListRoleAssignmentsDetailedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listRoleAssignmentsDetailed( + requestParameters: RoleAssignmentsApiListRoleAssignmentsDetailedRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listRoleAssignmentsDetailed( + requestParameters.projId, + requestParameters.envId, + requestParameters.user, + requestParameters.role, + requestParameters.tenant, + requestParameters.resource, + requestParameters.resourceInstance, + requestParameters.page, + requestParameters.perPage, options, ) .then((request) => request(axios, basePath)); @@ -682,20 +885,22 @@ export const RoleAssignmentsApiFactory = function ( /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RoleAssignmentRemove} roleAssignmentRemove + * @param {RoleAssignmentsApiUnassignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ unassignRole( - projId: string, - envId: string, - roleAssignmentRemove: RoleAssignmentRemove, - options?: any, - ): AxiosPromise { + requestParameters: RoleAssignmentsApiUnassignRoleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .unassignRole(projId, envId, roleAssignmentRemove, options) + .unassignRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleAssignmentRemove, + requestParameters.returnDeleted, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -703,205 +908,194 @@ export const RoleAssignmentsApiFactory = function ( /** * Request parameters for assignRole operation in RoleAssignmentsApi. - * @export - * @interface RoleAssignmentsApiAssignRoleRequest */ export interface RoleAssignmentsApiAssignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiAssignRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiAssignRole */ readonly envId: string; - /** - * - * @type {RoleAssignmentCreate} - * @memberof RoleAssignmentsApiAssignRole - */ readonly roleAssignmentCreate: RoleAssignmentCreate; } /** * Request parameters for bulkAssignRole operation in RoleAssignmentsApi. - * @export - * @interface RoleAssignmentsApiBulkAssignRoleRequest */ export interface RoleAssignmentsApiBulkAssignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiBulkAssignRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiBulkAssignRole */ readonly envId: string; + readonly roleAssignmentCreate: Array; + /** - * - * @type {Array} - * @memberof RoleAssignmentsApiBulkAssignRole + * Policy for missing users - \'fail\': Fail the entire operation if a user is missing; \'ignore\': Skip assignments for missing users; \'create\': Create missing users and continue with the operation */ - readonly roleAssignmentCreate: Array; + readonly missingUserPolicy?: MissingUserPolicy; } /** * Request parameters for bulkUnassignRole operation in RoleAssignmentsApi. - * @export - * @interface RoleAssignmentsApiBulkUnassignRoleRequest */ export interface RoleAssignmentsApiBulkUnassignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiBulkUnassignRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiBulkUnassignRole */ readonly envId: string; - /** - * - * @type {Array} - * @memberof RoleAssignmentsApiBulkUnassignRole - */ readonly roleAssignmentRemove: Array; } /** * Request parameters for listRoleAssignments operation in RoleAssignmentsApi. - * @export - * @interface RoleAssignmentsApiListRoleAssignmentsRequest */ export interface RoleAssignmentsApiListRoleAssignmentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly envId: string; /** - * optional user(s) filter, will only return role assignments granted to this user(s). - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments + * optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each. */ - readonly user?: string; + readonly user?: Array; /** - * optional role(s) filter, will only return role assignments granting this role(s). - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments + * optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each. */ - readonly role?: string; + readonly role?: Array; /** - * optional tenant(s) filter, will only return role assignments granted in that tenant(s). - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments + * optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`. */ - readonly tenant?: string; + readonly tenant?: Array; /** * optional resource **type** filter, will only return role assignments granted on that resource type. - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly resource?: string; /** * optional resource instance filter, will only return role assignments granted on that resource instance. - * @type {string} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly resourceInstance?: string; /** * Whether to return full details about the user, tenant and role - * @type {boolean} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly detailed?: boolean; /** * If true, returns the list of role assignments and the total count. - * @type {boolean} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly includeTotalCount?: boolean; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof RoleAssignmentsApiListRoleAssignments */ readonly page?: number; /** - * The number of results per page (max 100). - * @type {number} - * @memberof RoleAssignmentsApiListRoleAssignments + * The number of results per page (max 1000). + */ + readonly perPage?: number; +} + +/** + * Request parameters for listRoleAssignmentsDetailed operation in RoleAssignmentsApi. + */ +export interface RoleAssignmentsApiListRoleAssignmentsDetailedRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each. + */ + readonly user?: Array; + + /** + * optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each. + */ + readonly role?: Array; + + /** + * optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with `resource_instance`, only the **last** tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with **404** even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside `resource_instance`. + */ + readonly tenant?: Array; + + /** + * optional resource **type** filter, will only return role assignments granted on that resource type. + */ + readonly resource?: string; + + /** + * optional resource instance filter, will only return role assignments granted on that resource instance. + */ + readonly resourceInstance?: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 1000). */ readonly perPage?: number; } /** * Request parameters for unassignRole operation in RoleAssignmentsApi. - * @export - * @interface RoleAssignmentsApiUnassignRoleRequest */ export interface RoleAssignmentsApiUnassignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiUnassignRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RoleAssignmentsApiUnassignRole */ readonly envId: string; + readonly roleAssignmentRemove: RoleAssignmentRemove; + /** - * - * @type {RoleAssignmentRemove} - * @memberof RoleAssignmentsApiUnassignRole + * Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true */ - readonly roleAssignmentRemove: RoleAssignmentRemove; + readonly returnDeleted?: boolean; } /** * RoleAssignmentsApi - object-oriented interface - * @export - * @class RoleAssignmentsApi - * @extends {BaseAPI} */ export class RoleAssignmentsApi extends BaseAPI { /** @@ -909,12 +1103,11 @@ export class RoleAssignmentsApi extends BaseAPI { * @summary Assign Role * @param {RoleAssignmentsApiAssignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RoleAssignmentsApi + * @throws If a required parameter is missing. */ public assignRole( requestParameters: RoleAssignmentsApiAssignRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RoleAssignmentsApiFp(this.configuration) .assignRole( @@ -928,21 +1121,21 @@ export class RoleAssignmentsApi extends BaseAPI { /** * - * @summary Bulk Assign Role + * @summary Bulk create role assignments * @param {RoleAssignmentsApiBulkAssignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RoleAssignmentsApi + * @throws If a required parameter is missing. */ public bulkAssignRole( requestParameters: RoleAssignmentsApiBulkAssignRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RoleAssignmentsApiFp(this.configuration) .bulkAssignRole( requestParameters.projId, requestParameters.envId, requestParameters.roleAssignmentCreate, + requestParameters.missingUserPolicy, options, ) .then((request) => request(this.axios, this.basePath)); @@ -953,12 +1146,11 @@ export class RoleAssignmentsApi extends BaseAPI { * @summary Bulk Unassign Role * @param {RoleAssignmentsApiBulkUnassignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RoleAssignmentsApi + * @throws If a required parameter is missing. */ public bulkUnassignRole( requestParameters: RoleAssignmentsApiBulkUnassignRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RoleAssignmentsApiFp(this.configuration) .bulkUnassignRole( @@ -975,12 +1167,11 @@ export class RoleAssignmentsApi extends BaseAPI { * @summary List Role Assignments * @param {RoleAssignmentsApiListRoleAssignmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RoleAssignmentsApi + * @throws If a required parameter is missing. */ public listRoleAssignments( requestParameters: RoleAssignmentsApiListRoleAssignmentsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RoleAssignmentsApiFp(this.configuration) .listRoleAssignments( @@ -1000,23 +1191,50 @@ export class RoleAssignmentsApi extends BaseAPI { .then((request) => request(this.axios, this.basePath)); } + /** + * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user (supports multiple). - If the `tenant` filter is present, will only return the role assignments in that tenant (supports multiple). - If the `role` filter is present, will only return role assignments that are granting that role (supports multiple). - If the `resource` filter is present, will only return role assignments for resource instances of that resource type. - If the `resource_instance` filter is present, will only return role assignments for that resource instance. Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant. If multiple tenants are received, the last tenant will be compared with the resource instance. + * @summary List Role Assignments Detailed + * @param {RoleAssignmentsApiListRoleAssignmentsDetailedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listRoleAssignmentsDetailed( + requestParameters: RoleAssignmentsApiListRoleAssignmentsDetailedRequest, + options?: RawAxiosRequestConfig, + ) { + return RoleAssignmentsApiFp(this.configuration) + .listRoleAssignmentsDetailed( + requestParameters.projId, + requestParameters.envId, + requestParameters.user, + requestParameters.role, + requestParameters.tenant, + requestParameters.resource, + requestParameters.resourceInstance, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign Role * @param {RoleAssignmentsApiUnassignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RoleAssignmentsApi + * @throws If a required parameter is missing. */ public unassignRole( requestParameters: RoleAssignmentsApiUnassignRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RoleAssignmentsApiFp(this.configuration) .unassignRole( requestParameters.projId, requestParameters.envId, requestParameters.roleAssignmentRemove, + requestParameters.returnDeleted, options, ) .then((request) => request(this.axios, this.basePath)); diff --git a/src/openapi/api/roles-api.ts b/src/openapi/api/roles-api.ts index ccc97dfa..5cfe2454 100644 --- a/src/openapi/api/roles-api.ts +++ b/src/openapi/api/roles-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,129 +10,62 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { AddRolePermissions, PaginatedResultRoleRead } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { RemoveRolePermissions } from '../types'; -// @ts-ignore -import { RoleCreate } from '../types'; -// @ts-ignore -import { RoleRead } from '../types'; -// @ts-ignore -import { RoleUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + AddRolePermissions, + RemoveRolePermissions, + ResponseListRolesV2SchemaProjIdEnvIdRolesGet, + RoleCreate, + RoleList, + RoleRead, + RoleUpdate, +} from '../types'; /** * RolesApi - axios parameter creator - * @export */ export const RolesApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. - * @summary Add Parent Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addParentRole: async ( - projId: string, - envId: string, - roleId: string, - parentRoleId: string, - options: AxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('addParentRole', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('addParentRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('addParentRole', 'roleId', roleId); - // verify required parameter 'parentRoleId' is not null or undefined - assertParamExists('addParentRole', 'parentRoleId', parentRoleId); - const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))) - .replace(`{${'parent_role_id'}}`, encodeURIComponent(String(parentRoleId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication HTTPBearer required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration); - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignPermissionsToRole: async ( + roleId: string, projId: string, envId: string, - roleId: string, addRolePermissions: AddRolePermissions, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('assignPermissionsToRole', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined assertParamExists('assignPermissionsToRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('assignPermissionsToRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('assignPermissionsToRole', 'roleId', roleId); // verify required parameter 'addRolePermissions' is not null or undefined assertParamExists('assignPermissionsToRole', 'addRolePermissions', addRolePermissions); const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -151,6 +82,7 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -177,13 +109,13 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RoleCreate} roleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createRole: async ( projId: string, envId: string, roleCreate: RoleCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createRole', 'projId', projId); @@ -192,8 +124,8 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration // verify required parameter 'roleCreate' is not null or undefined assertParamExists('createRole', 'roleCreate', roleCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -210,6 +142,7 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -232,28 +165,28 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteRole: async ( + roleId: string, projId: string, envId: string, - roleId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('deleteRole', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('deleteRole', 'roleId', roleId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -269,6 +202,8 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -285,28 +220,28 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration /** * Gets a single tenant role, if such role exists. * @summary Get Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getRole: async ( + roleId: string, projId: string, envId: string, - roleId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('getRole', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined assertParamExists('getRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('getRole', 'roleId', roleId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -322,6 +257,8 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -336,31 +273,30 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Lists all tenant roles. - * @summary List Roles + * + * @summary Get Role Ancestors + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). - * @param {boolean} [includeTotalCount] Include total count in response (default to false) * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listRoles: async ( + getRoleAncestors: async ( + roleId: string, projId: string, envId: string, - page?: number, - perPage?: number, - includeTotalCount?: boolean, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('getRoleAncestors', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined - assertParamExists('listRoles', 'projId', projId); + assertParamExists('getRoleAncestors', 'projId', projId); // verify required parameter 'envId' is not null or undefined - assertParamExists('listRoles', 'envId', envId); - const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + assertParamExists('getRoleAncestors', 'envId', envId); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}/ancestors` + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -368,30 +304,71 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions: Record = { - method: 'GET', - ...baseOptions, - ...options, - }; - const localVarHeaderParameter: Record = {}; - const localVarQueryParameter: Record = {}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; // authentication HTTPBearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + localVarHeaderParameter['Accept'] = 'application/json'; - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage; - } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; - if (includeTotalCount !== undefined) { - localVarQueryParameter['include_total_count'] = includeTotalCount; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Role Descendants + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getRoleDescendants: async ( + roleId: string, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('getRoleDescendants', 'roleId', roleId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getRoleDescendants', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getRoleDescendants', 'envId', envId); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}/descendants` + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -406,35 +383,33 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. - * @summary Remove Parent Role + * Lists all tenant roles. + * @summary List Roles * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). + * @param {boolean} [includeTotalCount] Include total count in response + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [search] Text search for the object name or key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - removeParentRole: async ( + listRoles: async ( projId: string, envId: string, - roleId: string, - parentRoleId: string, - options: AxiosRequestConfig = {}, + includeTotalCount?: boolean, + page?: number, + perPage?: number, + search?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined - assertParamExists('removeParentRole', 'projId', projId); + assertParamExists('listRoles', 'projId', projId); // verify required parameter 'envId' is not null or undefined - assertParamExists('removeParentRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('removeParentRole', 'roleId', roleId); - // verify required parameter 'parentRoleId' is not null or undefined - assertParamExists('removeParentRole', 'parentRoleId', parentRoleId); - const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}/parents/{parent_role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))) - .replace(`{${'parent_role_id'}}`, encodeURIComponent(String(parentRoleId))); + assertParamExists('listRoles', 'envId', envId); + const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -442,7 +417,7 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -450,6 +425,24 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -466,26 +459,26 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions From Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ removePermissionsFromRole: async ( + roleId: string, projId: string, envId: string, - roleId: string, removeRolePermissions: RemoveRolePermissions, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('removePermissionsFromRole', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined assertParamExists('removePermissionsFromRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('removePermissionsFromRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('removePermissionsFromRole', 'roleId', roleId); // verify required parameter 'removeRolePermissions' is not null or undefined assertParamExists( 'removePermissionsFromRole', @@ -493,9 +486,9 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration removeRolePermissions, ); const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -512,6 +505,7 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -534,32 +528,32 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RoleUpdate} roleUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateRole: async ( + roleId: string, projId: string, envId: string, - roleId: string, roleUpdate: RoleUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'roleId' is not null or undefined + assertParamExists('updateRole', 'roleId', roleId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateRole', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateRole', 'envId', envId); - // verify required parameter 'roleId' is not null or undefined - assertParamExists('updateRole', 'roleId', roleId); // verify required parameter 'roleUpdate' is not null or undefined assertParamExists('updateRole', 'roleUpdate', roleUpdate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/roles/{role_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'role_id'}}`, encodeURIComponent(String(roleId))); + .replace('{role_id}', encodeURIComponent(String(roleId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -576,6 +570,7 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -600,62 +595,44 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration /** * RolesApi - functional programming interface - * @export */ export const RolesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = RolesApiAxiosParamCreator(configuration); return { - /** - * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. - * @summary Add Parent Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addParentRole( - projId: string, - envId: string, - roleId: string, - parentRoleId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addParentRole( - projId, - envId, - roleId, - parentRoleId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async assignPermissionsToRole( + roleId: string, projId: string, envId: string, - roleId: string, addRolePermissions: AddRolePermissions, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.assignPermissionsToRole( + roleId, projId, envId, - roleId, addRolePermissions, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.assignPermissionsToRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new tenant role. @@ -664,13 +641,13 @@ export const RolesApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {RoleCreate} roleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createRole( projId: string, envId: string, roleCreate: RoleCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRole( projId, @@ -678,172 +655,267 @@ export const RolesApiFp = function (configuration?: Configuration) { roleCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.createRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteRole( + roleId: string, projId: string, envId: string, - roleId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRole( + roleId, projId, envId, - roleId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.deleteRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single tenant role, if such role exists. * @summary Get Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getRole( + roleId: string, projId: string, envId: string, - roleId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRole( + roleId, + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.getRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Role Ancestors + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getRoleAncestors( + roleId: string, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleAncestors( + roleId, projId, envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.getRoleAncestors']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Role Descendants + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getRoleDescendants( + roleId: string, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleDescendants( roleId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.getRoleDescendants']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all tenant roles. * @summary List Roles * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). - * @param {boolean} [includeTotalCount] Include total count in response (default to false) + * @param {string} [search] Text search for the object name or key * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listRoles( projId: string, envId: string, + includeTotalCount?: boolean, page?: number, perPage?: number, - includeTotalCount?: boolean, - options?: AxiosRequestConfig, + search?: string, + options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise | PaginatedResultRoleRead> + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listRoles( projId, envId, + includeTotalCount, page, perPage, - includeTotalCount, + search, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.listRoles']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. - * @summary Remove Parent Role + * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. + * @summary Remove Permissions From Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). + * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - async removeParentRole( + async removePermissionsFromRole( + roleId: string, projId: string, envId: string, - roleId: string, - parentRoleId: string, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeParentRole( - projId, - envId, - roleId, - parentRoleId, - options, - ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. - * @summary Remove Permissions From Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {RemoveRolePermissions} removeRolePermissions - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async removePermissionsFromRole( - projId: string, - envId: string, - roleId: string, removeRolePermissions: RemoveRolePermissions, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.removePermissionsFromRole( + roleId, projId, envId, - roleId, removeRolePermissions, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.removePermissionsFromRole']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role + * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RoleUpdate} roleUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateRole( + roleId: string, projId: string, envId: string, - roleId: string, roleUpdate: RoleUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateRole( + roleId, projId, envId, - roleId, roleUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['RolesApi.updateRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * RolesApi - factory interface - * @export */ export const RolesApiFactory = function ( configuration?: Configuration, @@ -852,531 +924,413 @@ export const RolesApiFactory = function ( ) { const localVarFp = RolesApiFp(configuration); return { - /** - * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. - * @summary Add Parent Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addParentRole( - projId: string, - envId: string, - roleId: string, - parentRoleId: string, - options?: any, - ): AxiosPromise { - return localVarFp - .addParentRole(projId, envId, roleId, parentRoleId, options) - .then((request) => request(axios, basePath)); - }, /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {AddRolePermissions} addRolePermissions + * @param {RolesApiAssignPermissionsToRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignPermissionsToRole( - projId: string, - envId: string, - roleId: string, - addRolePermissions: AddRolePermissions, - options?: any, + requestParameters: RolesApiAssignPermissionsToRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .assignPermissionsToRole(projId, envId, roleId, addRolePermissions, options) + .assignPermissionsToRole( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.addRolePermissions, + options, + ) .then((request) => request(axios, basePath)); }, /** * Creates a new tenant role. * @summary Create Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {RoleCreate} roleCreate + * @param {RolesApiCreateRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createRole( - projId: string, - envId: string, - roleCreate: RoleCreate, - options?: any, + requestParameters: RolesApiCreateRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createRole(projId, envId, roleCreate, options) + .createRole( + requestParameters.projId, + requestParameters.envId, + requestParameters.roleCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {RolesApiDeleteRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteRole(projId: string, envId: string, roleId: string, options?: any): AxiosPromise { + deleteRole( + requestParameters: RolesApiDeleteRoleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .deleteRole(projId, envId, roleId, options) + .deleteRole( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single tenant role, if such role exists. * @summary Get Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + * @param {RolesApiGetRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getRole(projId: string, envId: string, roleId: string, options?: any): AxiosPromise { + getRole( + requestParameters: RolesApiGetRoleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getRole(projId, envId, roleId, options) + .getRole( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Lists all tenant roles. - * @summary List Roles - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * + * @summary Get Role Ancestors + * @param {RolesApiGetRoleAncestorsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - listRoles( - projId: string, - envId: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise | PaginatedResultRoleRead> { + getRoleAncestors( + requestParameters: RolesApiGetRoleAncestorsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listRoles(projId, envId, page, perPage, options) + .getRoleAncestors( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** - * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. - * @summary Remove Parent Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). + * + * @summary Get Role Descendants + * @param {RolesApiGetRoleDescendantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - removeParentRole( - projId: string, - envId: string, - roleId: string, - parentRoleId: string, - options?: any, - ): AxiosPromise { + getRoleDescendants( + requestParameters: RolesApiGetRoleDescendantsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getRoleDescendants( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * Lists all tenant roles. + * @summary List Roles + * @param {RolesApiListRolesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listRoles( + requestParameters: RolesApiListRolesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .removeParentRole(projId, envId, roleId, parentRoleId, options) + .listRoles( + requestParameters.projId, + requestParameters.envId, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, + options, + ) .then((request) => request(axios, basePath)); }, /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions From Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {RemoveRolePermissions} removeRolePermissions + * @param {RolesApiRemovePermissionsFromRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ removePermissionsFromRole( - projId: string, - envId: string, - roleId: string, - removeRolePermissions: RemoveRolePermissions, - options?: any, + requestParameters: RolesApiRemovePermissionsFromRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .removePermissionsFromRole(projId, envId, roleId, removeRolePermissions, options) + .removePermissionsFromRole( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.removeRolePermissions, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @param {RoleUpdate} roleUpdate + * @param {RolesApiUpdateRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateRole( - projId: string, - envId: string, - roleId: string, - roleUpdate: RoleUpdate, - options?: any, + requestParameters: RolesApiUpdateRoleRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateRole(projId, envId, roleId, roleUpdate, options) + .updateRole( + requestParameters.roleId, + requestParameters.projId, + requestParameters.envId, + requestParameters.roleUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for addParentRole operation in RolesApi. - * @export - * @interface RolesApiAddParentRoleRequest + * Request parameters for assignPermissionsToRole operation in RolesApi. */ -export interface RolesApiAddParentRoleRequest { - /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAddParentRole - */ - readonly projId: string; - - /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAddParentRole - */ - readonly envId: string; - +export interface RolesApiAssignPermissionsToRoleRequest { /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAddParentRole */ readonly roleId: string; - /** - * Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAddParentRole - */ - readonly parentRoleId: string; -} - -/** - * Request parameters for assignPermissionsToRole operation in RolesApi. - * @export - * @interface RolesApiAssignPermissionsToRoleRequest - */ -export interface RolesApiAssignPermissionsToRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAssignPermissionsToRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAssignPermissionsToRole */ readonly envId: string; - /** - * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiAssignPermissionsToRole - */ - readonly roleId: string; - - /** - * - * @type {AddRolePermissions} - * @memberof RolesApiAssignPermissionsToRole - */ readonly addRolePermissions: AddRolePermissions; } /** * Request parameters for createRole operation in RolesApi. - * @export - * @interface RolesApiCreateRoleRequest */ export interface RolesApiCreateRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiCreateRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiCreateRole */ readonly envId: string; - /** - * - * @type {RoleCreate} - * @memberof RolesApiCreateRole - */ readonly roleCreate: RoleCreate; } /** * Request parameters for deleteRole operation in RolesApi. - * @export - * @interface RolesApiDeleteRoleRequest */ export interface RolesApiDeleteRoleRequest { + /** + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + */ + readonly roleId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiDeleteRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiDeleteRole */ readonly envId: string; - - /** - * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiDeleteRole - */ - readonly roleId: string; } /** * Request parameters for getRole operation in RolesApi. - * @export - * @interface RolesApiGetRoleRequest */ export interface RolesApiGetRoleRequest { + /** + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + */ + readonly roleId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiGetRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiGetRole */ readonly envId: string; +} +/** + * Request parameters for getRoleAncestors operation in RolesApi. + */ +export interface RolesApiGetRoleAncestorsRequest { /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiGetRole */ readonly roleId: string; -} -/** - * Request parameters for listRoles operation in RolesApi. - * @export - * @interface RolesApiListRolesRequest - */ -export interface RolesApiListRolesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiListRoles */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiListRoles */ readonly envId: string; +} +/** + * Request parameters for getRoleDescendants operation in RolesApi. + */ +export interface RolesApiGetRoleDescendantsRequest { /** - * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof RolesApiListRoles + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). */ - readonly page?: number; + readonly roleId: string; /** - * The number of results per page (max 100). - * @type {number} - * @memberof RolesApiListRoles + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly perPage?: number; + readonly projId: string; /** - * Include total count in response - * @type {boolean} - * @memberof RolesApiListRoles - * @default false + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly includeTotalCount?: boolean; + readonly envId: string; } /** - * Request parameters for removeParentRole operation in RolesApi. - * @export - * @interface RolesApiRemoveParentRoleRequest + * Request parameters for listRoles operation in RolesApi. */ -export interface RolesApiRemoveParentRoleRequest { +export interface RolesApiListRolesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemoveParentRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemoveParentRole */ readonly envId: string; /** - * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemoveParentRole + * Include total count in response */ - readonly roleId: string; + readonly includeTotalCount?: boolean; /** - * Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemoveParentRole + * Page number of the results to fetch, starting at 1. */ - readonly parentRoleId: string; + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * Text search for the object name or key + */ + readonly search?: string; } /** * Request parameters for removePermissionsFromRole operation in RolesApi. - * @export - * @interface RolesApiRemovePermissionsFromRoleRequest */ export interface RolesApiRemovePermissionsFromRoleRequest { + /** + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + */ + readonly roleId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemovePermissionsFromRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemovePermissionsFromRole */ readonly envId: string; - /** - * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiRemovePermissionsFromRole - */ - readonly roleId: string; - - /** - * - * @type {RemoveRolePermissions} - * @memberof RolesApiRemovePermissionsFromRole - */ readonly removeRolePermissions: RemoveRolePermissions; } /** * Request parameters for updateRole operation in RolesApi. - * @export - * @interface RolesApiUpdateRoleRequest */ export interface RolesApiUpdateRoleRequest { + /** + * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). + */ + readonly roleId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiUpdateRole */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiUpdateRole */ readonly envId: string; - /** - * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). - * @type {string} - * @memberof RolesApiUpdateRole - */ - readonly roleId: string; - - /** - * - * @type {RoleUpdate} - * @memberof RolesApiUpdateRole - */ readonly roleUpdate: RoleUpdate; } /** * RolesApi - object-oriented interface - * @export - * @class RolesApi - * @extends {BaseAPI} */ export class RolesApi extends BaseAPI { - /** - * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. - * @summary Add Parent Role - * @param {RolesApiAddParentRoleRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi - */ - public addParentRole( - requestParameters: RolesApiAddParentRoleRequest, - options?: AxiosRequestConfig, - ) { - return RolesApiFp(this.configuration) - .addParentRole( - requestParameters.projId, - requestParameters.envId, - requestParameters.roleId, - requestParameters.parentRoleId, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } - /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role * @param {RolesApiAssignPermissionsToRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ public assignPermissionsToRole( requestParameters: RolesApiAssignPermissionsToRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RolesApiFp(this.configuration) .assignPermissionsToRole( + requestParameters.roleId, requestParameters.projId, requestParameters.envId, - requestParameters.roleId, requestParameters.addRolePermissions, options, ) @@ -1388,10 +1342,9 @@ export class RolesApi extends BaseAPI { * @summary Create Role * @param {RolesApiCreateRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ - public createRole(requestParameters: RolesApiCreateRoleRequest, options?: AxiosRequestConfig) { + public createRole(requestParameters: RolesApiCreateRoleRequest, options?: RawAxiosRequestConfig) { return RolesApiFp(this.configuration) .createRole( requestParameters.projId, @@ -1407,15 +1360,14 @@ export class RolesApi extends BaseAPI { * @summary Delete Role * @param {RolesApiDeleteRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ - public deleteRole(requestParameters: RolesApiDeleteRoleRequest, options?: AxiosRequestConfig) { + public deleteRole(requestParameters: RolesApiDeleteRoleRequest, options?: RawAxiosRequestConfig) { return RolesApiFp(this.configuration) .deleteRole( + requestParameters.roleId, requestParameters.projId, requestParameters.envId, - requestParameters.roleId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1426,54 +1378,72 @@ export class RolesApi extends BaseAPI { * @summary Get Role * @param {RolesApiGetRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ - public getRole(requestParameters: RolesApiGetRoleRequest, options?: AxiosRequestConfig) { + public getRole(requestParameters: RolesApiGetRoleRequest, options?: RawAxiosRequestConfig) { return RolesApiFp(this.configuration) - .getRole(requestParameters.projId, requestParameters.envId, requestParameters.roleId, options) + .getRole(requestParameters.roleId, requestParameters.projId, requestParameters.envId, options) .then((request) => request(this.axios, this.basePath)); } /** - * Lists all tenant roles. - * @summary List Roles - * @param {RolesApiListRolesRequest} requestParameters Request parameters. + * + * @summary Get Role Ancestors + * @param {RolesApiGetRoleAncestorsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ - public listRoles(requestParameters: RolesApiListRolesRequest, options?: AxiosRequestConfig) { + public getRoleAncestors( + requestParameters: RolesApiGetRoleAncestorsRequest, + options?: RawAxiosRequestConfig, + ) { return RolesApiFp(this.configuration) - .listRoles( + .getRoleAncestors( + requestParameters.roleId, requestParameters.projId, requestParameters.envId, - requestParameters.page, - requestParameters.perPage, - requestParameters.includeTotalCount, options, ) .then((request) => request(this.axios, this.basePath)); } /** - * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. - * @summary Remove Parent Role - * @param {RolesApiRemoveParentRoleRequest} requestParameters Request parameters. + * + * @summary Get Role Descendants + * @param {RolesApiGetRoleDescendantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ - public removeParentRole( - requestParameters: RolesApiRemoveParentRoleRequest, - options?: AxiosRequestConfig, + public getRoleDescendants( + requestParameters: RolesApiGetRoleDescendantsRequest, + options?: RawAxiosRequestConfig, ) { return RolesApiFp(this.configuration) - .removeParentRole( + .getRoleDescendants( + requestParameters.roleId, requestParameters.projId, requestParameters.envId, - requestParameters.roleId, - requestParameters.parentRoleId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists all tenant roles. + * @summary List Roles + * @param {RolesApiListRolesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listRoles(requestParameters: RolesApiListRolesRequest, options?: RawAxiosRequestConfig) { + return RolesApiFp(this.configuration) + .listRoles( + requestParameters.projId, + requestParameters.envId, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + requestParameters.search, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1484,18 +1454,17 @@ export class RolesApi extends BaseAPI { * @summary Remove Permissions From Role * @param {RolesApiRemovePermissionsFromRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ public removePermissionsFromRole( requestParameters: RolesApiRemovePermissionsFromRoleRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return RolesApiFp(this.configuration) .removePermissionsFromRole( + requestParameters.roleId, requestParameters.projId, requestParameters.envId, - requestParameters.roleId, requestParameters.removeRolePermissions, options, ) @@ -1507,15 +1476,14 @@ export class RolesApi extends BaseAPI { * @summary Update Role * @param {RolesApiUpdateRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi + * @throws If a required parameter is missing. */ - public updateRole(requestParameters: RolesApiUpdateRoleRequest, options?: AxiosRequestConfig) { + public updateRole(requestParameters: RolesApiUpdateRoleRequest, options?: RawAxiosRequestConfig) { return RolesApiFp(this.configuration) .updateRole( + requestParameters.roleId, requestParameters.projId, requestParameters.envId, - requestParameters.roleId, requestParameters.roleUpdate, options, ) diff --git a/src/openapi/api/scope-configurations-api.ts b/src/openapi/api/scope-configurations-api.ts new file mode 100644 index 00000000..85e7591b --- /dev/null +++ b/src/openapi/api/scope-configurations-api.ts @@ -0,0 +1,464 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { ScopeConfigRead, ScopeConfigSet } from '../types'; +/** + * ScopeConfigurationsApi - axios parameter creator + */ +export const ScopeConfigurationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns the custom OPAL Scope config for given environment, if exists. If not custom config is set, return 404. + * @summary Get Scope Config + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getScopeConfig: async ( + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('getScopeConfig', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getScopeConfig', 'envId', envId); + const localVarPath = `/v2/projects/{proj_id}/{env_id}/opal_scope` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Reset the custom OPAL Scope config for a given environment to the default. + * @summary Reset Scope Config + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + resetScopeConfig: async ( + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('resetScopeConfig', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('resetScopeConfig', 'envId', envId); + const localVarPath = `/v2/projects/{proj_id}/{env_id}/opal_scope` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Set or update the custom OPAL Scope config for a given environment. + * @summary Set Scope Config + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ScopeConfigSet} scopeConfigSet + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + setScopeConfig: async ( + projId: string, + envId: string, + scopeConfigSet: ScopeConfigSet, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('setScopeConfig', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('setScopeConfig', 'envId', envId); + // verify required parameter 'scopeConfigSet' is not null or undefined + assertParamExists('setScopeConfig', 'scopeConfigSet', scopeConfigSet); + const localVarPath = `/v2/projects/{proj_id}/{env_id}/opal_scope` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + scopeConfigSet, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * ScopeConfigurationsApi - functional programming interface + */ +export const ScopeConfigurationsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ScopeConfigurationsApiAxiosParamCreator(configuration); + return { + /** + * Returns the custom OPAL Scope config for given environment, if exists. If not custom config is set, return 404. + * @summary Get Scope Config + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getScopeConfig( + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getScopeConfig( + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ScopeConfigurationsApi.getScopeConfig']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Reset the custom OPAL Scope config for a given environment to the default. + * @summary Reset Scope Config + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async resetScopeConfig( + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resetScopeConfig( + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ScopeConfigurationsApi.resetScopeConfig']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Set or update the custom OPAL Scope config for a given environment. + * @summary Set Scope Config + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ScopeConfigSet} scopeConfigSet + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async setScopeConfig( + projId: string, + envId: string, + scopeConfigSet: ScopeConfigSet, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setScopeConfig( + projId, + envId, + scopeConfigSet, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['ScopeConfigurationsApi.setScopeConfig']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * ScopeConfigurationsApi - factory interface + */ +export const ScopeConfigurationsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ScopeConfigurationsApiFp(configuration); + return { + /** + * Returns the custom OPAL Scope config for given environment, if exists. If not custom config is set, return 404. + * @summary Get Scope Config + * @param {ScopeConfigurationsApiGetScopeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getScopeConfig( + requestParameters: ScopeConfigurationsApiGetScopeConfigRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getScopeConfig(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Reset the custom OPAL Scope config for a given environment to the default. + * @summary Reset Scope Config + * @param {ScopeConfigurationsApiResetScopeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + resetScopeConfig( + requestParameters: ScopeConfigurationsApiResetScopeConfigRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .resetScopeConfig(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(axios, basePath)); + }, + /** + * Set or update the custom OPAL Scope config for a given environment. + * @summary Set Scope Config + * @param {ScopeConfigurationsApiSetScopeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + setScopeConfig( + requestParameters: ScopeConfigurationsApiSetScopeConfigRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .setScopeConfig( + requestParameters.projId, + requestParameters.envId, + requestParameters.scopeConfigSet, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getScopeConfig operation in ScopeConfigurationsApi. + */ +export interface ScopeConfigurationsApiGetScopeConfigRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; +} + +/** + * Request parameters for resetScopeConfig operation in ScopeConfigurationsApi. + */ +export interface ScopeConfigurationsApiResetScopeConfigRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; +} + +/** + * Request parameters for setScopeConfig operation in ScopeConfigurationsApi. + */ +export interface ScopeConfigurationsApiSetScopeConfigRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly scopeConfigSet: ScopeConfigSet; +} + +/** + * ScopeConfigurationsApi - object-oriented interface + */ +export class ScopeConfigurationsApi extends BaseAPI { + /** + * Returns the custom OPAL Scope config for given environment, if exists. If not custom config is set, return 404. + * @summary Get Scope Config + * @param {ScopeConfigurationsApiGetScopeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getScopeConfig( + requestParameters: ScopeConfigurationsApiGetScopeConfigRequest, + options?: RawAxiosRequestConfig, + ) { + return ScopeConfigurationsApiFp(this.configuration) + .getScopeConfig(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Reset the custom OPAL Scope config for a given environment to the default. + * @summary Reset Scope Config + * @param {ScopeConfigurationsApiResetScopeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public resetScopeConfig( + requestParameters: ScopeConfigurationsApiResetScopeConfigRequest, + options?: RawAxiosRequestConfig, + ) { + return ScopeConfigurationsApiFp(this.configuration) + .resetScopeConfig(requestParameters.projId, requestParameters.envId, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Set or update the custom OPAL Scope config for a given environment. + * @summary Set Scope Config + * @param {ScopeConfigurationsApiSetScopeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public setScopeConfig( + requestParameters: ScopeConfigurationsApiSetScopeConfigRequest, + options?: RawAxiosRequestConfig, + ) { + return ScopeConfigurationsApiFp(this.configuration) + .setScopeConfig( + requestParameters.projId, + requestParameters.envId, + requestParameters.scopeConfigSet, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/tenants-api.ts b/src/openapi/api/tenants-api.ts index 999bad06..2d6dc5e4 100644 --- a/src/openapi/api/tenants-api.ts +++ b/src/openapi/api/tenants-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,98 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultUserRead } from '../types'; -// @ts-ignore -import { TenantCreate } from '../types'; -// @ts-ignore -import { TenantRead } from '../types'; -// @ts-ignore -import { TenantUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + PaginatedResultUserRead, + ResponseListTenantsV2FactsProjIdEnvIdTenantsGet, + TenantCreate, + TenantRead, + TenantUpdate, + UserCreate, + UserRead, +} from '../types'; /** * TenantsApi - axios parameter creator - * @export */ export const TenantsApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Create and add user to a tenant. + * @summary Add User To Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserCreate} userCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + addUserToTenant: async ( + tenantId: string, + projId: string, + envId: string, + userCreate: UserCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('addUserToTenant', 'tenantId', tenantId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('addUserToTenant', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('addUserToTenant', 'envId', envId); + // verify required parameter 'userCreate' is not null or undefined + assertParamExists('addUserToTenant', 'userCreate', userCreate); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users` + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + userCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant @@ -53,13 +109,13 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {TenantCreate} tenantCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createTenant: async ( projId: string, envId: string, tenantCreate: TenantCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createTenant', 'projId', projId); @@ -68,8 +124,8 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati // verify required parameter 'tenantCreate' is not null or undefined assertParamExists('createTenant', 'tenantCreate', tenantCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -86,6 +142,7 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -108,28 +165,28 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati /** * Deletes the tenant and all its related data. * @summary Delete Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteTenant: async ( + tenantId: string, projId: string, envId: string, - tenantId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('deleteTenant', 'tenantId', tenantId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteTenant', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteTenant', 'envId', envId); - // verify required parameter 'tenantId' is not null or undefined - assertParamExists('deleteTenant', 'tenantId', tenantId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'tenant_id'}}`, encodeURIComponent(String(tenantId))); + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -145,6 +202,8 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -161,33 +220,33 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati /** * Deletes a user under a tenant. * @summary Delete Tenant User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteTenantUser: async ( - projId: string, - envId: string, tenantId: string, userId: string, - options: AxiosRequestConfig = {}, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('deleteTenantUser', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('deleteTenantUser', 'envId', envId); // verify required parameter 'tenantId' is not null or undefined assertParamExists('deleteTenantUser', 'tenantId', tenantId); // verify required parameter 'userId' is not null or undefined assertParamExists('deleteTenantUser', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteTenantUser', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteTenantUser', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'tenant_id'}}`, encodeURIComponent(String(tenantId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -203,6 +262,8 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -219,28 +280,28 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getTenant: async ( + tenantId: string, projId: string, envId: string, - tenantId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('getTenant', 'tenantId', tenantId); // verify required parameter 'projId' is not null or undefined assertParamExists('getTenant', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getTenant', 'envId', envId); - // verify required parameter 'tenantId' is not null or undefined - assertParamExists('getTenant', 'tenantId', tenantId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'tenant_id'}}`, encodeURIComponent(String(tenantId))); + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -256,6 +317,8 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -272,36 +335,38 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati /** * * @summary List Tenant Users - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [search] Text search for the email field * @param {string} [role] Match users with a specific role + * @param {boolean} [includeResourceInstanceRoles] Should add resource instance roles * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listTenantUsers: async ( - projId: string, tenantId: string, + projId: string, envId: string, search?: string, role?: string, + includeResourceInstanceRoles?: boolean, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('listTenantUsers', 'projId', projId); // verify required parameter 'tenantId' is not null or undefined assertParamExists('listTenantUsers', 'tenantId', tenantId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('listTenantUsers', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listTenantUsers', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'tenant_id'}}`, encodeURIComponent(String(tenantId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -325,6 +390,10 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['role'] = role; } + if (includeResourceInstanceRoles !== undefined) { + localVarQueryParameter['include_resource_instance_roles'] = includeResourceInstanceRoles; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -333,6 +402,8 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -347,31 +418,33 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Lists all the tenants defined within an environment. + * Lists all the tenants defined within an env. * @summary List Tenants * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [search] Text search for the tenant name or key + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listTenants: async ( projId: string, envId: string, search?: string, + includeTotalCount?: boolean, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listTenants', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listTenants', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -391,6 +464,10 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['search'] = search; } + if (includeTotalCount !== undefined) { + localVarQueryParameter['include_total_count'] = includeTotalCount; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -399,6 +476,8 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -415,32 +494,32 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {TenantUpdate} tenantUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateTenant: async ( + tenantId: string, projId: string, envId: string, - tenantId: string, tenantUpdate: TenantUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'tenantId' is not null or undefined + assertParamExists('updateTenant', 'tenantId', tenantId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateTenant', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateTenant', 'envId', envId); - // verify required parameter 'tenantId' is not null or undefined - assertParamExists('updateTenant', 'tenantId', tenantId); // verify required parameter 'tenantUpdate' is not null or undefined assertParamExists('updateTenant', 'tenantUpdate', tenantUpdate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'tenant_id'}}`, encodeURIComponent(String(tenantId))); + .replace('{tenant_id}', encodeURIComponent(String(tenantId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -457,6 +536,7 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -481,11 +561,45 @@ export const TenantsApiAxiosParamCreator = function (configuration?: Configurati /** * TenantsApi - functional programming interface - * @export */ export const TenantsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = TenantsApiAxiosParamCreator(configuration); return { + /** + * Create and add user to a tenant. + * @summary Add User To Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UserCreate} userCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async addUserToTenant( + tenantId: string, + projId: string, + envId: string, + userCreate: UserCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addUserToTenant( + tenantId, + projId, + envId, + userCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.addUserToTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant @@ -493,13 +607,13 @@ export const TenantsApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {TenantCreate} tenantCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createTenant( projId: string, envId: string, tenantCreate: TenantCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createTenant( projId, @@ -507,178 +621,251 @@ export const TenantsApiFp = function (configuration?: Configuration) { tenantCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.createTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the tenant and all its related data. * @summary Delete Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteTenant( + tenantId: string, projId: string, envId: string, - tenantId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTenant( + tenantId, projId, envId, - tenantId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.deleteTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a user under a tenant. * @summary Delete Tenant User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteTenantUser( - projId: string, - envId: string, tenantId: string, userId: string, - options?: AxiosRequestConfig, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTenantUser( - projId, - envId, tenantId, userId, + projId, + envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.deleteTenantUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getTenant( + tenantId: string, projId: string, envId: string, - tenantId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTenant( + tenantId, projId, envId, - tenantId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.getTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List Tenant Users - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [search] Text search for the email field * @param {string} [role] Match users with a specific role + * @param {boolean} [includeResourceInstanceRoles] Should add resource instance roles * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listTenantUsers( - projId: string, tenantId: string, + projId: string, envId: string, search?: string, role?: string, + includeResourceInstanceRoles?: boolean, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.listTenantUsers( - projId, tenantId, + projId, envId, search, role, + includeResourceInstanceRoles, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.listTenantUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Lists all the tenants defined within an environment. + * Lists all the tenants defined within an env. * @summary List Tenants * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [search] Text search for the tenant name or key + * @param {boolean} [includeTotalCount] Include total count in response * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listTenants( projId: string, envId: string, search?: string, + includeTotalCount?: boolean, page?: number, perPage?: number, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { const localVarAxiosArgs = await localVarAxiosParamCreator.listTenants( projId, envId, search, + includeTotalCount, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.listTenants']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant + * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {TenantUpdate} tenantUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateTenant( + tenantId: string, projId: string, envId: string, - tenantId: string, tenantUpdate: TenantUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateTenant( + tenantId, projId, envId, - tenantId, tenantUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['TenantsApi.updateTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * TenantsApi - factory interface - * @export */ export const TenantsApiFactory = function ( configuration?: Configuration, @@ -687,428 +874,422 @@ export const TenantsApiFactory = function ( ) { const localVarFp = TenantsApiFp(configuration); return { + /** + * Create and add user to a tenant. + * @summary Add User To Tenant + * @param {TenantsApiAddUserToTenantRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + addUserToTenant( + requestParameters: TenantsApiAddUserToTenantRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .addUserToTenant( + requestParameters.tenantId, + requestParameters.projId, + requestParameters.envId, + requestParameters.userCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {TenantCreate} tenantCreate + * @param {TenantsApiCreateTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createTenant( - projId: string, - envId: string, - tenantCreate: TenantCreate, - options?: any, + requestParameters: TenantsApiCreateTenantRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createTenant(projId, envId, tenantCreate, options) + .createTenant( + requestParameters.projId, + requestParameters.envId, + requestParameters.tenantCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the tenant and all its related data. * @summary Delete Tenant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {TenantsApiDeleteTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteTenant( - projId: string, - envId: string, - tenantId: string, - options?: any, + requestParameters: TenantsApiDeleteTenantRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteTenant(projId, envId, tenantId, options) + .deleteTenant( + requestParameters.tenantId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes a user under a tenant. * @summary Delete Tenant User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {TenantsApiDeleteTenantUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteTenantUser( - projId: string, - envId: string, - tenantId: string, - userId: string, - options?: any, + requestParameters: TenantsApiDeleteTenantUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteTenantUser(projId, envId, tenantId, userId, options) + .deleteTenantUser( + requestParameters.tenantId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + * @param {TenantsApiGetTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getTenant( - projId: string, - envId: string, - tenantId: string, - options?: any, + requestParameters: TenantsApiGetTenantRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getTenant(projId, envId, tenantId, options) + .getTenant( + requestParameters.tenantId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary List Tenant Users - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {string} [role] Match users with a specific role - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {TenantsApiListTenantUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listTenantUsers( - projId: string, - tenantId: string, - envId: string, - search?: string, - role?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: TenantsApiListTenantUsersRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .listTenantUsers(projId, tenantId, envId, search, role, page, perPage, options) + .listTenantUsers( + requestParameters.tenantId, + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.role, + requestParameters.includeResourceInstanceRoles, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Lists all the tenants defined within an environment. + * Lists all the tenants defined within an env. * @summary List Tenants - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [search] Text search for the tenant name or key - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {TenantsApiListTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listTenants( - projId: string, - envId: string, - search?: string, - page?: number, - perPage?: number, - options?: any, - ): AxiosPromise> { + requestParameters: TenantsApiListTenantsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .listTenants(projId, envId, search, page, perPage, options) + .listTenants( + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.includeTotalCount, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @param {TenantUpdate} tenantUpdate + * @param {TenantsApiUpdateTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateTenant( - projId: string, - envId: string, - tenantId: string, - tenantUpdate: TenantUpdate, - options?: any, + requestParameters: TenantsApiUpdateTenantRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateTenant(projId, envId, tenantId, tenantUpdate, options) + .updateTenant( + requestParameters.tenantId, + requestParameters.projId, + requestParameters.envId, + requestParameters.tenantUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for createTenant operation in TenantsApi. - * @export - * @interface TenantsApiCreateTenantRequest + * Request parameters for addUserToTenant operation in TenantsApi. */ -export interface TenantsApiCreateTenantRequest { +export interface TenantsApiAddUserToTenantRequest { + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiCreateTenant */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiCreateTenant */ readonly envId: string; - /** - * - * @type {TenantCreate} - * @memberof TenantsApiCreateTenant - */ - readonly tenantCreate: TenantCreate; + readonly userCreate: UserCreate; } /** - * Request parameters for deleteTenant operation in TenantsApi. - * @export - * @interface TenantsApiDeleteTenantRequest + * Request parameters for createTenant operation in TenantsApi. */ -export interface TenantsApiDeleteTenantRequest { +export interface TenantsApiCreateTenantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenant */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenant */ readonly envId: string; + readonly tenantCreate: TenantCreate; +} + +/** + * Request parameters for deleteTenant operation in TenantsApi. + */ +export interface TenantsApiDeleteTenantRequest { /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenant */ readonly tenantId: string; -} -/** - * Request parameters for deleteTenantUser operation in TenantsApi. - * @export - * @interface TenantsApiDeleteTenantUserRequest - */ -export interface TenantsApiDeleteTenantUserRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenantUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenantUser */ readonly envId: string; +} +/** + * Request parameters for deleteTenantUser operation in TenantsApi. + */ +export interface TenantsApiDeleteTenantUserRequest { /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenantUser */ readonly tenantId: string; /** * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiDeleteTenantUser */ readonly userId: string; -} -/** - * Request parameters for getTenant operation in TenantsApi. - * @export - * @interface TenantsApiGetTenantRequest - */ -export interface TenantsApiGetTenantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiGetTenant */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiGetTenant */ readonly envId: string; +} +/** + * Request parameters for getTenant operation in TenantsApi. + */ +export interface TenantsApiGetTenantRequest { /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiGetTenant */ readonly tenantId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; } /** * Request parameters for listTenantUsers operation in TenantsApi. - * @export - * @interface TenantsApiListTenantUsersRequest */ export interface TenantsApiListTenantUsersRequest { /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiListTenantUsers + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). */ - readonly projId: string; + readonly tenantId: string; /** - * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiListTenantUsers + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly tenantId: string; + readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiListTenantUsers */ readonly envId: string; /** * Text search for the email field - * @type {string} - * @memberof TenantsApiListTenantUsers */ readonly search?: string; /** * Match users with a specific role - * @type {string} - * @memberof TenantsApiListTenantUsers */ readonly role?: string; + /** + * Should add resource instance roles + */ + readonly includeResourceInstanceRoles?: boolean; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof TenantsApiListTenantUsers */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof TenantsApiListTenantUsers */ readonly perPage?: number; } /** * Request parameters for listTenants operation in TenantsApi. - * @export - * @interface TenantsApiListTenantsRequest */ export interface TenantsApiListTenantsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiListTenants */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiListTenants */ readonly envId: string; /** * Text search for the tenant name or key - * @type {string} - * @memberof TenantsApiListTenants */ readonly search?: string; + /** + * Include total count in response + */ + readonly includeTotalCount?: boolean; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof TenantsApiListTenants */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof TenantsApiListTenants */ readonly perPage?: number; } /** * Request parameters for updateTenant operation in TenantsApi. - * @export - * @interface TenantsApiUpdateTenantRequest */ export interface TenantsApiUpdateTenantRequest { + /** + * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). + */ + readonly tenantId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiUpdateTenant */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiUpdateTenant */ readonly envId: string; - /** - * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). - * @type {string} - * @memberof TenantsApiUpdateTenant - */ - readonly tenantId: string; - - /** - * - * @type {TenantUpdate} - * @memberof TenantsApiUpdateTenant - */ readonly tenantUpdate: TenantUpdate; } /** * TenantsApi - object-oriented interface - * @export - * @class TenantsApi - * @extends {BaseAPI} */ export class TenantsApi extends BaseAPI { + /** + * Create and add user to a tenant. + * @summary Add User To Tenant + * @param {TenantsApiAddUserToTenantRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public addUserToTenant( + requestParameters: TenantsApiAddUserToTenantRequest, + options?: RawAxiosRequestConfig, + ) { + return TenantsApiFp(this.configuration) + .addUserToTenant( + requestParameters.tenantId, + requestParameters.projId, + requestParameters.envId, + requestParameters.userCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant * @param {TenantsApiCreateTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ public createTenant( requestParameters: TenantsApiCreateTenantRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return TenantsApiFp(this.configuration) .createTenant( @@ -1125,18 +1306,17 @@ export class TenantsApi extends BaseAPI { * @summary Delete Tenant * @param {TenantsApiDeleteTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ public deleteTenant( requestParameters: TenantsApiDeleteTenantRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return TenantsApiFp(this.configuration) .deleteTenant( + requestParameters.tenantId, requestParameters.projId, requestParameters.envId, - requestParameters.tenantId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1147,19 +1327,18 @@ export class TenantsApi extends BaseAPI { * @summary Delete Tenant User * @param {TenantsApiDeleteTenantUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ public deleteTenantUser( requestParameters: TenantsApiDeleteTenantUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return TenantsApiFp(this.configuration) .deleteTenantUser( - requestParameters.projId, - requestParameters.envId, requestParameters.tenantId, requestParameters.userId, + requestParameters.projId, + requestParameters.envId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1170,15 +1349,14 @@ export class TenantsApi extends BaseAPI { * @summary Get Tenant * @param {TenantsApiGetTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ - public getTenant(requestParameters: TenantsApiGetTenantRequest, options?: AxiosRequestConfig) { + public getTenant(requestParameters: TenantsApiGetTenantRequest, options?: RawAxiosRequestConfig) { return TenantsApiFp(this.configuration) .getTenant( + requestParameters.tenantId, requestParameters.projId, requestParameters.envId, - requestParameters.tenantId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1189,20 +1367,20 @@ export class TenantsApi extends BaseAPI { * @summary List Tenant Users * @param {TenantsApiListTenantUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ public listTenantUsers( requestParameters: TenantsApiListTenantUsersRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return TenantsApiFp(this.configuration) .listTenantUsers( - requestParameters.projId, requestParameters.tenantId, + requestParameters.projId, requestParameters.envId, requestParameters.search, requestParameters.role, + requestParameters.includeResourceInstanceRoles, requestParameters.page, requestParameters.perPage, options, @@ -1211,22 +1389,22 @@ export class TenantsApi extends BaseAPI { } /** - * Lists all the tenants defined within an environment. + * Lists all the tenants defined within an env. * @summary List Tenants * @param {TenantsApiListTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ public listTenants( requestParameters: TenantsApiListTenantsRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return TenantsApiFp(this.configuration) .listTenants( requestParameters.projId, requestParameters.envId, requestParameters.search, + requestParameters.includeTotalCount, requestParameters.page, requestParameters.perPage, options, @@ -1239,18 +1417,17 @@ export class TenantsApi extends BaseAPI { * @summary Update Tenant * @param {TenantsApiUpdateTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TenantsApi + * @throws If a required parameter is missing. */ public updateTenant( requestParameters: TenantsApiUpdateTenantRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return TenantsApiFp(this.configuration) .updateTenant( + requestParameters.tenantId, requestParameters.projId, requestParameters.envId, - requestParameters.tenantId, requestParameters.tenantUpdate, options, ) diff --git a/src/openapi/api/user-attributes-api.ts b/src/openapi/api/user-attributes-api.ts index fe467597..e5918a75 100644 --- a/src/openapi/api/user-attributes-api.ts +++ b/src/openapi/api/user-attributes-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,26 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { ResourceAttributeCreate } from '../types'; -// @ts-ignore -import { ResourceAttributeRead } from '../types'; -// @ts-ignore -import { ResourceAttributeUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ResourceAttributeCreate, + ResourceAttributeRead, + ResourceAttributeUpdate, +} from '../types'; /** * UserAttributesApi - axios parameter creator - * @export */ export const UserAttributesApiAxiosParamCreator = function (configuration?: Configuration) { return { @@ -52,14 +41,14 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {string} [resourceId] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createUserAttribute: async ( projId: string, envId: string, resourceAttributeCreate: ResourceAttributeCreate, resourceId?: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createUserAttribute', 'projId', projId); @@ -68,8 +57,8 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf // verify required parameter 'resourceAttributeCreate' is not null or undefined assertParamExists('createUserAttribute', 'resourceAttributeCreate', resourceAttributeCreate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/users/attributes` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -90,6 +79,7 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf } localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -112,34 +102,34 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute + * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteUserAttribute: async ( + attributeId: string, projId: string, envId: string, - attributeId: string, resourceId?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'attributeId' is not null or undefined + assertParamExists('deleteUserAttribute', 'attributeId', attributeId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteUserAttribute', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteUserAttribute', 'envId', envId); - // verify required parameter 'attributeId' is not null or undefined - assertParamExists('deleteUserAttribute', 'attributeId', attributeId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'attribute_id'}}`, encodeURIComponent(String(attributeId))); + .replace('{attribute_id}', encodeURIComponent(String(attributeId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -167,6 +157,8 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -183,30 +175,30 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute + * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getUserAttribute: async ( + attributeId: string, projId: string, envId: string, - attributeId: string, resourceId?: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'attributeId' is not null or undefined + assertParamExists('getUserAttribute', 'attributeId', attributeId); // verify required parameter 'projId' is not null or undefined assertParamExists('getUserAttribute', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getUserAttribute', 'envId', envId); - // verify required parameter 'attributeId' is not null or undefined - assertParamExists('getUserAttribute', 'attributeId', attributeId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'attribute_id'}}`, encodeURIComponent(String(attributeId))); + .replace('{attribute_id}', encodeURIComponent(String(attributeId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -226,6 +218,8 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf localVarQueryParameter['resource_id'] = resourceId; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -248,7 +242,7 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listUserAttributes: async ( projId: string, @@ -256,15 +250,15 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf resourceId?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listUserAttributes', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listUserAttributes', 'envId', envId); const localVarPath = `/v2/schema/{proj_id}/{env_id}/users/attributes` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -292,6 +286,8 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -308,34 +304,34 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute + * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {string} [resourceId] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateUserAttribute: async ( + attributeId: string, projId: string, envId: string, - attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, resourceId?: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'attributeId' is not null or undefined + assertParamExists('updateUserAttribute', 'attributeId', attributeId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateUserAttribute', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateUserAttribute', 'envId', envId); - // verify required parameter 'attributeId' is not null or undefined - assertParamExists('updateUserAttribute', 'attributeId', attributeId); // verify required parameter 'resourceAttributeUpdate' is not null or undefined assertParamExists('updateUserAttribute', 'resourceAttributeUpdate', resourceAttributeUpdate); const localVarPath = `/v2/schema/{proj_id}/{env_id}/users/attributes/{attribute_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'attribute_id'}}`, encodeURIComponent(String(attributeId))); + .replace('{attribute_id}', encodeURIComponent(String(attributeId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -356,6 +352,7 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf } localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -380,7 +377,6 @@ export const UserAttributesApiAxiosParamCreator = function (configuration?: Conf /** * UserAttributesApi - functional programming interface - * @export */ export const UserAttributesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = UserAttributesApiAxiosParamCreator(configuration); @@ -393,14 +389,14 @@ export const UserAttributesApiFp = function (configuration?: Configuration) { * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {string} [resourceId] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createUserAttribute( projId: string, envId: string, resourceAttributeCreate: ResourceAttributeCreate, resourceId?: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUserAttribute( projId, @@ -409,65 +405,95 @@ export const UserAttributesApiFp = function (configuration?: Configuration) { resourceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserAttributesApi.createUserAttribute']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute + * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteUserAttribute( + attributeId: string, projId: string, envId: string, - attributeId: string, resourceId?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUserAttribute( + attributeId, projId, envId, - attributeId, resourceId, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserAttributesApi.deleteUserAttribute']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute + * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getUserAttribute( + attributeId: string, projId: string, envId: string, - attributeId: string, resourceId?: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAttribute( + attributeId, projId, envId, - attributeId, resourceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserAttributesApi.getUserAttribute']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the attributes defined on the User resource. @@ -478,7 +504,7 @@ export const UserAttributesApiFp = function (configuration?: Configuration) { * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listUserAttributes( projId: string, @@ -486,7 +512,7 @@ export const UserAttributesApiFp = function (configuration?: Configuration) { resourceId?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { @@ -498,43 +524,62 @@ export const UserAttributesApiFp = function (configuration?: Configuration) { perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserAttributesApi.listUserAttributes']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute + * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {string} [resourceId] * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateUserAttribute( + attributeId: string, projId: string, envId: string, - attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, resourceId?: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserAttribute( + attributeId, projId, envId, - attributeId, resourceAttributeUpdate, resourceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserAttributesApi.updateUserAttribute']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * UserAttributesApi - factory interface - * @export */ export const UserAttributesApiFactory = function ( configuration?: Configuration, @@ -546,119 +591,108 @@ export const UserAttributesApiFactory = function ( /** * Creates a new attribute for the User resource. * @summary Create User Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {ResourceAttributeCreate} resourceAttributeCreate - * @param {string} [resourceId] + * @param {UserAttributesApiCreateUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createUserAttribute( - projId: string, - envId: string, - resourceAttributeCreate: ResourceAttributeCreate, - resourceId?: string, - options?: any, + requestParameters: UserAttributesApiCreateUserAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createUserAttribute(projId, envId, resourceAttributeCreate, resourceId, options) + .createUserAttribute( + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceAttributeCreate, + requestParameters.resourceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @param {string} [resourceId] - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {UserAttributesApiDeleteUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteUserAttribute( - projId: string, - envId: string, - attributeId: string, - resourceId?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: UserAttributesApiDeleteUserAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteUserAttribute(projId, envId, attributeId, resourceId, page, perPage, options) + .deleteUserAttribute( + requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @param {string} [resourceId] + * @param {UserAttributesApiGetUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getUserAttribute( - projId: string, - envId: string, - attributeId: string, - resourceId?: string, - options?: any, + requestParameters: UserAttributesApiGetUserAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .getUserAttribute(projId, envId, attributeId, resourceId, options) + .getUserAttribute( + requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the attributes defined on the User resource. * @summary List User Attributes - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [resourceId] - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {UserAttributesApiListUserAttributesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listUserAttributes( - projId: string, - envId: string, - resourceId?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: UserAttributesApiListUserAttributesRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .listUserAttributes(projId, envId, resourceId, page, perPage, options) + .listUserAttributes( + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceId, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @param {ResourceAttributeUpdate} resourceAttributeUpdate - * @param {string} [resourceId] + * @param {UserAttributesApiUpdateUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateUserAttribute( - projId: string, - envId: string, - attributeId: string, - resourceAttributeUpdate: ResourceAttributeUpdate, - resourceId?: string, - options?: any, + requestParameters: UserAttributesApiUpdateUserAttributeRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .updateUserAttribute( - projId, - envId, - attributeId, - resourceAttributeUpdate, - resourceId, + requestParameters.attributeId, + requestParameters.projId, + requestParameters.envId, + requestParameters.resourceAttributeUpdate, + requestParameters.resourceId, options, ) .then((request) => request(axios, basePath)); @@ -668,212 +702,130 @@ export const UserAttributesApiFactory = function ( /** * Request parameters for createUserAttribute operation in UserAttributesApi. - * @export - * @interface UserAttributesApiCreateUserAttributeRequest */ export interface UserAttributesApiCreateUserAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiCreateUserAttribute */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiCreateUserAttribute */ readonly envId: string; - /** - * - * @type {ResourceAttributeCreate} - * @memberof UserAttributesApiCreateUserAttribute - */ readonly resourceAttributeCreate: ResourceAttributeCreate; - /** - * - * @type {string} - * @memberof UserAttributesApiCreateUserAttribute - */ readonly resourceId?: string; } /** * Request parameters for deleteUserAttribute operation in UserAttributesApi. - * @export - * @interface UserAttributesApiDeleteUserAttributeRequest */ export interface UserAttributesApiDeleteUserAttributeRequest { + /** + * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + */ + readonly attributeId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiDeleteUserAttribute */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiDeleteUserAttribute */ readonly envId: string; - /** - * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiDeleteUserAttribute - */ - readonly attributeId: string; - - /** - * - * @type {string} - * @memberof UserAttributesApiDeleteUserAttribute - */ readonly resourceId?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof UserAttributesApiDeleteUserAttribute */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof UserAttributesApiDeleteUserAttribute */ readonly perPage?: number; } /** * Request parameters for getUserAttribute operation in UserAttributesApi. - * @export - * @interface UserAttributesApiGetUserAttributeRequest */ export interface UserAttributesApiGetUserAttributeRequest { + /** + * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + */ + readonly attributeId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiGetUserAttribute */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiGetUserAttribute */ readonly envId: string; - /** - * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiGetUserAttribute - */ - readonly attributeId: string; - - /** - * - * @type {string} - * @memberof UserAttributesApiGetUserAttribute - */ readonly resourceId?: string; } /** * Request parameters for listUserAttributes operation in UserAttributesApi. - * @export - * @interface UserAttributesApiListUserAttributesRequest */ export interface UserAttributesApiListUserAttributesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiListUserAttributes */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiListUserAttributes */ readonly envId: string; - /** - * - * @type {string} - * @memberof UserAttributesApiListUserAttributes - */ readonly resourceId?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof UserAttributesApiListUserAttributes */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof UserAttributesApiListUserAttributes */ readonly perPage?: number; } /** * Request parameters for updateUserAttribute operation in UserAttributesApi. - * @export - * @interface UserAttributesApiUpdateUserAttributeRequest */ export interface UserAttributesApiUpdateUserAttributeRequest { + /** + * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). + */ + readonly attributeId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiUpdateUserAttribute */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiUpdateUserAttribute */ readonly envId: string; - /** - * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). - * @type {string} - * @memberof UserAttributesApiUpdateUserAttribute - */ - readonly attributeId: string; - - /** - * - * @type {ResourceAttributeUpdate} - * @memberof UserAttributesApiUpdateUserAttribute - */ readonly resourceAttributeUpdate: ResourceAttributeUpdate; - /** - * - * @type {string} - * @memberof UserAttributesApiUpdateUserAttribute - */ readonly resourceId?: string; } /** * UserAttributesApi - object-oriented interface - * @export - * @class UserAttributesApi - * @extends {BaseAPI} */ export class UserAttributesApi extends BaseAPI { /** @@ -881,12 +833,11 @@ export class UserAttributesApi extends BaseAPI { * @summary Create User Attribute * @param {UserAttributesApiCreateUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserAttributesApi + * @throws If a required parameter is missing. */ public createUserAttribute( requestParameters: UserAttributesApiCreateUserAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UserAttributesApiFp(this.configuration) .createUserAttribute( @@ -904,18 +855,17 @@ export class UserAttributesApi extends BaseAPI { * @summary Delete User Attribute * @param {UserAttributesApiDeleteUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserAttributesApi + * @throws If a required parameter is missing. */ public deleteUserAttribute( requestParameters: UserAttributesApiDeleteUserAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UserAttributesApiFp(this.configuration) .deleteUserAttribute( + requestParameters.attributeId, requestParameters.projId, requestParameters.envId, - requestParameters.attributeId, requestParameters.resourceId, requestParameters.page, requestParameters.perPage, @@ -929,18 +879,17 @@ export class UserAttributesApi extends BaseAPI { * @summary Get User Attribute * @param {UserAttributesApiGetUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserAttributesApi + * @throws If a required parameter is missing. */ public getUserAttribute( requestParameters: UserAttributesApiGetUserAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UserAttributesApiFp(this.configuration) .getUserAttribute( + requestParameters.attributeId, requestParameters.projId, requestParameters.envId, - requestParameters.attributeId, requestParameters.resourceId, options, ) @@ -952,12 +901,11 @@ export class UserAttributesApi extends BaseAPI { * @summary List User Attributes * @param {UserAttributesApiListUserAttributesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserAttributesApi + * @throws If a required parameter is missing. */ public listUserAttributes( requestParameters: UserAttributesApiListUserAttributesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UserAttributesApiFp(this.configuration) .listUserAttributes( @@ -976,18 +924,17 @@ export class UserAttributesApi extends BaseAPI { * @summary Update User Attribute * @param {UserAttributesApiUpdateUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserAttributesApi + * @throws If a required parameter is missing. */ public updateUserAttribute( requestParameters: UserAttributesApiUpdateUserAttributeRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UserAttributesApiFp(this.configuration) .updateUserAttribute( + requestParameters.attributeId, requestParameters.projId, requestParameters.envId, - requestParameters.attributeId, requestParameters.resourceAttributeUpdate, requestParameters.resourceId, options, diff --git a/src/openapi/api/user-invites-api.ts b/src/openapi/api/user-invites-api.ts new file mode 100644 index 00000000..97243ef0 --- /dev/null +++ b/src/openapi/api/user-invites-api.ts @@ -0,0 +1,1065 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; +import { + DUMMY_BASE_URL, + assertParamExists, + createRequestFunction, + serializeDataIfNeeded, + setBearerAuthToObject, + setSearchParams, + toPathString, +} from '../common'; +import type { Configuration } from '../configuration'; +import type { + ElementsUserInviteApprove, + ElementsUserInviteCreate, + ElementsUserInviteRead, + ElementsUserInviteUpdate, + PaginatedResultElementsUserInviteRead, + UserRead, +} from '../types'; +/** + * UserInvitesApi - axios parameter creator + */ +export const UserInvitesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Approve User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsUserInviteApprove} elementsUserInviteApprove + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveUserInvite: async ( + userInviteId: string, + projId: string, + envId: string, + elementsUserInviteApprove: ElementsUserInviteApprove, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userInviteId' is not null or undefined + assertParamExists('approveUserInvite', 'userInviteId', userInviteId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('approveUserInvite', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('approveUserInvite', 'envId', envId); + // verify required parameter 'elementsUserInviteApprove' is not null or undefined + assertParamExists( + 'approveUserInvite', + 'elementsUserInviteApprove', + elementsUserInviteApprove, + ); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}/approve` + .replace('{user_invite_id}', encodeURIComponent(String(userInviteId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + elementsUserInviteApprove, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create User Invite + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsUserInviteCreate} elementsUserInviteCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createUserInvite: async ( + projId: string, + envId: string, + elementsUserInviteCreate: ElementsUserInviteCreate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('createUserInvite', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('createUserInvite', 'envId', envId); + // verify required parameter 'elementsUserInviteCreate' is not null or undefined + assertParamExists('createUserInvite', 'elementsUserInviteCreate', elementsUserInviteCreate); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/user_invites` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + elementsUserInviteCreate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deleteUserInvite: async ( + userInviteId: string, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userInviteId' is not null or undefined + assertParamExists('deleteUserInvite', 'userInviteId', userInviteId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('deleteUserInvite', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('deleteUserInvite', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}` + .replace('{user_invite_id}', encodeURIComponent(String(userInviteId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getUserInvite: async ( + userInviteId: string, + projId: string, + envId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userInviteId' is not null or undefined + assertParamExists('getUserInvite', 'userInviteId', userInviteId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('getUserInvite', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('getUserInvite', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}` + .replace('{user_invite_id}', encodeURIComponent(String(userInviteId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List User Invites + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [role] optional role filter, will only return invited users with this role. + * @param {string} [tenant] optional tenant filter, will only return invited users in that tenant. + * @param {string} [search] optional search, will only return invited users to that email, key or name. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listUserInvites: async ( + projId: string, + envId: string, + role?: string, + tenant?: string, + search?: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'projId' is not null or undefined + assertParamExists('listUserInvites', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listUserInvites', 'envId', envId); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/user_invites` + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (role !== undefined) { + localVarQueryParameter['role'] = role; + } + + if (tenant !== undefined) { + localVarQueryParameter['tenant'] = tenant; + } + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsUserInviteUpdate} elementsUserInviteUpdate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateUserInvite: async ( + userInviteId: string, + projId: string, + envId: string, + elementsUserInviteUpdate: ElementsUserInviteUpdate, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userInviteId' is not null or undefined + assertParamExists('updateUserInvite', 'userInviteId', userInviteId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('updateUserInvite', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('updateUserInvite', 'envId', envId); + // verify required parameter 'elementsUserInviteUpdate' is not null or undefined + assertParamExists('updateUserInvite', 'elementsUserInviteUpdate', elementsUserInviteUpdate); + const localVarPath = `/v2/facts/{proj_id}/{env_id}/user_invites/{user_invite_id}` + .replace('{user_invite_id}', encodeURIComponent(String(userInviteId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + elementsUserInviteUpdate, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * UserInvitesApi - functional programming interface + */ +export const UserInvitesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = UserInvitesApiAxiosParamCreator(configuration); + return { + /** + * + * @summary Approve User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsUserInviteApprove} elementsUserInviteApprove + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async approveUserInvite( + userInviteId: string, + projId: string, + envId: string, + elementsUserInviteApprove: ElementsUserInviteApprove, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approveUserInvite( + userInviteId, + projId, + envId, + elementsUserInviteApprove, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserInvitesApi.approveUserInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Create User Invite + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsUserInviteCreate} elementsUserInviteCreate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async createUserInvite( + projId: string, + envId: string, + elementsUserInviteCreate: ElementsUserInviteCreate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUserInvite( + projId, + envId, + elementsUserInviteCreate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserInvitesApi.createUserInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Delete User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async deleteUserInvite( + userInviteId: string, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUserInvite( + userInviteId, + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserInvitesApi.deleteUserInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async getUserInvite( + userInviteId: string, + projId: string, + envId: string, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserInvite( + userInviteId, + projId, + envId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserInvitesApi.getUserInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List User Invites + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [role] optional role filter, will only return invited users with this role. + * @param {string} [tenant] optional tenant filter, will only return invited users in that tenant. + * @param {string} [search] optional search, will only return invited users to that email, key or name. + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listUserInvites( + projId: string, + envId: string, + role?: string, + tenant?: string, + search?: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listUserInvites( + projId, + envId, + role, + tenant, + search, + page, + perPage, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserInvitesApi.listUserInvites']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Update User Invite + * @param {string} userInviteId Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {ElementsUserInviteUpdate} elementsUserInviteUpdate + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async updateUserInvite( + userInviteId: string, + projId: string, + envId: string, + elementsUserInviteUpdate: ElementsUserInviteUpdate, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserInvite( + userInviteId, + projId, + envId, + elementsUserInviteUpdate, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UserInvitesApi.updateUserInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * UserInvitesApi - factory interface + */ +export const UserInvitesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = UserInvitesApiFp(configuration); + return { + /** + * + * @summary Approve User Invite + * @param {UserInvitesApiApproveUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + approveUserInvite( + requestParameters: UserInvitesApiApproveUserInviteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .approveUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserInviteApprove, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create User Invite + * @param {UserInvitesApiCreateUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + createUserInvite( + requestParameters: UserInvitesApiCreateUserInviteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createUserInvite( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserInviteCreate, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Delete User Invite + * @param {UserInvitesApiDeleteUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + deleteUserInvite( + requestParameters: UserInvitesApiDeleteUserInviteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get User Invite + * @param {UserInvitesApiGetUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + getUserInvite( + requestParameters: UserInvitesApiGetUserInviteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary List User Invites + * @param {UserInvitesApiListUserInvitesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listUserInvites( + requestParameters: UserInvitesApiListUserInvitesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listUserInvites( + requestParameters.projId, + requestParameters.envId, + requestParameters.role, + requestParameters.tenant, + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update User Invite + * @param {UserInvitesApiUpdateUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + updateUserInvite( + requestParameters: UserInvitesApiUpdateUserInviteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserInviteUpdate, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for approveUserInvite operation in UserInvitesApi. + */ +export interface UserInvitesApiApproveUserInviteRequest { + /** + * Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + */ + readonly userInviteId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly elementsUserInviteApprove: ElementsUserInviteApprove; +} + +/** + * Request parameters for createUserInvite operation in UserInvitesApi. + */ +export interface UserInvitesApiCreateUserInviteRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly elementsUserInviteCreate: ElementsUserInviteCreate; +} + +/** + * Request parameters for deleteUserInvite operation in UserInvitesApi. + */ +export interface UserInvitesApiDeleteUserInviteRequest { + /** + * Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + */ + readonly userInviteId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; +} + +/** + * Request parameters for getUserInvite operation in UserInvitesApi. + */ +export interface UserInvitesApiGetUserInviteRequest { + /** + * Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + */ + readonly userInviteId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; +} + +/** + * Request parameters for listUserInvites operation in UserInvitesApi. + */ +export interface UserInvitesApiListUserInvitesRequest { + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + /** + * optional role filter, will only return invited users with this role. + */ + readonly role?: string; + + /** + * optional tenant filter, will only return invited users in that tenant. + */ + readonly tenant?: string; + + /** + * optional search, will only return invited users to that email, key or name. + */ + readonly search?: string; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; +} + +/** + * Request parameters for updateUserInvite operation in UserInvitesApi. + */ +export interface UserInvitesApiUpdateUserInviteRequest { + /** + * Either the unique id of the user_invite, or the URL-friendly key of the user_invite (i.e: the \"slug\"). + */ + readonly userInviteId: string; + + /** + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + */ + readonly projId: string; + + /** + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + */ + readonly envId: string; + + readonly elementsUserInviteUpdate: ElementsUserInviteUpdate; +} + +/** + * UserInvitesApi - object-oriented interface + */ +export class UserInvitesApi extends BaseAPI { + /** + * + * @summary Approve User Invite + * @param {UserInvitesApiApproveUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public approveUserInvite( + requestParameters: UserInvitesApiApproveUserInviteRequest, + options?: RawAxiosRequestConfig, + ) { + return UserInvitesApiFp(this.configuration) + .approveUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserInviteApprove, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create User Invite + * @param {UserInvitesApiCreateUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public createUserInvite( + requestParameters: UserInvitesApiCreateUserInviteRequest, + options?: RawAxiosRequestConfig, + ) { + return UserInvitesApiFp(this.configuration) + .createUserInvite( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserInviteCreate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Delete User Invite + * @param {UserInvitesApiDeleteUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public deleteUserInvite( + requestParameters: UserInvitesApiDeleteUserInviteRequest, + options?: RawAxiosRequestConfig, + ) { + return UserInvitesApiFp(this.configuration) + .deleteUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get User Invite + * @param {UserInvitesApiGetUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public getUserInvite( + requestParameters: UserInvitesApiGetUserInviteRequest, + options?: RawAxiosRequestConfig, + ) { + return UserInvitesApiFp(this.configuration) + .getUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List User Invites + * @param {UserInvitesApiListUserInvitesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listUserInvites( + requestParameters: UserInvitesApiListUserInvitesRequest, + options?: RawAxiosRequestConfig, + ) { + return UserInvitesApiFp(this.configuration) + .listUserInvites( + requestParameters.projId, + requestParameters.envId, + requestParameters.role, + requestParameters.tenant, + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update User Invite + * @param {UserInvitesApiUpdateUserInviteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public updateUserInvite( + requestParameters: UserInvitesApiUpdateUserInviteRequest, + options?: RawAxiosRequestConfig, + ) { + return UserInvitesApiFp(this.configuration) + .updateUserInvite( + requestParameters.userInviteId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserInviteUpdate, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/openapi/api/users-api.ts b/src/openapi/api/users-api.ts index d521687c..529c04f5 100644 --- a/src/openapi/api/users-api.ts +++ b/src/openapi/api/users-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,75 +10,63 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultUserRead } from '../types'; -// @ts-ignore -import { RoleAssignmentRead } from '../types'; -// @ts-ignore -import { UserCreate } from '../types'; -// @ts-ignore -import { UserRead } from '../types'; -// @ts-ignore -import { UserRoleCreate } from '../types'; -// @ts-ignore -import { UserRoleRemove } from '../types'; -// @ts-ignore -import { UserUpdate } from '../types'; +import type { Configuration } from '../configuration'; +import type { + PaginatedResultUserRead, + RoleAssignmentRead, + SearchOperator, + UserCreate, + UserRead, + UserRoleCreate, + UserRoleRemove, + UserUpdate, +} from '../types'; /** * UsersApi - axios parameter creator - * @export */ export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign Role To User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserRoleCreate} userRoleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignRoleToUser: async ( + userId: string, projId: string, envId: string, - userId: string, userRoleCreate: UserRoleCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('assignRoleToUser', 'userId', userId); // verify required parameter 'projId' is not null or undefined assertParamExists('assignRoleToUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('assignRoleToUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('assignRoleToUser', 'userId', userId); // verify required parameter 'userRoleCreate' is not null or undefined assertParamExists('assignRoleToUser', 'userRoleCreate', userRoleCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users/{user_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -97,6 +83,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -117,19 +104,19 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. + * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. Returns 201 if the user is created, 409 if the user already exists or if an inline role assignment names a tenant other than the one its resource instance already exists in. User is identified by its key, and you can only create one user with the same key inside a Permit environment. * @summary Create User * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {UserCreate} userCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createUser: async ( projId: string, envId: string, userCreate: UserCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('createUser', 'projId', projId); @@ -138,8 +125,8 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // verify required parameter 'userCreate' is not null or undefined assertParamExists('createUser', 'userCreate', userCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -156,6 +143,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -178,28 +166,28 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration /** * Deletes the user and all its related data. * @summary Delete User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ deleteUser: async ( + userId: string, projId: string, envId: string, - userId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('deleteUser', 'userId', userId); // verify required parameter 'projId' is not null or undefined assertParamExists('deleteUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('deleteUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('deleteUser', 'userId', userId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users/{user_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -215,6 +203,8 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -231,28 +221,28 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration /** * Gets a user, if such user exists. Otherwise returns 404. * @summary Get User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ getUser: async ( + userId: string, projId: string, envId: string, - userId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('getUser', 'userId', userId); // verify required parameter 'projId' is not null or undefined assertParamExists('getUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('getUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('getUser', 'userId', userId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users/{user_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -268,6 +258,8 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -286,29 +278,33 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration * @summary List Users * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {string} [role] Match users with a specific role + * @param {string} [search] Text search for the user + * @param {SearchOperator} [searchOperator] The search operator to use. `contains` performs a substring match on email, key, first_name, and last_name. `startswith` performs a prefix match on email, key, first_name, and last_name. + * @param {string} [role] Match users with a specific role. To filter users without any roles, send an empty string. + * @param {boolean} [includeResourceInstanceRoles] Should add resource instance roles * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listUsers: async ( projId: string, envId: string, search?: string, + searchOperator?: SearchOperator, role?: string, + includeResourceInstanceRoles?: boolean, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('listUsers', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('listUsers', 'envId', envId); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -328,10 +324,18 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['search'] = search; } + if (searchOperator !== undefined) { + localVarQueryParameter['search_operator'] = searchOperator; + } + if (role !== undefined) { localVarQueryParameter['role'] = role; } + if (includeResourceInstanceRoles !== undefined) { + localVarQueryParameter['include_resource_instance_roles'] = includeResourceInstanceRoles; + } + if (page !== undefined) { localVarQueryParameter['page'] = page; } @@ -340,6 +344,8 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['per_page'] = perPage; } + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -354,34 +360,34 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * + * Replace User / Sync User upsert a user in the system. If the user already exists, it will update the user with the new data. If the user does not exist, it will create a new user with the provided data. The user is identified by its key, and you can only create one user with the same key inside a Permit environment. A 200 status code will be returned if the user already exists, and a 201 status code will be returned if the user is created. * @summary Replace User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserCreate} userCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ replaceUser: async ( + userId: string, projId: string, envId: string, - userId: string, userCreate: UserCreate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('replaceUser', 'userId', userId); // verify required parameter 'projId' is not null or undefined assertParamExists('replaceUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('replaceUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('replaceUser', 'userId', userId); // verify required parameter 'userCreate' is not null or undefined assertParamExists('replaceUser', 'userCreate', userCreate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users/{user_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -398,6 +404,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -420,32 +427,34 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration /** * Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign Role From User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserRoleRemove} userRoleRemove + * @param {boolean} [returnDeleted] Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ unassignRoleFromUser: async ( + userId: string, projId: string, envId: string, - userId: string, userRoleRemove: UserRoleRemove, - options: AxiosRequestConfig = {}, + returnDeleted?: boolean, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('unassignRoleFromUser', 'userId', userId); // verify required parameter 'projId' is not null or undefined assertParamExists('unassignRoleFromUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('unassignRoleFromUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('unassignRoleFromUser', 'userId', userId); // verify required parameter 'userRoleRemove' is not null or undefined assertParamExists('unassignRoleFromUser', 'userRoleRemove', userRoleRemove); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users/{user_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -461,7 +470,12 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (returnDeleted !== undefined) { + localVarQueryParameter['return_deleted'] = returnDeleted; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -484,32 +498,32 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration /** * Partially updates the user definition. Fields that will be provided will be completely overwritten. * @summary Update User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserUpdate} userUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateUser: async ( + userId: string, projId: string, envId: string, - userId: string, userUpdate: UserUpdate, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'userId' is not null or undefined + assertParamExists('updateUser', 'userId', userId); // verify required parameter 'projId' is not null or undefined assertParamExists('updateUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('updateUser', 'envId', envId); - // verify required parameter 'userId' is not null or undefined - assertParamExists('updateUser', 'userId', userId); // verify required parameter 'userUpdate' is not null or undefined assertParamExists('updateUser', 'userUpdate', userUpdate); const localVarPath = `/v2/facts/{proj_id}/{env_id}/users/{user_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -526,6 +540,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -550,7 +565,6 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration /** * UsersApi - functional programming interface - * @export */ export const UsersApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration); @@ -558,43 +572,52 @@ export const UsersApiFp = function (configuration?: Configuration) { /** * Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign Role To User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserRoleCreate} userRoleCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async assignRoleToUser( + userId: string, projId: string, envId: string, - userId: string, userRoleCreate: UserRoleCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.assignRoleToUser( + userId, projId, envId, - userId, userRoleCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.assignRoleToUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. + * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. Returns 201 if the user is created, 409 if the user already exists or if an inline role assignment names a tenant other than the one its resource instance already exists in. User is identified by its key, and you can only create one user with the same key inside a Permit environment. * @summary Create User * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {UserCreate} userCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async createUser( projId: string, envId: string, userCreate: UserCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser( projId, @@ -602,74 +625,105 @@ export const UsersApiFp = function (configuration?: Configuration) { userCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.createUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes the user and all its related data. * @summary Delete User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async deleteUser( + userId: string, projId: string, envId: string, - userId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser( + userId, projId, envId, - userId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.deleteUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a user, if such user exists. Otherwise returns 404. * @summary Get User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async getUser( + userId: string, projId: string, envId: string, - userId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUser( + userId, projId, envId, - userId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.getUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the users defined within an environment. * @summary List Users * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {string} [role] Match users with a specific role + * @param {string} [search] Text search for the user + * @param {SearchOperator} [searchOperator] The search operator to use. `contains` performs a substring match on email, key, first_name, and last_name. `startswith` performs a prefix match on email, key, first_name, and last_name. + * @param {string} [role] Match users with a specific role. To filter users without any roles, send an empty string. + * @param {boolean} [includeResourceInstanceRoles] Should add resource instance roles * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async listUsers( projId: string, envId: string, search?: string, + searchOperator?: SearchOperator, role?: string, + includeResourceInstanceRoles?: boolean, page?: number, perPage?: number, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { @@ -677,97 +731,137 @@ export const UsersApiFp = function (configuration?: Configuration) { projId, envId, search, + searchOperator, role, + includeResourceInstanceRoles, page, perPage, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.listUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** - * + * Replace User / Sync User upsert a user in the system. If the user already exists, it will update the user with the new data. If the user does not exist, it will create a new user with the provided data. The user is identified by its key, and you can only create one user with the same key inside a Permit environment. A 200 status code will be returned if the user already exists, and a 201 status code will be returned if the user is created. * @summary Replace User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserCreate} userCreate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async replaceUser( + userId: string, projId: string, envId: string, - userId: string, userCreate: UserCreate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.replaceUser( + userId, projId, envId, - userId, userCreate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.replaceUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign Role From User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserRoleRemove} userRoleRemove + * @param {boolean} [returnDeleted] Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async unassignRoleFromUser( + userId: string, projId: string, envId: string, - userId: string, userRoleRemove: UserRoleRemove, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + returnDeleted?: boolean, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.unassignRoleFromUser( + userId, projId, envId, - userId, userRoleRemove, + returnDeleted, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.unassignRoleFromUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Partially updates the user definition. Fields that will be provided will be completely overwritten. * @summary Update User + * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {UserUpdate} userUpdate * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async updateUser( + userId: string, projId: string, envId: string, - userId: string, userUpdate: UserUpdate, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser( + userId, projId, envId, - userId, userUpdate, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersApi.updateUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * UsersApi - factory interface - * @export */ export const UsersApiFactory = function ( configuration?: Configuration, @@ -779,157 +873,171 @@ export const UsersApiFactory = function ( /** * Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign Role To User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @param {UserRoleCreate} userRoleCreate + * @param {UsersApiAssignRoleToUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ assignRoleToUser( - projId: string, - envId: string, - userId: string, - userRoleCreate: UserRoleCreate, - options?: any, + requestParameters: UsersApiAssignRoleToUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .assignRoleToUser(projId, envId, userId, userRoleCreate, options) + .assignRoleToUser( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.userRoleCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** - * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. + * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. Returns 201 if the user is created, 409 if the user already exists or if an inline role assignment names a tenant other than the one its resource instance already exists in. User is identified by its key, and you can only create one user with the same key inside a Permit environment. * @summary Create User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {UserCreate} userCreate + * @param {UsersApiCreateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ createUser( - projId: string, - envId: string, - userCreate: UserCreate, - options?: any, + requestParameters: UsersApiCreateUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .createUser(projId, envId, userCreate, options) + .createUser( + requestParameters.projId, + requestParameters.envId, + requestParameters.userCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Deletes the user and all its related data. * @summary Delete User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {UsersApiDeleteUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - deleteUser(projId: string, envId: string, userId: string, options?: any): AxiosPromise { + deleteUser( + requestParameters: UsersApiDeleteUserRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .deleteUser(projId, envId, userId, options) + .deleteUser( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Gets a user, if such user exists. Otherwise returns 404. * @summary Get User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {UsersApiGetUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ - getUser(projId: string, envId: string, userId: string, options?: any): AxiosPromise { + getUser( + requestParameters: UsersApiGetUserRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .getUser(projId, envId, userId, options) + .getUser( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the users defined within an environment. * @summary List Users - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {string} [role] Match users with a specific role - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {UsersApiListUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ listUsers( - projId: string, - envId: string, - search?: string, - role?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: UsersApiListUsersRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .listUsers(projId, envId, search, role, page, perPage, options) + .listUsers( + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.searchOperator, + requestParameters.role, + requestParameters.includeResourceInstanceRoles, + requestParameters.page, + requestParameters.perPage, + options, + ) .then((request) => request(axios, basePath)); }, /** - * + * Replace User / Sync User upsert a user in the system. If the user already exists, it will update the user with the new data. If the user does not exist, it will create a new user with the provided data. The user is identified by its key, and you can only create one user with the same key inside a Permit environment. A 200 status code will be returned if the user already exists, and a 201 status code will be returned if the user is created. * @summary Replace User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @param {UserCreate} userCreate + * @param {UsersApiReplaceUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ replaceUser( - projId: string, - envId: string, - userId: string, - userCreate: UserCreate, - options?: any, + requestParameters: UsersApiReplaceUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .replaceUser(projId, envId, userId, userCreate, options) + .replaceUser( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.userCreate, + options, + ) .then((request) => request(axios, basePath)); }, /** * Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign Role From User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @param {UserRoleRemove} userRoleRemove + * @param {UsersApiUnassignRoleFromUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ unassignRoleFromUser( - projId: string, - envId: string, - userId: string, - userRoleRemove: UserRoleRemove, - options?: any, - ): AxiosPromise { + requestParameters: UsersApiUnassignRoleFromUserRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .unassignRoleFromUser(projId, envId, userId, userRoleRemove, options) + .unassignRoleFromUser( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.userRoleRemove, + requestParameters.returnDeleted, + options, + ) .then((request) => request(axios, basePath)); }, /** * Partially updates the user definition. Fields that will be provided will be completely overwritten. * @summary Update User - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @param {UserUpdate} userUpdate + * @param {UsersApiUpdateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ updateUser( - projId: string, - envId: string, - userId: string, - userUpdate: UserUpdate, - options?: any, + requestParameters: UsersApiUpdateUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .updateUser(projId, envId, userId, userUpdate, options) + .updateUser( + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.userUpdate, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -937,282 +1045,201 @@ export const UsersApiFactory = function ( /** * Request parameters for assignRoleToUser operation in UsersApi. - * @export - * @interface UsersApiAssignRoleToUserRequest */ export interface UsersApiAssignRoleToUserRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiAssignRoleToUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiAssignRoleToUser */ readonly envId: string; - /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiAssignRoleToUser - */ - readonly userId: string; - - /** - * - * @type {UserRoleCreate} - * @memberof UsersApiAssignRoleToUser - */ readonly userRoleCreate: UserRoleCreate; } /** * Request parameters for createUser operation in UsersApi. - * @export - * @interface UsersApiCreateUserRequest */ export interface UsersApiCreateUserRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiCreateUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiCreateUser */ readonly envId: string; - /** - * - * @type {UserCreate} - * @memberof UsersApiCreateUser - */ readonly userCreate: UserCreate; } /** * Request parameters for deleteUser operation in UsersApi. - * @export - * @interface UsersApiDeleteUserRequest */ export interface UsersApiDeleteUserRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiDeleteUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiDeleteUser */ readonly envId: string; - - /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiDeleteUser - */ - readonly userId: string; } /** * Request parameters for getUser operation in UsersApi. - * @export - * @interface UsersApiGetUserRequest */ export interface UsersApiGetUserRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiGetUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiGetUser */ readonly envId: string; - - /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiGetUser - */ - readonly userId: string; } /** * Request parameters for listUsers operation in UsersApi. - * @export - * @interface UsersApiListUsersRequest */ export interface UsersApiListUsersRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiListUsers */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiListUsers */ readonly envId: string; /** - * Text search for the email field - * @type {string} - * @memberof UsersApiListUsers + * Text search for the user */ readonly search?: string; /** - * Match users with a specific role - * @type {string} - * @memberof UsersApiListUsers + * The search operator to use. `contains` performs a substring match on email, key, first_name, and last_name. `startswith` performs a prefix match on email, key, first_name, and last_name. + */ + readonly searchOperator?: SearchOperator; + + /** + * Match users with a specific role. To filter users without any roles, send an empty string. */ readonly role?: string; + /** + * Should add resource instance roles + */ + readonly includeResourceInstanceRoles?: boolean; + /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof UsersApiListUsers */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof UsersApiListUsers */ readonly perPage?: number; } /** * Request parameters for replaceUser operation in UsersApi. - * @export - * @interface UsersApiReplaceUserRequest */ export interface UsersApiReplaceUserRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiReplaceUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiReplaceUser */ readonly envId: string; - /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiReplaceUser - */ - readonly userId: string; - - /** - * - * @type {UserCreate} - * @memberof UsersApiReplaceUser - */ readonly userCreate: UserCreate; } /** * Request parameters for unassignRoleFromUser operation in UsersApi. - * @export - * @interface UsersApiUnassignRoleFromUserRequest */ export interface UsersApiUnassignRoleFromUserRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiUnassignRoleFromUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiUnassignRoleFromUser */ readonly envId: string; - /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiUnassignRoleFromUser - */ - readonly userId: string; + readonly userRoleRemove: UserRoleRemove; /** - * - * @type {UserRoleRemove} - * @memberof UsersApiUnassignRoleFromUser + * Whether to return the deleted role assignment, status code will be 200 instead of the default 204 if true */ - readonly userRoleRemove: UserRoleRemove; + readonly returnDeleted?: boolean; } /** * Request parameters for updateUser operation in UsersApi. - * @export - * @interface UsersApiUpdateUserRequest */ export interface UsersApiUpdateUserRequest { + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiUpdateUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiUpdateUser */ readonly envId: string; - /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersApiUpdateUser - */ - readonly userId: string; - - /** - * - * @type {UserUpdate} - * @memberof UsersApiUpdateUser - */ readonly userUpdate: UserUpdate; } /** * UsersApi - object-oriented interface - * @export - * @class UsersApi - * @extends {BaseAPI} */ export class UsersApi extends BaseAPI { /** @@ -1220,18 +1247,17 @@ export class UsersApi extends BaseAPI { * @summary Assign Role To User * @param {UsersApiAssignRoleToUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ public assignRoleToUser( requestParameters: UsersApiAssignRoleToUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersApiFp(this.configuration) .assignRoleToUser( + requestParameters.userId, requestParameters.projId, requestParameters.envId, - requestParameters.userId, requestParameters.userRoleCreate, options, ) @@ -1239,14 +1265,13 @@ export class UsersApi extends BaseAPI { } /** - * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. + * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. Returns 201 if the user is created, 409 if the user already exists or if an inline role assignment names a tenant other than the one its resource instance already exists in. User is identified by its key, and you can only create one user with the same key inside a Permit environment. * @summary Create User * @param {UsersApiCreateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ - public createUser(requestParameters: UsersApiCreateUserRequest, options?: AxiosRequestConfig) { + public createUser(requestParameters: UsersApiCreateUserRequest, options?: RawAxiosRequestConfig) { return UsersApiFp(this.configuration) .createUser( requestParameters.projId, @@ -1262,15 +1287,14 @@ export class UsersApi extends BaseAPI { * @summary Delete User * @param {UsersApiDeleteUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ - public deleteUser(requestParameters: UsersApiDeleteUserRequest, options?: AxiosRequestConfig) { + public deleteUser(requestParameters: UsersApiDeleteUserRequest, options?: RawAxiosRequestConfig) { return UsersApiFp(this.configuration) .deleteUser( + requestParameters.userId, requestParameters.projId, requestParameters.envId, - requestParameters.userId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1281,12 +1305,11 @@ export class UsersApi extends BaseAPI { * @summary Get User * @param {UsersApiGetUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ - public getUser(requestParameters: UsersApiGetUserRequest, options?: AxiosRequestConfig) { + public getUser(requestParameters: UsersApiGetUserRequest, options?: RawAxiosRequestConfig) { return UsersApiFp(this.configuration) - .getUser(requestParameters.projId, requestParameters.envId, requestParameters.userId, options) + .getUser(requestParameters.userId, requestParameters.projId, requestParameters.envId, options) .then((request) => request(this.axios, this.basePath)); } @@ -1295,16 +1318,17 @@ export class UsersApi extends BaseAPI { * @summary List Users * @param {UsersApiListUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ - public listUsers(requestParameters: UsersApiListUsersRequest, options?: AxiosRequestConfig) { + public listUsers(requestParameters: UsersApiListUsersRequest, options?: RawAxiosRequestConfig) { return UsersApiFp(this.configuration) .listUsers( requestParameters.projId, requestParameters.envId, requestParameters.search, + requestParameters.searchOperator, requestParameters.role, + requestParameters.includeResourceInstanceRoles, requestParameters.page, requestParameters.perPage, options, @@ -1313,19 +1337,21 @@ export class UsersApi extends BaseAPI { } /** - * + * Replace User / Sync User upsert a user in the system. If the user already exists, it will update the user with the new data. If the user does not exist, it will create a new user with the provided data. The user is identified by its key, and you can only create one user with the same key inside a Permit environment. A 200 status code will be returned if the user already exists, and a 201 status code will be returned if the user is created. * @summary Replace User * @param {UsersApiReplaceUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ - public replaceUser(requestParameters: UsersApiReplaceUserRequest, options?: AxiosRequestConfig) { + public replaceUser( + requestParameters: UsersApiReplaceUserRequest, + options?: RawAxiosRequestConfig, + ) { return UsersApiFp(this.configuration) .replaceUser( + requestParameters.userId, requestParameters.projId, requestParameters.envId, - requestParameters.userId, requestParameters.userCreate, options, ) @@ -1337,19 +1363,19 @@ export class UsersApi extends BaseAPI { * @summary Unassign Role From User * @param {UsersApiUnassignRoleFromUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ public unassignRoleFromUser( requestParameters: UsersApiUnassignRoleFromUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersApiFp(this.configuration) .unassignRoleFromUser( + requestParameters.userId, requestParameters.projId, requestParameters.envId, - requestParameters.userId, requestParameters.userRoleRemove, + requestParameters.returnDeleted, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1360,15 +1386,14 @@ export class UsersApi extends BaseAPI { * @summary Update User * @param {UsersApiUpdateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersApi + * @throws If a required parameter is missing. */ - public updateUser(requestParameters: UsersApiUpdateUserRequest, options?: AxiosRequestConfig) { + public updateUser(requestParameters: UsersApiUpdateUserRequest, options?: RawAxiosRequestConfig) { return UsersApiFp(this.configuration) .updateUser( + requestParameters.userId, requestParameters.projId, requestParameters.envId, - requestParameters.userId, requestParameters.userUpdate, options, ) diff --git a/src/openapi/api/users-elements-data-api.ts b/src/openapi/api/users-elements-data-api.ts index dfb10856..8473a8ec 100644 --- a/src/openapi/api/users-elements-data-api.ts +++ b/src/openapi/api/users-elements-data-api.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,73 +10,64 @@ * Do not edit the class manually. */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore +import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import { BASE_PATH, BaseAPI, operationServerMap, type RequestArgs } from '../base'; import { DUMMY_BASE_URL, assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, + createRequestFunction, + serializeDataIfNeeded, setBearerAuthToObject, - setOAuthToObject, setSearchParams, - serializeDataIfNeeded, toPathString, - createRequestFunction, } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { ElementsRoleRead } from '../types'; -// @ts-ignore -import { ElementsUserCreate } from '../types'; -// @ts-ignore -import { ElementsUserRoleCreate } from '../types'; -// @ts-ignore -import { ElementsUserRoleRemove } from '../types'; -// @ts-ignore -import { HTTPValidationError } from '../types'; -// @ts-ignore -import { PaginatedResultUserRead } from '../types'; -// @ts-ignore -import { RoleAssignmentRead } from '../types'; -// @ts-ignore -import { UserRead } from '../types'; +import type { Configuration } from '../configuration'; +import type { + ElementsRoleRead, + ElementsUserCreate, + ElementsUserRoleCreate, + ElementsUserRoleRemove, + PaginatedResultElementsUserInviteRead, + PaginatedResultUserRead, + ResponseElementsCreateUserV2ElementsProjIdEnvIdConfigElementsConfigIdDataUsersPost, + RoleAssignmentRead, + UserInviteStatus, +} from '../types'; /** * UsersElementsDataApi - axios parameter creator - * @export */ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign role to user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsUserRoleCreate} elementsUserRoleCreate + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsAssignRoleToUser: async ( - projId: string, - envId: string, elementsConfigId: string, userId: string, + projId: string, + envId: string, elementsUserRoleCreate: ElementsUserRoleCreate, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('elementsAssignRoleToUser', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('elementsAssignRoleToUser', 'envId', envId); // verify required parameter 'elementsConfigId' is not null or undefined assertParamExists('elementsAssignRoleToUser', 'elementsConfigId', elementsConfigId); // verify required parameter 'userId' is not null or undefined assertParamExists('elementsAssignRoleToUser', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('elementsAssignRoleToUser', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('elementsAssignRoleToUser', 'envId', envId); // verify required parameter 'elementsUserRoleCreate' is not null or undefined assertParamExists( 'elementsAssignRoleToUser', @@ -87,10 +76,10 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C ); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -106,7 +95,12 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -129,32 +123,34 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C /** * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. * @summary Create user + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {ElementsUserCreate} elementsUserCreate + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsCreateUser: async ( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, elementsUserCreate: ElementsUserCreate, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('elementsCreateUser', 'elementsConfigId', elementsConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('elementsCreateUser', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('elementsCreateUser', 'envId', envId); - // verify required parameter 'elementsConfigId' is not null or undefined - assertParamExists('elementsCreateUser', 'elementsConfigId', elementsConfigId); // verify required parameter 'elementsUserCreate' is not null or undefined assertParamExists('elementsCreateUser', 'elementsUserCreate', elementsUserCreate); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -170,7 +166,12 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -197,15 +198,17 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsDeleteUser: async ( projId: string, envId: string, elementsConfigId: string, userId: string, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'projId' is not null or undefined assertParamExists('elementsDeleteUser', 'projId', projId); @@ -217,10 +220,10 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C assertParamExists('elementsDeleteUser', 'userId', userId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))) + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{user_id}', encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -236,6 +239,12 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -252,34 +261,36 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C /** * Lists all the users defined within an environment. * @summary List roles + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} [search] Text search for the email field * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsListRoles: async ( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, search?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('elementsListRoles', 'elementsConfigId', elementsConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('elementsListRoles', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('elementsListRoles', 'envId', envId); - // verify required parameter 'elementsConfigId' is not null or undefined - assertParamExists('elementsListRoles', 'elementsConfigId', elementsConfigId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -307,6 +318,12 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['per_page'] = perPage; } + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -323,34 +340,36 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C /** * Lists all the users defined within an environment. * @summary List users + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} [search] Text search for the email field * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsListUsers: async ( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, search?: string, page?: number, perPage?: number, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('elementsListUsers', 'elementsConfigId', elementsConfigId); // verify required parameter 'projId' is not null or undefined assertParamExists('elementsListUsers', 'projId', projId); // verify required parameter 'envId' is not null or undefined assertParamExists('elementsListUsers', 'envId', envId); - // verify required parameter 'elementsConfigId' is not null or undefined - assertParamExists('elementsListUsers', 'elementsConfigId', elementsConfigId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -378,6 +397,12 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C localVarQueryParameter['per_page'] = perPage; } + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -394,30 +419,32 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C /** * Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign role from user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsUserRoleRemove} elementsUserRoleRemove + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsUnassignRoleFromUser: async ( - projId: string, - envId: string, elementsConfigId: string, userId: string, + projId: string, + envId: string, elementsUserRoleRemove: ElementsUserRoleRemove, - options: AxiosRequestConfig = {}, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projId' is not null or undefined - assertParamExists('elementsUnassignRoleFromUser', 'projId', projId); - // verify required parameter 'envId' is not null or undefined - assertParamExists('elementsUnassignRoleFromUser', 'envId', envId); // verify required parameter 'elementsConfigId' is not null or undefined assertParamExists('elementsUnassignRoleFromUser', 'elementsConfigId', elementsConfigId); // verify required parameter 'userId' is not null or undefined assertParamExists('elementsUnassignRoleFromUser', 'userId', userId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('elementsUnassignRoleFromUser', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('elementsUnassignRoleFromUser', 'envId', envId); // verify required parameter 'elementsUserRoleRemove' is not null or undefined assertParamExists( 'elementsUnassignRoleFromUser', @@ -426,10 +453,10 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C ); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles` - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))) - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))) - .replace(`{${'user_id'}}`, encodeURIComponent(String(userId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{user_id}', encodeURIComponent(String(userId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -445,7 +472,12 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; @@ -465,6 +497,92 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C options: localVarRequestOptions, }; }, + /** + * List all Elements User Invites for the current environment and tenant. + * @summary List all Elements User Invites + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [search] Text search for the email field + * @param {UserInviteStatus} [status] Status of the user invite + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listElementsUserInvites: async ( + elementsConfigId: string, + projId: string, + envId: string, + search?: string, + status?: UserInviteStatus, + page?: number, + perPage?: number, + resourceInstanceId?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'elementsConfigId' is not null or undefined + assertParamExists('listElementsUserInvites', 'elementsConfigId', elementsConfigId); + // verify required parameter 'projId' is not null or undefined + assertParamExists('listElementsUserInvites', 'projId', projId); + // verify required parameter 'envId' is not null or undefined + assertParamExists('listElementsUserInvites', 'envId', envId); + const localVarPath = + `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/user-invites` + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage; + } + + if (resourceInstanceId !== undefined) { + localVarQueryParameter['resource_instance_id'] = resourceInstanceId; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Updates the embed_config. * @summary Set Config Active @@ -472,13 +590,13 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ setConfigActive: async ( elementsConfigId: string, projId: string, envId: string, - options: AxiosRequestConfig = {}, + options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'elementsConfigId' is not null or undefined assertParamExists('setConfigActive', 'elementsConfigId', elementsConfigId); @@ -487,9 +605,9 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C // verify required parameter 'envId' is not null or undefined assertParamExists('setConfigActive', 'envId', envId); const localVarPath = `/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/active` - .replace(`{${'elements_config_id'}}`, encodeURIComponent(String(elementsConfigId))) - .replace(`{${'proj_id'}}`, encodeURIComponent(String(projId))) - .replace(`{${'env_id'}}`, encodeURIComponent(String(envId))); + .replace('{elements_config_id}', encodeURIComponent(String(elementsConfigId))) + .replace('{proj_id}', encodeURIComponent(String(projId))) + .replace('{env_id}', encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -505,6 +623,8 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); + localVarHeaderParameter['Accept'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -523,7 +643,6 @@ export const UsersElementsDataApiAxiosParamCreator = function (configuration?: C /** * UsersElementsDataApi - functional programming interface - * @export */ export const UsersElementsDataApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = UsersElementsDataApiAxiosParamCreator(configuration); @@ -531,57 +650,90 @@ export const UsersElementsDataApiFp = function (configuration?: Configuration) { /** * Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign role to user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsUserRoleCreate} elementsUserRoleCreate + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsAssignRoleToUser( - projId: string, - envId: string, elementsConfigId: string, userId: string, + projId: string, + envId: string, elementsUserRoleCreate: ElementsUserRoleCreate, - options?: AxiosRequestConfig, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsAssignRoleToUser( - projId, - envId, elementsConfigId, userId, + projId, + envId, elementsUserRoleCreate, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.elementsAssignRoleToUser']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. * @summary Create user + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {ElementsUserCreate} elementsUserCreate + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsCreateUser( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, elementsUserCreate: ElementsUserCreate, - options?: AxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsCreateUser( + elementsConfigId, projId, envId, - elementsConfigId, elementsUserCreate, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.elementsCreateUser']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * @@ -590,121 +742,229 @@ export const UsersElementsDataApiFp = function (configuration?: Configuration) { * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsDeleteUser( projId: string, envId: string, elementsConfigId: string, userId: string, - options?: AxiosRequestConfig, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsDeleteUser( projId, envId, elementsConfigId, userId, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.elementsDeleteUser']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the users defined within an environment. * @summary List roles + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} [search] Text search for the email field * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsListRoles( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, search?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsListRoles( + elementsConfigId, projId, envId, - elementsConfigId, search, page, perPage, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.elementsListRoles']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all the users defined within an environment. * @summary List users + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} [search] Text search for the email field * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsListUsers( + elementsConfigId: string, projId: string, envId: string, - elementsConfigId: string, search?: string, page?: number, perPage?: number, - options?: AxiosRequestConfig, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsListUsers( + elementsConfigId, projId, envId, - elementsConfigId, search, page, perPage, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.elementsListUsers']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign role from user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ElementsUserRoleRemove} elementsUserRoleRemove + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async elementsUnassignRoleFromUser( - projId: string, - envId: string, elementsConfigId: string, userId: string, + projId: string, + envId: string, elementsUserRoleRemove: ElementsUserRoleRemove, - options?: AxiosRequestConfig, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.elementsUnassignRoleFromUser( - projId, - envId, elementsConfigId, userId, + projId, + envId, elementsUserRoleRemove, + resourceInstanceId, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.elementsUnassignRoleFromUser']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all Elements User Invites for the current environment and tenant. + * @summary List all Elements User Invites + * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). + * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {string} [search] Text search for the email field + * @param {UserInviteStatus} [status] Status of the user invite + * @param {number} [page] Page number of the results to fetch, starting at 1. + * @param {number} [perPage] The number of results per page (max 100). + * @param {string} [resourceInstanceId] For ReBAC Elements, the resource instance ID or key to work on + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + async listElementsUserInvites( + elementsConfigId: string, + projId: string, + envId: string, + search?: string, + status?: UserInviteStatus, + page?: number, + perPage?: number, + resourceInstanceId?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listElementsUserInvites( + elementsConfigId, + projId, + envId, + search, + status, + page, + perPage, + resourceInstanceId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.listElementsUserInvites']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the embed_config. @@ -713,13 +973,13 @@ export const UsersElementsDataApiFp = function (configuration?: Configuration) { * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ async setConfigActive( elementsConfigId: string, projId: string, envId: string, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setConfigActive( elementsConfigId, @@ -727,14 +987,23 @@ export const UsersElementsDataApiFp = function (configuration?: Configuration) { envId, options, ); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['UsersElementsDataApi.setConfigActive']?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * UsersElementsDataApi - factory interface - * @export */ export const UsersElementsDataApiFactory = function ( configuration?: Configuration, @@ -746,29 +1015,22 @@ export const UsersElementsDataApiFactory = function ( /** * Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign role to user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @param {ElementsUserRoleCreate} elementsUserRoleCreate + * @param {UsersElementsDataApiElementsAssignRoleToUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsAssignRoleToUser( - projId: string, - envId: string, - elementsConfigId: string, - userId: string, - elementsUserRoleCreate: ElementsUserRoleCreate, - options?: any, + requestParameters: UsersElementsDataApiElementsAssignRoleToUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .elementsAssignRoleToUser( - projId, - envId, - elementsConfigId, - userId, - elementsUserRoleCreate, + requestParameters.elementsConfigId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserRoleCreate, + requestParameters.resourceInstanceId, options, ) .then((request) => request(axios, basePath)); @@ -776,121 +1038,139 @@ export const UsersElementsDataApiFactory = function ( /** * Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body. * @summary Create user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {ElementsUserCreate} elementsUserCreate + * @param {UsersElementsDataApiElementsCreateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsCreateUser( - projId: string, - envId: string, - elementsConfigId: string, - elementsUserCreate: ElementsUserCreate, - options?: any, - ): AxiosPromise { + requestParameters: UsersElementsDataApiElementsCreateUserRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { return localVarFp - .elementsCreateUser(projId, envId, elementsConfigId, elementsUserCreate, options) + .elementsCreateUser( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserCreate, + requestParameters.resourceInstanceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * * @summary Delete user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + * @param {UsersElementsDataApiElementsDeleteUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsDeleteUser( - projId: string, - envId: string, - elementsConfigId: string, - userId: string, - options?: any, + requestParameters: UsersElementsDataApiElementsDeleteUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .elementsDeleteUser(projId, envId, elementsConfigId, userId, options) + .elementsDeleteUser( + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsConfigId, + requestParameters.userId, + requestParameters.resourceInstanceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the users defined within an environment. * @summary List roles - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {UsersElementsDataApiElementsListRolesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsListRoles( - projId: string, - envId: string, - elementsConfigId: string, - search?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: UsersElementsDataApiElementsListRolesRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp - .elementsListRoles(projId, envId, elementsConfigId, search, page, perPage, options) + .elementsListRoles( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Lists all the users defined within an environment. * @summary List users - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} [search] Text search for the email field - * @param {number} [page] Page number of the results to fetch, starting at 1. - * @param {number} [perPage] The number of results per page (max 100). + * @param {UsersElementsDataApiElementsListUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsListUsers( - projId: string, - envId: string, - elementsConfigId: string, - search?: string, - page?: number, - perPage?: number, - options?: any, + requestParameters: UsersElementsDataApiElementsListUsersRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .elementsListUsers(projId, envId, elementsConfigId, search, page, perPage, options) + .elementsListUsers( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, + options, + ) .then((request) => request(axios, basePath)); }, /** * Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign role from user - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @param {ElementsUserRoleRemove} elementsUserRoleRemove + * @param {UsersElementsDataApiElementsUnassignRoleFromUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ elementsUnassignRoleFromUser( - projId: string, - envId: string, - elementsConfigId: string, - userId: string, - elementsUserRoleRemove: ElementsUserRoleRemove, - options?: any, + requestParameters: UsersElementsDataApiElementsUnassignRoleFromUserRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .elementsUnassignRoleFromUser( - projId, - envId, - elementsConfigId, - userId, - elementsUserRoleRemove, + requestParameters.elementsConfigId, + requestParameters.userId, + requestParameters.projId, + requestParameters.envId, + requestParameters.elementsUserRoleRemove, + requestParameters.resourceInstanceId, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * List all Elements User Invites for the current environment and tenant. + * @summary List all Elements User Invites + * @param {UsersElementsDataApiListElementsUserInvitesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + listElementsUserInvites( + requestParameters: UsersElementsDataApiListElementsUserInvitesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listElementsUserInvites( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.status, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, options, ) .then((request) => request(axios, basePath)); @@ -898,20 +1178,21 @@ export const UsersElementsDataApiFactory = function ( /** * Updates the embed_config. * @summary Set Config Active - * @param {string} elementsConfigId Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). + * @param {UsersElementsDataApiSetConfigActiveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} + * @throws If a required parameter is missing. */ setConfigActive( - elementsConfigId: string, - projId: string, - envId: string, - options?: any, + requestParameters: UsersElementsDataApiSetConfigActiveRequest, + options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .setConfigActive(elementsConfigId, projId, envId, options) + .setConfigActive( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + options, + ) .then((request) => request(axios, basePath)); }, }; @@ -919,289 +1200,272 @@ export const UsersElementsDataApiFactory = function ( /** * Request parameters for elementsAssignRoleToUser operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiElementsAssignRoleToUserRequest */ export interface UsersElementsDataApiElementsAssignRoleToUserRequest { /** - * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsAssignRoleToUser + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). */ - readonly projId: string; + readonly elementsConfigId: string; /** - * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsAssignRoleToUser + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). */ - readonly envId: string; + readonly userId: string; /** - * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsAssignRoleToUser + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly elementsConfigId: string; + readonly projId: string; /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsAssignRoleToUser + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly userId: string; + readonly envId: string; + + readonly elementsUserRoleCreate: ElementsUserRoleCreate; /** - * - * @type {ElementsUserRoleCreate} - * @memberof UsersElementsDataApiElementsAssignRoleToUser + * For ReBAC Elements, the resource instance ID or key to work on */ - readonly elementsUserRoleCreate: ElementsUserRoleCreate; + readonly resourceInstanceId?: string; } /** * Request parameters for elementsCreateUser operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiElementsCreateUserRequest */ export interface UsersElementsDataApiElementsCreateUserRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsCreateUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsCreateUser */ readonly envId: string; - /** - * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsCreateUser - */ - readonly elementsConfigId: string; + readonly elementsUserCreate: ElementsUserCreate; /** - * - * @type {ElementsUserCreate} - * @memberof UsersElementsDataApiElementsCreateUser + * For ReBAC Elements, the resource instance ID or key to work on */ - readonly elementsUserCreate: ElementsUserCreate; + readonly resourceInstanceId?: string; } /** * Request parameters for elementsDeleteUser operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiElementsDeleteUserRequest */ export interface UsersElementsDataApiElementsDeleteUserRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsDeleteUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsDeleteUser */ readonly envId: string; /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsDeleteUser */ readonly elementsConfigId: string; /** * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsDeleteUser */ readonly userId: string; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; } /** * Request parameters for elementsListRoles operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiElementsListRolesRequest */ export interface UsersElementsDataApiElementsListRolesRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsListRoles */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsListRoles */ readonly envId: string; - /** - * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsListRoles - */ - readonly elementsConfigId: string; - /** * Text search for the email field - * @type {string} - * @memberof UsersElementsDataApiElementsListRoles */ readonly search?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof UsersElementsDataApiElementsListRoles */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof UsersElementsDataApiElementsListRoles */ readonly perPage?: number; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; } /** * Request parameters for elementsListUsers operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiElementsListUsersRequest */ export interface UsersElementsDataApiElementsListUsersRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsListUsers */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsListUsers */ readonly envId: string; - /** - * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsListUsers - */ - readonly elementsConfigId: string; - /** * Text search for the email field - * @type {string} - * @memberof UsersElementsDataApiElementsListUsers */ readonly search?: string; /** * Page number of the results to fetch, starting at 1. - * @type {number} - * @memberof UsersElementsDataApiElementsListUsers */ readonly page?: number; /** * The number of results per page (max 100). - * @type {number} - * @memberof UsersElementsDataApiElementsListUsers */ readonly perPage?: number; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; } /** * Request parameters for elementsUnassignRoleFromUser operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiElementsUnassignRoleFromUserRequest */ export interface UsersElementsDataApiElementsUnassignRoleFromUserRequest { + /** + * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). + */ + readonly elementsConfigId: string; + + /** + * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). + */ + readonly userId: string; + /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsUnassignRoleFromUser */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsUnassignRoleFromUser */ readonly envId: string; + readonly elementsUserRoleRemove: ElementsUserRoleRemove; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; +} + +/** + * Request parameters for listElementsUserInvites operation in UsersElementsDataApi. + */ +export interface UsersElementsDataApiListElementsUserInvitesRequest { /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsUnassignRoleFromUser */ readonly elementsConfigId: string; /** - * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiElementsUnassignRoleFromUser + * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). */ - readonly userId: string; + readonly projId: string; /** - * - * @type {ElementsUserRoleRemove} - * @memberof UsersElementsDataApiElementsUnassignRoleFromUser + * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). */ - readonly elementsUserRoleRemove: ElementsUserRoleRemove; + readonly envId: string; + + /** + * Text search for the email field + */ + readonly search?: string; + + /** + * Status of the user invite + */ + readonly status?: UserInviteStatus; + + /** + * Page number of the results to fetch, starting at 1. + */ + readonly page?: number; + + /** + * The number of results per page (max 100). + */ + readonly perPage?: number; + + /** + * For ReBAC Elements, the resource instance ID or key to work on + */ + readonly resourceInstanceId?: string; } /** * Request parameters for setConfigActive operation in UsersElementsDataApi. - * @export - * @interface UsersElementsDataApiSetConfigActiveRequest */ export interface UsersElementsDataApiSetConfigActiveRequest { /** * Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiSetConfigActive */ readonly elementsConfigId: string; /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiSetConfigActive */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). - * @type {string} - * @memberof UsersElementsDataApiSetConfigActive */ readonly envId: string; } /** * UsersElementsDataApi - object-oriented interface - * @export - * @class UsersElementsDataApi - * @extends {BaseAPI} */ export class UsersElementsDataApi extends BaseAPI { /** @@ -1209,20 +1473,20 @@ export class UsersElementsDataApi extends BaseAPI { * @summary Assign role to user * @param {UsersElementsDataApiElementsAssignRoleToUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public elementsAssignRoleToUser( requestParameters: UsersElementsDataApiElementsAssignRoleToUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .elementsAssignRoleToUser( - requestParameters.projId, - requestParameters.envId, requestParameters.elementsConfigId, requestParameters.userId, + requestParameters.projId, + requestParameters.envId, requestParameters.elementsUserRoleCreate, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1233,19 +1497,19 @@ export class UsersElementsDataApi extends BaseAPI { * @summary Create user * @param {UsersElementsDataApiElementsCreateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public elementsCreateUser( requestParameters: UsersElementsDataApiElementsCreateUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .elementsCreateUser( + requestParameters.elementsConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.elementsConfigId, requestParameters.elementsUserCreate, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1256,12 +1520,11 @@ export class UsersElementsDataApi extends BaseAPI { * @summary Delete user * @param {UsersElementsDataApiElementsDeleteUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public elementsDeleteUser( requestParameters: UsersElementsDataApiElementsDeleteUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .elementsDeleteUser( @@ -1269,6 +1532,7 @@ export class UsersElementsDataApi extends BaseAPI { requestParameters.envId, requestParameters.elementsConfigId, requestParameters.userId, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1279,21 +1543,21 @@ export class UsersElementsDataApi extends BaseAPI { * @summary List roles * @param {UsersElementsDataApiElementsListRolesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public elementsListRoles( requestParameters: UsersElementsDataApiElementsListRolesRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .elementsListRoles( + requestParameters.elementsConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.elementsConfigId, requestParameters.search, requestParameters.page, requestParameters.perPage, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1304,21 +1568,21 @@ export class UsersElementsDataApi extends BaseAPI { * @summary List users * @param {UsersElementsDataApiElementsListUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public elementsListUsers( requestParameters: UsersElementsDataApiElementsListUsersRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .elementsListUsers( + requestParameters.elementsConfigId, requestParameters.projId, requestParameters.envId, - requestParameters.elementsConfigId, requestParameters.search, requestParameters.page, requestParameters.perPage, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1329,20 +1593,46 @@ export class UsersElementsDataApi extends BaseAPI { * @summary Unassign role from user * @param {UsersElementsDataApiElementsUnassignRoleFromUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public elementsUnassignRoleFromUser( requestParameters: UsersElementsDataApiElementsUnassignRoleFromUserRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .elementsUnassignRoleFromUser( - requestParameters.projId, - requestParameters.envId, requestParameters.elementsConfigId, requestParameters.userId, + requestParameters.projId, + requestParameters.envId, requestParameters.elementsUserRoleRemove, + requestParameters.resourceInstanceId, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * List all Elements User Invites for the current environment and tenant. + * @summary List all Elements User Invites + * @param {UsersElementsDataApiListElementsUserInvitesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws If a required parameter is missing. + */ + public listElementsUserInvites( + requestParameters: UsersElementsDataApiListElementsUserInvitesRequest, + options?: RawAxiosRequestConfig, + ) { + return UsersElementsDataApiFp(this.configuration) + .listElementsUserInvites( + requestParameters.elementsConfigId, + requestParameters.projId, + requestParameters.envId, + requestParameters.search, + requestParameters.status, + requestParameters.page, + requestParameters.perPage, + requestParameters.resourceInstanceId, options, ) .then((request) => request(this.axios, this.basePath)); @@ -1353,12 +1643,11 @@ export class UsersElementsDataApi extends BaseAPI { * @summary Set Config Active * @param {UsersElementsDataApiSetConfigActiveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UsersElementsDataApi + * @throws If a required parameter is missing. */ public setConfigActive( requestParameters: UsersElementsDataApiSetConfigActiveRequest, - options?: AxiosRequestConfig, + options?: RawAxiosRequestConfig, ) { return UsersElementsDataApiFp(this.configuration) .setConfigActive( diff --git a/src/openapi/base.ts b/src/openapi/base.ts index 020d6166..5ea4477c 100644 --- a/src/openapi/base.ts +++ b/src/openapi/base.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,17 +10,12 @@ * Do not edit the class manually. */ -import { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +import type { Configuration } from './configuration'; export const BASE_PATH = 'http://localhost'.replace(/\/+$/, ''); -/** - * - * @export - */ export const COLLECTION_FORMATS = { csv: ',', ssv: ' ', @@ -30,21 +23,11 @@ export const COLLECTION_FORMATS = { pipes: '|', }; -/** - * - * @export - * @interface RequestArgs - */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } -/** - * - * @export - * @class BaseAPI - */ export class BaseAPI { protected configuration: Configuration | undefined; @@ -55,20 +38,26 @@ export class BaseAPI { ) { if (configuration) { this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; + this.basePath = configuration.basePath ?? basePath; } } } -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ export class RequiredError extends Error { - name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { + constructor( + public field: string, + msg?: string, + ) { super(msg); + this.name = 'RequiredError'; } } + +interface ServerMap { + [key: string]: { + url: string; + description: string; + }[]; +} + +export const operationServerMap: ServerMap = {}; diff --git a/src/openapi/common.ts b/src/openapi/common.ts index fb5bab62..b2f908f5 100644 --- a/src/openapi/common.ts +++ b/src/openapi/common.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,20 +10,16 @@ * Do not edit the class manually. */ -import { Configuration } from './configuration'; -import { RequiredError, RequestArgs } from './base'; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import type { RequestArgs } from './base'; +import { RequiredError } from './base'; +import type { Configuration } from './configuration'; -/** - * - * @export - */ export const DUMMY_BASE_URL = 'https://example.com'; /** * - * @throws {RequiredError} - * @export + * @throws If a required parameter is missing. */ export const assertParamExists = function ( functionName: string, @@ -40,10 +34,6 @@ export const assertParamExists = function ( } }; -/** - * - * @export - */ export const setApiKeyToObject = async function ( object: any, keyParamName: string, @@ -58,20 +48,12 @@ export const setApiKeyToObject = async function ( } }; -/** - * - * @export - */ export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { if (configuration && (configuration.username || configuration.password)) { object['auth'] = { username: configuration.username, password: configuration.password }; } }; -/** - * - * @export - */ export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { if (configuration && configuration.accessToken) { const accessToken = @@ -82,10 +64,6 @@ export const setBearerAuthToObject = async function (object: any, configuration? } }; -/** - * - * @export - */ export const setOAuthToObject = async function ( object: any, name: string, @@ -106,8 +84,9 @@ function setFlattenedQueryParams( parameter: any, key: string = '', ): void { + if (parameter == null) return; if (typeof parameter === 'object') { - if (Array.isArray(parameter)) { + if (Array.isArray(parameter) || parameter instanceof Set) { (parameter as any[]).forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key)); } else { Object.keys(parameter).forEach((currentKey) => @@ -127,10 +106,6 @@ function setFlattenedQueryParams( } } -/** - * - * @export - */ export const setSearchParams = function (url: URL, ...objects: any[]) { const searchParams = new URLSearchParams(url.search); setFlattenedQueryParams(searchParams, objects); @@ -138,9 +113,18 @@ export const setSearchParams = function (url: URL, ...objects: any[]) { }; /** - * - * @export + * JSON serialization helper function which replaces instances of unserializable types with serializable ones. + * This function will run for every key-value pair encountered by JSON.stringify while traversing an object. + * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required. */ +export const replaceWithSerializableTypeIfNeeded = function (key: string, value: any) { + if (value instanceof Set) { + return Array.from(value); + } else { + return value; + } +}; + export const serializeDataIfNeeded = function ( value: any, requestOptions: any, @@ -151,21 +135,15 @@ export const serializeDataIfNeeded = function ( nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers['Content-Type']) : nonString; - return needsSerialization ? JSON.stringify(value !== undefined ? value : {}) : value || ''; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded) + : value || ''; }; -/** - * - * @export - */ export const toPathString = function (url: URL) { return url.pathname + url.search + url.hash; }; -/** - * - * @export - */ export const createRequestFunction = function ( axiosArgs: RequestArgs, globalAxios: AxiosInstance, @@ -175,7 +153,7 @@ export const createRequestFunction = function ( return >( axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH, - ) => { + ): ReturnType> => { const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url, diff --git a/src/openapi/configuration.ts b/src/openapi/configuration.ts index a121e86c..fd8d3d49 100644 --- a/src/openapi/configuration.ts +++ b/src/openapi/configuration.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,6 +10,18 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string; + service?: string; + }; + credentials?: { + accessKeyId?: string; + secretAccessKey?: string; + sessionToken?: string; + }; +} + export interface ConfigurationParameters { apiKey?: | string @@ -25,7 +35,9 @@ export interface ConfigurationParameters { | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; + serverIndex?: number; baseOptions?: any; formDataCtor?: new () => any; } @@ -34,50 +46,51 @@ export class Configuration { /** * parameter for apiKey security * @param name security name - * @memberof Configuration */ apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); + | (string | Promise | ((name: string) => string) | ((name: string) => Promise)) + | undefined; /** * parameter for basic security - * - * @type {string} - * @memberof Configuration */ - username?: string; + username?: string | undefined; /** * parameter for basic security - * - * @type {string} - * @memberof Configuration */ - password?: string; + password?: string | undefined; /** * parameter for oauth2 security * @param name security name * @param scopes oauth2 scope - * @memberof Configuration */ accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); + | ( + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + ) + | undefined; + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + */ + awsv4?: AWSv4Configuration | undefined; /** * override base path - * - * @type {string} - * @memberof Configuration */ - basePath?: string; + basePath?: string | undefined; + /** + * override server index + */ + serverIndex?: number | undefined; /** * base options for axios calls - * - * @type {any} - * @memberof Configuration */ baseOptions?: any; /** @@ -87,15 +100,22 @@ export class Configuration { * * @type {new () => FormData} */ - formDataCtor?: new () => any; + formDataCtor?: (new () => any) | undefined; constructor(param: ConfigurationParameters = {}) { this.apiKey = param.apiKey; this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; - this.baseOptions = param.baseOptions; + this.serverIndex = param.serverIndex; + this.baseOptions = { + ...param.baseOptions, + headers: { + ...param.baseOptions?.headers, + }, + }; this.formDataCtor = param.formDataCtor; } @@ -110,12 +130,7 @@ export class Configuration { * @return True if the given MIME is JSON, false otherwise. */ public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', - 'i', - ); - return ( - mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') - ); + const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i; + return mime !== null && jsonMime.test(mime); } } diff --git a/src/openapi/index.ts b/src/openapi/index.ts index 52bde7f8..7890dc0b 100644 --- a/src/openapi/index.ts +++ b/src/openapi/index.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service diff --git a/src/openapi/types/access-request-approved.ts b/src/openapi/types/access-request-approved.ts new file mode 100644 index 00000000..a002002c --- /dev/null +++ b/src/openapi/types/access-request-approved.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AccessRequestDetails } from './access-request-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface AccessRequestApproved { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * details of the access request, including the resource and tenant + */ + access_request_details: AccessRequestDetails; + /** + * Optional business justification provided by the user requesting access + */ + reason?: string; + /** + * Unique id of the access request + */ + id: string; + /** + * Unique id of the organization that the access request belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the access request belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the access request belongs to. + */ + environment_id: string; + /** + * Date and time when the access request was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the access request was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the access + */ + requesting_user_id?: string; + /** + * when the access request was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * current status of the access request + */ + status: RequestStatus; + /** + * Optional id of the user who review the access request + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/access-request-canceled.ts b/src/openapi/types/access-request-canceled.ts new file mode 100644 index 00000000..6f619794 --- /dev/null +++ b/src/openapi/types/access-request-canceled.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AccessRequestDetails } from './access-request-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface AccessRequestCanceled { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * details of the access request, including the resource and tenant + */ + access_request_details: AccessRequestDetails; + /** + * Optional business justification provided by the user requesting access + */ + reason?: string; + /** + * Unique id of the access request + */ + id: string; + /** + * Unique id of the organization that the access request belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the access request belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the access request belongs to. + */ + environment_id: string; + /** + * Date and time when the access request was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the access request was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the access + */ + requesting_user_id?: string; + /** + * when the access request was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * current status of the access request + */ + status: RequestStatus; + /** + * Optional id of the user who review the access request + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/access-request-create-details.ts b/src/openapi/types/access-request-create-details.ts new file mode 100644 index 00000000..b92ec146 --- /dev/null +++ b/src/openapi/types/access-request-create-details.ts @@ -0,0 +1,30 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface AccessRequestCreateDetails { + /** + * tenant id or key that the user is requesting access to + */ + tenant: string; + /** + * resource id or key that the user is requesting access to + */ + resource?: string; + /** + * resource instance id or key that the user is requesting access to + */ + resource_instance?: string; + /** + * role id or key that the user is requesting access to + */ + role: string; +} diff --git a/src/openapi/types/access-request-denied.ts b/src/openapi/types/access-request-denied.ts new file mode 100644 index 00000000..8ac10be1 --- /dev/null +++ b/src/openapi/types/access-request-denied.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AccessRequestDetails } from './access-request-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface AccessRequestDenied { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * details of the access request, including the resource and tenant + */ + access_request_details: AccessRequestDetails; + /** + * Optional business justification provided by the user requesting access + */ + reason?: string; + /** + * Unique id of the access request + */ + id: string; + /** + * Unique id of the organization that the access request belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the access request belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the access request belongs to. + */ + environment_id: string; + /** + * Date and time when the access request was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the access request was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the access + */ + requesting_user_id?: string; + /** + * when the access request was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * current status of the access request + */ + status: RequestStatus; + /** + * Optional id of the user who review the access request + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/access-request-details.ts b/src/openapi/types/access-request-details.ts new file mode 100644 index 00000000..89f04e16 --- /dev/null +++ b/src/openapi/types/access-request-details.ts @@ -0,0 +1,34 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface AccessRequestDetails { + /** + * tenant id or key that the user is requesting access to + */ + tenant: string; + /** + * resource id or key that the user is requesting access to + */ + resource: string; + /** + * Either the unique id of the resource instance that the user is requesting access to, or the URL-friendly key of the (i.e: file:my_file) + */ + resource_instance?: string; + /** + * role id or key that the user is requesting access to + */ + role: string; + /** + * element config id or key that the user is requesting access request from + */ + element_config_id?: string; +} diff --git a/src/openapi/types/access-request-list.ts b/src/openapi/types/access-request-list.ts new file mode 100644 index 00000000..eb45864f --- /dev/null +++ b/src/openapi/types/access-request-list.ts @@ -0,0 +1,86 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AccessRequestDetails } from './access-request-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface AccessRequestList { + /** + * details of the access request, including the resource and tenant + */ + access_request_details: AccessRequestDetails; + /** + * Optional business justification provided by the user requesting access + */ + reason?: string; + /** + * Unique id of the access request + */ + id: string; + /** + * Unique id of the organization that the access request belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the access request belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the access request belongs to. + */ + environment_id: string; + /** + * Date and time when the access request was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the access request was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the access + */ + requesting_user_id?: string; + /** + * when the access request was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * current status of the access request + */ + status: RequestStatus; + /** + * Optional id of the user who review the access request + */ + reviewer_user_id?: string; + /** + * email of the user that is requesting the access + */ + requesting_user_email?: string; + /** + * first name of the user that is requesting the access + */ + requesting_user_first_name?: string; + /** + * last name of the user that is requesting the access + */ + requesting_user_last_name?: string; +} diff --git a/src/openapi/types/access-request-read.ts b/src/openapi/types/access-request-read.ts new file mode 100644 index 00000000..77e82c83 --- /dev/null +++ b/src/openapi/types/access-request-read.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AccessRequestDetails } from './access-request-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface AccessRequestRead { + /** + * details of the access request, including the resource and tenant + */ + access_request_details: AccessRequestDetails; + /** + * Optional business justification provided by the user requesting access + */ + reason?: string; + /** + * Unique id of the access request + */ + id: string; + /** + * Unique id of the organization that the access request belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the access request belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the access request belongs to. + */ + environment_id: string; + /** + * Date and time when the access request was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the access request was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the access + */ + requesting_user_id?: string; + /** + * when the access request was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * current status of the access request + */ + status: RequestStatus; + /** + * Optional id of the user who review the access request + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/access-request-review-deny.ts b/src/openapi/types/access-request-review-deny.ts new file mode 100644 index 00000000..f0d801d3 --- /dev/null +++ b/src/openapi/types/access-request-review-deny.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface AccessRequestReviewDeny { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; +} diff --git a/src/openapi/types/access-request-review.ts b/src/openapi/types/access-request-review.ts new file mode 100644 index 00000000..221b18b4 --- /dev/null +++ b/src/openapi/types/access-request-review.ts @@ -0,0 +1,22 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface AccessRequestReview { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * role id or key that the user is requesting access to + */ + role?: string; +} diff --git a/src/openapi/types/access-request-user-create.ts b/src/openapi/types/access-request-user-create.ts new file mode 100644 index 00000000..9ae633b8 --- /dev/null +++ b/src/openapi/types/access-request-user-create.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AccessRequestCreateDetails } from './access-request-create-details'; + +export interface AccessRequestUserCreate { + /** + * details of the access request, including the resource and tenant + */ + access_request_details: AccessRequestCreateDetails; + /** + * Optional business justification provided by the user requesting access + */ + reason?: string; +} diff --git a/src/openapi/types/action-block-editable.ts b/src/openapi/types/action-block-editable.ts index 1740f04d..91148ea1 100644 --- a/src/openapi/types/action-block-editable.ts +++ b/src/openapi/types/action-block-editable.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,16 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ActionBlockEditable - */ export interface ActionBlockEditable { /** * a more descriptive name for the action - * @type {string} - * @memberof ActionBlockEditable */ name?: string; /** * optional description string explaining what this action represents in your system - * @type {string} - * @memberof ActionBlockEditable */ description?: string; - /** - * - * @type {object} - * @memberof ActionBlockEditable - */ attributes?: object; + v1compat_path?: string; + v1compat_name?: string; } diff --git a/src/openapi/types/action-block-read.ts b/src/openapi/types/action-block-read.ts index 9979c358..dda7ce1c 100644 --- a/src/openapi/types/action-block-read.ts +++ b/src/openapi/types/action-block-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,24 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ActionBlockRead - */ export interface ActionBlockRead { /** * a more descriptive name for the action - * @type {string} - * @memberof ActionBlockRead */ name?: string; /** * optional description string explaining what this action represents in your system - * @type {string} - * @memberof ActionBlockRead */ description?: string; - /** - * - * @type {object} - * @memberof ActionBlockRead - */ attributes?: object; + v1compat_path?: string; + v1compat_name?: string; /** * Unique id of the action - * @type {string} - * @memberof ActionBlockRead */ id: string; /** * action key - * @type {string} - * @memberof ActionBlockRead */ key?: string; } diff --git a/src/openapi/types/action-block.ts b/src/openapi/types/action-block.ts deleted file mode 100644 index 96b5ed98..00000000 --- a/src/openapi/types/action-block.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface ActionBlock - */ -export interface ActionBlock { - /** - * a more descriptive name for the action - * @type {string} - * @memberof ActionBlock - */ - name?: string; - /** - * optional description string explaining what this action represents in your system - * @type {string} - * @memberof ActionBlock - */ - description?: string; -} diff --git a/src/openapi/types/action-obj.ts b/src/openapi/types/action-obj.ts index 99800c8d..6ccea476 100644 --- a/src/openapi/types/action-obj.ts +++ b/src/openapi/types/action-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,10 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ActionObj - */ export interface ActionObj { - /** - * - * @type {string} - * @memberof ActionObj - */ id: string; - /** - * - * @type {string} - * @memberof ActionObj - */ key: string; - /** - * - * @type {string} - * @memberof ActionObj - */ - name?: string; - /** - * - * @type {string} - * @memberof ActionObj - */ + name?: string | null; created_at: string; - /** - * - * @type {string} - * @memberof ActionObj - */ updated_at: string; } diff --git a/src/openapi/types/activity-details-list.ts b/src/openapi/types/activity-details-list.ts index dc6ccf78..99a79d01 100644 --- a/src/openapi/types/activity-details-list.ts +++ b/src/openapi/types/activity-details-list.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,32 +11,11 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActivityDetailsObjectData } from './activity-details-object-data'; +import type { ActivityDetailsObjectData } from './activity-details-object-data'; -/** - * - * @export - * @interface ActivityDetailsList - */ export interface ActivityDetailsList { - /** - * - * @type {string} - * @memberof ActivityDetailsList - */ kind?: ActivityDetailsListKindEnum; - /** - * - * @type {string} - * @memberof ActivityDetailsList - */ type: string; - /** - * - * @type {Array} - * @memberof ActivityDetailsList - */ items: Array; } diff --git a/src/openapi/types/activity-details-object-data.ts b/src/openapi/types/activity-details-object-data.ts index 1244eb9f..e1a74e87 100644 --- a/src/openapi/types/activity-details-object-data.ts +++ b/src/openapi/types/activity-details-object-data.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,7 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ActivityDetailsObjectData - */ export interface ActivityDetailsObjectData { - /** - * - * @type {string} - * @memberof ActivityDetailsObjectData - */ id?: string; - /** - * - * @type {string} - * @memberof ActivityDetailsObjectData - */ key?: string; } diff --git a/src/openapi/types/activity-details-object.ts b/src/openapi/types/activity-details-object.ts index 521a2646..040106e1 100644 --- a/src/openapi/types/activity-details-object.ts +++ b/src/openapi/types/activity-details-object.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,10 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ActivityDetailsObject - */ export interface ActivityDetailsObject { - /** - * - * @type {string} - * @memberof ActivityDetailsObject - */ id?: string; - /** - * - * @type {string} - * @memberof ActivityDetailsObject - */ key?: string; - /** - * - * @type {string} - * @memberof ActivityDetailsObject - */ kind?: ActivityDetailsObjectKindEnum; - /** - * - * @type {string} - * @memberof ActivityDetailsObject - */ type: string; } diff --git a/src/openapi/types/activity-details.ts b/src/openapi/types/activity-details-value.ts similarity index 58% rename from src/openapi/types/activity-details.ts rename to src/openapi/types/activity-details-value.ts index ad3132f5..deb5b288 100644 --- a/src/openapi/types/activity-details.ts +++ b/src/openapi/types/activity-details-value.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,19 +11,14 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActivityDetailsList } from './activity-details-list'; +import type { ActivityDetailsList } from './activity-details-list'; // May contain unused imports in some cases -// @ts-ignore -import { ActivityDetailsObject } from './activity-details-object'; +import type { ActivityDetailsObject } from './activity-details-object'; // May contain unused imports in some cases -// @ts-ignore -import { ActivityDetailsObjectData } from './activity-details-object-data'; /** - * @type ActivityDetails - * @export + * @type ActivityDetailsValue */ -export type ActivityDetails = +export type ActivityDetailsValue = | ({ kind: 'list' } & ActivityDetailsList) | ({ kind: 'object' } & ActivityDetailsObject); diff --git a/src/openapi/types/activity-log-event-read.ts b/src/openapi/types/activity-log-event-read.ts index c2b2d8c6..d3a49b6d 100644 --- a/src/openapi/types/activity-log-event-read.ts +++ b/src/openapi/types/activity-log-event-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,97 +11,21 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActivityDetails } from './activity-details'; +import type { ActivityDetailsValue } from './activity-details-value'; -/** - * - * @export - * @interface ActivityLogEventRead - */ export interface ActivityLogEventRead { - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ id: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ timestamp: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ activity_id?: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ activity_description?: string; - /** - * - * @type {{ [key: string]: ActivityDetails; }} - * @memberof ActivityLogEventRead - */ - activity_details?: { [key: string]: ActivityDetails }; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ + activity_details?: { [key: string]: ActivityDetailsValue }; client_ip: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ actor_type: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ actor_id: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ actor_display_name?: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ org_id?: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ project_key?: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ project_id?: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ env_key?: string; - /** - * - * @type {string} - * @memberof ActivityLogEventRead - */ env_id?: string; } diff --git a/src/openapi/types/actor.ts b/src/openapi/types/actor.ts deleted file mode 100644 index 98825fb7..00000000 --- a/src/openapi/types/actor.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { APIKeyOwnerType } from './apikey-owner-type'; -// May contain unused imports in some cases -// @ts-ignore -import { AuthnMeAPIKeyRead } from './authn-me-apikey-read'; -// May contain unused imports in some cases -// @ts-ignore -import { AuthnMeMemberRead } from './authn-me-member-read'; -// May contain unused imports in some cases -// @ts-ignore -import { AuthnMeUserRead } from './authn-me-user-read'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; - -/** - * @type Actor - * @export - */ -export type Actor = - | ({ actor_type: 'api_key' } & AuthnMeAPIKeyRead) - | ({ actor_type: 'member' } & AuthnMeMemberRead) - | ({ actor_type: 'user' } & AuthnMeUserRead); diff --git a/src/openapi/types/add-role-permissions.ts b/src/openapi/types/add-role-permissions.ts index fb988048..4cf68fd3 100644 --- a/src/openapi/types/add-role-permissions.ts +++ b/src/openapi/types/add-role-permissions.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface AddRolePermissions - */ export interface AddRolePermissions { /** * List of permissions to assign to the role. If a permission is already granted to the role it is skipped. Each permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\". - * @type {Array} - * @memberof AddRolePermissions */ permissions: Array; } diff --git a/src/openapi/types/allowed-result.ts b/src/openapi/types/allowed-result.ts deleted file mode 100644 index 5fcb4da2..00000000 --- a/src/openapi/types/allowed-result.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { Allow } from './allow'; - -/** - * - * @export - * @interface AllowedResult - */ -export interface AllowedResult { - /** - * - * @type {string} - * @memberof AllowedResult - */ - query_type: AllowedResultQueryTypeEnum; - /** - * - * @type {Allow} - * @memberof AllowedResult - */ - allow: Allow; - /** - * - * @type {object} - * @memberof AllowedResult - */ - debug: object; -} - -export const AllowedResultQueryTypeEnum = { - PermitCheck: 'permit-check', -} as const; - -export type AllowedResultQueryTypeEnum = - (typeof AllowedResultQueryTypeEnum)[keyof typeof AllowedResultQueryTypeEnum]; diff --git a/src/openapi/types/apihistory-event-full-read.ts b/src/openapi/types/apihistory-event-full-read.ts index d8563f42..95faad9a 100644 --- a/src/openapi/types/apihistory-event-full-read.ts +++ b/src/openapi/types/apihistory-event-full-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,118 +10,24 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface APIHistoryEventFullRead - */ export interface APIHistoryEventFullRead { - /** - * - * @type {File} - * @memberof APIHistoryEventFullRead - */ request_body?: File; - /** - * - * @type {File} - * @memberof APIHistoryEventFullRead - */ response_body?: File; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ timestamp: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ + timestamp_utc?: string; method: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ path: string; - /** - * - * @type {boolean} - * @memberof APIHistoryEventFullRead - */ success: boolean; - /** - * - * @type {number} - * @memberof APIHistoryEventFullRead - */ status: number; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ request_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ client_ip: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ actor_type: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ actor_id: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ actor_display_name?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ org_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ project_key?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ project_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ env_key?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ env_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventFullRead - */ id: string; } diff --git a/src/openapi/types/apihistory-event-read.ts b/src/openapi/types/apihistory-event-read.ts index 7fdb6709..edbeecf2 100644 --- a/src/openapi/types/apihistory-event-read.ts +++ b/src/openapi/types/apihistory-event-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,106 +10,22 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface APIHistoryEventRead - */ export interface APIHistoryEventRead { - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ timestamp: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ + timestamp_utc?: string; method: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ path: string; - /** - * - * @type {boolean} - * @memberof APIHistoryEventRead - */ success: boolean; - /** - * - * @type {number} - * @memberof APIHistoryEventRead - */ status: number; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ request_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ client_ip: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ actor_type: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ actor_id: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ actor_display_name?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ org_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ project_key?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ project_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ env_key?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ env_id?: string; - /** - * - * @type {string} - * @memberof APIHistoryEventRead - */ id: string; } diff --git a/src/openapi/types/apikey-create.ts b/src/openapi/types/apikey-create.ts index 5ce63fb7..62c06201 100644 --- a/src/openapi/types/apikey-create.ts +++ b/src/openapi/types/apikey-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,61 +11,18 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { APIKeyOwnerType } from './apikey-owner-type'; +import type { APIKeyOwnerType } from './apikey-owner-type'; // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; +import type { MemberAccessLevel } from './member-access-level'; // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; +import type { MemberAccessObj } from './member-access-obj'; -/** - * - * @export - * @interface APIKeyCreate - */ export interface APIKeyCreate { - /** - * - * @type {string} - * @memberof APIKeyCreate - */ organization_id: string; - /** - * - * @type {string} - * @memberof APIKeyCreate - */ project_id?: string; - /** - * - * @type {string} - * @memberof APIKeyCreate - */ environment_id?: string; - /** - * - * @type {MemberAccessObj} - * @memberof APIKeyCreate - */ object_type?: MemberAccessObj; - /** - * - * @type {MemberAccessLevel} - * @memberof APIKeyCreate - */ access_level?: MemberAccessLevel; - /** - * - * @type {APIKeyOwnerType} - * @memberof APIKeyCreate - */ owner_type?: APIKeyOwnerType; - /** - * - * @type {string} - * @memberof APIKeyCreate - */ name?: string; } diff --git a/src/openapi/types/apikey-info.ts b/src/openapi/types/apikey-info.ts deleted file mode 100644 index 77ca5495..00000000 --- a/src/openapi/types/apikey-info.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { APIKeyOwnerType } from './apikey-owner-type'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; - -/** - * - * @export - * @interface APIKeyInfo - */ -export interface APIKeyInfo { - /** - * - * @type {string} - * @memberof APIKeyInfo - */ - id: string; - /** - * - * @type {string} - * @memberof APIKeyInfo - */ - org_id: string; - /** - * - * @type {string} - * @memberof APIKeyInfo - */ - project_id?: string; - /** - * - * @type {string} - * @memberof APIKeyInfo - */ - env_id?: string; - /** - * - * @type {MemberAccessLevel} - * @memberof APIKeyInfo - */ - access_level: MemberAccessLevel; - /** - * - * @type {MemberAccessObj} - * @memberof APIKeyInfo - */ - object_type: MemberAccessObj; - /** - * - * @type {APIKeyOwnerType} - * @memberof APIKeyInfo - */ - owner_type: APIKeyOwnerType; -} diff --git a/src/openapi/types/apikey-owner-type.ts b/src/openapi/types/apikey-owner-type.ts index 274838b3..4757eecf 100644 --- a/src/openapi/types/apikey-owner-type.ts +++ b/src/openapi/types/apikey-owner-type.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,14 +12,13 @@ /** * An enumeration. - * @export - * @enum {string} */ export const APIKeyOwnerType = { PdpConfig: 'pdp_config', Member: 'member', Elements: 'elements', + NatsPdpConfig: 'nats_pdp_config', } as const; export type APIKeyOwnerType = (typeof APIKeyOwnerType)[keyof typeof APIKeyOwnerType]; diff --git a/src/openapi/types/apikey-read.ts b/src/openapi/types/apikey-read.ts index 79d09a3a..0c5776ad 100644 --- a/src/openapi/types/apikey-read.ts +++ b/src/openapi/types/apikey-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,112 +11,31 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { APIKeyOwnerType } from './apikey-owner-type'; +import type { APIKeyOwnerType } from './apikey-owner-type'; // May contain unused imports in some cases -// @ts-ignore -import { EnvironmentRead } from './environment-read'; +import type { EnvironmentRead } from './environment-read'; // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; +import type { MemberAccessLevel } from './member-access-level'; // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; +import type { MemberAccessObj } from './member-access-obj'; // May contain unused imports in some cases -// @ts-ignore -import { OrgMemberRead } from './org-member-read'; +import type { OrgMemberRead } from './org-member-read'; // May contain unused imports in some cases -// @ts-ignore -import { ProjectRead } from './project-read'; +import type { ProjectRead } from './project-read'; -/** - * - * @export - * @interface APIKeyRead - */ export interface APIKeyRead { - /** - * - * @type {string} - * @memberof APIKeyRead - */ organization_id: string; - /** - * - * @type {string} - * @memberof APIKeyRead - */ - project_id?: string; - /** - * - * @type {string} - * @memberof APIKeyRead - */ - environment_id?: string; - /** - * - * @type {MemberAccessObj} - * @memberof APIKeyRead - */ - object_type?: MemberAccessObj; - /** - * - * @type {MemberAccessLevel} - * @memberof APIKeyRead - */ - access_level?: MemberAccessLevel; - /** - * - * @type {APIKeyOwnerType} - * @memberof APIKeyRead - */ + project_id?: string | null; + environment_id?: string | null; + object_type?: MemberAccessObj | null; + access_level?: MemberAccessLevel | null; owner_type: APIKeyOwnerType; - /** - * - * @type {string} - * @memberof APIKeyRead - */ - name?: string; - /** - * - * @type {string} - * @memberof APIKeyRead - */ + name?: string | null; id: string; - /** - * - * @type {string} - * @memberof APIKeyRead - */ - secret?: string; - /** - * - * @type {string} - * @memberof APIKeyRead - */ + secret?: string | null; created_at: string; - /** - * - * @type {OrgMemberRead} - * @memberof APIKeyRead - */ - created_by_member?: OrgMemberRead; - /** - * - * @type {string} - * @memberof APIKeyRead - */ - last_used_at?: string; - /** - * - * @type {EnvironmentRead} - * @memberof APIKeyRead - */ - env?: EnvironmentRead; - /** - * - * @type {ProjectRead} - * @memberof APIKeyRead - */ - project?: ProjectRead; + created_by_member?: OrgMemberRead | null; + last_used_at?: string | null; + env?: EnvironmentRead | null; + project?: ProjectRead | null; } diff --git a/src/openapi/types/apikey-scope-read.ts b/src/openapi/types/apikey-scope-read.ts index d1054de2..51a3d0b0 100644 --- a/src/openapi/types/apikey-scope-read.ts +++ b/src/openapi/types/apikey-scope-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface APIKeyScopeRead - */ export interface APIKeyScopeRead { /** * Unique id of the organization that the api_key belongs to. - * @type {string} - * @memberof APIKeyScopeRead */ organization_id: string; /** * Unique id of the project that the api_key belongs to. - * @type {string} - * @memberof APIKeyScopeRead */ - project_id?: string; + project_id?: string | null; /** * Unique id of the environment that the api_key belongs to. - * @type {string} - * @memberof APIKeyScopeRead */ - environment_id?: string; + environment_id?: string | null; } diff --git a/src/openapi/types/apikey-viewer-context.ts b/src/openapi/types/apikey-viewer-context.ts deleted file mode 100644 index 16892b37..00000000 --- a/src/openapi/types/apikey-viewer-context.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { APIKeyInfo } from './apikey-info'; - -/** - * - * @export - * @interface APIKeyViewerContext - */ -export interface APIKeyViewerContext { - /** - * - * @type {string} - * @memberof APIKeyViewerContext - */ - type: APIKeyViewerContextTypeEnum; - /** - * - * @type {APIKeyInfo} - * @memberof APIKeyViewerContext - */ - api_key: APIKeyInfo; -} - -export const APIKeyViewerContextTypeEnum = { - ApiKey: 'api_key', -} as const; - -export type APIKeyViewerContextTypeEnum = - (typeof APIKeyViewerContextTypeEnum)[keyof typeof APIKeyViewerContextTypeEnum]; diff --git a/src/openapi/types/allow.ts b/src/openapi/types/approve-message.ts similarity index 71% rename from src/openapi/types/allow.ts rename to src/openapi/types/approve-message.ts index b6008a16..74c7d1ce 100644 --- a/src/openapi/types/allow.ts +++ b/src/openapi/types/approve-message.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,6 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface Allow - */ -export interface Allow {} +export interface ApproveMessage { + message: string; +} diff --git a/src/openapi/types/attribute-block-editable.ts b/src/openapi/types/attribute-block-editable.ts index 385c0048..4df69d27 100644 --- a/src/openapi/types/attribute-block-editable.ts +++ b/src/openapi/types/attribute-block-editable.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,15 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AttributeType } from './attribute-type'; +import type { AttributeType } from './attribute-type'; -/** - * - * @export - * @interface AttributeBlockEditable - */ export interface AttributeBlockEditable { /** * The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`. - * @type {AttributeType} - * @memberof AttributeBlockEditable */ type: AttributeType; /** * optional description string explaining what data this attribute will store - * @type {string} - * @memberof AttributeBlockEditable */ description?: string; } diff --git a/src/openapi/types/attribute-block-read.ts b/src/openapi/types/attribute-block-read.ts index 9fe8ef68..865b0fc2 100644 --- a/src/openapi/types/attribute-block-read.ts +++ b/src/openapi/types/attribute-block-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,37 +11,23 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AttributeType } from './attribute-type'; +import type { AttributeType } from './attribute-type'; -/** - * - * @export - * @interface AttributeBlockRead - */ export interface AttributeBlockRead { /** * The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`. - * @type {AttributeType} - * @memberof AttributeBlockRead */ type: AttributeType; /** * optional description string explaining what data this attribute will store - * @type {string} - * @memberof AttributeBlockRead */ description?: string; /** * Unique id of the attribute - * @type {string} - * @memberof AttributeBlockRead */ id: string; /** * action key - * @type {string} - * @memberof AttributeBlockRead */ key?: string; } diff --git a/src/openapi/types/attribute-block.ts b/src/openapi/types/attribute-block.ts deleted file mode 100644 index ec4d1c79..00000000 --- a/src/openapi/types/attribute-block.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AttributeType } from './attribute-type'; - -/** - * - * @export - * @interface AttributeBlock - */ -export interface AttributeBlock { - /** - * The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`. - * @type {AttributeType} - * @memberof AttributeBlock - */ - type: AttributeType; - /** - * optional description string explaining what data this attribute will store - * @type {string} - * @memberof AttributeBlock - */ - description?: string; -} diff --git a/src/openapi/types/attribute-type.ts b/src/openapi/types/attribute-type.ts index b8a86f66..16c5b503 100644 --- a/src/openapi/types/attribute-type.ts +++ b/src/openapi/types/attribute-type.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * supported attribute primitives - * @export - * @enum {string} */ export const AttributeType = { @@ -25,6 +21,8 @@ export const AttributeType = { Time: 'time', Array: 'array', Json: 'json', + Object: 'object', + ObjectArray: 'object_array', } as const; export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType]; diff --git a/src/openapi/types/audit-log-model.ts b/src/openapi/types/audit-log-model.ts new file mode 100644 index 00000000..d82271cd --- /dev/null +++ b/src/openapi/types/audit-log-model.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { RawData } from './raw-data'; + +export interface AuditLogModel { + id: string; + raw_data?: RawData | null; + timestamp: string; + created_at?: string | null; + query?: string | null; + user_key?: string | null; + user_email?: string | null; + user_name?: string | null; + resource_type?: string | null; + tenant?: string | null; + action?: string | null; + decision?: boolean | null; + reason?: string | null; + org_id: string; + project_id: string; + env_id: string; + pdp_config_id?: string | null; + input?: any; + result?: any; + context?: any; +} diff --git a/src/openapi/types/audit-log-objects-model.ts b/src/openapi/types/audit-log-objects-model.ts new file mode 100644 index 00000000..eabd4281 --- /dev/null +++ b/src/openapi/types/audit-log-objects-model.ts @@ -0,0 +1,41 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ActionObj } from './action-obj'; +// May contain unused imports in some cases +import type { EnvironmentObject } from './environment-object'; +// May contain unused imports in some cases +import type { OrganizationObject } from './organization-object'; +// May contain unused imports in some cases +import type { PdpConfigObject } from './pdp-config-object'; +// May contain unused imports in some cases +import type { ProjectObject } from './project-object'; +// May contain unused imports in some cases +import type { ResourceTypeObj } from './resource-type-obj'; +// May contain unused imports in some cases +import type { TenantObj } from './tenant-obj'; +// May contain unused imports in some cases +import type { UserObj } from './user-obj'; + +export interface AuditLogObjectsModel { + id?: string | null; + organization_object?: OrganizationObject | null; + project_object?: ProjectObject | null; + environment_object?: EnvironmentObject | null; + pdp_config_object?: PdpConfigObject | null; + user_object?: UserObj | null; + action_object?: ActionObj | null; + resource_type_object?: ResourceTypeObj | null; + tenant_object?: TenantObj | null; + created_at?: string | null; +} diff --git a/src/openapi/types/audit-log-objects.ts b/src/openapi/types/audit-log-objects.ts deleted file mode 100644 index 2947626d..00000000 --- a/src/openapi/types/audit-log-objects.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { ActionObj } from './action-obj'; -// May contain unused imports in some cases -// @ts-ignore -import { EnvironmentObject } from './environment-object'; -// May contain unused imports in some cases -// @ts-ignore -import { OrganizationObject } from './organization-object'; -// May contain unused imports in some cases -// @ts-ignore -import { PdpConfigObject } from './pdp-config-object'; -// May contain unused imports in some cases -// @ts-ignore -import { ProjectObject } from './project-object'; -// May contain unused imports in some cases -// @ts-ignore -import { ResourceTypeObj } from './resource-type-obj'; -// May contain unused imports in some cases -// @ts-ignore -import { TenantObj } from './tenant-obj'; -// May contain unused imports in some cases -// @ts-ignore -import { UserObj } from './user-obj'; - -/** - * - * @export - * @interface AuditLogObjects - */ -export interface AuditLogObjects { - /** - * - * @type {OrganizationObject} - * @memberof AuditLogObjects - */ - organization_object?: OrganizationObject; - /** - * - * @type {ProjectObject} - * @memberof AuditLogObjects - */ - project_object?: ProjectObject; - /** - * - * @type {EnvironmentObject} - * @memberof AuditLogObjects - */ - environment_object?: EnvironmentObject; - /** - * - * @type {PdpConfigObject} - * @memberof AuditLogObjects - */ - pdp_config_object?: PdpConfigObject; - /** - * - * @type {UserObj} - * @memberof AuditLogObjects - */ - user_object?: UserObj; - /** - * - * @type {ActionObj} - * @memberof AuditLogObjects - */ - action_object?: ActionObj; - /** - * - * @type {ResourceTypeObj} - * @memberof AuditLogObjects - */ - resource_type_object?: ResourceTypeObj; - /** - * - * @type {TenantObj} - * @memberof AuditLogObjects - */ - tenant_object?: TenantObj; -} diff --git a/src/openapi/types/audit-log-query-type.ts b/src/openapi/types/audit-log-query-type.ts new file mode 100644 index 00000000..a5bf963e --- /dev/null +++ b/src/openapi/types/audit-log-query-type.ts @@ -0,0 +1,24 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Filter audit logs by the type of query that generated them. + */ + +export const AuditLogQueryType = { + Check: 'check', + GetUserPermissions: 'get_user_permissions', + GetAuthorizedUsers: 'get_authorized_users', + None: 'none', +} as const; + +export type AuditLogQueryType = (typeof AuditLogQueryType)[keyof typeof AuditLogQueryType]; diff --git a/src/openapi/types/audit-log-replay-request.ts b/src/openapi/types/audit-log-replay-request.ts new file mode 100644 index 00000000..70eb3ac1 --- /dev/null +++ b/src/openapi/types/audit-log-replay-request.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Request model for audit log replay + */ +export interface AuditLogReplayRequest { + /** + * URL of the PDP to test against + */ + pdp_url: string; + /** + * Start time for the query (in seconds since epoch). Defaults to 24 hours ago. + */ + start_time?: number; + /** + * End time for the query (in seconds since epoch). Defaults to current time. + */ + end_time?: number; + /** + * Concurrency limit for processing documents (max: 5) + */ + concurrency_limit?: number; + /** + * Graceful shutdown time in seconds + */ + graceful_shutdown_s?: number; +} diff --git a/src/openapi/types/audit-log-replay-response.ts b/src/openapi/types/audit-log-replay-response.ts new file mode 100644 index 00000000..3b4880c1 --- /dev/null +++ b/src/openapi/types/audit-log-replay-response.ts @@ -0,0 +1,19 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Response model for audit log replay + */ +export interface AuditLogReplayResponse { + message: string; + document_count: number; +} diff --git a/src/openapi/types/audit-log-sort-key.ts b/src/openapi/types/audit-log-sort-key.ts index c26f57e1..921bbc7c 100644 --- a/src/openapi/types/audit-log-sort-key.ts +++ b/src/openapi/types/audit-log-sort-key.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const AuditLogSortKey = { diff --git a/src/openapi/types/audit-log.ts b/src/openapi/types/audit-log.ts deleted file mode 100644 index 26a70539..00000000 --- a/src/openapi/types/audit-log.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface AuditLog - */ -export interface AuditLog { - /** - * - * @type {string} - * @memberof AuditLog - */ - id: string; - /** - * - * @type {any} - * @memberof AuditLog - */ - input?: any; - /** - * - * @type {any} - * @memberof AuditLog - */ - result?: any; - /** - * - * @type {any} - * @memberof AuditLog - */ - context?: any; - /** - * - * @type {string} - * @memberof AuditLog - */ - action?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - timestamp: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - query?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - user_key?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - user_email?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - user_name?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - resource_type?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - tenant?: string; - /** - * - * @type {boolean} - * @memberof AuditLog - */ - decision?: boolean; - /** - * - * @type {string} - * @memberof AuditLog - */ - reason?: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - pdp_config_id: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - env_id: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - project_id: string; - /** - * - * @type {string} - * @memberof AuditLog - */ - org_id: string; -} diff --git a/src/openapi/types/audit-logs.ts b/src/openapi/types/audit-logs.ts deleted file mode 100644 index 19b79775..00000000 --- a/src/openapi/types/audit-logs.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { OPADecisionLog } from './opadecision-log'; - -/** - * - * @export - * @interface AuditLogs - */ -export interface AuditLogs { - /** - * - * @type {Array} - * @memberof AuditLogs - */ - data: Array; - /** - * - * @type {number} - * @memberof AuditLogs - */ - count_filtered: number; - /** - * - * @type {number} - * @memberof AuditLogs - */ - page_count?: number; -} diff --git a/src/openapi/types/auth-mechanism.ts b/src/openapi/types/auth-mechanism.ts index 93b10e1e..d3aa0703 100644 --- a/src/openapi/types/auth-mechanism.ts +++ b/src/openapi/types/auth-mechanism.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const AuthMechanism = { diff --git a/src/openapi/types/authn-me-apikey-read.ts b/src/openapi/types/authn-me-apikey-read.ts deleted file mode 100644 index 9028d877..00000000 --- a/src/openapi/types/authn-me-apikey-read.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { APIKeyOwnerType } from './apikey-owner-type'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; - -/** - * - * @export - * @interface AuthnMeAPIKeyRead - */ -export interface AuthnMeAPIKeyRead { - /** - * - * @type {string} - * @memberof AuthnMeAPIKeyRead - */ - actor_type?: AuthnMeAPIKeyReadActorTypeEnum; - /** - * - * @type {string} - * @memberof AuthnMeAPIKeyRead - */ - id: string; - /** - * - * @type {MemberAccessObj} - * @memberof AuthnMeAPIKeyRead - */ - object_type: MemberAccessObj; - /** - * - * @type {APIKeyOwnerType} - * @memberof AuthnMeAPIKeyRead - */ - owner_type: APIKeyOwnerType; - /** - * - * @type {string} - * @memberof AuthnMeAPIKeyRead - */ - org_id: string; - /** - * - * @type {string} - * @memberof AuthnMeAPIKeyRead - */ - project_id?: string; - /** - * - * @type {string} - * @memberof AuthnMeAPIKeyRead - */ - env_id?: string; -} - -export const AuthnMeAPIKeyReadActorTypeEnum = { - ApiKey: 'api_key', -} as const; - -export type AuthnMeAPIKeyReadActorTypeEnum = - (typeof AuthnMeAPIKeyReadActorTypeEnum)[keyof typeof AuthnMeAPIKeyReadActorTypeEnum]; diff --git a/src/openapi/types/authn-me-member-read.ts b/src/openapi/types/authn-me-member-read.ts deleted file mode 100644 index 066c77be..00000000 --- a/src/openapi/types/authn-me-member-read.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { OnboardingStep } from './onboarding-step'; - -/** - * - * @export - * @interface AuthnMeMemberRead - */ -export interface AuthnMeMemberRead { - /** - * - * @type {string} - * @memberof AuthnMeMemberRead - */ - actor_type?: AuthnMeMemberReadActorTypeEnum; - /** - * - * @type {string} - * @memberof AuthnMeMemberRead - */ - id: string; - /** - * Email of the user controlling this account - * @type {string} - * @memberof AuthnMeMemberRead - */ - email: string; - /** - * Name of this user - * @type {string} - * @memberof AuthnMeMemberRead - */ - name?: string; - /** - * Given name of the user - * @type {string} - * @memberof AuthnMeMemberRead - */ - given_name?: string; - /** - * Family name of the user - * @type {string} - * @memberof AuthnMeMemberRead - */ - family_name?: string; - /** - * URL to picture, photo, or avatar of the user that controls this account. - * @type {string} - * @memberof AuthnMeMemberRead - */ - picture?: string; - /** - * - * @type {boolean} - * @memberof AuthnMeMemberRead - */ - is_onboarding: boolean; - /** - * - * @type {OnboardingStep} - * @memberof AuthnMeMemberRead - */ - onboarding_step: OnboardingStep; -} - -export const AuthnMeMemberReadActorTypeEnum = { - Member: 'member', -} as const; - -export type AuthnMeMemberReadActorTypeEnum = - (typeof AuthnMeMemberReadActorTypeEnum)[keyof typeof AuthnMeMemberReadActorTypeEnum]; diff --git a/src/openapi/types/authn-me-user-read.ts b/src/openapi/types/authn-me-user-read.ts deleted file mode 100644 index e425a5d5..00000000 --- a/src/openapi/types/authn-me-user-read.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface AuthnMeUserRead - */ -export interface AuthnMeUserRead { - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - actor_type?: AuthnMeUserReadActorTypeEnum; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - id: string; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - key: string; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - org_id: string; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - project_id: string; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - env_id: string; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - tenant_id: string; - /** - * Email of the user controlling this account - * @type {string} - * @memberof AuthnMeUserRead - */ - email: string; - /** - * Name of this user - * @type {string} - * @memberof AuthnMeUserRead - */ - name?: string; - /** - * Given name of the user - * @type {string} - * @memberof AuthnMeUserRead - */ - given_name?: string; - /** - * Family name of the user - * @type {string} - * @memberof AuthnMeUserRead - */ - family_name?: string; - /** - * URL to picture, photo, or avatar of the user that controls this account. - * @type {string} - * @memberof AuthnMeUserRead - */ - picture?: string; - /** - * - * @type {boolean} - * @memberof AuthnMeUserRead - */ - is_onboarding?: AuthnMeUserReadIsOnboardingEnum; - /** - * - * @type {string} - * @memberof AuthnMeUserRead - */ - onboarding_step?: AuthnMeUserReadOnboardingStepEnum; -} - -export const AuthnMeUserReadActorTypeEnum = { - User: 'user', -} as const; - -export type AuthnMeUserReadActorTypeEnum = - (typeof AuthnMeUserReadActorTypeEnum)[keyof typeof AuthnMeUserReadActorTypeEnum]; -export const AuthnMeUserReadIsOnboardingEnum = { - False: false, -} as const; - -export type AuthnMeUserReadIsOnboardingEnum = - (typeof AuthnMeUserReadIsOnboardingEnum)[keyof typeof AuthnMeUserReadIsOnboardingEnum]; -export const AuthnMeUserReadOnboardingStepEnum = { - Done: 'done', -} as const; - -export type AuthnMeUserReadOnboardingStepEnum = - (typeof AuthnMeUserReadOnboardingStepEnum)[keyof typeof AuthnMeUserReadOnboardingStepEnum]; diff --git a/src/openapi/types/avpengine-decision-log.ts b/src/openapi/types/avpengine-decision-log.ts index 9f70bc7c..1bbf5f1c 100644 --- a/src/openapi/types/avpengine-decision-log.ts +++ b/src/openapi/types/avpengine-decision-log.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,47 +10,12 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface AVPEngineDecisionLog - */ export interface AVPEngineDecisionLog { - /** - * - * @type {string} - * @memberof AVPEngineDecisionLog - */ - engine?: AVPEngineDecisionLogEngineEnum; - /** - * - * @type {string} - * @memberof AVPEngineDecisionLog - */ + engine?: AVPEngineDecisionLogEngineEnum | null; timestamp: string; - /** - * - * @type {string} - * @memberof AVPEngineDecisionLog - */ tenant: string; - /** - * - * @type {number} - * @memberof AVPEngineDecisionLog - */ - process_time_ms?: number; - /** - * - * @type {object} - * @memberof AVPEngineDecisionLog - */ + process_time_ms?: number | null; input: object; - /** - * - * @type {object} - * @memberof AVPEngineDecisionLog - */ result: object; } diff --git a/src/openapi/types/billing-tier-type.ts b/src/openapi/types/billing-tier-type.ts new file mode 100644 index 00000000..625f71a3 --- /dev/null +++ b/src/openapi/types/billing-tier-type.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const BillingTierType = { + Free: 'free', + Startup: 'startup', + Pro: 'pro', + Enterprise: 'enterprise', + Internal: 'internal', + Trial: 'trial', +} as const; + +export type BillingTierType = (typeof BillingTierType)[keyof typeof BillingTierType]; diff --git a/src/openapi/types/bulk-role-assignment-report.ts b/src/openapi/types/bulk-role-assignment-report.ts index 0a156865..70c8588f 100644 --- a/src/openapi/types/bulk-role-assignment-report.ts +++ b/src/openapi/types/bulk-role-assignment-report.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,6 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface BulkRoleAssignmentReport - */ export interface BulkRoleAssignmentReport { - /** - * - * @type {number} - * @memberof BulkRoleAssignmentReport - */ assignments_created?: number; } diff --git a/src/openapi/types/bulk-role-un-assignment-report.ts b/src/openapi/types/bulk-role-un-assignment-report.ts index eee16b9b..547f5074 100644 --- a/src/openapi/types/bulk-role-un-assignment-report.ts +++ b/src/openapi/types/bulk-role-un-assignment-report.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,6 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface BulkRoleUnAssignmentReport - */ export interface BulkRoleUnAssignmentReport { - /** - * - * @type {number} - * @memberof BulkRoleUnAssignmentReport - */ assignments_removed?: number; } diff --git a/src/openapi/types/callbacks-inner.ts b/src/openapi/types/callbacks-inner.ts index 7c63f1b5..21835a27 100644 --- a/src/openapi/types/callbacks-inner.ts +++ b/src/openapi/types/callbacks-inner.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,5 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface CallbacksInner - */ -export interface CallbacksInner {} +import type { OPALHttpFetcherConfig } from './opalhttp-fetcher-config'; +export type CallbacksInner = string | [string, OPALHttpFetcherConfig]; diff --git a/src/openapi/types/condition-set-create.ts b/src/openapi/types/condition-set-create.ts index 67204bdb..dde8bdf7 100644 --- a/src/openapi/types/condition-set-create.ts +++ b/src/openapi/types/condition-set-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,67 +11,37 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ConditionSetType } from './condition-set-type'; +import type { ConditionSetType } from './condition-set-type'; // May contain unused imports in some cases -// @ts-ignore -import { ParentId } from './parent-id'; +import type { ParentId } from './parent-id'; // May contain unused imports in some cases -// @ts-ignore -import { ResourceId } from './resource-id'; +import type { ResourceId } from './resource-id'; -/** - * - * @export - * @interface ConditionSetCreate - */ export interface ConditionSetCreate { /** * A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name. - * @type {string} - * @memberof ConditionSetCreate */ key: string; /** * the type of the set: UserSet or ResourceSet - * @type {ConditionSetType} - * @memberof ConditionSetCreate */ type?: ConditionSetType; /** * whether the set was autogenerated by the system. - * @type {boolean} - * @memberof ConditionSetCreate */ autogenerated?: boolean; - /** - * - * @type {ResourceId} - * @memberof ConditionSetCreate - */ resource_id?: ResourceId; /** * A descriptive name for the set, i.e: \'US based employees\' or \'Users behind VPN\' - * @type {string} - * @memberof ConditionSetCreate */ name: string; /** * an optional longer description of the set - * @type {string} - * @memberof ConditionSetCreate */ description?: string; /** * a boolean expression that consists of multiple conditions, with and/or logic. - * @type {object} - * @memberof ConditionSetCreate */ conditions?: object; - /** - * - * @type {ParentId} - * @memberof ConditionSetCreate - */ parent_id?: ParentId; } diff --git a/src/openapi/types/condition-set-read.ts b/src/openapi/types/condition-set-read.ts index 17f90b24..15bfd1a0 100644 --- a/src/openapi/types/condition-set-read.ts +++ b/src/openapi/types/condition-set-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,112 +11,64 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ConditionSetType } from './condition-set-type'; +import type { ConditionSetType } from './condition-set-type'; // May contain unused imports in some cases -// @ts-ignore -import { ParentId } from './parent-id'; +import type { ParentId } from './parent-id'; // May contain unused imports in some cases -// @ts-ignore -import { ResourceId } from './resource-id'; +import type { ResourceId } from './resource-id'; // May contain unused imports in some cases -// @ts-ignore -import { ResourceRead } from './resource-read'; +import type { ResourceRead } from './resource-read'; -/** - * - * @export - * @interface ConditionSetRead - */ export interface ConditionSetRead { /** * A unique id by which Permit will identify the condition set. The key will be used as the generated rego rule name. - * @type {string} - * @memberof ConditionSetRead */ key: string; /** * the type of the set: UserSet or ResourceSet - * @type {ConditionSetType} - * @memberof ConditionSetRead */ type?: ConditionSetType; /** * whether the set was autogenerated by the system. - * @type {boolean} - * @memberof ConditionSetRead */ autogenerated?: boolean; - /** - * - * @type {ResourceId} - * @memberof ConditionSetRead - */ resource_id?: ResourceId; /** * Unique id of the condition set - * @type {string} - * @memberof ConditionSetRead */ id: string; /** * Unique id of the organization that the condition set belongs to. - * @type {string} - * @memberof ConditionSetRead */ organization_id: string; /** * Unique id of the project that the condition set belongs to. - * @type {string} - * @memberof ConditionSetRead */ project_id: string; /** * Unique id of the environment that the condition set belongs to. - * @type {string} - * @memberof ConditionSetRead */ environment_id: string; /** * Date and time when the condition set was created (ISO_8601 format). - * @type {string} - * @memberof ConditionSetRead */ created_at: string; /** * Date and time when the condition set was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ConditionSetRead */ updated_at: string; - /** - * - * @type {ResourceRead} - * @memberof ConditionSetRead - */ resource?: ResourceRead; /** * A descriptive name for the set, i.e: \'US based employees\' or \'Users behind VPN\' - * @type {string} - * @memberof ConditionSetRead */ name: string; /** * an optional longer description of the set - * @type {string} - * @memberof ConditionSetRead */ description?: string; /** * a boolean expression that consists of multiple conditions, with and/or logic. - * @type {object} - * @memberof ConditionSetRead */ conditions?: object; - /** - * - * @type {ParentId} - * @memberof ConditionSetRead - */ parent_id?: ParentId; } diff --git a/src/openapi/types/condition-set-rule-create.ts b/src/openapi/types/condition-set-rule-create.ts index ada36acf..95ed2699 100644 --- a/src/openapi/types/condition-set-rule-create.ts +++ b/src/openapi/types/condition-set-rule-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,25 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ConditionSetRuleCreate - */ export interface ConditionSetRuleCreate { /** * The userset that will be given permission, i.e: all the users matching this rule will be given the specified permission - * @type {string} - * @memberof ConditionSetRuleCreate */ user_set: string; /** * The permission that will be granted to the userset *on* the resourceset. The permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\". - * @type {string} - * @memberof ConditionSetRuleCreate */ permission: string; /** * The resourceset that represents the resources that are granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted *permission* - * @type {string} - * @memberof ConditionSetRuleCreate */ resource_set: string; /** * if True, will set the condition set rule to the role\'s autogen user-set. - * @type {boolean} - * @memberof ConditionSetRuleCreate */ is_role?: boolean; /** * if True, will set the condition set rule to the resource\'s autogen resource-set. - * @type {boolean} - * @memberof ConditionSetRuleCreate */ is_resource?: boolean; } diff --git a/src/openapi/types/condition-set-rule-read.ts b/src/openapi/types/condition-set-rule-read.ts index 0cce29bd..2094d5df 100644 --- a/src/openapi/types/condition-set-rule-read.ts +++ b/src/openapi/types/condition-set-rule-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,70 +10,45 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ConditionSetRuleRead - */ export interface ConditionSetRuleRead { /** * Unique id of the condition set rule - * @type {string} - * @memberof ConditionSetRuleRead */ id: string; /** * A unique id by which Permit will identify this condition set rule. - * @type {string} - * @memberof ConditionSetRuleRead */ key: string; /** * the userset that is currently granted permissions, i.e: all the users matching this rule are granted the permission on the resourceset - * @type {string} - * @memberof ConditionSetRuleRead */ user_set: string; /** * a permission that is currently granted to the userset *on* the resourceset. - * @type {string} - * @memberof ConditionSetRuleRead */ permission: string; /** * the resourceset that represents the resources that are currently granted for access, i.e: all the resources matching this rule can be accessed by the userset to perform the granted *permission* - * @type {string} - * @memberof ConditionSetRuleRead */ resource_set: string; /** * Unique id of the organization that the condition set rule belongs to. - * @type {string} - * @memberof ConditionSetRuleRead */ organization_id: string; /** * Unique id of the project that the condition set rule belongs to. - * @type {string} - * @memberof ConditionSetRuleRead */ project_id: string; /** * Unique id of the environment that the condition set rule belongs to. - * @type {string} - * @memberof ConditionSetRuleRead */ environment_id: string; /** * Date and time when the condition set rule was created (ISO_8601 format). - * @type {string} - * @memberof ConditionSetRuleRead */ created_at: string; /** * Date and time when the condition set rule was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ConditionSetRuleRead */ updated_at: string; } diff --git a/src/openapi/types/condition-set-rule-remove.ts b/src/openapi/types/condition-set-rule-remove.ts index d0deffc2..375b44c4 100644 --- a/src/openapi/types/condition-set-rule-remove.ts +++ b/src/openapi/types/condition-set-rule-remove.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,25 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ConditionSetRuleRemove - */ export interface ConditionSetRuleRemove { /** * The userset that will be unassigned these permission, i.e: all the users matching this rule will lose the specified permission - * @type {string} - * @memberof ConditionSetRuleRemove */ user_set: string; /** * The permission that will be removed from the userset *on* the resourceset. The permission can be either a resource action id, or `{resource_key}:{action_key}`, i.e: the \"permission name\". - * @type {string} - * @memberof ConditionSetRuleRemove */ permission: string; /** * The resourceset that represents the resources that are no longer granted for access, i.e: all the resources matching this rule can no longer be accessed by the userset, and will be revoked the specified *permission* - * @type {string} - * @memberof ConditionSetRuleRemove */ resource_set: string; /** * if True, will set the condition set rule to the role\'s autogen user-set. - * @type {boolean} - * @memberof ConditionSetRuleRemove */ is_role?: boolean; /** * if True, will set the condition set rule to the resource\'s autogen resource-set. - * @type {boolean} - * @memberof ConditionSetRuleRemove */ is_resource?: boolean; } diff --git a/src/openapi/types/condition-set-type.ts b/src/openapi/types/condition-set-type.ts index 10827f2b..b42e57eb 100644 --- a/src/openapi/types/condition-set-type.ts +++ b/src/openapi/types/condition-set-type.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const ConditionSetType = { diff --git a/src/openapi/types/condition-set-update.ts b/src/openapi/types/condition-set-update.ts index c25793d6..d36d66ed 100644 --- a/src/openapi/types/condition-set-update.ts +++ b/src/openapi/types/condition-set-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,37 +11,20 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ParentId } from './parent-id'; +import type { ParentId } from './parent-id'; -/** - * - * @export - * @interface ConditionSetUpdate - */ export interface ConditionSetUpdate { /** * A descriptive name for the set, i.e: \'US based employees\' or \'Users behind VPN\' - * @type {string} - * @memberof ConditionSetUpdate */ name?: string; /** * an optional longer description of the set - * @type {string} - * @memberof ConditionSetUpdate */ description?: string; /** * a boolean expression that consists of multiple conditions, with and/or logic. - * @type {object} - * @memberof ConditionSetUpdate */ conditions?: object; - /** - * - * @type {ParentId} - * @memberof ConditionSetUpdate - */ parent_id?: ParentId; } diff --git a/src/openapi/types/condition-set.ts b/src/openapi/types/condition-set.ts new file mode 100644 index 00000000..1921c6b7 --- /dev/null +++ b/src/openapi/types/condition-set.ts @@ -0,0 +1,30 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface ConditionSet { + /** + * The key of the condition set. + */ + key: string; + /** + * The attribute of the condition set. + */ + attribute: string; + /** + * The operator of the condition set. + */ + operator: string; + /** + * The value of the condition set. + */ + value: string; +} diff --git a/src/openapi/types/data-entry-report.ts b/src/openapi/types/data-entry-report.ts deleted file mode 100644 index 982e5d3e..00000000 --- a/src/openapi/types/data-entry-report.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { Entry } from './entry'; - -/** - * A report of the processing of a single DataSourceEntry. - * @export - * @interface DataEntryReport - */ -export interface DataEntryReport { - /** - * - * @type {Entry} - * @memberof DataEntryReport - */ - entry: Entry; - /** - * - * @type {boolean} - * @memberof DataEntryReport - */ - fetched?: boolean; - /** - * - * @type {boolean} - * @memberof DataEntryReport - */ - saved?: boolean; - /** - * - * @type {string} - * @memberof DataEntryReport - */ - hash?: string; -} diff --git a/src/openapi/types/condition-set-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-condition-set-data.ts similarity index 55% rename from src/openapi/types/condition-set-data.ts rename to src/openapi/types/data-generator-lib-schemas-schema-opal-data-condition-set-data.ts index 0aab943d..f1f7eb6d 100644 --- a/src/openapi/types/condition-set-data.ts +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-condition-set-data.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,18 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ConditionSetType } from './condition-set-type'; +import type { ConditionSetType } from './condition-set-type'; /** - * - * @export - * @interface ConditionSetData + * This is the data of a specific condition set in the system */ -export interface ConditionSetData { +export interface DataGeneratorLibSchemasSchemaOpalDataConditionSetData { /** - * - * @type {ConditionSetType} - * @memberof ConditionSetData + * The type of the condition set. */ type: ConditionSetType; /** - * - * @type {string} - * @memberof ConditionSetData + * The key of the condition set. */ key: string; } diff --git a/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role-settings.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derivation-settings.ts similarity index 53% rename from src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role-settings.ts rename to src/openapi/types/data-generator-lib-schemas-schema-opal-data-derivation-settings.ts index 46662f74..172ff3b2 100644 --- a/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role-settings.ts +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derivation-settings.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,15 +11,12 @@ */ /** - * - * @export - * @interface PermitBackendSchemasSchemaOpalDataDerivedRoleSettings + * Settings for the derived role */ -export interface PermitBackendSchemasSchemaOpalDataDerivedRoleSettings { +export interface DataGeneratorLibSchemasSchemaOpalDataDerivationSettings { /** - * - * @type {boolean} - * @memberof PermitBackendSchemasSchemaOpalDataDerivedRoleSettings + * If True, the derived role is superseded by a direct role. + * Meaning role derivation is not considered if the user has a direct role. */ superseded_by_direct_role?: boolean; } diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derived-role-rule.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derived-role-rule.ts new file mode 100644 index 00000000..429f00f2 --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derived-role-rule.ts @@ -0,0 +1,36 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataDerivationSettings } from './data-generator-lib-schemas-schema-opal-data-derivation-settings'; + +/** + * This is the data of a specific derived role rule in the system + */ +export interface DataGeneratorLibSchemasSchemaOpalDataDerivedRoleRule { + /** + * The relation between the resource and the related resource. + */ + relation: string; + /** + * The related resource type key. + */ + related_resource: string; + /** + * The related role key. + */ + related_role: string; + /** + * Settings for the derived role rule. + */ + settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings; +} diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derived-role.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derived-role.ts new file mode 100644 index 00000000..d341482a --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-derived-role.ts @@ -0,0 +1,31 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataDerivationSettings } from './data-generator-lib-schemas-schema-opal-data-derivation-settings'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataDerivedRoleRule } from './data-generator-lib-schemas-schema-opal-data-derived-role-rule'; + +/** + * This is the data of a specific derived role in the system + */ +export interface DataGeneratorLibSchemasSchemaOpalDataDerivedRole { + conditions?: string; + /** + * Settings for the derived role. + */ + settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings; + /** + * List of rules for the derived role. + */ + rules: Array; +} diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-full-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-full-data.ts new file mode 100644 index 00000000..ac86ca12 --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-full-data.ts @@ -0,0 +1,88 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataConditionSetData } from './data-generator-lib-schemas-schema-opal-data-condition-set-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData } from './data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataResourceTypeData } from './data-generator-lib-schemas-schema-opal-data-resource-type-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataRoleData } from './data-generator-lib-schemas-schema-opal-data-role-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataTenantData } from './data-generator-lib-schemas-schema-opal-data-tenant-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataUserData } from './data-generator-lib-schemas-schema-opal-data-user-data'; +// May contain unused imports in some cases +import type { LocationInner } from './location-inner'; + +/** + * This is the data structure that is used by the PDP in a manged Permit environment. The code Permit generates uses this data structure to enforce the policy and make decisions. + */ +export interface DataGeneratorLibSchemasSchemaOpalDataFullData { + use_debugger?: boolean; + /** + * Key-Value mapping of the users in the system. The key is the user key and the value contains some details about the user. + */ + users: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataUserData }; + /** + * Key-Value mapping of the tenants in the system. The key is the tenant key and the value contains some details about the tenant. + */ + tenants: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataTenantData }; + /** + * Key-Value mapping of the roles in the system. The key is the role key and the value contains some details about the role. + * @deprecated + */ + roles: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData }; + /** + * Key-Value mapping of the permissions for each condition set. The key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set + */ + condition_set_rules: { [key: string]: { [key: string]: { [key: string]: Array } } }; + /** + * Sanitized Key-Value mapping of the permissions for each condition set. (Equal to condition_set_rules but user_set_key and resource_set_key are sanitized)The key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set + */ + condition_set_rules_expand?: { + [key: string]: { [key: string]: { [key: string]: Array } }; + }; + /** + * Key-Value mapping of the relationships between resources. The key is the resource instance key and the value is Key-Value mapping of relation key to a Key-Value mapping of resource ( type ) to list of instances keys. + */ + relationships: { [key: string]: { [key: string]: { [key: string]: Array } } }; + /** + * Key-Value mapping of the resource types in the system. The key is the resource type key and the value contains some details about the resource type. + */ + resource_types: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceTypeData }; + /** + * Key-Value mapping of the condition sets in the system. The key is the formatted condition set key and the value contains some details about the condition set. + */ + condition_sets: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataConditionSetData }; + /** + * Key-Value mapping of the role assignments for the users. The key is the user key and the value is Key-Value mapping of resource instance key or tenant key to list of role keys assigned to the user in that resource instance. + */ + role_assignments: { [key: string]: { [key: string]: Array } }; + /** + * Key-Value mapping of the permissions for each role. The key is the resource key and the value is Key-Value mapping of role key to details on the role permissions. + */ + role_permissions: { + [key: string]: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData }; + }; + /** + * Key-Value mapping of groups of mapping rules in the system. The key is the mapping rule group and the value is a list of mapping rules objects.We currently have only one group named \'all\' which contains all the mapping rules.A mapping rule object contains, action, http_method, resource and url - all strings. + */ + mapping_rules?: { [key: string]: Array<{ [key: string]: LocationInner }> }; + /** + * Key-Value mapping of the resource instances in the system. The key is the resource instance key and the value contains some details about the resource instance. + */ + resource_instances?: { + [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData; + }; +} diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data.ts new file mode 100644 index 00000000..f09db4eb --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * This is the data of a specific resource instance in the system + */ +export interface DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData { + /** + * The tenant key that this resource instance belongs to. + */ + tenant?: string; + /** + * Key-Value mapping of the attributes of the resource instance. The key is the attribute key and the value is the attribute value. + */ + attributes?: object; +} diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-resource-type-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-resource-type-data.ts new file mode 100644 index 00000000..c13dfb03 --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-resource-type-data.ts @@ -0,0 +1,28 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataDerivedRole } from './data-generator-lib-schemas-schema-opal-data-derived-role'; + +/** + * This is the data of a specific resource type in the system + */ +export interface DataGeneratorLibSchemasSchemaOpalDataResourceTypeData { + /** + * List of actions that can be performed on the resource. + */ + actions: Array; + /** + * Key-Value mapping of the derived roles for the resource type. The key is the derived role key and the value is the details and conditions for the role derivation. + */ + derived_roles: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataDerivedRole }; +} diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-role-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-role-data.ts new file mode 100644 index 00000000..72cc80ba --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-role-data.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * This is the data of a specific role in the system + */ +export interface DataGeneratorLibSchemasSchemaOpalDataRoleData { + /** + * Key-Value mapping of the resources and actions that the role can perform. The key is the resource key and the value is a list of actions that the role can perform on that resource. + */ + grants: { [key: string]: Array }; + /** + * Key-Value mapping of the attributes of the role. The key is the attribute key and the value is the attribute value. + */ + attributes?: object; +} diff --git a/src/openapi/types/tenant-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-tenant-data.ts similarity index 56% rename from src/openapi/types/tenant-data.ts rename to src/openapi/types/data-generator-lib-schemas-schema-opal-data-tenant-data.ts index 7e735726..cfcd67a6 100644 --- a/src/openapi/types/tenant-data.ts +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-tenant-data.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,21 +11,15 @@ */ /** - * - * @export - * @interface TenantData + * This is the data of a specific tenant in the system */ -export interface TenantData { +export interface DataGeneratorLibSchemasSchemaOpalDataTenantData { /** - * - * @type {{ [key: string]: Array; }} - * @memberof TenantData + * @deprecated */ roleAssignments?: { [key: string]: Array }; /** - * - * @type {object} - * @memberof TenantData + * Key-Value mapping of the attributes of the tenant. The key is the attribute key and the value is the attribute value. */ - attributes?: object; + attributes: object; } diff --git a/src/openapi/types/data-generator-lib-schemas-schema-opal-data-user-data.ts b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-user-data.ts new file mode 100644 index 00000000..086dad62 --- /dev/null +++ b/src/openapi/types/data-generator-lib-schemas-schema-opal-data-user-data.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * This is the data of a specific user in the system + */ +export interface DataGeneratorLibSchemasSchemaOpalDataUserData { + /** + * Key-Value mapping of the roles assigned to the user. The key is the tenant key and the value is a list of role keys assigned to the user in that tenant. + * @deprecated + */ + roleAssignments: { [key: string]: Array }; + /** + * Key-Value mapping of the attributes of the user. The key is the attribute key and the value is the attribute value. + */ + attributes: object; +} diff --git a/src/openapi/types/data-source-config.ts b/src/openapi/types/data-source-config.ts index 7fbd34fc..033aa4fc 100644 --- a/src/openapi/types/data-source-config.ts +++ b/src/openapi/types/data-source-config.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,19 +11,14 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { DataSourceEntry } from './data-source-entry'; +import type { DataSourceEntryWithPollingInterval } from './data-source-entry-with-polling-interval'; /** * Static list of Data Source Entries returned to client. Answers this question for the client: from where should i get the full picture of data i need? (as opposed to incremental data updates) - * @export - * @interface DataSourceConfig */ export interface DataSourceConfig { /** * list of data sources and how to fetch from them - * @type {Array} - * @memberof DataSourceConfig */ - entries: Array; + entries?: Array; } diff --git a/src/openapi/types/data-source-entry-with-polling-interval.ts b/src/openapi/types/data-source-entry-with-polling-interval.ts index e0fd430c..3b77c938 100644 --- a/src/openapi/types/data-source-entry-with-polling-interval.ts +++ b/src/openapi/types/data-source-entry-with-polling-interval.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,55 +11,35 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Data } from './data'; +import type { Data } from './data'; /** * Data source configuration - where client\'s should retrieve data from and how they should store it - * @export - * @interface DataSourceEntryWithPollingInterval */ export interface DataSourceEntryWithPollingInterval { /** * Url source to query for data - * @type {string} - * @memberof DataSourceEntryWithPollingInterval */ url: string; - /** - * - * @type {Data} - * @memberof DataSourceEntryWithPollingInterval - */ - data?: Data; /** * Suggested fetcher configuration (e.g. auth or method) to fetch data with - * @type {object} - * @memberof DataSourceEntryWithPollingInterval */ config?: object; /** * topics the data applies to - * @type {Array} - * @memberof DataSourceEntryWithPollingInterval */ topics?: Array; /** * OPA data api path to store the document at - * @type {string} - * @memberof DataSourceEntryWithPollingInterval */ dst_path?: string; /** - * Method used to write into OPA - PUT/PATCH - * @type {string} - * @memberof DataSourceEntryWithPollingInterval + * Method used to write into OPA - PUT/PATCH, when using the PATCH method the data field should conform to the JSON patch schema defined in RFC 6902(https://datatracker.ietf.org/doc/html/rfc6902#section-3) */ save_method?: string; + data?: Data; /** * Polling interval to refresh data from data source - * @type {number} - * @memberof DataSourceEntryWithPollingInterval */ periodic_update_interval?: number; } diff --git a/src/openapi/types/data-source-entry.ts b/src/openapi/types/data-source-entry.ts deleted file mode 100644 index 5cda25c6..00000000 --- a/src/openapi/types/data-source-entry.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Data source configuration - where client\'s should retrive data from and how they should store it - * @export - * @interface DataSourceEntry - */ -export interface DataSourceEntry { - /** - * Url source to query for data - * @type {string} - * @memberof DataSourceEntry - */ - url: string; - /** - * Suggested fetcher configuration (e.g. auth or method) to fetch data with - * @type {object} - * @memberof DataSourceEntry - */ - config?: object; - /** - * topics the data applies to - * @type {Array} - * @memberof DataSourceEntry - */ - topics?: Array; - /** - * OPA data api path to store the document at - * @type {string} - * @memberof DataSourceEntry - */ - dst_path?: string; - /** - * Method used to write into OPA - PUT/PATCH - * @type {string} - * @memberof DataSourceEntry - */ - save_method?: string; -} diff --git a/src/openapi/types/data-update-report.ts b/src/openapi/types/data-update-report.ts deleted file mode 100644 index 7b189b41..00000000 --- a/src/openapi/types/data-update-report.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DataEntryReport } from './data-entry-report'; - -/** - * - * @export - * @interface DataUpdateReport - */ -export interface DataUpdateReport { - /** - * - * @type {string} - * @memberof DataUpdateReport - */ - update_id?: string; - /** - * - * @type {Array} - * @memberof DataUpdateReport - */ - reports: Array; - /** - * - * @type {string} - * @memberof DataUpdateReport - */ - policy_hash?: string; -} diff --git a/src/openapi/types/data.ts b/src/openapi/types/data.ts index 26517ae9..919f3d8b 100644 --- a/src/openapi/types/data.ts +++ b/src/openapi/types/data.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,7 @@ * Do not edit the class manually. */ -/** - * Data payload to embed within the data update (instead of having the client fetch it from the url). - * @export - * @interface Data - */ -export interface Data {} +// May contain unused imports in some cases +import type { JSONPatchAction } from './jsonpatch-action'; + +export type Data = Array | Array | object; diff --git a/src/openapi/types/derived-role-block-edit.ts b/src/openapi/types/derived-role-block-edit.ts index b3242084..e0b2d8ad 100644 --- a/src/openapi/types/derived-role-block-edit.ts +++ b/src/openapi/types/derived-role-block-edit.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,28 +11,17 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleRuleCreate } from './derived-role-rule-create'; +import type { DerivedRoleRuleCreate } from './derived-role-rule-create'; // May contain unused imports in some cases -// @ts-ignore -import { When } from './when'; +import type { PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings } from './permit-backend-schemas-schema-derived-role-rule-derivation-settings'; -/** - * - * @export - * @interface DerivedRoleBlockEdit - */ export interface DerivedRoleBlockEdit { /** - * - * @type {When} - * @memberof DerivedRoleBlockEdit + * the settings of the derived role */ - when?: When; + when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings; /** * the rules of the derived role - * @type {Array} - * @memberof DerivedRoleBlockEdit */ users_with_role?: Array; } diff --git a/src/openapi/types/derived-role-block-read.ts b/src/openapi/types/derived-role-block-read.ts index ab0f675d..007a2fe9 100644 --- a/src/openapi/types/derived-role-block-read.ts +++ b/src/openapi/types/derived-role-block-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,34 +11,21 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleRuleRead } from './derived-role-rule-read'; +import type { DerivedRoleRuleRead } from './derived-role-rule-read'; // May contain unused imports in some cases -// @ts-ignore -import { When } from './when'; +import type { PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings } from './permit-backend-schemas-schema-derived-role-rule-derivation-settings'; -/** - * - * @export - * @interface DerivedRoleBlockRead - */ export interface DerivedRoleBlockRead { /** - * - * @type {When} - * @memberof DerivedRoleBlockRead + * the settings of the derived role */ - when?: When; + when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings; /** * The unique id of the derived_role - * @type {string} - * @memberof DerivedRoleBlockRead */ id: string; /** * the rules of the derived role - * @type {Array} - * @memberof DerivedRoleBlockRead */ users_with_role?: Array; } diff --git a/src/openapi/types/derived-role-rule-create.ts b/src/openapi/types/derived-role-rule-create.ts index 3aa84b4f..3f087af1 100644 --- a/src/openapi/types/derived-role-rule-create.ts +++ b/src/openapi/types/derived-role-rule-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,35 +10,24 @@ * Do not edit the class manually. */ -import { PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings } from './permit-backend-schemas-schema-derived-role-derived-role-settings'; +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings } from './permit-backend-schemas-schema-derived-role-rule-derivation-settings'; -/** - * - * @export - * @interface DerivedRoleRuleCreate - */ export interface DerivedRoleRuleCreate { /** * the role key that needs to exist on the related resource (from the relation) - * @type {string} - * @memberof DerivedRoleRuleCreate */ role: string; /** * the resource key that needs to exist on the related role (from the relation) - * @type {string} - * @memberof DerivedRoleRuleCreate */ on_resource: string; /** * the relation key that needs to exist between the resource and the related resource - * @type {string} - * @memberof DerivedRoleRuleCreate */ linked_by_relation: string; /** - * condition for the rule to be applied - * @type {PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings} + * the settings of the derived role rule */ - when?: PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings; + when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings; } diff --git a/src/openapi/types/derived-role-rule-delete.ts b/src/openapi/types/derived-role-rule-delete.ts index 8c619acd..36b6dd08 100644 --- a/src/openapi/types/derived-role-rule-delete.ts +++ b/src/openapi/types/derived-role-rule-delete.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,24 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface DerivedRoleRuleDelete - */ +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings } from './permit-backend-schemas-schema-derived-role-rule-derivation-settings'; + export interface DerivedRoleRuleDelete { /** * the role key that needs to exist on the related resource (from the relation) - * @type {string} - * @memberof DerivedRoleRuleDelete */ role: string; /** * the resource key that needs to exist on the related role (from the relation) - * @type {string} - * @memberof DerivedRoleRuleDelete */ on_resource: string; /** * the relation key that needs to exist between the resource and the related resource - * @type {string} - * @memberof DerivedRoleRuleDelete */ linked_by_relation: string; + /** + * the settings of the derived role rule + */ + when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings; } diff --git a/src/openapi/types/derived-role-rule-read.ts b/src/openapi/types/derived-role-rule-read.ts index afadafb5..bf29bdc9 100644 --- a/src/openapi/types/derived-role-rule-read.ts +++ b/src/openapi/types/derived-role-rule-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,36 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface DerivedRoleRuleRead - */ +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings } from './permit-backend-schemas-schema-derived-role-rule-derivation-settings'; + export interface DerivedRoleRuleRead { /** * the role id that needs to exist on the related resource (from the relation) - * @type {string} - * @memberof DerivedRoleRuleRead */ role_id: string; /** * the resource id that needs to exist on the related role (from the relation) - * @type {string} - * @memberof DerivedRoleRuleRead */ resource_id: string; /** * the relation id that needs to exist between the resource and the related resource - * @type {string} - * @memberof DerivedRoleRuleRead */ relation_id: string; /** * the role key that needs to exist on the related resource (from the relation) - * @type {string} - * @memberof DerivedRoleRuleRead */ role: string; /** * the resource key that needs to exist on the related role (from the relation) - * @type {string} - * @memberof DerivedRoleRuleRead */ on_resource: string; /** * the relation key that needs to exist between the resource and the related resource - * @type {string} - * @memberof DerivedRoleRuleRead */ linked_by_relation: string; + /** + * the settings of the derived role rule + */ + when?: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings; } diff --git a/src/openapi/types/derived-role-rule.ts b/src/openapi/types/derived-role-rule.ts deleted file mode 100644 index dcac5152..00000000 --- a/src/openapi/types/derived-role-rule.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface DerivedRoleRule - */ -export interface DerivedRoleRule { - /** - * - * @type {string} - * @memberof DerivedRoleRule - */ - relation: string; - /** - * - * @type {string} - * @memberof DerivedRoleRule - */ - related_resource: string; - /** - * - * @type {string} - * @memberof DerivedRoleRule - */ - related_role: string; -} diff --git a/src/openapi/types/derived-role.ts b/src/openapi/types/derived-role.ts deleted file mode 100644 index 6dedbfeb..00000000 --- a/src/openapi/types/derived-role.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleRule } from './derived-role-rule'; -// May contain unused imports in some cases -// @ts-ignore -import { PermitBackendSchemasSchemaOpalDataDerivedRoleSettings } from './permit-backend-schemas-schema-opal-data-derived-role-settings'; - -/** - * - * @export - * @interface DerivedRole - */ -export interface DerivedRole { - /** - * - * @type {string} - * @memberof DerivedRole - */ - conditions?: string; - /** - * - * @type {PermitBackendSchemasSchemaOpalDataDerivedRoleSettings} - * @memberof DerivedRole - */ - settings: PermitBackendSchemasSchemaOpalDataDerivedRoleSettings; - /** - * - * @type {Array} - * @memberof DerivedRole - */ - rules: Array; -} diff --git a/src/openapi/types/detailed-audit-log-model.ts b/src/openapi/types/detailed-audit-log-model.ts new file mode 100644 index 00000000..18ceebe9 --- /dev/null +++ b/src/openapi/types/detailed-audit-log-model.ts @@ -0,0 +1,40 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AuditLogObjectsModel } from './audit-log-objects-model'; +// May contain unused imports in some cases +import type { RawData1 } from './raw-data1'; + +export interface DetailedAuditLogModel { + id: string; + raw_data: RawData1; + timestamp: string; + created_at?: string | null; + query?: string | null; + user_key?: string | null; + user_email?: string | null; + user_name?: string | null; + resource_type?: string | null; + tenant?: string | null; + action?: string | null; + decision?: boolean | null; + reason?: string | null; + org_id: string; + project_id: string; + env_id: string; + pdp_config_id?: string | null; + input?: any; + result?: any; + context?: any; + objects?: AuditLogObjectsModel | null; +} diff --git a/src/openapi/types/detailed-audit-log.ts b/src/openapi/types/detailed-audit-log.ts deleted file mode 100644 index 2bbde606..00000000 --- a/src/openapi/types/detailed-audit-log.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { AuditLogObjects } from './audit-log-objects'; -// May contain unused imports in some cases -// @ts-ignore -import { RawData } from './raw-data'; - -/** - * - * @export - * @interface DetailedAuditLog - */ -export interface DetailedAuditLog { - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - id: string; - /** - * - * @type {RawData} - * @memberof DetailedAuditLog - */ - raw_data: RawData; - /** - * - * @type {any} - * @memberof DetailedAuditLog - */ - input?: any; - /** - * - * @type {any} - * @memberof DetailedAuditLog - */ - result?: any; - /** - * - * @type {any} - * @memberof DetailedAuditLog - */ - context?: any; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - action?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - timestamp: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - query?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - user_key?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - user_email?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - user_name?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - resource_type?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - tenant?: string; - /** - * - * @type {boolean} - * @memberof DetailedAuditLog - */ - decision?: boolean; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - reason?: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - pdp_config_id: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - env_id: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - project_id: string; - /** - * - * @type {string} - * @memberof DetailedAuditLog - */ - org_id: string; - /** - * - * @type {AuditLogObjects} - * @memberof DetailedAuditLog - */ - objects: AuditLogObjects; -} diff --git a/src/openapi/types/dummy-engine-model.ts b/src/openapi/types/dummy-engine-model.ts index eb303807..aaaff695 100644 --- a/src/openapi/types/dummy-engine-model.ts +++ b/src/openapi/types/dummy-engine-model.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,12 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Engine } from './engine'; +import type { Engine } from './engine'; /** * dummy engine class in case we couldn\'t parse the log but we didn\'t want to drop it - * @export - * @interface DummyEngineModel */ export interface DummyEngineModel { - /** - * - * @type {Engine} - * @memberof DummyEngineModel - */ - engine?: Engine; - /** - * - * @type {string} - * @memberof DummyEngineModel - */ - timestamp?: string; + engine?: Engine | null; + timestamp?: string | null; } diff --git a/src/openapi/types/elements-config-create.ts b/src/openapi/types/elements-config-create.ts index ec167840..c004a618 100644 --- a/src/openapi/types/elements-config-create.ts +++ b/src/openapi/types/elements-config-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,55 +11,36 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ElementsType } from './elements-type'; +import type { ElementsType } from './elements-type'; // May contain unused imports in some cases -// @ts-ignore -import { Settings } from './settings'; +import type { SettingsValue } from './settings-value'; // May contain unused imports in some cases -// @ts-ignore -import { WebhookCreate } from './webhook-create'; +import type { WebhookCreateWithElements } from './webhook-create-with-elements'; -/** - * - * @export - * @interface ElementsConfigCreate - */ export interface ElementsConfigCreate { /** * A URL-friendly name of the elements_config (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_config. - * @type {string} - * @memberof ElementsConfigCreate */ key: string; /** * The name of the elements_config - * @type {string} - * @memberof ElementsConfigCreate */ name: string; /** * The type of the elements interface, e.g: user management - * @type {ElementsType} - * @memberof ElementsConfigCreate */ elements_type: ElementsType; /** * Obj with the options of the elements interface, e.g: primary color - * @type {{ [key: string]: Settings; }} - * @memberof ElementsConfigCreate */ - settings: { [key: string]: Settings }; + settings: { [key: string]: SettingsValue }; /** - * Obj with levels as keys and role ids as values - * @type {{ [key: string]: Array; }} - * @memberof ElementsConfigCreate + * Whether to send email notifications to users using your Email Provider you set */ - roles_to_levels: { [key: string]: Array }; + email_notifications?: boolean; /** - * - * @type {WebhookCreate} - * @memberof ElementsConfigCreate + * Obj with levels as keys and role ids as values */ - webhook?: WebhookCreate; + roles_to_levels: { [key: string]: Array }; + webhook?: WebhookCreateWithElements; } diff --git a/src/openapi/types/elements-config-read.ts b/src/openapi/types/elements-config-read.ts index 0575e0e8..b0b3e3a4 100644 --- a/src/openapi/types/elements-config-read.ts +++ b/src/openapi/types/elements-config-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,100 +11,63 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ElementsType } from './elements-type'; +import type { ElementsType } from './elements-type'; // May contain unused imports in some cases -// @ts-ignore -import { PermissionLevelRoleRead } from './permission-level-role-read'; +import type { PermissionLevelRoleRead } from './permission-level-role-read'; // May contain unused imports in some cases -// @ts-ignore -import { Settings } from './settings'; +import type { SettingsValue } from './settings-value'; // May contain unused imports in some cases -// @ts-ignore -import { WebhookRead } from './webhook-read'; +import type { WebhookRead } from './webhook-read'; -/** - * - * @export - * @interface ElementsConfigRead - */ export interface ElementsConfigRead { /** * A URL-friendly name of the elements_config (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_config. - * @type {string} - * @memberof ElementsConfigRead */ key: string; /** * Unique id of the elements_config - * @type {string} - * @memberof ElementsConfigRead */ id: string; /** * Unique id of the organization that the elements_config belongs to. - * @type {string} - * @memberof ElementsConfigRead */ organization_id: string; /** * Unique id of the project that the elements_config belongs to. - * @type {string} - * @memberof ElementsConfigRead */ project_id: string; /** * Unique id of the environment that the elements_config belongs to. - * @type {string} - * @memberof ElementsConfigRead */ environment_id: string; /** * Date and time when the elements_config was created (ISO_8601 format). - * @type {string} - * @memberof ElementsConfigRead */ created_at: string; /** * Date and time when the elements_config was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ElementsConfigRead */ updated_at: string; - /** - * - * @type {boolean} - * @memberof ElementsConfigRead - */ is_active: boolean; /** * The name of the elements_config - * @type {string} - * @memberof ElementsConfigRead */ name: string; /** * The type of the elements interface, e.g: user management - * @type {ElementsType} - * @memberof ElementsConfigRead */ elements_type: ElementsType; /** * Obj with the options of the elements interface, e.g: primary color - * @type {{ [key: string]: Settings; }} - * @memberof ElementsConfigRead */ - settings: { [key: string]: Settings }; + settings: { [key: string]: SettingsValue }; /** - * Obj with levels as keys and role ids as values - * @type {{ [key: string]: Array; }} - * @memberof ElementsConfigRead + * Whether to send email notifications to users using your Email Provider you set */ - roles_to_levels: { [key: string]: Array }; + email_notifications?: boolean; /** - * - * @type {WebhookRead} - * @memberof ElementsConfigRead + * Obj with levels as keys and role ids as values */ + roles_to_levels: { [key: string]: Array }; webhook?: WebhookRead; } diff --git a/src/openapi/types/elements-config-runtime-read.ts b/src/openapi/types/elements-config-runtime-read.ts index 06be0802..7e6bbec5 100644 --- a/src/openapi/types/elements-config-runtime-read.ts +++ b/src/openapi/types/elements-config-runtime-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,28 +11,11 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ElementsConfigRead } from './elements-config-read'; +import type { ElementsConfigRead } from './elements-config-read'; // May contain unused imports in some cases -// @ts-ignore -import { ElementsPermissionLevel } from './elements-permission-level'; +import type { ElementsPermissionLevel } from './elements-permission-level'; -/** - * - * @export - * @interface ElementsConfigRuntimeRead - */ export interface ElementsConfigRuntimeRead { - /** - * - * @type {ElementsConfigRead} - * @memberof ElementsConfigRuntimeRead - */ config: ElementsConfigRead; - /** - * - * @type {ElementsPermissionLevel} - * @memberof ElementsConfigRuntimeRead - */ current_permission_level: ElementsPermissionLevel; } diff --git a/src/openapi/types/elements-config-update.ts b/src/openapi/types/elements-config-update.ts index 820b76d5..d4babbbc 100644 --- a/src/openapi/types/elements-config-update.ts +++ b/src/openapi/types/elements-config-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,32 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ElementsType } from './elements-type'; +import type { ElementsType } from './elements-type'; // May contain unused imports in some cases -// @ts-ignore -import { Settings } from './settings'; +import type { SettingsValue } from './settings-value'; // May contain unused imports in some cases -// @ts-ignore -import { WebhookUpdate } from './webhook-update'; +import type { WebhookUpdate } from './webhook-update'; -/** - * - * @export - * @interface ElementsConfigUpdate - */ export interface ElementsConfigUpdate { /** * The name of the elements_config - * @type {string} - * @memberof ElementsConfigUpdate */ name?: string; /** * The type of the elements interface, e.g: user management - * @type {ElementsType} - * @memberof ElementsConfigUpdate */ elements_type?: ElementsType; /** * Obj with the options of the elements interface, e.g: primary color - * @type {{ [key: string]: Settings; }} - * @memberof ElementsConfigUpdate */ - settings?: { [key: string]: Settings }; + settings?: { [key: string]: SettingsValue }; /** - * Obj with levels as keys and role ids as values - * @type {{ [key: string]: Array; }} - * @memberof ElementsConfigUpdate + * Whether to send email notifications to users using your Email Provider you set */ - roles_to_levels: { [key: string]: Array }; + email_notifications?: boolean; /** - * - * @type {WebhookUpdate} - * @memberof ElementsConfigUpdate + * Obj with levels as keys and role ids as values */ + roles_to_levels: { [key: string]: Array }; webhook?: WebhookUpdate; } diff --git a/src/openapi/types/elements-env-type-read.ts b/src/openapi/types/elements-env-type-read.ts deleted file mode 100644 index d8ca0d21..00000000 --- a/src/openapi/types/elements-env-type-read.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { PermissionLevelRoleRead } from './permission-level-role-read'; - -/** - * - * @export - * @interface ElementsEnvTypeRead - */ -export interface ElementsEnvTypeRead { - /** - * Obj with levels as keys and role ids as values - * @type {{ [key: string]: Array; }} - * @memberof ElementsEnvTypeRead - */ - roles_to_levels: { [key: string]: Array }; - /** - * The type of the elements interface, e.g: user_management - * @type {string} - * @memberof ElementsEnvTypeRead - */ - elements_type: string; -} diff --git a/src/openapi/types/elements-env-type-update.ts b/src/openapi/types/elements-env-type-update.ts deleted file mode 100644 index 47c5313c..00000000 --- a/src/openapi/types/elements-env-type-update.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface ElementsEnvTypeUpdate - */ -export interface ElementsEnvTypeUpdate { - /** - * Obj with levels as keys and role ids as values - * @type {{ [key: string]: Array; }} - * @memberof ElementsEnvTypeUpdate - */ - roles_to_levels?: { [key: string]: Array }; -} diff --git a/src/openapi/types/elements-permission-level.ts b/src/openapi/types/elements-permission-level.ts index 1b9414b9..813e9aa6 100644 --- a/src/openapi/types/elements-permission-level.ts +++ b/src/openapi/types/elements-permission-level.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const ElementsPermissionLevel = { diff --git a/src/openapi/types/elements-role-read.ts b/src/openapi/types/elements-role-read.ts index 8d90986a..ab2a482b 100644 --- a/src/openapi/types/elements-role-read.ts +++ b/src/openapi/types/elements-role-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,94 +11,20 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ElementsPermissionLevel } from './elements-permission-level'; -// May contain unused imports in some cases -// @ts-ignore -import { GrantedTo } from './granted-to'; +import type { ElementsPermissionLevel } from './elements-permission-level'; -/** - * - * @export - * @interface ElementsRoleRead - */ export interface ElementsRoleRead { - /** - * The name of the role - * @type {string} - * @memberof ElementsRoleRead - */ - name: string; - /** - * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof ElementsRoleRead - */ - description?: string; - /** - * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof ElementsRoleRead - */ - permissions?: Array; - /** - * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof ElementsRoleRead - */ - attributes?: object; - /** - * - * @type {GrantedTo} - * @memberof ElementsRoleRead - */ - granted_to?: GrantedTo; - /** - * A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role. - * @type {string} - * @memberof ElementsRoleRead - */ - key: string; /** * Unique id of the role - * @type {string} - * @memberof ElementsRoleRead */ id: string; /** - * Unique id of the organization that the role belongs to. - * @type {string} - * @memberof ElementsRoleRead - */ - organization_id: string; - /** - * Unique id of the project that the role belongs to. - * @type {string} - * @memberof ElementsRoleRead - */ - project_id: string; - /** - * Unique id of the environment that the role belongs to. - * @type {string} - * @memberof ElementsRoleRead - */ - environment_id: string; - /** - * Date and time when the role was created (ISO_8601 format). - * @type {string} - * @memberof ElementsRoleRead - */ - created_at: string; - /** - * Date and time when the role was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ElementsRoleRead + * A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role. */ - updated_at: string; + key: string; /** - * - * @type {ElementsPermissionLevel} - * @memberof ElementsRoleRead + * The name of the role */ + name: string; permission_level: ElementsPermissionLevel; } diff --git a/src/openapi/types/elements-type.ts b/src/openapi/types/elements-type.ts index 35f61fc3..7ee60026 100644 --- a/src/openapi/types/elements-type.ts +++ b/src/openapi/types/elements-type.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,14 +12,14 @@ /** * An enumeration. - * @export - * @enum {string} */ export const ElementsType = { UserManagement: 'user_management', AuditLog: 'audit_log', ApprovalFlow: 'approval_flow', + OperationApproval: 'operation_approval', + ApprovalManagement: 'approval_management', } as const; export type ElementsType = (typeof ElementsType)[keyof typeof ElementsType]; diff --git a/src/openapi/types/elements-user-create.ts b/src/openapi/types/elements-user-create.ts index d67f0724..a2988e2f 100644 --- a/src/openapi/types/elements-user-create.ts +++ b/src/openapi/types/elements-user-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,54 +10,33 @@ * Do not edit the class manually. */ -import { UserRoleCreate } from './user-role-create'; +// May contain unused imports in some cases +import type { UserRoleCreate } from './user-role-create'; -/** - * - * @export - * @interface ElementsUserCreate - */ export interface ElementsUserCreate { /** * A unique id by which Permit will identify the user for permission checks. - * @type {string} - * @memberof ElementsUserCreate */ key: string; /** * The email of the user. If synced, will be unique inside the environment. - * @type {string} - * @memberof ElementsUserCreate */ email?: string; /** * First name of the user. - * @type {string} - * @memberof ElementsUserCreate */ first_name?: string; /** * Last name of the user. - * @type {string} - * @memberof ElementsUserCreate */ last_name?: string; /** * Arbitrary user attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof ElementsUserCreate */ attributes?: object; /** * List of roles to assign to the user in the environment. - * @type {UserRoleCreate[]} - * @memberof ElementsUserCreate - */ - role_assignments?: UserRoleCreate[]; - /** - * - * @type {string} - * @memberof ElementsUserCreate */ + role_assignments?: Array; role?: string; } diff --git a/src/openapi/types/labels.ts b/src/openapi/types/elements-user-invite-approve.ts similarity index 55% rename from src/openapi/types/labels.ts rename to src/openapi/types/elements-user-invite-approve.ts index 5945705a..84247173 100644 --- a/src/openapi/types/labels.ts +++ b/src/openapi/types/elements-user-invite-approve.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface Labels - */ -export interface Labels { +export interface ElementsUserInviteApprove { + /** + * The email of the user that is being invited + */ + email: string; /** - * - * @type {string} - * @memberof Labels + * The key of the elements user invite */ - id: string; + key: string; /** - * - * @type {string} - * @memberof Labels + * The attributes of the user */ - version: string; + attributes: object; } diff --git a/src/openapi/types/elements-user-invite-create.ts b/src/openapi/types/elements-user-invite-create.ts new file mode 100644 index 00000000..298c9b88 --- /dev/null +++ b/src/openapi/types/elements-user-invite-create.ts @@ -0,0 +1,49 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { UserInviteStatus } from './user-invite-status'; + +export interface ElementsUserInviteCreate { + /** + * The key of the user that is being invited + */ + key: string; + /** + * The status of the user invite + */ + status: UserInviteStatus; + /** + * The email of the user that being invited + */ + email: string; + /** + * The first name of the user that is being invited + */ + first_name: string; + /** + * The last name of the user that is being invited + */ + last_name: string; + /** + * The role of the user that is being invited + */ + role_id: string; + /** + * The tenant id of the user that is being invited + */ + tenant_id: string; + /** + * The resource instance id of the user that is being invited + */ + resource_instance_id: string; +} diff --git a/src/openapi/types/elements-user-invite-read.ts b/src/openapi/types/elements-user-invite-read.ts new file mode 100644 index 00000000..8adb1ac5 --- /dev/null +++ b/src/openapi/types/elements-user-invite-read.ts @@ -0,0 +1,73 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { UserInviteStatus } from './user-invite-status'; + +export interface ElementsUserInviteRead { + /** + * Unique id of the elements_user_invite + */ + id: string; + /** + * Unique id of the organization that the elements_user_invite belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the elements_user_invite belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the elements_user_invite belongs to. + */ + environment_id: string; + /** + * Date and time when the elements_user_invite was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the elements_user_invite was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * The key of the user that is being invited + */ + key: string; + /** + * The status of the user invite + */ + status: UserInviteStatus; + /** + * The email of the user that being invited + */ + email: string; + /** + * The first name of the user that is being invited + */ + first_name: string; + /** + * The last name of the user that is being invited + */ + last_name: string; + /** + * The role of the user that is being invited + */ + role_id: string; + /** + * The tenant id of the user that is being invited + */ + tenant_id: string; + /** + * The resource instance id of the user that is being invited + */ + resource_instance_id: string; +} diff --git a/src/openapi/types/elements-user-invite-update.ts b/src/openapi/types/elements-user-invite-update.ts new file mode 100644 index 00000000..0a5610f7 --- /dev/null +++ b/src/openapi/types/elements-user-invite-update.ts @@ -0,0 +1,49 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { UserInviteStatus } from './user-invite-status'; + +export interface ElementsUserInviteUpdate { + /** + * The key of the user that is being invited + */ + key: string; + /** + * The status of the user invite + */ + status: UserInviteStatus; + /** + * The email of the user that being invited + */ + email: string; + /** + * The first name of the user that is being invited + */ + first_name: string; + /** + * The last name of the user that is being invited + */ + last_name: string; + /** + * The role of the user that is being invited + */ + role_id: string; + /** + * The tenant id of the user that is being invited + */ + tenant_id: string; + /** + * The resource instance id of the user that is being invited + */ + resource_instance_id: string; +} diff --git a/src/openapi/types/elements-user-role-create.ts b/src/openapi/types/elements-user-role-create.ts index 5af5c872..d3c0c10f 100644 --- a/src/openapi/types/elements-user-role-create.ts +++ b/src/openapi/types/elements-user-role-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ElementsUserRoleCreate - */ export interface ElementsUserRoleCreate { /** * the role that will be assigned (accepts either the role id or the role key) - * @type {string} - * @memberof ElementsUserRoleCreate */ role: string; } diff --git a/src/openapi/types/elements-user-role-remove.ts b/src/openapi/types/elements-user-role-remove.ts index 49039a0a..70832571 100644 --- a/src/openapi/types/elements-user-role-remove.ts +++ b/src/openapi/types/elements-user-role-remove.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ElementsUserRoleRemove - */ export interface ElementsUserRoleRemove { /** * the role that will be unassigned (accepts either the role id or the role key) - * @type {string} - * @memberof ElementsUserRoleRemove */ role: string; } diff --git a/src/openapi/types/email-configuration-create.ts b/src/openapi/types/email-configuration-create.ts new file mode 100644 index 00000000..4bfcb09a --- /dev/null +++ b/src/openapi/types/email-configuration-create.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { MailgunEmailConfigurationCreate } from './mailgun-email-configuration-create'; +// May contain unused imports in some cases +import type { SMTPEmailConfigurationCreate } from './smtpemail-configuration-create'; + +/** + * @type EmailConfigurationCreate + */ +export type EmailConfigurationCreate = + | ({ email_provider_type: 'mailgun' } & MailgunEmailConfigurationCreate) + | ({ email_provider_type: 'smtp' } & SMTPEmailConfigurationCreate); diff --git a/src/openapi/types/email-configuration-read.ts b/src/openapi/types/email-configuration-read.ts new file mode 100644 index 00000000..e428ff8b --- /dev/null +++ b/src/openapi/types/email-configuration-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { MailgunEmailConfigurationRead } from './mailgun-email-configuration-read'; +// May contain unused imports in some cases +import type { SMTPEmailConfigurationRead } from './smtpemail-configuration-read'; + +/** + * @type EmailConfigurationRead + */ +export type EmailConfigurationRead = + | ({ email_provider_type: 'mailgun' } & MailgunEmailConfigurationRead) + | ({ email_provider_type: 'smtp' } & SMTPEmailConfigurationRead); diff --git a/src/openapi/types/email-message-keys.ts b/src/openapi/types/email-message-keys.ts new file mode 100644 index 00000000..5865d2fc --- /dev/null +++ b/src/openapi/types/email-message-keys.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const EmailMessageKeys = { + ApprovalFlowsDeny: 'approval_flows_deny', + UserManagementInvite: 'user_management_invite', + ApprovalFlowsApprove: 'approval_flows_approve', + ApprovalFlowsRequest: 'approval_flows_request', + TestEmail: 'test_email', +} as const; + +export type EmailMessageKeys = (typeof EmailMessageKeys)[keyof typeof EmailMessageKeys]; diff --git a/src/openapi/types/pdpstate-update.ts b/src/openapi/types/email-template-message.ts similarity index 50% rename from src/openapi/types/pdpstate-update.ts rename to src/openapi/types/email-template-message.ts index c972f2c9..a28db62a 100644 --- a/src/openapi/types/pdpstate-update.ts +++ b/src/openapi/types/email-template-message.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,15 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { PDPState } from './pdpstate'; +import type { EmailMessageKeys } from './email-message-keys'; -/** - * - * @export - * @interface PDPStateUpdate - */ -export interface PDPStateUpdate { +export interface EmailTemplateMessage { /** - * - * @type {string} - * @memberof PDPStateUpdate + * The key of the message, can be either \'approval_flows_deny\', \'approval_flows_approve\', \'approval_flows_request\' */ - pdp_instance_id: string; + message_type: EmailMessageKeys; /** - * - * @type {PDPState} - * @memberof PDPStateUpdate + * The value of the message */ - state: PDPState; + message_content: string; } diff --git a/src/openapi/types/email-template-read.ts b/src/openapi/types/email-template-read.ts new file mode 100644 index 00000000..c6fa4445 --- /dev/null +++ b/src/openapi/types/email-template-read.ts @@ -0,0 +1,59 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { EmailTemplateMessage } from './email-template-message'; +// May contain unused imports in some cases +import type { EmailTemplateType } from './email-template-type'; + +export interface EmailTemplateRead { + /** + * The type of the email template, can be either \'approval_flows\' or \'user_management\' + */ + template_type: EmailTemplateType; + /** + * Unique id of the EmailTemplate + */ + id: string; + /** + * Unique id of the organization that the EmailTemplate belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the EmailTemplate belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the EmailTemplate belongs to. + */ + environment_id: string; + /** + * The from address the mails will be sent from + */ + from_address: string; + /** + * The redirect url the user will be redirected to after clicking the link in the email + */ + redirect_to: string; + /** + * The time to live of the url in the email, in seconds + */ + url_ttl: string; + /** + * The subject of the email template + */ + subject: string; + /** + * The messages of the email template + */ + messages: Array; +} diff --git a/src/openapi/types/email-template-type.ts b/src/openapi/types/email-template-type.ts new file mode 100644 index 00000000..1c5328b1 --- /dev/null +++ b/src/openapi/types/email-template-type.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const EmailTemplateType = { + ApprovalFlows: 'approval_flows', + UserManagement: 'user_management', + TestEmail: 'test_email', +} as const; + +export type EmailTemplateType = (typeof EmailTemplateType)[keyof typeof EmailTemplateType]; diff --git a/src/openapi/types/email-template-update.ts b/src/openapi/types/email-template-update.ts new file mode 100644 index 00000000..f3ce8c44 --- /dev/null +++ b/src/openapi/types/email-template-update.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { EmailTemplateMessage } from './email-template-message'; + +export interface EmailTemplateUpdate { + /** + * The from address the mails will be sent from + */ + from_address: string; + /** + * The redirect url the user will be redirected to after clicking the link in the email + */ + redirect_to: string; + /** + * The time to live of the url in the email, in seconds + */ + url_ttl: string; + /** + * The subject of the email template + */ + subject: string; + /** + * The messages of the email template + */ + messages: Array; +} diff --git a/src/openapi/types/embedded-login-request-output.ts b/src/openapi/types/embedded-login-request-output.ts index cce65ca5..cbe2b29e 100644 --- a/src/openapi/types/embedded-login-request-output.ts +++ b/src/openapi/types/embedded-login-request-output.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,29 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface EmbeddedLoginRequestOutput - */ export interface EmbeddedLoginRequestOutput { /** * If the login request failed, this field will contain the error message - * @type {string} - * @memberof EmbeddedLoginRequestOutput */ error?: string; /** * If the login request failed, this field will contain the error code - * @type {number} - * @memberof EmbeddedLoginRequestOutput */ error_code?: number; /** * The auth token that lets your users login into permit elements - * @type {string} - * @memberof EmbeddedLoginRequestOutput */ token?: string; /** * Extra data that you can pass to the login request - * @type {string} - * @memberof EmbeddedLoginRequestOutput */ extra?: string; /** * The full URL to which the user should be redirected in order to complete the login process - * @type {string} - * @memberof EmbeddedLoginRequestOutput */ redirect_url: string; + /** + * The bearer token that lets your users login into permit elements + */ + element_bearer_token?: string; } diff --git a/src/openapi/types/engine.ts b/src/openapi/types/engine.ts index db85e97e..c83991cd 100644 --- a/src/openapi/types/engine.ts +++ b/src/openapi/types/engine.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,13 +12,12 @@ /** * An enumeration. - * @export - * @enum {string} */ export const Engine = { Opa: 'OPA', Avp: 'AVP', + Generic: 'GENERIC', } as const; export type Engine = (typeof Engine)[keyof typeof Engine]; diff --git a/src/openapi/types/environment-copy-conflict-strategy.ts b/src/openapi/types/environment-copy-conflict-strategy.ts new file mode 100644 index 00000000..b05dcbff --- /dev/null +++ b/src/openapi/types/environment-copy-conflict-strategy.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const EnvironmentCopyConflictStrategy = { + Fail: 'fail', + Overwrite: 'overwrite', +} as const; + +export type EnvironmentCopyConflictStrategy = + (typeof EnvironmentCopyConflictStrategy)[keyof typeof EnvironmentCopyConflictStrategy]; diff --git a/src/openapi/types/environment-copy-scope-filters.ts b/src/openapi/types/environment-copy-scope-filters.ts index fcb465f0..096108c3 100644 --- a/src/openapi/types/environment-copy-scope-filters.ts +++ b/src/openapi/types/environment-copy-scope-filters.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,13 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface EnvironmentCopyScopeFilters - */ export interface EnvironmentCopyScopeFilters { /** * Objects to include (use * as wildcard) - * @type {Array} - * @memberof EnvironmentCopyScopeFilters */ include?: Array; /** * Object to exclude (use * as wildcard) - * @type {Array} - * @memberof EnvironmentCopyScopeFilters */ exclude?: Array; } diff --git a/src/openapi/types/environment-copy-scope.ts b/src/openapi/types/environment-copy-scope.ts index b02a212f..e4edb6a1 100644 --- a/src/openapi/types/environment-copy-scope.ts +++ b/src/openapi/types/environment-copy-scope.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,46 +11,27 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ResourceSets } from './resource-sets'; -// May contain unused imports in some cases -// @ts-ignore -import { Resources } from './resources'; -// May contain unused imports in some cases -// @ts-ignore -import { Roles } from './roles'; -// May contain unused imports in some cases -// @ts-ignore -import { UserSets } from './user-sets'; +import type { EnvironmentCopyScopeFilters } from './environment-copy-scope-filters'; -/** - * - * @export - * @interface EnvironmentCopyScope - */ export interface EnvironmentCopyScope { /** - * - * @type {Resources} - * @memberof EnvironmentCopyScope + * Resources to copy + */ + resources?: EnvironmentCopyScopeFilters; + /** + * Roles to copy */ - resources?: Resources; + roles?: EnvironmentCopyScopeFilters; /** - * - * @type {Roles} - * @memberof EnvironmentCopyScope + * User sets to copy */ - roles?: Roles; + user_sets?: EnvironmentCopyScopeFilters; /** - * - * @type {UserSets} - * @memberof EnvironmentCopyScope + * Resource sets to copy */ - user_sets?: UserSets; + resource_sets?: EnvironmentCopyScopeFilters; /** - * - * @type {ResourceSets} - * @memberof EnvironmentCopyScope + * Custom policies to copy */ - resource_sets?: ResourceSets; + custom_policies?: EnvironmentCopyScopeFilters; } diff --git a/src/openapi/types/environment-copy-target.ts b/src/openapi/types/environment-copy-target.ts index 4b7a34a5..ed1cdd65 100644 --- a/src/openapi/types/environment-copy-target.ts +++ b/src/openapi/types/environment-copy-target.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,15 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { New } from './new'; +import type { EnvironmentCreate } from './environment-create'; -/** - * - * @export - * @interface EnvironmentCopyTarget - */ export interface EnvironmentCopyTarget { /** * Identifier of an existing environment to copy into - * @type {string} - * @memberof EnvironmentCopyTarget */ existing?: string; /** - * - * @type {New} - * @memberof EnvironmentCopyTarget + * Description of the environment to create. This environment must not already exist. */ - new?: New; + new?: EnvironmentCreate; } diff --git a/src/openapi/types/environment-copy.ts b/src/openapi/types/environment-copy.ts index 083c9df4..29c998e6 100644 --- a/src/openapi/types/environment-copy.ts +++ b/src/openapi/types/environment-copy.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,42 +11,23 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Scope } from './scope'; +import type { EnvironmentCopyConflictStrategy } from './environment-copy-conflict-strategy'; // May contain unused imports in some cases -// @ts-ignore -import { TargetEnv } from './target-env'; +import type { EnvironmentCopyScope } from './environment-copy-scope'; +// May contain unused imports in some cases +import type { EnvironmentCopyTarget } from './environment-copy-target'; -/** - * - * @export - * @interface EnvironmentCopy - */ export interface EnvironmentCopy { /** - * - * @type {TargetEnv} - * @memberof EnvironmentCopy + * If copying a new environment, the environment configuration. If copying to an existing environment, the environment identifier */ - target_env: TargetEnv; + target_env: EnvironmentCopyTarget; /** * Action to take when detecting a conflict when copying. Only applies to copying into an existing environment - * @type {string} - * @memberof EnvironmentCopy */ - conflict_strategy?: EnvironmentCopyConflictStrategyEnum; + conflict_strategy?: EnvironmentCopyConflictStrategy; /** - * - * @type {Scope} - * @memberof EnvironmentCopy + * Filters to include and exclude copied objects */ - scope?: Scope; + scope?: EnvironmentCopyScope; } - -export const EnvironmentCopyConflictStrategyEnum = { - Fail: 'fail', - Overwrite: 'overwrite', -} as const; - -export type EnvironmentCopyConflictStrategyEnum = - (typeof EnvironmentCopyConflictStrategyEnum)[keyof typeof EnvironmentCopyConflictStrategyEnum]; diff --git a/src/openapi/types/environment-create.ts b/src/openapi/types/environment-create.ts index 9b9c29ea..bac3b616 100644 --- a/src/openapi/types/environment-create.ts +++ b/src/openapi/types/environment-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,31 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Jwks } from './jwks'; +import type { JwksConfig } from './jwks-config'; -/** - * - * @export - * @interface EnvironmentCreate - */ export interface EnvironmentCreate { /** * A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment. - * @type {string} - * @memberof EnvironmentCreate */ key: string; /** * The name of the environment - * @type {string} - * @memberof EnvironmentCreate */ name: string; /** * an optional longer description of the environment - * @type {string} - * @memberof EnvironmentCreate */ description?: string; /** * when using gitops feature, an optional branch name for the environment - * @type {string} - * @memberof EnvironmentCreate */ custom_branch_name?: string; /** - * - * @type {Jwks} - * @memberof EnvironmentCreate + * jwks for element frontend only login + */ + jwks?: JwksConfig; + /** + * the settings for this environment */ - jwks?: Jwks; + settings?: object; } diff --git a/src/openapi/types/environment-obj.ts b/src/openapi/types/environment-obj.ts index abf205ef..62533670 100644 --- a/src/openapi/types/environment-obj.ts +++ b/src/openapi/types/environment-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,10 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface EnvironmentObj - */ export interface EnvironmentObj { - /** - * - * @type {string} - * @memberof EnvironmentObj - */ id: string; - /** - * - * @type {string} - * @memberof EnvironmentObj - */ key: string; - /** - * - * @type {string} - * @memberof EnvironmentObj - */ - name?: string; - /** - * - * @type {string} - * @memberof EnvironmentObj - */ + name?: string | null; created_at: string; - /** - * - * @type {string} - * @memberof EnvironmentObj - */ updated_at: string; } diff --git a/src/openapi/types/environment-object.ts b/src/openapi/types/environment-object.ts index 1f0ca90e..41ef4e17 100644 --- a/src/openapi/types/environment-object.ts +++ b/src/openapi/types/environment-object.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,6 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { EnvironmentObj } from './environment-obj'; +import type { EnvironmentObj } from './environment-obj'; -/** - * - * @export - * @interface EnvironmentObject - */ -export interface EnvironmentObject { - /** - * - * @type {string} - * @memberof EnvironmentObject - */ - id: string; - /** - * - * @type {string} - * @memberof EnvironmentObject - */ - key: string; - /** - * - * @type {string} - * @memberof EnvironmentObject - */ - name?: string; - /** - * - * @type {string} - * @memberof EnvironmentObject - */ - created_at: string; - /** - * - * @type {string} - * @memberof EnvironmentObject - */ - updated_at: string; -} +export type EnvironmentObject = EnvironmentObj | object; diff --git a/src/openapi/types/environment-read-with-email-config.ts b/src/openapi/types/environment-read-with-email-config.ts new file mode 100644 index 00000000..f3a92536 --- /dev/null +++ b/src/openapi/types/environment-read-with-email-config.ts @@ -0,0 +1,63 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { JwksConfig } from './jwks-config'; + +export interface EnvironmentReadWithEmailConfig { + /** + * A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment. + */ + key: string; + /** + * Unique id of the environment + */ + id: string; + /** + * Unique id of the organization that the environment belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the environment belongs to. + */ + project_id: string; + /** + * Date and time when the environment was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the environment was last updated/modified (ISO_8601 format). + */ + updated_at: string; + avp_policy_store_id?: string; + /** + * The name of the environment + */ + name: string; + /** + * an optional longer description of the environment + */ + description?: string; + /** + * when using gitops feature, an optional branch name for the environment + */ + custom_branch_name?: string; + /** + * jwks for element frontend only login + */ + jwks?: JwksConfig; + /** + * the settings for this environment + */ + settings?: object; + email_configuration: string; +} diff --git a/src/openapi/types/environment-read.ts b/src/openapi/types/environment-read.ts index 14e50b11..6e9f0de1 100644 --- a/src/openapi/types/environment-read.ts +++ b/src/openapi/types/environment-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,73 +11,52 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Jwks } from './jwks'; +import type { JwksConfig } from './jwks-config'; -/** - * - * @export - * @interface EnvironmentRead - */ export interface EnvironmentRead { /** * A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment. - * @type {string} - * @memberof EnvironmentRead */ key: string; /** * Unique id of the environment - * @type {string} - * @memberof EnvironmentRead */ id: string; /** * Unique id of the organization that the environment belongs to. - * @type {string} - * @memberof EnvironmentRead */ organization_id: string; /** * Unique id of the project that the environment belongs to. - * @type {string} - * @memberof EnvironmentRead */ project_id: string; /** * Date and time when the environment was created (ISO_8601 format). - * @type {string} - * @memberof EnvironmentRead */ created_at: string; /** * Date and time when the environment was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof EnvironmentRead */ updated_at: string; + avp_policy_store_id?: string; /** * The name of the environment - * @type {string} - * @memberof EnvironmentRead */ name: string; /** * an optional longer description of the environment - * @type {string} - * @memberof EnvironmentRead */ description?: string; /** * when using gitops feature, an optional branch name for the environment - * @type {string} - * @memberof EnvironmentRead */ custom_branch_name?: string; /** - * - * @type {Jwks} - * @memberof EnvironmentRead + * jwks for element frontend only login + */ + jwks?: JwksConfig; + /** + * the settings for this environment */ - jwks?: Jwks; + settings?: object; } diff --git a/src/openapi/types/environment-regeneration.ts b/src/openapi/types/environment-regeneration.ts deleted file mode 100644 index 5af0e332..00000000 --- a/src/openapi/types/environment-regeneration.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface EnvironmentRegeneration - */ -export interface EnvironmentRegeneration { - /** - * - * @type {string} - * @memberof EnvironmentRegeneration - */ - scope: EnvironmentRegenerationScopeEnum; - /** - * - * @type {string} - * @memberof EnvironmentRegeneration - */ - org_id: string; - /** - * - * @type {string} - * @memberof EnvironmentRegeneration - */ - proj_id: string; - /** - * - * @type {string} - * @memberof EnvironmentRegeneration - */ - env_id: string; -} - -export const EnvironmentRegenerationScopeEnum = { - Environment: 'environment', -} as const; - -export type EnvironmentRegenerationScopeEnum = - (typeof EnvironmentRegenerationScopeEnum)[keyof typeof EnvironmentRegenerationScopeEnum]; diff --git a/src/openapi/types/environment-statistics.ts b/src/openapi/types/environment-statistics.ts new file mode 100644 index 00000000..d1435911 --- /dev/null +++ b/src/openapi/types/environment-statistics.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OrgMemberReadWithGrants } from './org-member-read-with-grants'; + +export interface EnvironmentStatistics { + roles: number; + users: number; + policies: number; + resources: number; + tenants: number; + has_decision_logs: boolean; + members: Array; + mau: number; +} diff --git a/src/openapi/types/environment-stats.ts b/src/openapi/types/environment-stats.ts index 8e9f849e..09a27b07 100644 --- a/src/openapi/types/environment-stats.ts +++ b/src/openapi/types/environment-stats.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,91 +11,58 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Jwks } from './jwks'; +import type { EnvironmentStatistics } from './environment-statistics'; // May contain unused imports in some cases -// @ts-ignore -import { PDPConfigRead } from './pdpconfig-read'; +import type { JwksConfig } from './jwks-config'; // May contain unused imports in some cases -// @ts-ignore -import { Statistics } from './statistics'; +import type { PDPConfigRead } from './pdpconfig-read'; -/** - * - * @export - * @interface EnvironmentStats - */ export interface EnvironmentStats { /** * A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment. - * @type {string} - * @memberof EnvironmentStats */ key: string; /** * Unique id of the environment - * @type {string} - * @memberof EnvironmentStats */ id: string; /** * Unique id of the organization that the environment belongs to. - * @type {string} - * @memberof EnvironmentStats */ organization_id: string; /** * Unique id of the project that the environment belongs to. - * @type {string} - * @memberof EnvironmentStats */ project_id: string; /** * Date and time when the environment was created (ISO_8601 format). - * @type {string} - * @memberof EnvironmentStats */ created_at: string; /** * Date and time when the environment was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof EnvironmentStats */ updated_at: string; + avp_policy_store_id?: string; /** * The name of the environment - * @type {string} - * @memberof EnvironmentStats */ name: string; /** * an optional longer description of the environment - * @type {string} - * @memberof EnvironmentStats */ description?: string; /** * when using gitops feature, an optional branch name for the environment - * @type {string} - * @memberof EnvironmentStats */ custom_branch_name?: string; /** - * - * @type {Jwks} - * @memberof EnvironmentStats + * jwks for element frontend only login */ - jwks?: Jwks; + jwks?: JwksConfig; /** - * - * @type {Array} - * @memberof EnvironmentStats + * the settings for this environment */ + settings?: object; pdp_configs: Array; - /** - * - * @type {Statistics} - * @memberof EnvironmentStats - */ - stats: Statistics; + stats: EnvironmentStatistics; } diff --git a/src/openapi/types/environment-update.ts b/src/openapi/types/environment-update.ts index fc3da1bf..fd1bcb69 100644 --- a/src/openapi/types/environment-update.ts +++ b/src/openapi/types/environment-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,37 +11,27 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Jwks } from './jwks'; +import type { JwksConfig } from './jwks-config'; -/** - * - * @export - * @interface EnvironmentUpdate - */ export interface EnvironmentUpdate { /** * The name of the environment - * @type {string} - * @memberof EnvironmentUpdate */ name?: string; /** * an optional longer description of the environment - * @type {string} - * @memberof EnvironmentUpdate */ description?: string; /** * when using gitops feature, an optional branch name for the environment - * @type {string} - * @memberof EnvironmentUpdate */ custom_branch_name?: string; /** - * - * @type {Jwks} - * @memberof EnvironmentUpdate + * jwks for element frontend only login + */ + jwks?: JwksConfig; + /** + * the settings for this environment */ - jwks?: Jwks; + settings?: object; } diff --git a/src/openapi/types/error-code.ts b/src/openapi/types/error-code.ts new file mode 100644 index 00000000..f9f2c466 --- /dev/null +++ b/src/openapi/types/error-code.ts @@ -0,0 +1,40 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const ErrorCode = { + InvalidInput: 'INVALID_INPUT', + InvalidJwksConfiguration: 'INVALID_JWKS_CONFIGURATION', + UnexpectedError: 'UNEXPECTED_ERROR', + NotFound: 'NOT_FOUND', + DuplicateEntity: 'DUPLICATE_ENTITY', + EmptyDecisionLogs: 'EMPTY_DECISION_LOGS', + MissingRequestAttribute: 'MISSING_REQUEST_ATTRIBUTE', + ForbiddenAccess: 'FORBIDDEN_ACCESS', + InvalidPermissionFormat: 'INVALID_PERMISSION_FORMAT', + MissingPermissions: 'MISSING_PERMISSIONS', + UnsupportedAttributeType: 'UNSUPPORTED_ATTRIBUTE_TYPE', + MissingResourceAttribute: 'MISSING_RESOURCE_ATTRIBUTE', + MismatchAttributesTypes: 'MISMATCH_ATTRIBUTES_TYPES', + InvalidPolicyRepoStatus: 'INVALID_POLICY_REPO_STATUS', + InvalidSmtpConfiguration: 'INVALID_SMTP_CONFIGURATION', + MismatchResourceInstancesTenants: 'MISMATCH_RESOURCE_INSTANCES_TENANTS', + PaginationSizeOverreached: 'PAGINATION_SIZE_OVERREACHED', + MismatchRelationType: 'MISMATCH_RELATION_TYPE', + ConcurrentOperationDisallowed: 'CONCURRENT_OPERATION_DISALLOWED', + Unauthorized: 'UNAUTHORIZED', +} as const; + +export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode]; diff --git a/src/openapi/types/entry.ts b/src/openapi/types/error-details.ts similarity index 59% rename from src/openapi/types/entry.ts rename to src/openapi/types/error-details.ts index 4703d8f3..d0b69c7f 100644 --- a/src/openapi/types/entry.ts +++ b/src/openapi/types/error-details.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,12 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { DataSourceEntry } from './data-source-entry'; +import type { ErrorCode } from './error-code'; -/** - * @type Entry - * The entry that was processed - * @export - */ -export type Entry = DataSourceEntry; +export interface ErrorDetails { + id: string; + title: string; + support_link?: string; + error_code: ErrorCode; + message?: string; + additional_info?: any; +} diff --git a/src/openapi/types/failed-invite.ts b/src/openapi/types/failed-invite.ts index e75cb4c6..2e9ab06e 100644 --- a/src/openapi/types/failed-invite.ts +++ b/src/openapi/types/failed-invite.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,7 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface FailedInvite - */ export interface FailedInvite { - /** - * - * @type {string} - * @memberof FailedInvite - */ email: string; - /** - * - * @type {string} - * @memberof FailedInvite - */ reason: string; } diff --git a/src/openapi/types/full-data.ts b/src/openapi/types/full-data.ts deleted file mode 100644 index 3a73512a..00000000 --- a/src/openapi/types/full-data.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { ConditionSetData } from './condition-set-data'; -// May contain unused imports in some cases -// @ts-ignore -import { ResourceTypeData } from './resource-type-data'; -// May contain unused imports in some cases -// @ts-ignore -import { RoleData } from './role-data'; -// May contain unused imports in some cases -// @ts-ignore -import { TenantData } from './tenant-data'; -// May contain unused imports in some cases -// @ts-ignore -import { UserData } from './user-data'; - -/** - * - * @export - * @interface FullData - */ -export interface FullData { - /** - * - * @type {{ [key: string]: UserData; }} - * @memberof FullData - */ - users: { [key: string]: UserData }; - /** - * - * @type {{ [key: string]: TenantData; }} - * @memberof FullData - */ - tenants: { [key: string]: TenantData }; - /** - * - * @type {{ [key: string]: RoleData; }} - * @memberof FullData - */ - roles: { [key: string]: RoleData }; - /** - * - * @type {{ [key: string]: { [key: string]: { [key: string]: Array; }; }; }} - * @memberof FullData - */ - condition_set_rules: { [key: string]: { [key: string]: { [key: string]: Array } } }; - /** - * - * @type {{ [key: string]: { [key: string]: { [key: string]: Array; }; }; }} - * @memberof FullData - */ - relationships: { [key: string]: { [key: string]: { [key: string]: Array } } }; - /** - * - * @type {{ [key: string]: ResourceTypeData; }} - * @memberof FullData - */ - resource_types: { [key: string]: ResourceTypeData }; - /** - * - * @type {{ [key: string]: ConditionSetData; }} - * @memberof FullData - */ - condition_sets: { [key: string]: ConditionSetData }; - /** - * - * @type {{ [key: string]: { [key: string]: Array; }; }} - * @memberof FullData - */ - role_assignments: { [key: string]: { [key: string]: Array } }; -} diff --git a/src/openapi/types/full-regeneration.ts b/src/openapi/types/full-regeneration.ts deleted file mode 100644 index 31ff6db1..00000000 --- a/src/openapi/types/full-regeneration.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface FullRegeneration - */ -export interface FullRegeneration { - /** - * - * @type {string} - * @memberof FullRegeneration - */ - scope: FullRegenerationScopeEnum; -} - -export const FullRegenerationScopeEnum = { - Full: 'full', -} as const; - -export type FullRegenerationScopeEnum = - (typeof FullRegenerationScopeEnum)[keyof typeof FullRegenerationScopeEnum]; diff --git a/src/openapi/types/generic-engine-decision-log.ts b/src/openapi/types/generic-engine-decision-log.ts new file mode 100644 index 00000000..e4e1b69b --- /dev/null +++ b/src/openapi/types/generic-engine-decision-log.ts @@ -0,0 +1,39 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Generic decision log format for external or custom integrations. Accepts a flat JSON payload with explicit fields rather than requiring engine-specific nested structures. Unknown fields are rejected to prevent unbounded storage growth. + */ +export interface GenericEngineDecisionLog { + engine?: GenericEngineDecisionLogEngineEnum | null; + timestamp: string; + decision: boolean; + decision_id?: string | null; + process_time_ms?: number | null; + query?: string | null; + user_key?: string | null; + user_email?: string | null; + user_name?: string | null; + action?: string | null; + resource_type?: string | null; + tenant?: string | null; + input?: any; + result?: any; + context?: any; +} + +export const GenericEngineDecisionLogEngineEnum = { + Generic: 'GENERIC', +} as const; + +export type GenericEngineDecisionLogEngineEnum = + (typeof GenericEngineDecisionLogEngineEnum)[keyof typeof GenericEngineDecisionLogEngineEnum]; diff --git a/src/openapi/types/granted-to.ts b/src/openapi/types/granted-to.ts deleted file mode 100644 index 89d5e2ff..00000000 --- a/src/openapi/types/granted-to.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleBlockRead } from './derived-role-block-read'; -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleRuleRead } from './derived-role-rule-read'; -// May contain unused imports in some cases -// @ts-ignore -import { When } from './when'; - -/** - * @type GrantedTo - * A derived role defintion block, typically contained whithin a role definition. The derived role is a role that is derived from the role definition. - * @export - */ -export type GrantedTo = DerivedRoleBlockRead; diff --git a/src/openapi/types/granted-to1.ts b/src/openapi/types/granted-to1.ts deleted file mode 100644 index e1928ca9..00000000 --- a/src/openapi/types/granted-to1.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleBlockEdit } from './derived-role-block-edit'; -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleRuleCreate } from './derived-role-rule-create'; -// May contain unused imports in some cases -// @ts-ignore -import { When } from './when'; - -/** - * @type GrantedTo1 - * Derived role that inherit will be applied on this role - * @export - */ -export type GrantedTo1 = DerivedRoleBlockEdit; diff --git a/src/openapi/types/granted-to2.ts b/src/openapi/types/granted-to2.ts deleted file mode 100644 index fe7a6465..00000000 --- a/src/openapi/types/granted-to2.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleBlockRead } from './derived-role-block-read'; -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRoleRuleRead } from './derived-role-rule-read'; -// May contain unused imports in some cases -// @ts-ignore -import { When } from './when'; - -/** - * @type GrantedTo2 - * Derived role that inherit will be applied on this role - * @export - */ -export type GrantedTo2 = DerivedRoleBlockRead; diff --git a/src/openapi/types/group-add-role.ts b/src/openapi/types/group-add-role.ts new file mode 100644 index 00000000..b9c5c8e1 --- /dev/null +++ b/src/openapi/types/group-add-role.ts @@ -0,0 +1,30 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface GroupAddRole { + /** + * The role key or id that will be assigned to the group. + */ + role: string; + /** + * The resource key or id that the role belongs to. + */ + resource: string; + /** + * The resource instance key or id that the role belongs to. + */ + resource_instance: string; + /** + * The tenant key or id that the role belongs to. + */ + tenant: string; +} diff --git a/src/openapi/types/attributes.ts b/src/openapi/types/group-assign-user.ts similarity index 69% rename from src/openapi/types/attributes.ts rename to src/openapi/types/group-assign-user.ts index 335fdb9a..e2daf7da 100644 --- a/src/openapi/types/attributes.ts +++ b/src/openapi/types/group-assign-user.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface Attributes - */ -export interface Attributes {} +export interface GroupAssignUser { + /** + * The tenant key or id that the user belongs to. + */ + tenant: string; +} diff --git a/src/openapi/types/role-data.ts b/src/openapi/types/group-assignment.ts similarity index 54% rename from src/openapi/types/role-data.ts rename to src/openapi/types/group-assignment.ts index 25108174..e4d2bc59 100644 --- a/src/openapi/types/role-data.ts +++ b/src/openapi/types/group-assignment.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,10 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleData - */ -export interface RoleData { +export interface GroupAssignment { /** - * - * @type {{ [key: string]: Array; }} - * @memberof RoleData + * Either the unique id of the resource instance that the group belongs to, or the + * URL-friendly key of the (i.e: file:my_file) */ - grants?: { [key: string]: Array }; + group_instance_key: string; } diff --git a/src/openapi/types/group-create.ts b/src/openapi/types/group-create.ts new file mode 100644 index 00000000..2533ef0d --- /dev/null +++ b/src/openapi/types/group-create.ts @@ -0,0 +1,27 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface GroupCreate { + /** + * The key of the resource type that the group belongs to. + */ + group_resource_type_key?: string; + /** + * Either the unique id of the resource instance that the group belongs to, or the + * URL-friendly key of the (i.e: file:my_file) + */ + group_instance_key: string; + /** + * The tenant key or id that the group belongs to. + */ + group_tenant: string; +} diff --git a/src/openapi/types/group-read-schema.ts b/src/openapi/types/group-read-schema.ts new file mode 100644 index 00000000..8baae999 --- /dev/null +++ b/src/openapi/types/group-read-schema.ts @@ -0,0 +1,28 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface GroupReadSchema { + /** + * The key of the resource type that the group belongs to. + */ + group_resource_type_key?: string; + /** + * Either the unique id of the resource instance that the group belongs to, or the + * URL-friendly key of the (i.e: file:my_file) + */ + group_instance_key: string; + /** + * The tenant key or id that the group belongs to. + */ + group_tenant: string; + id: string; +} diff --git a/src/openapi/types/group-read.ts b/src/openapi/types/group-read.ts new file mode 100644 index 00000000..7240a110 --- /dev/null +++ b/src/openapi/types/group-read.ts @@ -0,0 +1,34 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface GroupRead { + /** + * List of roles that are assigned to this group + */ + assigned_roles?: Array; + /** + * List of user ids that are assigned to this group + */ + users?: Array; + /** + * The key of the resource type that the group belongs to. + */ + group_resource_type_key?: string; + /** + * Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the (i.e: file:my_file) + */ + group_instance_key: string; + /** + * The tenant key or id that the group belongs to. + */ + group_tenant: string; +} diff --git a/src/openapi/types/group-role-read-schema.ts b/src/openapi/types/group-role-read-schema.ts new file mode 100644 index 00000000..18423e36 --- /dev/null +++ b/src/openapi/types/group-role-read-schema.ts @@ -0,0 +1,20 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { GroupRoleResourceReadOnly } from './group-role-resource-read-only'; + +export interface GroupRoleReadSchema { + key: string; + resource_instance: GroupRoleResourceReadOnly; + resource: GroupRoleResourceReadOnly; +} diff --git a/src/openapi/types/settings.ts b/src/openapi/types/group-role-resource-read-only.ts similarity index 70% rename from src/openapi/types/settings.ts rename to src/openapi/types/group-role-resource-read-only.ts index 6827606f..70360a32 100644 --- a/src/openapi/types/settings.ts +++ b/src/openapi/types/group-role-resource-read-only.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,7 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface Settings - */ -export interface Settings {} +export interface GroupRoleResourceReadOnly { + id: string; + key: string; +} diff --git a/src/openapi/types/group-user-read-schema.ts b/src/openapi/types/group-user-read-schema.ts new file mode 100644 index 00000000..ad1447c2 --- /dev/null +++ b/src/openapi/types/group-user-read-schema.ts @@ -0,0 +1,16 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface GroupUserReadSchema { + key: string; + id: string; +} diff --git a/src/openapi/types/jwks.ts b/src/openapi/types/historical-usage.ts similarity index 62% rename from src/openapi/types/jwks.ts rename to src/openapi/types/historical-usage.ts index 851f685f..07dc6210 100644 --- a/src/openapi/types/jwks.ts +++ b/src/openapi/types/historical-usage.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,12 +11,10 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { JwksObj } from './jwks-obj'; +import type { MonthlyUsage } from './monthly-usage'; -/** - * @type Jwks - * jwks for element frontend only login - * @export - */ -export type Jwks = JwksObj; +export interface HistoricalUsage { + current_month?: MonthlyUsage; + previous_month?: MonthlyUsage; + two_months_ago?: MonthlyUsage; +} diff --git a/src/openapi/types/http-methods.ts b/src/openapi/types/http-methods.ts index f53fcdf0..afcd8042 100644 --- a/src/openapi/types/http-methods.ts +++ b/src/openapi/types/http-methods.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const HttpMethods = { diff --git a/src/openapi/types/httpvalidation-error.ts b/src/openapi/types/httpvalidation-error.ts index e8f958b1..8ea2795f 100644 --- a/src/openapi/types/httpvalidation-error.ts +++ b/src/openapi/types/httpvalidation-error.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,19 +11,8 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ValidationError } from './validation-error'; +import type { ValidationError } from './validation-error'; -/** - * - * @export - * @interface HTTPValidationError - */ export interface HTTPValidationError { - /** - * - * @type {Array} - * @memberof HTTPValidationError - */ detail?: Array; } diff --git a/src/openapi/types/identity-read.ts b/src/openapi/types/identity-read.ts index 2c4aa4cf..3fb427c0 100644 --- a/src/openapi/types/identity-read.ts +++ b/src/openapi/types/identity-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,29 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface IdentityRead - */ export interface IdentityRead { /** * Unique User Id of this identity in the identity provider (including the provider type) - * @type {string} - * @memberof IdentityRead */ user_id: string; /** * The identity provider type this identity came from - * @type {string} - * @memberof IdentityRead */ provider: string; /** * Unique User Id of this identity in the identity provider (NOT including the provider type) - * @type {string} - * @memberof IdentityRead */ sub: string; /** * Email connected to this account identity - * @type {string} - * @memberof IdentityRead */ email: string; /** * Whether this email address connected to this account identity is verified or not. For social providers like \'Login with Google\' this is done automatically, otherwise we will send the user a verification link in email. - * @type {boolean} - * @memberof IdentityRead */ email_verified: boolean; /** * Raw user info json coming from our identity provider and matching a specific account identity - * @type {object} - * @memberof IdentityRead */ auth0_info: object; } diff --git a/src/openapi/types/index.ts b/src/openapi/types/index.ts index 7d54b46a..8eeb3e1c 100644 --- a/src/openapi/types/index.ts +++ b/src/openapi/types/index.ts @@ -1,38 +1,46 @@ -export * from './apihistory-event-full-read'; -export * from './apihistory-event-read'; -export * from './apikey-create'; -export * from './apikey-owner-type'; -export * from './apikey-read'; -export * from './apikey-scope-read'; -export * from './avpengine-decision-log'; +export * from './access-request-approved'; +export * from './access-request-canceled'; +export * from './access-request-create-details'; +export * from './access-request-denied'; +export * from './access-request-details'; +export * from './access-request-list'; +export * from './access-request-read'; +export * from './access-request-review'; +export * from './access-request-review-deny'; +export * from './access-request-user-create'; export * from './action-block-editable'; export * from './action-block-read'; export * from './action-obj'; -export * from './activity-details'; export * from './activity-details-list'; export * from './activity-details-object'; export * from './activity-details-object-data'; +export * from './activity-details-value'; export * from './activity-log-event-read'; -export * from './actor'; export * from './add-role-permissions'; +export * from './apihistory-event-full-read'; +export * from './apihistory-event-read'; +export * from './apikey-create'; +export * from './apikey-owner-type'; +export * from './apikey-read'; +export * from './apikey-scope-read'; +export * from './approve-message'; export * from './attribute-block-editable'; export * from './attribute-block-read'; export * from './attribute-type'; -export * from './audit-log'; -export * from './audit-log-objects'; +export * from './audit-log-model'; +export * from './audit-log-objects-model'; +export * from './audit-log-query-type'; +export * from './audit-log-replay-request'; +export * from './audit-log-replay-response'; export * from './audit-log-sort-key'; export * from './auth-mechanism'; -export * from './authn-me-apikey-read'; -export * from './authn-me-member-read'; -export * from './authn-me-read'; -export * from './authn-me-user-read'; +export * from './avpengine-decision-log'; +export * from './billing-tier-type'; export * from './bulk-role-assignment-report'; export * from './bulk-role-un-assignment-report'; -export * from './relationship-tuple-create-bulk-operation'; -export * from './relationship-tuple-delete-bulk-operation'; export * from './callbacks-inner'; +export * from './condition-set'; export * from './condition-set-create'; -export * from './condition-set-data'; export * from './condition-set-read'; export * from './condition-set-rule-create'; export * from './condition-set-rule-read'; @@ -40,37 +48,50 @@ export * from './condition-set-rule-remove'; export * from './condition-set-type'; export * from './condition-set-update'; export * from './data'; -export * from './data-entry-report'; -export * from './data-source-entry'; +export * from './data-generator-lib-schemas-schema-opal-data-condition-set-data'; +export * from './data-generator-lib-schemas-schema-opal-data-derivation-settings'; +export * from './data-generator-lib-schemas-schema-opal-data-derived-role'; +export * from './data-generator-lib-schemas-schema-opal-data-derived-role-rule'; +export * from './data-generator-lib-schemas-schema-opal-data-full-data'; +export * from './data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data'; +export * from './data-generator-lib-schemas-schema-opal-data-resource-type-data'; +export * from './data-generator-lib-schemas-schema-opal-data-role-data'; +export * from './data-generator-lib-schemas-schema-opal-data-tenant-data'; +export * from './data-generator-lib-schemas-schema-opal-data-user-data'; +export * from './data-source-config'; export * from './data-source-entry-with-polling-interval'; -export * from './data-update-report'; -export * from './derived-role'; export * from './derived-role-block-edit'; export * from './derived-role-block-read'; -export * from './derived-role-rule'; export * from './derived-role-rule-create'; export * from './derived-role-rule-delete'; export * from './derived-role-rule-read'; -export * from './detailed-audit-log'; -export * from './dev-login'; +export * from './detailed-audit-log-model'; export * from './dummy-engine-model'; -export * from './editable'; export * from './elements-config-create'; export * from './elements-config-read'; export * from './elements-config-runtime-read'; export * from './elements-config-update'; -export * from './elements-env-type-read'; -export * from './elements-env-type-update'; export * from './elements-permission-level'; export * from './elements-role-read'; export * from './elements-type'; export * from './elements-user-create'; +export * from './elements-user-invite-approve'; +export * from './elements-user-invite-create'; +export * from './elements-user-invite-read'; +export * from './elements-user-invite-update'; export * from './elements-user-role-create'; export * from './elements-user-role-remove'; +export * from './email-configuration-create'; +export * from './email-configuration-read'; +export * from './email-message-keys'; +export * from './email-template-message'; +export * from './email-template-read'; +export * from './email-template-type'; +export * from './email-template-update'; export * from './embedded-login-request-output'; export * from './engine'; -export * from './entry'; export * from './environment-copy'; +export * from './environment-copy-conflict-strategy'; export * from './environment-copy-scope'; export * from './environment-copy-scope-filters'; export * from './environment-copy-target'; @@ -78,46 +99,65 @@ export * from './environment-create'; export * from './environment-obj'; export * from './environment-object'; export * from './environment-read'; -export * from './environment-regeneration'; +export * from './environment-read-with-email-config'; +export * from './environment-statistics'; export * from './environment-stats'; export * from './environment-update'; +export * from './error-code'; +export * from './error-details'; export * from './failed-invite'; -export * from './full-data'; -export * from './full-regeneration'; -export * from './granted-to'; -export * from './granted-to1'; -export * from './granted-to2'; -export * from './httpvalidation-error'; +export * from './generic-engine-decision-log'; +export * from './group-add-role'; +export * from './group-assign-user'; +export * from './group-assignment'; +export * from './group-create'; +export * from './group-read'; +export * from './group-read-schema'; +export * from './group-role-read-schema'; +export * from './group-role-resource-read-only'; +export * from './group-user-read-schema'; +export * from './historical-usage'; export * from './http-methods'; +export * from './httpvalidation-error'; export * from './identity-read'; -export * from './invite-attempt-result'; export * from './invite-create'; export * from './invite-read'; export * from './invite-status'; -export * from './jwks'; +export * from './jsonpatch-action'; +export * from './jwks-config'; export * from './jwks-obj'; -export * from './labels'; -export * from './language-instructions'; +export * from './limited-paginated-result-activity-log-event-read'; +export * from './limited-paginated-result-apihistory-event-read'; +export * from './limited-paginated-result-audit-log-model'; export * from './location-inner'; -export * from './login-result'; +export * from './mailgun-email-configuration-create'; +export * from './mailgun-email-configuration-read'; export * from './mapping-rule'; +export * from './mapping-rule-update'; export * from './member-access-level'; export * from './member-access-obj'; -export * from './message'; export * from './methods'; +export * from './missing-user-policy'; +export * from './monthly-usage'; export * from './multi-invite-result'; -export * from './new'; -export * from './opadecision-log'; +export * from './onboarding-step'; export * from './opaengine-decision-log'; +export * from './opalabels'; export * from './opalclient'; export * from './opalcommon'; export * from './opalhttp-fetcher-config'; export * from './opalupdate-callback'; -export * from './opalabels'; export * from './opametrics'; -export * from './onboarding-step'; -export * from './opal-common'; -export * from './opal-common-schemas-data-data-source-config'; +export * from './operation-approval-approved'; +export * from './operation-approval-canceled'; +export * from './operation-approval-create-details'; +export * from './operation-approval-denied'; +export * from './operation-approval-details'; +export * from './operation-approval-list'; +export * from './operation-approval-read'; +export * from './operation-approval-review'; +export * from './operation-approval-user-create'; +export * from './org-export-result'; export * from './org-member-create'; export * from './org-member-read'; export * from './org-member-read-with-grants'; @@ -128,62 +168,85 @@ export * from './organization-obj'; export * from './organization-object'; export * from './organization-read'; export * from './organization-read-with-apikey'; -export * from './organization-regeneration'; +export * from './organization-schedule-delete-response'; +export * from './organization-statistics'; +export * from './organization-stats'; export * from './organization-update'; -export * from './pdpconfig-read'; -export * from './pdpcontext'; -export * from './pdpinfo'; -export * from './pdpopainfo'; -export * from './pdpstate'; -export * from './pdpstate-update'; +export * from './paginated-result-access-request-list'; +export * from './paginated-result-activity-log-event-read'; export * from './paginated-result-apihistory-event-read'; export * from './paginated-result-apikey-read'; -export * from './paginated-result-activity-log-event-read'; -export * from './paginated-result-audit-log'; export * from './paginated-result-condition-set-read'; export * from './paginated-result-elements-config-read'; -export * from './paginated-result-opadecision-log'; +export * from './paginated-result-elements-user-invite-read'; +export * from './paginated-result-group-read-schema'; +export * from './paginated-result-group-role-read-schema'; +export * from './paginated-result-group-user-read-schema'; +export * from './paginated-result-operation-approval-list'; +export * from './paginated-result-relation-read'; +export * from './paginated-result-relationship-tuple-detailed-read'; +export * from './paginated-result-relationship-tuple-read'; +export * from './paginated-result-resource-instance-detailed-read'; +export * from './paginated-result-resource-instance-read'; export * from './paginated-result-resource-read'; -export * from './paginated-result-role-read'; +export * from './paginated-result-resource-role-read'; export * from './paginated-result-role-assignment-detailed-read'; export * from './paginated-result-role-assignment-read'; +export * from './paginated-result-role-read'; export * from './paginated-result-tenant-read'; export * from './paginated-result-user-read'; export * from './parent-id'; -export * from './payload'; -export * from './pdp'; export * from './pdp-config-obj'; export * from './pdp-config-object'; export * from './pdp-values'; +export * from './pdpconfig-read'; +export * from './pdpcontext'; +export * from './pdpdata-refresh-request'; +export * from './pdpdata-refresh-response'; +export * from './pdpshard-migration'; export * from './permission'; export * from './permission-level-role-read'; -export * from './permit-backend-opal-api-data-data-source-config'; -export * from './permit-backend-schemas-schema-derived-role-derived-role-settings'; -export * from './permit-backend-schemas-schema-opal-data-derived-role-settings'; +export * from './permit-backend-schemas-schema-derived-role-rule-derivation-settings'; +export * from './permit-backend-schemas-schema-opal-data-derived-role'; +export * from './permit-backend-schemas-schema-opal-data-derived-role-rule'; +export * from './permit-backend-schemas-schema-opal-data-full-data'; +export * from './permit-backend-schemas-schema-opal-data-resource-type-data'; +export * from './policy-guard-rule-create'; +export * from './policy-guard-rule-item'; +export * from './policy-guard-rule-read'; +export * from './policy-guard-scope-associate'; +export * from './policy-guard-scope-create'; +export * from './policy-guard-scope-detail'; +export * from './policy-guard-scope-detail-create'; +export * from './policy-guard-scope-read'; export * from './policy-repo-create'; export * from './policy-repo-read'; export * from './policy-repo-status'; -export * from './policy-synchronizer-regeneration'; -export * from './programming-language'; export * from './project-create'; export * from './project-obj'; export * from './project-object'; export * from './project-read'; -export * from './project-regeneration'; export * from './project-update'; export * from './proxy-config-create'; export * from './proxy-config-read'; export * from './proxy-config-update'; export * from './raw-data'; +export * from './raw-data1'; export * from './relation-block-read'; export * from './relation-create'; export * from './relation-read'; +export * from './relationship-tuple-block-read'; export * from './relationship-tuple-create'; +export * from './relationship-tuple-create-bulk-operation'; export * from './relationship-tuple-delete'; +export * from './relationship-tuple-delete-bulk-operation'; +export * from './relationship-tuple-detailed-read'; export * from './relationship-tuple-obj'; export * from './relationship-tuple-read'; export * from './remote-config'; export * from './remove-role-permissions'; +export * from './request-status'; +export * from './request-type'; export * from './resource-action-create'; export * from './resource-action-group-create'; export * from './resource-action-group-read'; @@ -196,65 +259,91 @@ export * from './resource-attribute-update'; export * from './resource-attributes'; export * from './resource-create'; export * from './resource-id'; +export * from './resource-instance-block-read'; export * from './resource-instance-create'; +export * from './resource-instance-create-bulk-operation'; +export * from './resource-instance-delete-bulk-operation'; +export * from './resource-instance-detailed-read'; export * from './resource-instance-read'; export * from './resource-instance-update'; export * from './resource-read'; export * from './resource-replace'; export * from './resource-role-create'; +export * from './resource-role-list'; export * from './resource-role-read'; export * from './resource-role-update'; -export * from './resource-sets'; -export * from './resource-type-data'; export * from './resource-type-obj'; export * from './resource-update'; -export * from './resources'; -export * from './response-get-data-for-condition-set-v2-internal-opal-data-org-id-proj-id-env-id-condition-sets-condition-set-id-get'; -export * from './response-get-data-for-resource-v2-internal-opal-data-org-id-proj-id-env-id-resource-types-resource-id-get'; -export * from './response-get-data-for-role-v2-internal-opal-data-org-id-proj-id-env-id-roles-role-id-get'; -export * from './response-get-data-for-tenant-v2-internal-opal-data-org-id-proj-id-env-id-tenants-tenant-id-get'; -export * from './response-get-data-for-user-v2-internal-opal-data-org-id-proj-id-env-id-users-user-id-get'; +export * from './response-elements-create-user-v2-elements-proj-id-env-id-config-elements-config-id-data-users-post'; +export * from './response-get-all-data-v2-internal-opal-data-org-id-proj-id-env-id-get'; +export * from './response-get-all-resource-instances-data-v2-internal-opal-data-org-id-proj-id-env-id-resource-instances-get'; +export * from './response-get-all-users-data-v2-internal-opal-data-org-id-proj-id-env-id-users-get'; +export * from './response-list-condition-sets-v2-schema-proj-id-env-id-condition-sets-get'; +export * from './response-list-elements-configs-v2-elements-proj-id-env-id-config-get'; +export * from './response-list-relationship-tuples-v2-facts-proj-id-env-id-relationship-tuples-get'; +export * from './response-list-resource-instances-v2-facts-proj-id-env-id-resource-instances-get'; +export * from './response-list-resources-v2-schema-proj-id-env-id-resources-get'; +export * from './response-list-role-assignments-v2-facts-proj-id-env-id-role-assignments-get'; +export * from './response-list-roles-v2-schema-proj-id-env-id-roles-get'; +export * from './response-list-tenants-v2-facts-proj-id-env-id-tenants-get'; export * from './role-assignment-create'; -export * from './role-assignment-read'; export * from './role-assignment-detailed-read'; +export * from './role-assignment-read'; export * from './role-assignment-remove'; export * from './role-assignment-resource-instance'; export * from './role-assignment-role'; export * from './role-assignment-tenant'; export * from './role-assignment-user'; +export * from './role-block-editable'; export * from './role-create'; -export * from './role-data'; +export * from './role-create-bulk'; +export * from './role-create-bulk-operation'; +export * from './role-create-bulk-operation-result'; +export * from './role-list'; export * from './role-read'; export * from './role-update'; export * from './roles'; -export * from './sshauth-data'; -export * from './scope'; +export * from './roles1'; export * from './scope-config-read'; export * from './scope-config-set'; +export * from './search'; +export * from './search-operator'; export * from './secret'; -export * from './settings'; -export * from './statistics'; -export * from './target-env'; +export * from './settings-value'; +export * from './smtpemail-configuration-create'; +export * from './smtpemail-configuration-read'; +export * from './sshauth-data'; +export * from './sshauth-data-read'; +export * from './stripped-relation-block-read'; +export * from './task-result-environment-read'; +export * from './task-result-org-export-result'; +export * from './task-result-policy-guard-scope-read'; +export * from './task-status'; +export * from './tenant-block-read'; export * from './tenant-create'; -export * from './tenant-data'; +export * from './tenant-create-bulk-operation'; +export * from './tenant-delete-bulk-operation'; export * from './tenant-obj'; export * from './tenant-read'; export * from './tenant-update'; +export * from './usage-limits'; export * from './user-create'; -export * from './user-data'; -export * from './user-felogin-request-input'; +export * from './user-create-bulk-operation'; +export * from './user-delete-bulk-operation'; export * from './user-in-tenant'; +export * from './user-invite-status'; export * from './user-login-request-input'; export * from './user-obj'; export * from './user-read'; +export * from './user-replace-bulk-operation'; +export * from './user-resource-instance-role'; export * from './user-role'; export * from './user-role-create'; export * from './user-role-remove'; -export * from './user-sets'; export * from './user-status'; export * from './user-update'; export * from './validation-error'; -export * from './webhook-create'; +export * from './webhook-create-with-elements'; export * from './webhook-read'; +export * from './webhook-type'; export * from './webhook-update'; -export * from './when'; diff --git a/src/openapi/types/invite-attempt-result.ts b/src/openapi/types/invite-attempt-result.ts deleted file mode 100644 index cfba2ad8..00000000 --- a/src/openapi/types/invite-attempt-result.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface InviteAttemptResult - */ -export interface InviteAttemptResult { - /** - * the invite code was accepted - * @type {boolean} - * @memberof InviteAttemptResult - */ - invite_successful?: boolean; - /** - * if the invite failed, the reason it failed - * @type {string} - * @memberof InviteAttemptResult - */ - invite_failed_reason?: string; -} diff --git a/src/openapi/types/invite-create.ts b/src/openapi/types/invite-create.ts index a9dea3ef..9f5a9486 100644 --- a/src/openapi/types/invite-create.ts +++ b/src/openapi/types/invite-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,19 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; +import type { MemberAccessLevel } from './member-access-level'; -/** - * - * @export - * @interface InviteCreate - */ export interface InviteCreate { /** * Unique id of the invite - * @type {string} - * @memberof InviteCreate */ member_id?: string; /** * The invited member\'s email address - * @type {string} - * @memberof InviteCreate */ email: string; /** * The role the member will be assigned with - * @type {MemberAccessLevel} - * @memberof InviteCreate */ role?: MemberAccessLevel; } diff --git a/src/openapi/types/invite-read.ts b/src/openapi/types/invite-read.ts index e068d31e..7fa87692 100644 --- a/src/openapi/types/invite-read.ts +++ b/src/openapi/types/invite-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,70 +11,45 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { InviteStatus } from './invite-status'; +import type { InviteStatus } from './invite-status'; // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; +import type { MemberAccessLevel } from './member-access-level'; -/** - * - * @export - * @interface InviteRead - */ export interface InviteRead { /** * Unique id of the invite - * @type {string} - * @memberof InviteRead */ member_id?: string; /** * The invited member\'s email address - * @type {string} - * @memberof InviteRead */ email: string; /** * The role the member will be assigned with - * @type {MemberAccessLevel} - * @memberof InviteRead */ role?: MemberAccessLevel; /** * Unique id of the invite - * @type {string} - * @memberof InviteRead */ id: string; /** * Unique id of the organization that the invite belongs to. - * @type {string} - * @memberof InviteRead */ organization_id: string; /** * The invite code that is sent to the member\'s email - * @type {string} - * @memberof InviteRead */ invite_code: string; /** * Date and time when the invite was created (ISO_8601 format). - * @type {string} - * @memberof InviteRead */ created_at: string; /** * The status of the invite (pending, failed, etc) - * @type {InviteStatus} - * @memberof InviteRead */ status: InviteStatus; /** * if failed, the reason the invitation failed - * @type {string} - * @memberof InviteRead */ failed_reason?: string; } diff --git a/src/openapi/types/invite-status.ts b/src/openapi/types/invite-status.ts index f47eac6f..d16e0df5 100644 --- a/src/openapi/types/invite-status.ts +++ b/src/openapi/types/invite-status.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const InviteStatus = { diff --git a/src/openapi/types/jsonpatch-action.ts b/src/openapi/types/jsonpatch-action.ts new file mode 100644 index 00000000..d39a473d --- /dev/null +++ b/src/openapi/types/jsonpatch-action.ts @@ -0,0 +1,33 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Abstract base class for JSON patch actions (RFC 6902) + */ +export interface JSONPatchAction { + /** + * patch action to perform + */ + op: string; + /** + * target location in modified json + */ + path: string; + /** + * json document, the operand of the action + */ + value?: any; + /** + * source location in json + */ + from?: string; +} diff --git a/src/openapi/types/jwks-config.ts b/src/openapi/types/jwks-config.ts new file mode 100644 index 00000000..8c025039 --- /dev/null +++ b/src/openapi/types/jwks-config.ts @@ -0,0 +1,29 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { JwksObj } from './jwks-obj'; + +export interface JwksConfig { + /** + * JWKS cache TTL (in seconds) + */ + ttl?: number; + /** + * ... + */ + url?: string; + /** + * ... + */ + jwks?: JwksObj; +} diff --git a/src/openapi/types/jwks-obj.ts b/src/openapi/types/jwks-obj.ts index cfc42f11..249d5aea 100644 --- a/src/openapi/types/jwks-obj.ts +++ b/src/openapi/types/jwks-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface JwksObj - */ export interface JwksObj { /** * The keys to match against the request headers - * @type {Array} - * @memberof JwksObj */ keys: Array; } diff --git a/src/openapi/types/language-instructions.ts b/src/openapi/types/language-instructions.ts deleted file mode 100644 index 5185df80..00000000 --- a/src/openapi/types/language-instructions.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { ProgrammingLanguage } from './programming-language'; - -/** - * - * @export - * @interface LanguageInstructions - */ -export interface LanguageInstructions { - /** - * - * @type {ProgrammingLanguage} - * @memberof LanguageInstructions - */ - language: ProgrammingLanguage; - /** - * - * @type {string} - * @memberof LanguageInstructions - */ - label: string; - /** - * - * @type {string} - * @memberof LanguageInstructions - */ - instructions: string; -} diff --git a/src/openapi/types/limited-paginated-result-activity-log-event-read.ts b/src/openapi/types/limited-paginated-result-activity-log-event-read.ts new file mode 100644 index 00000000..b850026b --- /dev/null +++ b/src/openapi/types/limited-paginated-result-activity-log-event-read.ts @@ -0,0 +1,24 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ActivityLogEventRead } from './activity-log-event-read'; + +export interface LimitedPaginatedResultActivityLogEventRead { + /** + * List of Activity Log Events + */ + data: Array; + total_count: number; + page_count?: number; + pagination_count: number; +} diff --git a/src/openapi/types/limited-paginated-result-apihistory-event-read.ts b/src/openapi/types/limited-paginated-result-apihistory-event-read.ts new file mode 100644 index 00000000..39d58730 --- /dev/null +++ b/src/openapi/types/limited-paginated-result-apihistory-event-read.ts @@ -0,0 +1,24 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { APIHistoryEventRead } from './apihistory-event-read'; + +export interface LimitedPaginatedResultAPIHistoryEventRead { + /** + * List of Api History Events + */ + data: Array; + total_count: number; + page_count?: number; + pagination_count: number; +} diff --git a/src/openapi/types/limited-paginated-result-audit-log-model.ts b/src/openapi/types/limited-paginated-result-audit-log-model.ts new file mode 100644 index 00000000..c20db0fb --- /dev/null +++ b/src/openapi/types/limited-paginated-result-audit-log-model.ts @@ -0,0 +1,24 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AuditLogModel } from './audit-log-model'; + +export interface LimitedPaginatedResultAuditLogModel { + /** + * List of Audit Log Models + */ + data: Array; + total_count: number; + page_count?: number | null; + pagination_count: number; +} diff --git a/src/openapi/types/location-inner.ts b/src/openapi/types/location-inner.ts index c47e5618..307a12c9 100644 --- a/src/openapi/types/location-inner.ts +++ b/src/openapi/types/location-inner.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,4 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface LocationInner - */ -export interface LocationInner {} +export type LocationInner = number | string; diff --git a/src/openapi/types/login-result.ts b/src/openapi/types/login-result.ts deleted file mode 100644 index 208ec769..00000000 --- a/src/openapi/types/login-result.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { InviteAttemptResult } from './invite-attempt-result'; - -/** - * - * @export - * @interface LoginResult - */ -export interface LoginResult { - /** - * whether login was successful - * @type {boolean} - * @memberof LoginResult - */ - logged_in: boolean; - /** - * when will the login session expire (the unix timestamp in seconds) - * @type {number} - * @memberof LoginResult - */ - expires_at: number; - /** - * the active organization on the session after the login - * @type {string} - * @memberof LoginResult - */ - active_org_id?: string; - /** - * - * @type {InviteAttemptResult} - * @memberof LoginResult - */ - invite_attempt?: InviteAttemptResult; -} diff --git a/src/openapi/types/mailgun-email-configuration-create.ts b/src/openapi/types/mailgun-email-configuration-create.ts new file mode 100644 index 00000000..6eaa27b7 --- /dev/null +++ b/src/openapi/types/mailgun-email-configuration-create.ts @@ -0,0 +1,41 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MailgunEmailConfigurationCreate { + /** + * The from address the mails will be sent from + */ + from_address: string; + /** + * The api key of the mail provider + */ + api_key: string; + /** + * The region of the mail provider + */ + region: string; + /** + * The domain of the mail provider + */ + domain: string; + /** + * The type of the email provider + */ + email_provider_type?: MailgunEmailConfigurationCreateEmailProviderTypeEnum; +} + +export const MailgunEmailConfigurationCreateEmailProviderTypeEnum = { + Mailgun: 'mailgun', +} as const; + +export type MailgunEmailConfigurationCreateEmailProviderTypeEnum = + (typeof MailgunEmailConfigurationCreateEmailProviderTypeEnum)[keyof typeof MailgunEmailConfigurationCreateEmailProviderTypeEnum]; diff --git a/src/openapi/types/mailgun-email-configuration-read.ts b/src/openapi/types/mailgun-email-configuration-read.ts new file mode 100644 index 00000000..d6809fe7 --- /dev/null +++ b/src/openapi/types/mailgun-email-configuration-read.ts @@ -0,0 +1,57 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MailgunEmailConfigurationRead { + /** + * The from address the mails will be sent from + */ + from_address: string; + /** + * The api key of the mail provider + */ + api_key: string; + /** + * The region of the mail provider + */ + region: string; + /** + * The domain of the mail provider + */ + domain: string; + /** + * The type of the email provider + */ + email_provider_type?: MailgunEmailConfigurationReadEmailProviderTypeEnum; + /** + * Unique id of the email_configuration + */ + id: string; + /** + * Unique id of the organization that the email_configuration belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the email_configuration belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the email_configuration belongs to. + */ + environment_id: string; +} + +export const MailgunEmailConfigurationReadEmailProviderTypeEnum = { + Mailgun: 'mailgun', +} as const; + +export type MailgunEmailConfigurationReadEmailProviderTypeEnum = + (typeof MailgunEmailConfigurationReadEmailProviderTypeEnum)[keyof typeof MailgunEmailConfigurationReadEmailProviderTypeEnum]; diff --git a/src/openapi/types/mapping-rule-update.ts b/src/openapi/types/mapping-rule-update.ts new file mode 100644 index 00000000..3ba8107c --- /dev/null +++ b/src/openapi/types/mapping-rule-update.ts @@ -0,0 +1,56 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { Methods } from './methods'; + +export interface MappingRuleUpdate { + /** + * The URL to match against the request URL + */ + url: string; + /** + * The URL type to match against the request URL can be, \'regex\' or none + */ + url_type?: MappingRuleUpdateUrlTypeEnum; + /** + * The HTTP method to match against the request method + */ + http_method: Methods; + /** + * The resource to match against the request resource + */ + resource: string; + /** + * The headers to match against the request headers + */ + headers?: { [key: string]: string }; + /** + * The action to match against the request action + */ + action?: string; + /** + * The priority of the mapping rule. The higher the priority, the higher the precedence + */ + priority?: number; + /** + * If true, this mapping rule will be deleted during update. + */ + should_delete?: boolean; +} + +export const MappingRuleUpdateUrlTypeEnum = { + Regex: 'regex', +} as const; + +export type MappingRuleUpdateUrlTypeEnum = + (typeof MappingRuleUpdateUrlTypeEnum)[keyof typeof MappingRuleUpdateUrlTypeEnum]; diff --git a/src/openapi/types/mapping-rule.ts b/src/openapi/types/mapping-rule.ts index 487d7c3f..c105b8ce 100644 --- a/src/openapi/types/mapping-rule.ts +++ b/src/openapi/types/mapping-rule.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,42 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Methods } from './methods'; +import type { Methods } from './methods'; -/** - * - * @export - * @interface MappingRule - */ export interface MappingRule { /** * The URL to match against the request URL - * @type {string} - * @memberof MappingRule */ url: string; + /** + * The URL type to match against the request URL can be, \'regex\' or none + */ + url_type?: MappingRuleUrlTypeEnum; /** * The HTTP method to match against the request method - * @type {Methods} - * @memberof MappingRule */ http_method: Methods; /** * The resource to match against the request resource - * @type {string} - * @memberof MappingRule */ resource: string; /** * The headers to match against the request headers - * @type {{ [key: string]: string; }} - * @memberof MappingRule */ headers?: { [key: string]: string }; /** * The action to match against the request action - * @type {string} - * @memberof MappingRule */ action?: string; /** * The priority of the mapping rule. The higher the priority, the higher the precedence - * @type {number} - * @memberof MappingRule */ priority?: number; } + +export const MappingRuleUrlTypeEnum = { + Regex: 'regex', +} as const; + +export type MappingRuleUrlTypeEnum = + (typeof MappingRuleUrlTypeEnum)[keyof typeof MappingRuleUrlTypeEnum]; diff --git a/src/openapi/types/member-access-level.ts b/src/openapi/types/member-access-level.ts index a5d693de..403a9f70 100644 --- a/src/openapi/types/member-access-level.ts +++ b/src/openapi/types/member-access-level.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,14 +12,13 @@ /** * An enumeration. - * @export - * @enum {string} */ export const MemberAccessLevel = { Admin: 'admin', Write: 'write', Read: 'read', + NoAccess: 'no_access', } as const; export type MemberAccessLevel = (typeof MemberAccessLevel)[keyof typeof MemberAccessLevel]; diff --git a/src/openapi/types/member-access-obj.ts b/src/openapi/types/member-access-obj.ts index 2ed8d255..e7126f0c 100644 --- a/src/openapi/types/member-access-obj.ts +++ b/src/openapi/types/member-access-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const MemberAccessObj = { diff --git a/src/openapi/types/member-info.ts b/src/openapi/types/member-info.ts deleted file mode 100644 index 7d471302..00000000 --- a/src/openapi/types/member-info.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface MemberInfo - */ -export interface MemberInfo { - /** - * - * @type {string} - * @memberof MemberInfo - */ - member_id: string; - /** - * - * @type {string} - * @memberof MemberInfo - */ - login_expires: string; - /** - * - * @type {string} - * @memberof MemberInfo - */ - email: string; - /** - * - * @type {string} - * @memberof MemberInfo - */ - name?: string; - /** - * - * @type {string} - * @memberof MemberInfo - */ - given_name?: string; - /** - * - * @type {string} - * @memberof MemberInfo - */ - family_name?: string; - /** - * - * @type {boolean} - * @memberof MemberInfo - */ - is_superuser: boolean; - /** - * - * @type {boolean} - * @memberof MemberInfo - */ - is_onboarding: boolean; - /** - * - * @type {object} - * @memberof MemberInfo - */ - settings: object; -} diff --git a/src/openapi/types/member-viewer-context.ts b/src/openapi/types/member-viewer-context.ts deleted file mode 100644 index b9ec7309..00000000 --- a/src/openapi/types/member-viewer-context.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { MemberInfo } from './member-info'; - -/** - * - * @export - * @interface MemberViewerContext - */ -export interface MemberViewerContext { - /** - * - * @type {string} - * @memberof MemberViewerContext - */ - type: MemberViewerContextTypeEnum; - /** - * - * @type {MemberInfo} - * @memberof MemberViewerContext - */ - member: MemberInfo; - /** - * - * @type {string} - * @memberof MemberViewerContext - */ - session_id: string; - /** - * - * @type {string} - * @memberof MemberViewerContext - */ - user_id?: string; -} - -export const MemberViewerContextTypeEnum = { - Member: 'member', -} as const; - -export type MemberViewerContextTypeEnum = - (typeof MemberViewerContextTypeEnum)[keyof typeof MemberViewerContextTypeEnum]; diff --git a/src/openapi/types/methods.ts b/src/openapi/types/methods.ts index 4cd167e5..70f80da1 100644 --- a/src/openapi/types/methods.ts +++ b/src/openapi/types/methods.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const Methods = { diff --git a/src/openapi/types/missing-user-policy.ts b/src/openapi/types/missing-user-policy.ts new file mode 100644 index 00000000..c0615a3d --- /dev/null +++ b/src/openapi/types/missing-user-policy.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const MissingUserPolicy = { + Fail: 'fail', + Ignore: 'ignore', + Create: 'create', +} as const; + +export type MissingUserPolicy = (typeof MissingUserPolicy)[keyof typeof MissingUserPolicy]; diff --git a/src/openapi/types/monthly-usage.ts b/src/openapi/types/monthly-usage.ts new file mode 100644 index 00000000..9708764c --- /dev/null +++ b/src/openapi/types/monthly-usage.ts @@ -0,0 +1,19 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MonthlyUsage { + mau?: number; + tenants?: number; + monthly_tenants?: Array; + month?: number; + year?: number; +} diff --git a/src/openapi/types/multi-invite-result.ts b/src/openapi/types/multi-invite-result.ts index 997d9697..8348108f 100644 --- a/src/openapi/types/multi-invite-result.ts +++ b/src/openapi/types/multi-invite-result.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,28 +11,14 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { FailedInvite } from './failed-invite'; +import type { FailedInvite } from './failed-invite'; // May contain unused imports in some cases -// @ts-ignore -import { InviteRead } from './invite-read'; +import type { InviteRead } from './invite-read'; -/** - * - * @export - * @interface MultiInviteResult - */ export interface MultiInviteResult { - /** - * - * @type {Array} - * @memberof MultiInviteResult - */ success: Array; /** * invites that were not even attempted, and the reason why - * @type {Array} - * @memberof MultiInviteResult */ failed?: Array; } diff --git a/src/openapi/types/onboarding-step.ts b/src/openapi/types/onboarding-step.ts index d7c8d9c3..7629365d 100644 --- a/src/openapi/types/onboarding-step.ts +++ b/src/openapi/types/onboarding-step.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const OnboardingStep = { diff --git a/src/openapi/types/opadecision-log.ts b/src/openapi/types/opadecision-log.ts deleted file mode 100644 index 2e883288..00000000 --- a/src/openapi/types/opadecision-log.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { Labels } from './labels'; - -/** - * - * @export - * @interface OPADecisionLog - */ -export interface OPADecisionLog { - /** - * - * @type {string} - * @memberof OPADecisionLog - */ - decision_id: string; - /** - * - * @type {Labels} - * @memberof OPADecisionLog - */ - labels: Labels; - /** - * - * @type {string} - * @memberof OPADecisionLog - */ - run_id?: string; - /** - * - * @type {string} - * @memberof OPADecisionLog - */ - timestamp: string; - /** - * - * @type {string} - * @memberof OPADecisionLog - */ - path?: string; - /** - * - * @type {object} - * @memberof OPADecisionLog - */ - input?: object; - /** - * - * @type {object} - * @memberof OPADecisionLog - */ - result?: object; -} diff --git a/src/openapi/types/opaengine-decision-log.ts b/src/openapi/types/opaengine-decision-log.ts index 492cbd82..781ee1c7 100644 --- a/src/openapi/types/opaengine-decision-log.ts +++ b/src/openapi/types/opaengine-decision-log.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,65 +11,18 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OPALabels } from './opalabels'; +import type { OPALabels } from './opalabels'; // May contain unused imports in some cases -// @ts-ignore -import { OPAMetrics } from './opametrics'; +import type { OPAMetrics } from './opametrics'; -/** - * - * @export - * @interface OPAEngineDecisionLog - */ export interface OPAEngineDecisionLog { - /** - * - * @type {string} - * @memberof OPAEngineDecisionLog - */ - engine?: OPAEngineDecisionLogEngineEnum; - /** - * - * @type {string} - * @memberof OPAEngineDecisionLog - */ + engine?: OPAEngineDecisionLogEngineEnum | null; decision_id: string; - /** - * - * @type {OPALabels} - * @memberof OPAEngineDecisionLog - */ labels: OPALabels; - /** - * - * @type {string} - * @memberof OPAEngineDecisionLog - */ timestamp: string; - /** - * - * @type {string} - * @memberof OPAEngineDecisionLog - */ path: string; - /** - * - * @type {any} - * @memberof OPAEngineDecisionLog - */ input?: any; - /** - * - * @type {any} - * @memberof OPAEngineDecisionLog - */ result?: any; - /** - * - * @type {OPAMetrics} - * @memberof OPAEngineDecisionLog - */ metrics: OPAMetrics; } diff --git a/src/openapi/types/opal-common-schemas-data-data-source-config.ts b/src/openapi/types/opal-common-schemas-data-data-source-config.ts deleted file mode 100644 index 17a59cc6..00000000 --- a/src/openapi/types/opal-common-schemas-data-data-source-config.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DataSourceEntryWithPollingInterval } from './data-source-entry-with-polling-interval'; - -/** - * Static list of Data Source Entries returned to client. Answers this question for the client: from where should i get the full picture of data i need? (as opposed to incremental data updates) - * @export - * @interface OpalCommonSchemasDataDataSourceConfig - */ -export interface OpalCommonSchemasDataDataSourceConfig { - /** - * list of data sources and how to fetch from them - * @type {Array} - * @memberof OpalCommonSchemasDataDataSourceConfig - */ - entries?: Array; -} diff --git a/src/openapi/types/opalabels.ts b/src/openapi/types/opalabels.ts index f0ab4fcb..9cd68598 100644 --- a/src/openapi/types/opalabels.ts +++ b/src/openapi/types/opalabels.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,7 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OPALabels - */ export interface OPALabels { - /** - * - * @type {string} - * @memberof OPALabels - */ id: string; - /** - * - * @type {string} - * @memberof OPALabels - */ version: string; } diff --git a/src/openapi/types/opalclient.ts b/src/openapi/types/opalclient.ts index af55ec4e..b1dbaf1c 100644 --- a/src/openapi/types/opalclient.ts +++ b/src/openapi/types/opalclient.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,76 +11,19 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OPALHttpFetcherConfig } from './opalhttp-fetcher-config'; +import type { OPALHttpFetcherConfig } from './opalhttp-fetcher-config'; // May contain unused imports in some cases -// @ts-ignore -import { OPALUpdateCallback } from './opalupdate-callback'; +import type { OPALUpdateCallback } from './opalupdate-callback'; -/** - * - * @export - * @interface OPALClient - */ export interface OPALClient { - /** - * - * @type {Array} - * @memberof OPALClient - */ DATA_TOPICS: Array; - /** - * - * @type {string} - * @memberof OPALClient - */ CLIENT_TOKEN: string; - /** - * - * @type {string} - * @memberof OPALClient - */ SERVER_URL: string; - /** - * - * @type {string} - * @memberof OPALClient - */ SERVER_WS_URL: string; - /** - * - * @type {string} - * @memberof OPALClient - */ SERVER_PUBSUB_URL: string; - /** - * - * @type {string} - * @memberof OPALClient - */ DEFAULT_DATA_SOURCES_CONFIG_URL: string; - /** - * - * @type {string} - * @memberof OPALClient - */ SCOPE_ID?: string; - /** - * - * @type {boolean} - * @memberof OPALClient - */ SHOULD_REPORT_ON_DATA_UPDATES?: boolean; - /** - * - * @type {OPALUpdateCallback} - * @memberof OPALClient - */ DEFAULT_UPDATE_CALLBACKS?: OPALUpdateCallback; - /** - * - * @type {OPALHttpFetcherConfig} - * @memberof OPALClient - */ DEFAULT_UPDATE_CALLBACK_CONFIG?: OPALHttpFetcherConfig; } diff --git a/src/openapi/types/opalcommon.ts b/src/openapi/types/opalcommon.ts index 592e408a..72a493e8 100644 --- a/src/openapi/types/opalcommon.ts +++ b/src/openapi/types/opalcommon.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,7 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OPALCommon - */ export interface OPALCommon { - /** - * - * @type {number} - * @memberof OPALCommon - */ FETCHING_CALLBACK_TIMEOUT?: number; + AUTH_PUBLIC_KEY: string; } diff --git a/src/openapi/types/opalhttp-fetcher-config.ts b/src/openapi/types/opalhttp-fetcher-config.ts index e813b6c1..1653f2c9 100644 --- a/src/openapi/types/opalhttp-fetcher-config.ts +++ b/src/openapi/types/opalhttp-fetcher-config.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,19 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { HttpMethods } from './http-methods'; +import type { HttpMethods } from './http-methods'; /** * Config for HttpFetchProvider\'s Adding HTTP headers. - * @export - * @interface OPALHttpFetcherConfig */ export interface OPALHttpFetcherConfig { /** * indicates to OPAL client that it should use a custom FetcherProvider to fetch the data - * @type {string} - * @memberof OPALHttpFetcherConfig */ fetcher?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof OPALHttpFetcherConfig - */ headers?: { [key: string]: string }; - /** - * - * @type {boolean} - * @memberof OPALHttpFetcherConfig - */ is_json?: boolean; - /** - * - * @type {boolean} - * @memberof OPALHttpFetcherConfig - */ process_data?: boolean; - /** - * - * @type {HttpMethods} - * @memberof OPALHttpFetcherConfig - */ method?: HttpMethods; - /** - * - * @type {any} - * @memberof OPALHttpFetcherConfig - */ data?: any; } diff --git a/src/openapi/types/opalupdate-callback.ts b/src/openapi/types/opalupdate-callback.ts index 1a305347..efcca066 100644 --- a/src/openapi/types/opalupdate-callback.ts +++ b/src/openapi/types/opalupdate-callback.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,19 +11,8 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { CallbacksInner } from './callbacks-inner'; +import type { CallbacksInner } from './callbacks-inner'; -/** - * - * @export - * @interface OPALUpdateCallback - */ export interface OPALUpdateCallback { - /** - * - * @type {Array} - * @memberof OPALUpdateCallback - */ callbacks: Array; } diff --git a/src/openapi/types/opametrics.ts b/src/openapi/types/opametrics.ts index 4037d77a..3c50a14c 100644 --- a/src/openapi/types/opametrics.ts +++ b/src/openapi/types/opametrics.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,52 +10,12 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OPAMetrics - */ export interface OPAMetrics { - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_rego_input_parse_ns?: number; - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_rego_query_parse_ns?: number; - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_rego_query_compile_ns?: number; - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_rego_query_eval_ns?: number; - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_rego_module_parse_ns?: number; - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_rego_module_compile_ns?: number; - /** - * - * @type {number} - * @memberof OPAMetrics - */ - timer_server_handler_ns?: number; + timer_rego_input_parse_ns?: number | null; + timer_rego_query_parse_ns?: number | null; + timer_rego_query_compile_ns?: number | null; + timer_rego_query_eval_ns?: number | null; + timer_rego_module_parse_ns?: number | null; + timer_rego_module_compile_ns?: number | null; + timer_server_handler_ns?: number | null; } diff --git a/src/openapi/types/operation-approval-approved.ts b/src/openapi/types/operation-approval-approved.ts new file mode 100644 index 00000000..99618e7e --- /dev/null +++ b/src/openapi/types/operation-approval-approved.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalDetails } from './operation-approval-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface OperationApprovalApproved { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * details of the operation approval, including the resource and tenant + */ + access_request_details: OperationApprovalDetails; + /** + * Optional business justification provided by the user requesting operation approval + */ + reason?: string; + /** + * Unique id of the operation approval + */ + id: string; + /** + * Unique id of the organization that the operation approval belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the operation approval belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the operation approval belongs to. + */ + environment_id: string; + /** + * Date and time when the operation approval was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the operation approval was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the approval + */ + requesting_user_id: string; + /** + * when the operation approval was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * current status of the operation approval + */ + status: RequestStatus; + /** + * Optional id of the user who review the operation approval + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/operation-approval-canceled.ts b/src/openapi/types/operation-approval-canceled.ts new file mode 100644 index 00000000..80522491 --- /dev/null +++ b/src/openapi/types/operation-approval-canceled.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalDetails } from './operation-approval-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface OperationApprovalCanceled { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * details of the operation approval, including the resource and tenant + */ + access_request_details: OperationApprovalDetails; + /** + * Optional business justification provided by the user requesting operation approval + */ + reason?: string; + /** + * Unique id of the operation approval + */ + id: string; + /** + * Unique id of the organization that the operation approval belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the operation approval belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the operation approval belongs to. + */ + environment_id: string; + /** + * Date and time when the operation approval was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the operation approval was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the approval + */ + requesting_user_id: string; + /** + * when the operation approval was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * current status of the operation approval + */ + status: RequestStatus; + /** + * Optional id of the user who review the operation approval + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/operation-approval-create-details.ts b/src/openapi/types/operation-approval-create-details.ts new file mode 100644 index 00000000..6c12851a --- /dev/null +++ b/src/openapi/types/operation-approval-create-details.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface OperationApprovalCreateDetails { + /** + * tenant id or key that the user is requesting operation approval for + */ + tenant: string; + /** + * resource id or key that the user is requesting operation approval for + */ + resource: string; + /** + * resource instance id or key that the user is requesting operation approval for + */ + resource_instance?: string; +} diff --git a/src/openapi/types/operation-approval-denied.ts b/src/openapi/types/operation-approval-denied.ts new file mode 100644 index 00000000..4e3e4581 --- /dev/null +++ b/src/openapi/types/operation-approval-denied.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalDetails } from './operation-approval-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface OperationApprovalDenied { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * details of the operation approval, including the resource and tenant + */ + access_request_details: OperationApprovalDetails; + /** + * Optional business justification provided by the user requesting operation approval + */ + reason?: string; + /** + * Unique id of the operation approval + */ + id: string; + /** + * Unique id of the organization that the operation approval belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the operation approval belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the operation approval belongs to. + */ + environment_id: string; + /** + * Date and time when the operation approval was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the operation approval was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the approval + */ + requesting_user_id: string; + /** + * when the operation approval was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * current status of the operation approval + */ + status: RequestStatus; + /** + * Optional id of the user who review the operation approval + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/operation-approval-details.ts b/src/openapi/types/operation-approval-details.ts new file mode 100644 index 00000000..65a7f07f --- /dev/null +++ b/src/openapi/types/operation-approval-details.ts @@ -0,0 +1,30 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface OperationApprovalDetails { + /** + * tenant id or key that the user is requesting operation approval for + */ + tenant: string; + /** + * resource id or key that the user is requesting operation approval for + */ + resource: string; + /** + * resource instance id or key that the user is requesting operation approval for + */ + resource_instance: string; + /** + * element config id or key that the user is requesting operation approval from + */ + element_config_id?: string; +} diff --git a/src/openapi/types/operation-approval-list.ts b/src/openapi/types/operation-approval-list.ts new file mode 100644 index 00000000..20196e12 --- /dev/null +++ b/src/openapi/types/operation-approval-list.ts @@ -0,0 +1,94 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalDetails } from './operation-approval-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface OperationApprovalList { + /** + * details of the operation approval, including the resource and tenant + */ + access_request_details: OperationApprovalDetails; + /** + * Optional business justification provided by the user requesting operation approval + */ + reason?: string; + /** + * Unique id of the operation approval + */ + id: string; + /** + * Unique id of the organization that the operation approval belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the operation approval belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the operation approval belongs to. + */ + environment_id: string; + /** + * Date and time when the operation approval was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the operation approval was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the approval + */ + requesting_user_id: string; + /** + * when the operation approval was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * current status of the operation approval + */ + status: RequestStatus; + /** + * Optional id of the user who review the operation approval + */ + reviewer_user_id?: string; + /** + * email of the user that is requesting the approval + */ + requesting_user_email?: string; + /** + * first name of the user that is requesting the approval + */ + requesting_user_first_name?: string; + /** + * last name of the user that is requesting the approval + */ + requesting_user_last_name?: string; + /** + * key of the resource that the user is requesting operation approval for + */ + resource_key?: string; + /** + * key of the resource instance that the user is requesting operation approval for + */ + resource_instance_key?: string; +} diff --git a/src/openapi/types/operation-approval-read.ts b/src/openapi/types/operation-approval-read.ts new file mode 100644 index 00000000..ad132bce --- /dev/null +++ b/src/openapi/types/operation-approval-read.ts @@ -0,0 +1,74 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalDetails } from './operation-approval-details'; +// May contain unused imports in some cases +import type { RequestStatus } from './request-status'; +// May contain unused imports in some cases +import type { RequestType } from './request-type'; + +export interface OperationApprovalRead { + /** + * details of the operation approval, including the resource and tenant + */ + access_request_details: OperationApprovalDetails; + /** + * Optional business justification provided by the user requesting operation approval + */ + reason?: string; + /** + * Unique id of the operation approval + */ + id: string; + /** + * Unique id of the organization that the operation approval belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the operation approval belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the operation approval belongs to. + */ + environment_id: string; + /** + * Date and time when the operation approval was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the operation approval was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * optional id of the user that is requesting the approval + */ + requesting_user_id: string; + /** + * when the operation approval was reviewed + */ + reviewed_at?: string; + type?: RequestType; + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; + /** + * current status of the operation approval + */ + status: RequestStatus; + /** + * Optional id of the user who review the operation approval + */ + reviewer_user_id?: string; +} diff --git a/src/openapi/types/operation-approval-review.ts b/src/openapi/types/operation-approval-review.ts new file mode 100644 index 00000000..03c26d5a --- /dev/null +++ b/src/openapi/types/operation-approval-review.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface OperationApprovalReview { + /** + * comment provided by the reviewer_user_id + */ + reviewer_comment?: string; +} diff --git a/src/openapi/types/operation-approval-user-create.ts b/src/openapi/types/operation-approval-user-create.ts new file mode 100644 index 00000000..e290405d --- /dev/null +++ b/src/openapi/types/operation-approval-user-create.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalCreateDetails } from './operation-approval-create-details'; + +export interface OperationApprovalUserCreate { + /** + * details of the operation approval, including the resource and tenant + */ + access_request_details: OperationApprovalCreateDetails; + /** + * Optional business justification provided by the user requesting operation approval + */ + reason?: string; +} diff --git a/src/openapi/types/org-export-result.ts b/src/openapi/types/org-export-result.ts new file mode 100644 index 00000000..2151a8fc --- /dev/null +++ b/src/openapi/types/org-export-result.ts @@ -0,0 +1,27 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * API result on a completed export poll — carries a freshly minted, short-lived presigned download URL (never persisted). + */ +export interface OrgExportResult { + /** + * Short-lived presigned URL to download the export archive. Treat as a credential — it grants access to the archive, which contains plaintext API-key secrets. + */ + download_url: string; + /** + * How long the download URL stays valid. + */ + expires_in_seconds: number; + filename: string; + size_bytes: number; +} diff --git a/src/openapi/types/org-member-create.ts b/src/openapi/types/org-member-create.ts index 8a1ce9ad..7f6fdb68 100644 --- a/src/openapi/types/org-member-create.ts +++ b/src/openapi/types/org-member-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,16 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Permission } from './permission'; +import type { Permission } from './permission'; -/** - * - * @export - * @interface OrgMemberCreate - */ export interface OrgMemberCreate { /** * Unique id of the account member - * @type {string} - * @memberof OrgMemberCreate */ id?: string; /** * Email of the user controlling this account - * @type {string} - * @memberof OrgMemberCreate */ email?: string; - /** - * - * @type {Array} - * @memberof OrgMemberCreate - */ permissions: Array; } diff --git a/src/openapi/types/org-member-read-with-grants.ts b/src/openapi/types/org-member-read-with-grants.ts index e1d48a8e..5db775c7 100644 --- a/src/openapi/types/org-member-read-with-grants.ts +++ b/src/openapi/types/org-member-read-with-grants.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,130 +11,76 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { IdentityRead } from './identity-read'; +import type { IdentityRead } from './identity-read'; // May contain unused imports in some cases -// @ts-ignore -import { InviteRead } from './invite-read'; +import type { InviteRead } from './invite-read'; // May contain unused imports in some cases -// @ts-ignore -import { OnboardingStep } from './onboarding-step'; +import type { OnboardingStep } from './onboarding-step'; // May contain unused imports in some cases -// @ts-ignore -import { Permission } from './permission'; +import type { Permission } from './permission'; -/** - * - * @export - * @interface OrgMemberReadWithGrants - */ export interface OrgMemberReadWithGrants { /** * Unique id of the account member - * @type {string} - * @memberof OrgMemberReadWithGrants */ id: string; /** * Email of the user controlling this account - * @type {string} - * @memberof OrgMemberReadWithGrants */ email: string; /** * Whether this email address is verified or not. For social providers like \'Login with Google\' this is done automatically, otherwise we will send the user a verification link in email. - * @type {boolean} - * @memberof OrgMemberReadWithGrants */ email_verified: boolean; /** * Name of this user - * @type {string} - * @memberof OrgMemberReadWithGrants */ name?: string; /** * First name of the user - * @type {string} - * @memberof OrgMemberReadWithGrants */ given_name?: string; /** * Last name of the user - * @type {string} - * @memberof OrgMemberReadWithGrants */ family_name?: string; /** * URL to picture, photo, or avatar of the user that controls this account. - * @type {string} - * @memberof OrgMemberReadWithGrants */ picture?: string; /** * Whether or not this user has special access to permit.io organizations - * @type {boolean} - * @memberof OrgMemberReadWithGrants */ is_superuser: boolean; /** * Whether or not this user is currently onboarding, needs to be replaced by a user journey object - * @type {boolean} - * @memberof OrgMemberReadWithGrants */ is_onboarding: boolean; /** * the step the user is currently going through in onboarding - * @type {OnboardingStep} - * @memberof OrgMemberReadWithGrants */ onboarding_step: OnboardingStep; /** * Date and time when the account member was created (ISO_8601 format). - * @type {string} - * @memberof OrgMemberReadWithGrants */ created_at: string; /** * Last date and time this user logged in (ISO_8601 format). - * @type {string} - * @memberof OrgMemberReadWithGrants */ last_login?: string; /** * Last IP address from which this user logged in. - * @type {string} - * @memberof OrgMemberReadWithGrants */ last_ip?: string; /** * Total number of logins this user has performed. - * @type {number} - * @memberof OrgMemberReadWithGrants */ logins_count?: number; - /** - * - * @type {Array} - * @memberof OrgMemberReadWithGrants - */ identities: Array; - /** - * - * @type {InviteRead} - * @memberof OrgMemberReadWithGrants - */ invite?: InviteRead; /** * Custom permit.io dashboard settings, such as preferred theme, etc. - * @type {object} - * @memberof OrgMemberReadWithGrants */ settings: object; - /** - * - * @type {Array} - * @memberof OrgMemberReadWithGrants - */ grants: Array; } diff --git a/src/openapi/types/org-member-read.ts b/src/openapi/types/org-member-read.ts index f988e87d..44eb8f8a 100644 --- a/src/openapi/types/org-member-read.ts +++ b/src/openapi/types/org-member-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,121 +11,73 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { IdentityRead } from './identity-read'; +import type { IdentityRead } from './identity-read'; // May contain unused imports in some cases -// @ts-ignore -import { InviteRead } from './invite-read'; +import type { InviteRead } from './invite-read'; // May contain unused imports in some cases -// @ts-ignore -import { OnboardingStep } from './onboarding-step'; +import type { OnboardingStep } from './onboarding-step'; -/** - * - * @export - * @interface OrgMemberRead - */ export interface OrgMemberRead { /** * Unique id of the account member - * @type {string} - * @memberof OrgMemberRead */ id: string; /** * Email of the user controlling this account - * @type {string} - * @memberof OrgMemberRead */ email: string; /** * Whether this email address is verified or not. For social providers like \'Login with Google\' this is done automatically, otherwise we will send the user a verification link in email. - * @type {boolean} - * @memberof OrgMemberRead */ email_verified: boolean; /** * Name of this user - * @type {string} - * @memberof OrgMemberRead */ name?: string; /** * First name of the user - * @type {string} - * @memberof OrgMemberRead */ given_name?: string; /** * Last name of the user - * @type {string} - * @memberof OrgMemberRead */ family_name?: string; /** * URL to picture, photo, or avatar of the user that controls this account. - * @type {string} - * @memberof OrgMemberRead */ picture?: string; /** * Whether or not this user has special access to permit.io organizations - * @type {boolean} - * @memberof OrgMemberRead */ is_superuser: boolean; /** * Whether or not this user is currently onboarding, needs to be replaced by a user journey object - * @type {boolean} - * @memberof OrgMemberRead */ is_onboarding: boolean; /** * the step the user is currently going through in onboarding - * @type {OnboardingStep} - * @memberof OrgMemberRead */ onboarding_step: OnboardingStep; /** * Date and time when the account member was created (ISO_8601 format). - * @type {string} - * @memberof OrgMemberRead */ created_at: string; /** * Last date and time this user logged in (ISO_8601 format). - * @type {string} - * @memberof OrgMemberRead */ last_login?: string; /** * Last IP address from which this user logged in. - * @type {string} - * @memberof OrgMemberRead */ last_ip?: string; /** * Total number of logins this user has performed. - * @type {number} - * @memberof OrgMemberRead */ logins_count?: number; - /** - * - * @type {Array} - * @memberof OrgMemberRead - */ identities: Array; - /** - * - * @type {InviteRead} - * @memberof OrgMemberRead - */ invite?: InviteRead; /** * Custom permit.io dashboard settings, such as preferred theme, etc. - * @type {object} - * @memberof OrgMemberRead */ settings: object; } diff --git a/src/openapi/types/org-member-remove-permissions.ts b/src/openapi/types/org-member-remove-permissions.ts index fb70895f..64fb4fc7 100644 --- a/src/openapi/types/org-member-remove-permissions.ts +++ b/src/openapi/types/org-member-remove-permissions.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,12 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Permission } from './permission'; +import type { Permission } from './permission'; -/** - * - * @export - * @interface OrgMemberRemovePermissions - */ export interface OrgMemberRemovePermissions { /** * Unique id of the account member - * @type {string} - * @memberof OrgMemberRemovePermissions */ id: string; - /** - * - * @type {Array} - * @memberof OrgMemberRemovePermissions - */ permissions: Array; } diff --git a/src/openapi/types/org-member-update.ts b/src/openapi/types/org-member-update.ts index 09cacb88..86f8f2d9 100644 --- a/src/openapi/types/org-member-update.ts +++ b/src/openapi/types/org-member-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,15 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OnboardingStep } from './onboarding-step'; +import type { OnboardingStep } from './onboarding-step'; -/** - * - * @export - * @interface OrgMemberUpdate - */ export interface OrgMemberUpdate { /** * Custom permit.io dashboard settings, such as preferred theme, etc. - * @type {object} - * @memberof OrgMemberUpdate */ settings?: object; /** * updates the onboarding step (optional) - * @type {OnboardingStep} - * @memberof OrgMemberUpdate */ onboarding_step?: OnboardingStep; } diff --git a/src/openapi/types/organization-create.ts b/src/openapi/types/organization-create.ts index 09663e54..731ca1bd 100644 --- a/src/openapi/types/organization-create.ts +++ b/src/openapi/types/organization-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OrganizationCreate - */ export interface OrganizationCreate { /** * A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization. - * @type {string} - * @memberof OrganizationCreate */ key: string; /** * The name of the organization, usually it\'s your company\'s name. - * @type {string} - * @memberof OrganizationCreate */ name: string; /** * the settings for this project - * @type {object} - * @memberof OrganizationCreate */ settings?: object; } diff --git a/src/openapi/types/organization-obj.ts b/src/openapi/types/organization-obj.ts index 72ad31c7..d8254745 100644 --- a/src/openapi/types/organization-obj.ts +++ b/src/openapi/types/organization-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,10 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OrganizationObj - */ export interface OrganizationObj { - /** - * - * @type {string} - * @memberof OrganizationObj - */ id: string; - /** - * - * @type {string} - * @memberof OrganizationObj - */ key: string; - /** - * - * @type {string} - * @memberof OrganizationObj - */ - name?: string; - /** - * - * @type {string} - * @memberof OrganizationObj - */ + name?: string | null; created_at: string; - /** - * - * @type {string} - * @memberof OrganizationObj - */ updated_at: string; } diff --git a/src/openapi/types/organization-object.ts b/src/openapi/types/organization-object.ts index def33d35..7b0e2f7c 100644 --- a/src/openapi/types/organization-object.ts +++ b/src/openapi/types/organization-object.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,6 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OrganizationObj } from './organization-obj'; +import type { OrganizationObj } from './organization-obj'; -/** - * - * @export - * @interface OrganizationObject - */ -export interface OrganizationObject { - /** - * - * @type {string} - * @memberof OrganizationObject - */ - id: string; - /** - * - * @type {string} - * @memberof OrganizationObject - */ - key: string; - /** - * - * @type {string} - * @memberof OrganizationObject - */ - name?: string; - /** - * - * @type {string} - * @memberof OrganizationObject - */ - created_at: string; - /** - * - * @type {string} - * @memberof OrganizationObject - */ - updated_at: string; -} +export type OrganizationObject = OrganizationObj | object; diff --git a/src/openapi/types/organization-read-with-apikey.ts b/src/openapi/types/organization-read-with-apikey.ts index 6f435fc2..0c57f23c 100644 --- a/src/openapi/types/organization-read-with-apikey.ts +++ b/src/openapi/types/organization-read-with-apikey.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,58 +10,42 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OrganizationReadWithAPIKey - */ +// May contain unused imports in some cases +import type { UsageLimits } from './usage-limits'; + export interface OrganizationReadWithAPIKey { /** * A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization. - * @type {string} - * @memberof OrganizationReadWithAPIKey */ key: string; /** * Unique id of the organization - * @type {string} - * @memberof OrganizationReadWithAPIKey */ id: string; + /** + * Is this an enterprise account? + */ + is_enterprise: boolean; + /** + * Usage limits for this organization + */ + usage_limits?: UsageLimits; /** * Date and time when the organization was created (ISO_8601 format). - * @type {string} - * @memberof OrganizationReadWithAPIKey */ created_at: string; /** * Date and time when the organization was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof OrganizationReadWithAPIKey */ updated_at: string; /** * The name of the organization, usually it\'s your company\'s name. - * @type {string} - * @memberof OrganizationReadWithAPIKey */ name: string; /** * the settings for this project - * @type {object} - * @memberof OrganizationReadWithAPIKey */ settings?: object; - /** - * - * @type {string} - * @memberof OrganizationReadWithAPIKey - */ api_key_id?: string; - /** - * - * @type {string} - * @memberof OrganizationReadWithAPIKey - */ api_key_secret?: string; } diff --git a/src/openapi/types/organization-read.ts b/src/openapi/types/organization-read.ts index 8625cb6a..3e26c56d 100644 --- a/src/openapi/types/organization-read.ts +++ b/src/openapi/types/organization-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,40 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OrganizationRead - */ +// May contain unused imports in some cases +import type { UsageLimits } from './usage-limits'; + export interface OrganizationRead { /** * A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization. - * @type {string} - * @memberof OrganizationRead */ key: string; /** * Unique id of the organization - * @type {string} - * @memberof OrganizationRead */ id: string; + /** + * Is this an enterprise account? + */ + is_enterprise: boolean; + /** + * Usage limits for this organization + */ + usage_limits?: UsageLimits; /** * Date and time when the organization was created (ISO_8601 format). - * @type {string} - * @memberof OrganizationRead */ created_at: string; /** * Date and time when the organization was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof OrganizationRead */ updated_at: string; /** * The name of the organization, usually it\'s your company\'s name. - * @type {string} - * @memberof OrganizationRead */ name: string; /** * the settings for this project - * @type {object} - * @memberof OrganizationRead */ settings?: object; } diff --git a/src/openapi/types/organization-regeneration.ts b/src/openapi/types/organization-regeneration.ts deleted file mode 100644 index 9d448d44..00000000 --- a/src/openapi/types/organization-regeneration.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface OrganizationRegeneration - */ -export interface OrganizationRegeneration { - /** - * - * @type {string} - * @memberof OrganizationRegeneration - */ - scope: OrganizationRegenerationScopeEnum; - /** - * - * @type {string} - * @memberof OrganizationRegeneration - */ - org_id: string; -} - -export const OrganizationRegenerationScopeEnum = { - Organization: 'organization', -} as const; - -export type OrganizationRegenerationScopeEnum = - (typeof OrganizationRegenerationScopeEnum)[keyof typeof OrganizationRegenerationScopeEnum]; diff --git a/src/openapi/types/organization-schedule-delete-response.ts b/src/openapi/types/organization-schedule-delete-response.ts new file mode 100644 index 00000000..83e38423 --- /dev/null +++ b/src/openapi/types/organization-schedule-delete-response.ts @@ -0,0 +1,30 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface OrganizationScheduleDeleteResponse { + status?: OrganizationScheduleDeleteResponseStatusEnum; + /** + * Timestamp when the deletion was scheduled + */ + deleted_at: string; + /** + * Timestamp when the org will be permanently deleted + */ + delete_after: string; +} + +export const OrganizationScheduleDeleteResponseStatusEnum = { + Scheduled: 'scheduled', +} as const; + +export type OrganizationScheduleDeleteResponseStatusEnum = + (typeof OrganizationScheduleDeleteResponseStatusEnum)[keyof typeof OrganizationScheduleDeleteResponseStatusEnum]; diff --git a/src/openapi/types/organization-statistics.ts b/src/openapi/types/organization-statistics.ts new file mode 100644 index 00000000..f2997047 --- /dev/null +++ b/src/openapi/types/organization-statistics.ts @@ -0,0 +1,17 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface OrganizationStatistics { + projects: number; + environments: number; + users: number; +} diff --git a/src/openapi/types/organization-stats.ts b/src/openapi/types/organization-stats.ts new file mode 100644 index 00000000..523bdf5d --- /dev/null +++ b/src/openapi/types/organization-stats.ts @@ -0,0 +1,55 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { HistoricalUsage } from './historical-usage'; +// May contain unused imports in some cases +import type { OrganizationStatistics } from './organization-statistics'; +// May contain unused imports in some cases +import type { UsageLimits } from './usage-limits'; + +export interface OrganizationStats { + /** + * A URL-friendly name of the organization (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the organization. + */ + key: string; + /** + * Unique id of the organization + */ + id: string; + /** + * Is this an enterprise account? + */ + is_enterprise: boolean; + /** + * Usage limits for this organization + */ + usage_limits?: UsageLimits; + /** + * Date and time when the organization was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the organization was last updated/modified (ISO_8601 format). + */ + updated_at: string; + /** + * The name of the organization, usually it\'s your company\'s name. + */ + name: string; + /** + * the settings for this project + */ + settings?: object; + stats: OrganizationStatistics; + historical_usage: HistoricalUsage; +} diff --git a/src/openapi/types/organization-update.ts b/src/openapi/types/organization-update.ts index de994605..981d3635 100644 --- a/src/openapi/types/organization-update.ts +++ b/src/openapi/types/organization-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,13 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface OrganizationUpdate - */ export interface OrganizationUpdate { /** * The name of the organization, usually it\'s your company\'s name. - * @type {string} - * @memberof OrganizationUpdate */ name?: string; /** * the settings for this project - * @type {object} - * @memberof OrganizationUpdate */ settings?: object; } diff --git a/src/openapi/types/authn-me-read.ts b/src/openapi/types/paginated-result-access-request-list.ts similarity index 58% rename from src/openapi/types/authn-me-read.ts rename to src/openapi/types/paginated-result-access-request-list.ts index cfc2a818..06534167 100644 --- a/src/openapi/types/authn-me-read.ts +++ b/src/openapi/types/paginated-result-access-request-list.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,19 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Actor } from './actor'; +import type { AccessRequestList } from './access-request-list'; -/** - * - * @export - * @interface AuthnMeRead - */ -export interface AuthnMeRead { +export interface PaginatedResultAccessRequestList { /** - * - * @type {Actor} - * @memberof AuthnMeRead + * List of Access Request Lists */ - actor: Actor; + data: Array; + total_count: number; + page_count?: number; } diff --git a/src/openapi/types/paginated-result-activity-log-event-read.ts b/src/openapi/types/paginated-result-activity-log-event-read.ts index 98ac86d2..384c1f61 100644 --- a/src/openapi/types/paginated-result-activity-log-event-read.ts +++ b/src/openapi/types/paginated-result-activity-log-event-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActivityLogEventRead } from './activity-log-event-read'; +import type { ActivityLogEventRead } from './activity-log-event-read'; -/** - * - * @export - * @interface PaginatedResultActivityLogEventRead - */ export interface PaginatedResultActivityLogEventRead { /** * List of Activity Log Events - * @type {Array} - * @memberof PaginatedResultActivityLogEventRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultActivityLogEventRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultActivityLogEventRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-apihistory-event-read.ts b/src/openapi/types/paginated-result-apihistory-event-read.ts index b12182b7..efabeac4 100644 --- a/src/openapi/types/paginated-result-apihistory-event-read.ts +++ b/src/openapi/types/paginated-result-apihistory-event-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { APIHistoryEventRead } from './apihistory-event-read'; +import type { APIHistoryEventRead } from './apihistory-event-read'; -/** - * - * @export - * @interface PaginatedResultAPIHistoryEventRead - */ export interface PaginatedResultAPIHistoryEventRead { /** * List of Api History Events - * @type {Array} - * @memberof PaginatedResultAPIHistoryEventRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultAPIHistoryEventRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultAPIHistoryEventRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-apikey-read.ts b/src/openapi/types/paginated-result-apikey-read.ts index 1ba44d1d..ec72f427 100644 --- a/src/openapi/types/paginated-result-apikey-read.ts +++ b/src/openapi/types/paginated-result-apikey-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { APIKeyRead } from './apikey-read'; +import type { APIKeyRead } from './apikey-read'; -/** - * - * @export - * @interface PaginatedResultAPIKeyRead - */ export interface PaginatedResultAPIKeyRead { /** * List of Api Keys - * @type {Array} - * @memberof PaginatedResultAPIKeyRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultAPIKeyRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultAPIKeyRead - */ - page_count?: number; + page_count?: number | null; } diff --git a/src/openapi/types/paginated-result-audit-log.ts b/src/openapi/types/paginated-result-audit-log.ts deleted file mode 100644 index b5b3627a..00000000 --- a/src/openapi/types/paginated-result-audit-log.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { AuditLog } from './audit-log'; - -/** - * - * @export - * @interface PaginatedResultAuditLog - */ -export interface PaginatedResultAuditLog { - /** - * List of Audit Logs - * @type {Array} - * @memberof PaginatedResultAuditLog - */ - data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultAuditLog - */ - total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultAuditLog - */ - page_count?: number; -} diff --git a/src/openapi/types/paginated-result-condition-set-read.ts b/src/openapi/types/paginated-result-condition-set-read.ts index b21c22a0..d3ebe9cb 100644 --- a/src/openapi/types/paginated-result-condition-set-read.ts +++ b/src/openapi/types/paginated-result-condition-set-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ConditionSetRead } from './condition-set-read'; +import type { ConditionSetRead } from './condition-set-read'; -/** - * - * @export - * @interface PaginatedResultConditionSetRead - */ export interface PaginatedResultConditionSetRead { /** * List of Condition Sets - * @type {Array} - * @memberof PaginatedResultConditionSetRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultConditionSetRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultConditionSetRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-elements-config-read.ts b/src/openapi/types/paginated-result-elements-config-read.ts index 46c95d62..135da92d 100644 --- a/src/openapi/types/paginated-result-elements-config-read.ts +++ b/src/openapi/types/paginated-result-elements-config-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ElementsConfigRead } from './elements-config-read'; +import type { ElementsConfigRead } from './elements-config-read'; -/** - * - * @export - * @interface PaginatedResultElementsConfigRead - */ export interface PaginatedResultElementsConfigRead { /** * List of Elements Configs - * @type {Array} - * @memberof PaginatedResultElementsConfigRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultElementsConfigRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultElementsConfigRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-elements-user-invite-read.ts b/src/openapi/types/paginated-result-elements-user-invite-read.ts new file mode 100644 index 00000000..2837cd6e --- /dev/null +++ b/src/openapi/types/paginated-result-elements-user-invite-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ElementsUserInviteRead } from './elements-user-invite-read'; + +export interface PaginatedResultElementsUserInviteRead { + /** + * List of Elements User Invites + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-group-read-schema.ts b/src/openapi/types/paginated-result-group-read-schema.ts new file mode 100644 index 00000000..89874203 --- /dev/null +++ b/src/openapi/types/paginated-result-group-read-schema.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { GroupReadSchema } from './group-read-schema'; + +export interface PaginatedResultGroupReadSchema { + /** + * List of Group Read Schemas + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-group-role-read-schema.ts b/src/openapi/types/paginated-result-group-role-read-schema.ts new file mode 100644 index 00000000..f330d704 --- /dev/null +++ b/src/openapi/types/paginated-result-group-role-read-schema.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { GroupRoleReadSchema } from './group-role-read-schema'; + +export interface PaginatedResultGroupRoleReadSchema { + /** + * List of Group Role Read Schemas + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-group-user-read-schema.ts b/src/openapi/types/paginated-result-group-user-read-schema.ts new file mode 100644 index 00000000..3f6d4a3a --- /dev/null +++ b/src/openapi/types/paginated-result-group-user-read-schema.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { GroupUserReadSchema } from './group-user-read-schema'; + +export interface PaginatedResultGroupUserReadSchema { + /** + * List of Group User Read Schemas + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-opadecision-log.ts b/src/openapi/types/paginated-result-opadecision-log.ts deleted file mode 100644 index 42bc04c6..00000000 --- a/src/openapi/types/paginated-result-opadecision-log.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { OPADecisionLog } from './opadecision-log'; - -/** - * - * @export - * @interface PaginatedResultOPADecisionLog - */ -export interface PaginatedResultOPADecisionLog { - /** - * List of Opa Decision Logs - * @type {Array} - * @memberof PaginatedResultOPADecisionLog - */ - data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultOPADecisionLog - */ - total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultOPADecisionLog - */ - page_count?: number; -} diff --git a/src/openapi/types/paginated-result-operation-approval-list.ts b/src/openapi/types/paginated-result-operation-approval-list.ts new file mode 100644 index 00000000..c35e40f6 --- /dev/null +++ b/src/openapi/types/paginated-result-operation-approval-list.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { OperationApprovalList } from './operation-approval-list'; + +export interface PaginatedResultOperationApprovalList { + /** + * List of Operation Approval Lists + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-relation-read.ts b/src/openapi/types/paginated-result-relation-read.ts new file mode 100644 index 00000000..d4d1a2ca --- /dev/null +++ b/src/openapi/types/paginated-result-relation-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { RelationRead } from './relation-read'; + +export interface PaginatedResultRelationRead { + /** + * List of Relations + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-relationship-tuple-detailed-read.ts b/src/openapi/types/paginated-result-relationship-tuple-detailed-read.ts new file mode 100644 index 00000000..07029f55 --- /dev/null +++ b/src/openapi/types/paginated-result-relationship-tuple-detailed-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { RelationshipTupleDetailedRead } from './relationship-tuple-detailed-read'; + +export interface PaginatedResultRelationshipTupleDetailedRead { + /** + * List of Detailed Relationship Tuples + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-relationship-tuple-read.ts b/src/openapi/types/paginated-result-relationship-tuple-read.ts new file mode 100644 index 00000000..1b820416 --- /dev/null +++ b/src/openapi/types/paginated-result-relationship-tuple-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { RelationshipTupleRead } from './relationship-tuple-read'; + +export interface PaginatedResultRelationshipTupleRead { + /** + * List of Relationship Tuples + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-resource-instance-detailed-read.ts b/src/openapi/types/paginated-result-resource-instance-detailed-read.ts new file mode 100644 index 00000000..8e30ce9e --- /dev/null +++ b/src/openapi/types/paginated-result-resource-instance-detailed-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ResourceInstanceDetailedRead } from './resource-instance-detailed-read'; + +export interface PaginatedResultResourceInstanceDetailedRead { + /** + * List of Detailed Resource Instances + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-resource-instance-read.ts b/src/openapi/types/paginated-result-resource-instance-read.ts new file mode 100644 index 00000000..916a5794 --- /dev/null +++ b/src/openapi/types/paginated-result-resource-instance-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ResourceInstanceRead } from './resource-instance-read'; + +export interface PaginatedResultResourceInstanceRead { + /** + * List of Resource Instances + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-resource-read.ts b/src/openapi/types/paginated-result-resource-read.ts index 558b450d..f88f3c00 100644 --- a/src/openapi/types/paginated-result-resource-read.ts +++ b/src/openapi/types/paginated-result-resource-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ResourceRead } from './resource-read'; +import type { ResourceRead } from './resource-read'; -/** - * - * @export - * @interface PaginatedResultResourceRead - */ export interface PaginatedResultResourceRead { /** * List of Resources - * @type {Array} - * @memberof PaginatedResultResourceRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultResourceRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultResourceRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-resource-role-read.ts b/src/openapi/types/paginated-result-resource-role-read.ts new file mode 100644 index 00000000..4e53bd09 --- /dev/null +++ b/src/openapi/types/paginated-result-resource-role-read.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ResourceRoleRead } from './resource-role-read'; + +export interface PaginatedResultResourceRoleRead { + /** + * List of Resource Roles + */ + data: Array; + total_count: number; + page_count?: number; +} diff --git a/src/openapi/types/paginated-result-role-assignment-detailed-read.ts b/src/openapi/types/paginated-result-role-assignment-detailed-read.ts index bfc2e359..f4bba34d 100644 --- a/src/openapi/types/paginated-result-role-assignment-detailed-read.ts +++ b/src/openapi/types/paginated-result-role-assignment-detailed-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { RoleAssignmentDetailedRead } from './role-assignment-detailed-read'; +import type { RoleAssignmentDetailedRead } from './role-assignment-detailed-read'; -/** - * - * @export - * @interface PaginatedResultRoleAssignmentDetailedRead - */ export interface PaginatedResultRoleAssignmentDetailedRead { /** * List of Role Assignment Detaileds - * @type {Array} - * @memberof PaginatedResultRoleAssignmentDetailedRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultRoleAssignmentDetailedRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultRoleAssignmentDetailedRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-role-assignment-read.ts b/src/openapi/types/paginated-result-role-assignment-read.ts index c1aa6e31..d96e71a0 100644 --- a/src/openapi/types/paginated-result-role-assignment-read.ts +++ b/src/openapi/types/paginated-result-role-assignment-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { RoleAssignmentRead } from './role-assignment-read'; +import type { RoleAssignmentRead } from './role-assignment-read'; -/** - * - * @export - * @interface PaginatedResultRoleAssignmentRead - */ export interface PaginatedResultRoleAssignmentRead { /** * List of Role Assignments - * @type {Array} - * @memberof PaginatedResultRoleAssignmentRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultRoleAssignmentRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultRoleAssignmentRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-role-read.ts b/src/openapi/types/paginated-result-role-read.ts index d2e8124d..129268e8 100644 --- a/src/openapi/types/paginated-result-role-read.ts +++ b/src/openapi/types/paginated-result-role-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { RoleRead } from './role-read'; +import type { RoleRead } from './role-read'; -/** - * - * @export - * @interface PaginatedResultRoleRead - */ export interface PaginatedResultRoleRead { /** * List of Roles - * @type {Array} - * @memberof PaginatedResultRoleRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultRoleRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultRoleRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-tenant-read.ts b/src/openapi/types/paginated-result-tenant-read.ts index 7af9af92..ffad4d57 100644 --- a/src/openapi/types/paginated-result-tenant-read.ts +++ b/src/openapi/types/paginated-result-tenant-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { TenantRead } from './tenant-read'; +import type { TenantRead } from './tenant-read'; -/** - * - * @export - * @interface PaginatedResultTenantRead - */ export interface PaginatedResultTenantRead { /** * List of Tenants - * @type {Array} - * @memberof PaginatedResultTenantRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultTenantRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultTenantRead - */ page_count?: number; } diff --git a/src/openapi/types/paginated-result-user-read.ts b/src/openapi/types/paginated-result-user-read.ts index 2fcc6de1..61007f26 100644 --- a/src/openapi/types/paginated-result-user-read.ts +++ b/src/openapi/types/paginated-result-user-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { UserRead } from './user-read'; +import type { UserRead } from './user-read'; -/** - * - * @export - * @interface PaginatedResultUserRead - */ export interface PaginatedResultUserRead { /** * List of Users - * @type {Array} - * @memberof PaginatedResultUserRead */ data: Array; - /** - * - * @type {number} - * @memberof PaginatedResultUserRead - */ total_count: number; - /** - * - * @type {number} - * @memberof PaginatedResultUserRead - */ page_count?: number; } diff --git a/src/openapi/types/parent-id.ts b/src/openapi/types/parent-id.ts index e289171d..3312fc92 100644 --- a/src/openapi/types/parent-id.ts +++ b/src/openapi/types/parent-id.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,4 @@ * Do not edit the class manually. */ -/** - * Parent Condition Set - * @export - * @interface ParentId - */ -export interface ParentId {} +export type ParentId = string; diff --git a/src/openapi/types/payload.ts b/src/openapi/types/payload.ts deleted file mode 100644 index e44e24fa..00000000 --- a/src/openapi/types/payload.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { EnvironmentRegeneration } from './environment-regeneration'; -// May contain unused imports in some cases -// @ts-ignore -import { FullRegeneration } from './full-regeneration'; -// May contain unused imports in some cases -// @ts-ignore -import { OrganizationRegeneration } from './organization-regeneration'; -// May contain unused imports in some cases -// @ts-ignore -import { ProjectRegeneration } from './project-regeneration'; - -/** - * @type Payload - * @export - */ -export type Payload = - | ({ scope: 'environment' } & EnvironmentRegeneration) - | ({ scope: 'full' } & FullRegeneration) - | ({ scope: 'organization' } & OrganizationRegeneration) - | ({ scope: 'project' } & ProjectRegeneration); diff --git a/src/openapi/types/pdp-config-obj.ts b/src/openapi/types/pdp-config-obj.ts index c61d6359..ed7a4940 100644 --- a/src/openapi/types/pdp-config-obj.ts +++ b/src/openapi/types/pdp-config-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,7 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface PdpConfigObj - */ export interface PdpConfigObj { - /** - * - * @type {string} - * @memberof PdpConfigObj - */ id: string; - /** - * - * @type {string} - * @memberof PdpConfigObj - */ name: string; } diff --git a/src/openapi/types/pdp-config-object.ts b/src/openapi/types/pdp-config-object.ts index 782fa6e3..6d54c809 100644 --- a/src/openapi/types/pdp-config-object.ts +++ b/src/openapi/types/pdp-config-object.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,6 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { PdpConfigObj } from './pdp-config-obj'; +import type { PdpConfigObj } from './pdp-config-obj'; -/** - * - * @export - * @interface PdpConfigObject - */ -export interface PdpConfigObject { - /** - * - * @type {string} - * @memberof PdpConfigObject - */ - id: string; - /** - * - * @type {string} - * @memberof PdpConfigObject - */ - name: string; -} +export type PdpConfigObject = PdpConfigObj | object; diff --git a/src/openapi/types/pdp-values.ts b/src/openapi/types/pdp-values.ts index 3300b160..181abbb9 100644 --- a/src/openapi/types/pdp-values.ts +++ b/src/openapi/types/pdp-values.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,14 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface PdpValues - */ export interface PdpValues { - /** - * - * @type {string} - * @memberof PdpValues - */ BACKEND_SERVICE_URL: string; - /** - * - * @type {string} - * @memberof PdpValues - */ + OPA_DECISION_LOG_ENABLED: boolean; OPA_DECISION_LOG_INGRESS_ROUTE: string; - /** - * - * @type {string} - * @memberof PdpValues - */ OPA_DECISION_LOG_INGRESS_BACKEND_TIER_URL: string; + CONTROL_PLANE_RELAY_JWT_TIER: string; + CONTROL_PLANE_RELAY_API: string; + CONTROL_PLANE_PDP_DELTAS_API: string; + FACTDB_ENABLED?: boolean; + FACTDB_BACKUP_SERVER_URL: string; } diff --git a/src/openapi/types/pdpconfig-read.ts b/src/openapi/types/pdpconfig-read.ts index e2611fd6..09f8c752 100644 --- a/src/openapi/types/pdpconfig-read.ts +++ b/src/openapi/types/pdpconfig-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,30 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface PDPConfigRead - */ export interface PDPConfigRead { - /** - * - * @type {string} - * @memberof PDPConfigRead - */ id: string; - /** - * - * @type {string} - * @memberof PDPConfigRead - */ name?: string; /** * Unique id of the organization that the pdp_config belongs to. - * @type {string} - * @memberof PDPConfigRead */ organization_id: string; /** * Unique id of the project that the pdp_config belongs to. - * @type {string} - * @memberof PDPConfigRead */ project_id: string; /** * Unique id of the environment that the pdp_config belongs to. - * @type {string} - * @memberof PDPConfigRead */ environment_id: string; + client_secret: string; + opal_server_access_token?: string; + num_shards?: number; /** - * - * @type {string} - * @memberof PDPConfigRead + * Whether debug audit logs are enabled or not */ - client_secret: string; + debug_audit_logs?: boolean; + /** + * The minimum image version of PDP that can connect to this config + */ + min_pdp_version?: string; } diff --git a/src/openapi/types/pdpcontext.ts b/src/openapi/types/pdpcontext.ts index f9802774..c4260767 100644 --- a/src/openapi/types/pdpcontext.ts +++ b/src/openapi/types/pdpcontext.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,12 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface PDPContext - */ export interface PDPContext { - /** - * - * @type {string} - * @memberof PDPContext - */ customer_id: string; - /** - * - * @type {string} - * @memberof PDPContext - */ client_id: string; - /** - * - * @type {string} - * @memberof PDPContext - */ backend_tier: string; - /** - * - * @type {string} - * @memberof PDPContext - */ component?: string; + org_id: string; + project_id: string; + env_id: string; } diff --git a/src/openapi/types/pdpdata-refresh-request.ts b/src/openapi/types/pdpdata-refresh-request.ts new file mode 100644 index 00000000..89b63ada --- /dev/null +++ b/src/openapi/types/pdpdata-refresh-request.ts @@ -0,0 +1,22 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PDPDataRefreshRequest { + /** + * Optional human-readable reason for the refresh, propagated to the OPAL DataUpdate and visible in PDP/OPAL logs. + */ + reason?: string; + /** + * For sharded PDPs, target only this shard. When omitted, the refresh targets the PDP\'s main topic (all shards). + */ + shard_id?: number; +} diff --git a/src/openapi/types/pdpdata-refresh-response.ts b/src/openapi/types/pdpdata-refresh-response.ts new file mode 100644 index 00000000..847a440e --- /dev/null +++ b/src/openapi/types/pdpdata-refresh-response.ts @@ -0,0 +1,22 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PDPDataRefreshResponse { + /** + * The id of the generated OPAL DataUpdate. It is injected as the X-Permit-Update-Id header and surfaced in PDP/OPAL logs for correlation. Because the refresh is a full-data reload (dst_path=\"\"), the PDP confirms it by advancing PDPInstance.current_data_date once the new bundle is fetched and saved (most_recent_data_fetch_id is only set for scoped/delta updates). + */ + update_id: string; + /** + * The ids of the PDP configurations that were targeted by this refresh. + */ + pdp_ids: Array; +} diff --git a/src/openapi/types/pdpinfo.ts b/src/openapi/types/pdpinfo.ts deleted file mode 100644 index cb72f3e9..00000000 --- a/src/openapi/types/pdpinfo.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface PDPInfo - */ -export interface PDPInfo { - /** - * - * @type {string} - * @memberof PDPInfo - */ - version?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - os_name?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - os_release?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - os_version?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - os_platform?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - os_machine?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - python_version?: string; - /** - * - * @type {string} - * @memberof PDPInfo - */ - python_implementation?: string; -} diff --git a/src/openapi/types/pdpopainfo.ts b/src/openapi/types/pdpopainfo.ts deleted file mode 100644 index ba8b3d35..00000000 --- a/src/openapi/types/pdpopainfo.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface PDPOPAInfo - */ -export interface PDPOPAInfo { - /** - * - * @type {string} - * @memberof PDPOPAInfo - */ - version?: string; - /** - * - * @type {string} - * @memberof PDPOPAInfo - */ - go_version?: string; - /** - * - * @type {string} - * @memberof PDPOPAInfo - */ - platform?: string; - /** - * - * @type {boolean} - * @memberof PDPOPAInfo - */ - have_webassembly?: boolean; -} diff --git a/src/openapi/types/pdpshard-migration.ts b/src/openapi/types/pdpshard-migration.ts new file mode 100644 index 00000000..a1be1ed1 --- /dev/null +++ b/src/openapi/types/pdpshard-migration.ts @@ -0,0 +1,15 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PDPShardMigration { + num_shards: number; +} diff --git a/src/openapi/types/pdpstate.ts b/src/openapi/types/pdpstate.ts deleted file mode 100644 index feaec606..00000000 --- a/src/openapi/types/pdpstate.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { PDPInfo } from './pdpinfo'; -// May contain unused imports in some cases -// @ts-ignore -import { PDPOPAInfo } from './pdpopainfo'; - -/** - * - * @export - * @interface PDPState - */ -export interface PDPState { - /** - * - * @type {number} - * @memberof PDPState - */ - api_version: number; - /** - * - * @type {PDPInfo} - * @memberof PDPState - */ - pdp?: PDPInfo; - /** - * - * @type {PDPOPAInfo} - * @memberof PDPState - */ - opa?: PDPOPAInfo; - /** - * - * @type {string} - * @memberof PDPState - */ - current_policy_hash?: string; - /** - * - * @type {number} - * @memberof PDPState - */ - most_recent_data?: number; - /** - * - * @type {Array} - * @memberof PDPState - */ - seen_sdks?: Array; -} diff --git a/src/openapi/types/permission-level-role-read.ts b/src/openapi/types/permission-level-role-read.ts index b9caea88..410563d5 100644 --- a/src/openapi/types/permission-level-role-read.ts +++ b/src/openapi/types/permission-level-role-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,18 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface PermissionLevelRoleRead - */ export interface PermissionLevelRoleRead { /** - * Unique id of the elements_env - * @type {string} - * @memberof PermissionLevelRoleRead + * Unique id of the elements_config */ id: string; /** - * A URL-friendly name of the elements_env (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_env. - * @type {string} - * @memberof PermissionLevelRoleRead + * A URL-friendly name of the elements_config (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the elements_config. */ key: string; + name: string; /** - * - * @type {string} - * @memberof PermissionLevelRoleRead + * Unique id of the resource */ - name: string; + resource_id: string; } diff --git a/src/openapi/types/permission.ts b/src/openapi/types/permission.ts index 93b3cdf5..6fdc5742 100644 --- a/src/openapi/types/permission.ts +++ b/src/openapi/types/permission.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,82 +11,20 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; +import type { MemberAccessLevel } from './member-access-level'; // May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; +import type { MemberAccessObj } from './member-access-obj'; -/** - * - * @export - * @interface Permission - */ export interface Permission { - /** - * - * @type {string} - * @memberof Permission - */ organization_id: string; - /** - * - * @type {string} - * @memberof Permission - */ project_id?: string; - /** - * - * @type {string} - * @memberof Permission - */ environment_id?: string; - /** - * - * @type {MemberAccessObj} - * @memberof Permission - */ object_type: MemberAccessObj; - /** - * - * @type {MemberAccessLevel} - * @memberof Permission - */ access_level: MemberAccessLevel; - /** - * - * @type {string} - * @memberof Permission - */ organization_key?: string; - /** - * - * @type {string} - * @memberof Permission - */ project_key?: string; - /** - * - * @type {string} - * @memberof Permission - */ environment_key?: string; - /** - * - * @type {string} - * @memberof Permission - */ organization_name?: string; - /** - * - * @type {string} - * @memberof Permission - */ project_name?: string; - /** - * - * @type {string} - * @memberof Permission - */ environment_name?: string; } diff --git a/src/openapi/types/permit-backend-opal-api-data-data-source-config.ts b/src/openapi/types/permit-backend-opal-api-data-data-source-config.ts deleted file mode 100644 index 67bf58f9..00000000 --- a/src/openapi/types/permit-backend-opal-api-data-data-source-config.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DataSourceEntry } from './data-source-entry'; - -/** - * Static list of Data Source Entries returned to client. Answers this question for the client: from where should i get the full picture of data i need? (as opposed to incremental data updates) - * @export - * @interface PermitBackendOpalApiDataDataSourceConfig - */ -export interface PermitBackendOpalApiDataDataSourceConfig { - /** - * list of data sources and how to fetch from them - * @type {Array} - * @memberof PermitBackendOpalApiDataDataSourceConfig - */ - entries: Array; -} diff --git a/src/openapi/types/permit-backend-schemas-schema-derived-role-derived-role-settings.ts b/src/openapi/types/permit-backend-schemas-schema-derived-role-derived-role-settings.ts deleted file mode 100644 index 23c57f2c..00000000 --- a/src/openapi/types/permit-backend-schemas-schema-derived-role-derived-role-settings.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Settings for a derived role - * @export - * @interface PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings - */ -export interface PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings { - /** - * If true, the derived role will not take action if the resource has any direct role - * @type {boolean} - * @memberof PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings - */ - no_direct_roles_on_object?: boolean; -} diff --git a/src/openapi/types/permit-backend-schemas-schema-derived-role-rule-derivation-settings.ts b/src/openapi/types/permit-backend-schemas-schema-derived-role-rule-derivation-settings.ts new file mode 100644 index 00000000..b2d463a9 --- /dev/null +++ b/src/openapi/types/permit-backend-schemas-schema-derived-role-rule-derivation-settings.ts @@ -0,0 +1,21 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Settings for a derived role or a derived role rule + */ +export interface PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings { + /** + * If true, the derived role or the specific rule will not apply if the resource has any direct role + */ + no_direct_roles_on_object?: boolean; +} diff --git a/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role-rule.ts b/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role-rule.ts new file mode 100644 index 00000000..e0de2eee --- /dev/null +++ b/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role-rule.ts @@ -0,0 +1,36 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataDerivationSettings } from './data-generator-lib-schemas-schema-opal-data-derivation-settings'; + +/** + * This is the data of a specific derived role rule in the system + */ +export interface PermitBackendSchemasSchemaOpalDataDerivedRoleRule { + /** + * The relation between the resource and the related resource. + */ + relation: string; + /** + * The related resource type key. + */ + related_resource: string; + /** + * The related role key. + */ + related_role: string; + /** + * Settings for the derived role rule. + */ + settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings; +} diff --git a/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role.ts b/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role.ts new file mode 100644 index 00000000..f869d62a --- /dev/null +++ b/src/openapi/types/permit-backend-schemas-schema-opal-data-derived-role.ts @@ -0,0 +1,31 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataDerivationSettings } from './data-generator-lib-schemas-schema-opal-data-derivation-settings'; +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaOpalDataDerivedRoleRule } from './permit-backend-schemas-schema-opal-data-derived-role-rule'; + +/** + * This is the data of a specific derived role in the system + */ +export interface PermitBackendSchemasSchemaOpalDataDerivedRole { + conditions?: string; + /** + * Settings for the derived role. + */ + settings: DataGeneratorLibSchemasSchemaOpalDataDerivationSettings; + /** + * List of rules for the derived role. + */ + rules: Array; +} diff --git a/src/openapi/types/permit-backend-schemas-schema-opal-data-full-data.ts b/src/openapi/types/permit-backend-schemas-schema-opal-data-full-data.ts new file mode 100644 index 00000000..488e18a6 --- /dev/null +++ b/src/openapi/types/permit-backend-schemas-schema-opal-data-full-data.ts @@ -0,0 +1,88 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataConditionSetData } from './data-generator-lib-schemas-schema-opal-data-condition-set-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData } from './data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataRoleData } from './data-generator-lib-schemas-schema-opal-data-role-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataTenantData } from './data-generator-lib-schemas-schema-opal-data-tenant-data'; +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataUserData } from './data-generator-lib-schemas-schema-opal-data-user-data'; +// May contain unused imports in some cases +import type { LocationInner } from './location-inner'; +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaOpalDataResourceTypeData } from './permit-backend-schemas-schema-opal-data-resource-type-data'; + +/** + * This is the data structure that is used by the PDP in a manged Permit environment. The code Permit generates uses this data structure to enforce the policy and make decisions. + */ +export interface PermitBackendSchemasSchemaOpalDataFullData { + use_debugger?: boolean; + /** + * Key-Value mapping of the users in the system. The key is the user key and the value contains some details about the user. + */ + users: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataUserData }; + /** + * Key-Value mapping of the tenants in the system. The key is the tenant key and the value contains some details about the tenant. + */ + tenants: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataTenantData }; + /** + * Key-Value mapping of the roles in the system. The key is the role key and the value contains some details about the role. + * @deprecated + */ + roles: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData }; + /** + * Key-Value mapping of the permissions for each condition set. The key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set + */ + condition_set_rules: { [key: string]: { [key: string]: { [key: string]: Array } } }; + /** + * Sanitized Key-Value mapping of the permissions for each condition set. (Equal to condition_set_rules but user_set_key and resource_set_key are sanitized)The key is the user-set key and the value is Key-Value mapping of resource-set key to the permissions for that user-set & resource-set.The key is the resource key and the value is list of actions that the user-set can perform on that resource-set + */ + condition_set_rules_expand?: { + [key: string]: { [key: string]: { [key: string]: Array } }; + }; + /** + * Key-Value mapping of the relationships between resources. The key is the resource instance key and the value is Key-Value mapping of relation key to a Key-Value mapping of resource ( type ) to list of instances keys. + */ + relationships: { [key: string]: { [key: string]: { [key: string]: Array } } }; + /** + * Key-Value mapping of the resource types in the system. The key is the resource type key and the value contains some details about the resource type. + */ + resource_types: { [key: string]: PermitBackendSchemasSchemaOpalDataResourceTypeData }; + /** + * Key-Value mapping of the condition sets in the system. The key is the formatted condition set key and the value contains some details about the condition set. + */ + condition_sets: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataConditionSetData }; + /** + * Key-Value mapping of the role assignments for the users. The key is the user key and the value is Key-Value mapping of resource instance key or tenant key to list of role keys assigned to the user in that resource instance. + */ + role_assignments: { [key: string]: { [key: string]: Array } }; + /** + * Key-Value mapping of the permissions for each role. The key is the resource key and the value is Key-Value mapping of role key to details on the role permissions. + */ + role_permissions: { + [key: string]: { [key: string]: DataGeneratorLibSchemasSchemaOpalDataRoleData }; + }; + /** + * Key-Value mapping of groups of mapping rules in the system. The key is the mapping rule group and the value is a list of mapping rules objects.We currently have only one group named \'all\' which contains all the mapping rules.A mapping rule object contains, action, http_method, resource and url - all strings. + */ + mapping_rules?: { [key: string]: Array<{ [key: string]: LocationInner }> }; + /** + * Key-Value mapping of the resource instances in the system. The key is the resource instance key and the value contains some details about the resource instance. + */ + resource_instances?: { + [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData; + }; +} diff --git a/src/openapi/types/permit-backend-schemas-schema-opal-data-resource-type-data.ts b/src/openapi/types/permit-backend-schemas-schema-opal-data-resource-type-data.ts new file mode 100644 index 00000000..4f09dba9 --- /dev/null +++ b/src/openapi/types/permit-backend-schemas-schema-opal-data-resource-type-data.ts @@ -0,0 +1,28 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaOpalDataDerivedRole } from './permit-backend-schemas-schema-opal-data-derived-role'; + +/** + * This is the data of a specific resource type in the system + */ +export interface PermitBackendSchemasSchemaOpalDataResourceTypeData { + /** + * List of actions that can be performed on the resource. + */ + actions: Array; + /** + * Key-Value mapping of the derived roles for the resource type. The key is the derived role key and the value is the details and conditions for the role derivation. + */ + derived_roles: { [key: string]: PermitBackendSchemasSchemaOpalDataDerivedRole }; +} diff --git a/src/openapi/types/policy-guard-rule-create.ts b/src/openapi/types/policy-guard-rule-create.ts new file mode 100644 index 00000000..ef2bcc8e --- /dev/null +++ b/src/openapi/types/policy-guard-rule-create.ts @@ -0,0 +1,41 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ConditionSet } from './condition-set'; + +export interface PolicyGuardRuleCreate { + /** + * If True, the permission will be allowed for the role in the policy guard across all projectswithin the policy scope, and the permission will be locked from further editing. + */ + is_allowed: boolean; + /** + * The key of the resource. + */ + resource_key: string; + /** + * The key of the role. + */ + role_key?: string; + /** + * The key of the action. + */ + action_key: string; + /** + * The resource set that the permission will be applied to. + */ + resource_set?: ConditionSet; + /** + * The user set that the permission will be applied to. + */ + user_set?: ConditionSet; +} diff --git a/src/openapi/types/policy-guard-rule-item.ts b/src/openapi/types/policy-guard-rule-item.ts new file mode 100644 index 00000000..a96bec68 --- /dev/null +++ b/src/openapi/types/policy-guard-rule-item.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ConditionSet } from './condition-set'; + +export interface PolicyGuardRuleItem { + /** + * The key of the resource. + */ + resource_key: string; + /** + * The key of the role. + */ + role_key?: string; + /** + * The key of the action. + */ + action_key: string; + /** + * The resource set that the permission will be applied to. + */ + resource_set?: ConditionSet; + /** + * The user set that the permission will be applied to. + */ + user_set?: ConditionSet; +} diff --git a/src/openapi/types/policy-guard-rule-read.ts b/src/openapi/types/policy-guard-rule-read.ts new file mode 100644 index 00000000..dc16f0bc --- /dev/null +++ b/src/openapi/types/policy-guard-rule-read.ts @@ -0,0 +1,53 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ConditionSet } from './condition-set'; + +export interface PolicyGuardRuleRead { + /** + * If True, the permission will be allowed for the role in the policy guard across all projectswithin the policy scope, and the permission will be locked from further editing. + */ + is_allowed: boolean; + /** + * The key of the resource. + */ + resource_key: string; + /** + * The key of the role. + */ + role_key?: string; + /** + * The key of the action. + */ + action_key: string; + /** + * The resource set that the permission will be applied to. + */ + resource_set?: ConditionSet; + /** + * The user set that the permission will be applied to. + */ + user_set?: ConditionSet; + /** + * The unique identifier of the policy guard. + */ + scope_id: string; + /** + * Unique id of the organization that the ScopeConfig belongs to. + */ + organization_id: string; + /** + * Unique id of the ScopeConfig + */ + id: string; +} diff --git a/src/openapi/types/policy-guard-scope-associate.ts b/src/openapi/types/policy-guard-scope-associate.ts new file mode 100644 index 00000000..8f4d942a --- /dev/null +++ b/src/openapi/types/policy-guard-scope-associate.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PolicyGuardScopeAssociate { + /** + * The unique identifier of the project of this policy scope. + */ + project_id: string; +} diff --git a/src/openapi/types/policy-guard-scope-create.ts b/src/openapi/types/policy-guard-scope-create.ts new file mode 100644 index 00000000..30cd2855 --- /dev/null +++ b/src/openapi/types/policy-guard-scope-create.ts @@ -0,0 +1,25 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PolicyGuardScopeDetailCreate } from './policy-guard-scope-detail-create'; + +export interface PolicyGuardScopeCreate { + /** + * list of projects that this policy guard is assigned to. + */ + policy_guard_scope_details?: Array; + /** + * The unique key of the policy guard scope. + */ + key: string; +} diff --git a/src/openapi/types/policy-guard-scope-detail-create.ts b/src/openapi/types/policy-guard-scope-detail-create.ts new file mode 100644 index 00000000..0f31e782 --- /dev/null +++ b/src/openapi/types/policy-guard-scope-detail-create.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PolicyGuardScopeDetailCreate { + /** + * The unique identifier of the project of this policy scope. + */ + project_id: string; +} diff --git a/src/openapi/types/policy-guard-scope-detail.ts b/src/openapi/types/policy-guard-scope-detail.ts new file mode 100644 index 00000000..3744eca2 --- /dev/null +++ b/src/openapi/types/policy-guard-scope-detail.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PolicyGuardScopeDetail { + /** + * Unique id of the project that the ScopeConfig belongs to. + */ + project_id: string; +} diff --git a/src/openapi/types/policy-guard-scope-read.ts b/src/openapi/types/policy-guard-scope-read.ts new file mode 100644 index 00000000..8a444f1a --- /dev/null +++ b/src/openapi/types/policy-guard-scope-read.ts @@ -0,0 +1,33 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PolicyGuardScopeDetail } from './policy-guard-scope-detail'; + +export interface PolicyGuardScopeRead { + /** + * The unique key of the policy guard scope. + */ + key: string; + /** + * Unique id of the ScopeConfig + */ + id: string; + /** + * Unique id of the organization that the ScopeConfig belongs to. + */ + organization_id: string; + /** + * list of projects that this policy guard is assigned to. + */ + policy_guard_scope_details?: Array; +} diff --git a/src/openapi/types/policy-repo-create.ts b/src/openapi/types/policy-repo-create.ts index f06375d5..9faa7856 100644 --- a/src/openapi/types/policy-repo-create.ts +++ b/src/openapi/types/policy-repo-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,21 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { SSHAuthData } from './sshauth-data'; +import type { SSHAuthData } from './sshauth-data'; -/** - * - * @export - * @interface PolicyRepoCreate - */ export interface PolicyRepoCreate { /** * A URL-friendly name of the policy repo (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the policy repo. - * @type {string} - * @memberof PolicyRepoCreate */ key: string; /** - * - * @type {string} - * @memberof PolicyRepoCreate + * The SSH URL of the git repository (e.g. git@github.com:username/repository.git) */ url: string; - /** - * - * @type {string} - * @memberof PolicyRepoCreate - */ main_branch_name?: string; - /** - * - * @type {SSHAuthData} - * @memberof PolicyRepoCreate - */ credentials: SSHAuthData; /** * if you want to change your policy repository to this repo right after it is validated - * @type {boolean} - * @memberof PolicyRepoCreate */ activate_when_validated?: boolean; } diff --git a/src/openapi/types/policy-repo-read.ts b/src/openapi/types/policy-repo-read.ts index e5d1729d..cabbfcd7 100644 --- a/src/openapi/types/policy-repo-read.ts +++ b/src/openapi/types/policy-repo-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,58 +11,28 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { PolicyRepoStatus } from './policy-repo-status'; +import type { PolicyRepoStatus } from './policy-repo-status'; // May contain unused imports in some cases -// @ts-ignore -import { SSHAuthData } from './sshauth-data'; +import type { SSHAuthDataRead } from './sshauth-data-read'; -/** - * - * @export - * @interface PolicyRepoRead - */ export interface PolicyRepoRead { /** * Unique id of the policy repo - * @type {string} - * @memberof PolicyRepoRead */ id: string; - /** - * - * @type {PolicyRepoStatus} - * @memberof PolicyRepoRead - */ status: PolicyRepoStatus; /** * A URL-friendly name of the policy repo (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the policy repo. - * @type {string} - * @memberof PolicyRepoRead */ key: string; /** - * - * @type {string} - * @memberof PolicyRepoRead + * The SSH URL of the git repository (e.g. git@github.com:username/repository.git) */ url: string; - /** - * - * @type {string} - * @memberof PolicyRepoRead - */ main_branch_name?: string; - /** - * - * @type {SSHAuthData} - * @memberof PolicyRepoRead - */ - credentials: SSHAuthData; + credentials: SSHAuthDataRead; /** * if you want to change your policy repository to this repo right after it is validated - * @type {boolean} - * @memberof PolicyRepoRead */ activate_when_validated?: boolean; } diff --git a/src/openapi/types/policy-repo-status.ts b/src/openapi/types/policy-repo-status.ts index d78acdaa..a18fb43d 100644 --- a/src/openapi/types/policy-repo-status.ts +++ b/src/openapi/types/policy-repo-status.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const PolicyRepoStatus = { diff --git a/src/openapi/types/policy-synchronizer-regeneration.ts b/src/openapi/types/policy-synchronizer-regeneration.ts deleted file mode 100644 index 24168792..00000000 --- a/src/openapi/types/policy-synchronizer-regeneration.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { Payload } from './payload'; - -/** - * - * @export - * @interface PolicySynchronizerRegeneration - */ -export interface PolicySynchronizerRegeneration { - /** - * - * @type {Payload} - * @memberof PolicySynchronizerRegeneration - */ - payload: Payload; - /** - * - * @type {string} - * @memberof PolicySynchronizerRegeneration - */ - reason: string; -} diff --git a/src/openapi/types/programming-language.ts b/src/openapi/types/programming-language.ts deleted file mode 100644 index 01049ae2..00000000 --- a/src/openapi/types/programming-language.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * An enumeration. - * @export - * @enum {string} - */ - -export const ProgrammingLanguage = { - Javascript: 'javascript', - Python: 'python', - Dotnet: 'dotnet', - Golang: 'golang', - Ruby: 'ruby', - Java: 'java', - KongGateway: 'kong_gateway', -} as const; - -export type ProgrammingLanguage = (typeof ProgrammingLanguage)[keyof typeof ProgrammingLanguage]; diff --git a/src/openapi/types/project-create.ts b/src/openapi/types/project-create.ts index 98c59ea7..3c19fa78 100644 --- a/src/openapi/types/project-create.ts +++ b/src/openapi/types/project-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,36 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ProjectCreate - */ +// May contain unused imports in some cases +import type { EnvironmentCreate } from './environment-create'; + export interface ProjectCreate { /** * A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project. - * @type {string} - * @memberof ProjectCreate */ key: string; /** * Optional namespace for URNs. If empty, URNs will be generated from project key. - * @type {string} - * @memberof ProjectCreate */ urn_namespace?: string; /** * The name of the project - * @type {string} - * @memberof ProjectCreate */ name: string; /** * a longer description outlining the project objectives - * @type {string} - * @memberof ProjectCreate */ description?: string; /** * the settings for this project - * @type {object} - * @memberof ProjectCreate */ settings?: object; /** * the id of the policy repo to use for this project - * @type {string} - * @memberof ProjectCreate */ active_policy_repo_id?: string; + /** + * The initial environments to create for this project. By default, \'Development\' and \'Production\' are created, specify [] (empty list) to skip that. + */ + initial_environments?: Array; } diff --git a/src/openapi/types/project-obj.ts b/src/openapi/types/project-obj.ts index 7f6ee883..63c34b67 100644 --- a/src/openapi/types/project-obj.ts +++ b/src/openapi/types/project-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,10 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ProjectObj - */ export interface ProjectObj { - /** - * - * @type {string} - * @memberof ProjectObj - */ id: string; - /** - * - * @type {string} - * @memberof ProjectObj - */ key: string; - /** - * - * @type {string} - * @memberof ProjectObj - */ - name?: string; - /** - * - * @type {string} - * @memberof ProjectObj - */ + name?: string | null; created_at: string; - /** - * - * @type {string} - * @memberof ProjectObj - */ updated_at: string; } diff --git a/src/openapi/types/project-object.ts b/src/openapi/types/project-object.ts index dadde2cc..d3c29549 100644 --- a/src/openapi/types/project-object.ts +++ b/src/openapi/types/project-object.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,6 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ProjectObj } from './project-obj'; +import type { ProjectObj } from './project-obj'; -/** - * - * @export - * @interface ProjectObject - */ -export interface ProjectObject { - /** - * - * @type {string} - * @memberof ProjectObject - */ - id: string; - /** - * - * @type {string} - * @memberof ProjectObject - */ - key: string; - /** - * - * @type {string} - * @memberof ProjectObject - */ - name?: string; - /** - * - * @type {string} - * @memberof ProjectObject - */ - created_at: string; - /** - * - * @type {string} - * @memberof ProjectObject - */ - updated_at: string; -} +export type ProjectObject = ProjectObj | object; diff --git a/src/openapi/types/project-read.ts b/src/openapi/types/project-read.ts index 2e4f371e..a55570ce 100644 --- a/src/openapi/types/project-read.ts +++ b/src/openapi/types/project-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,70 +10,45 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ProjectRead - */ export interface ProjectRead { /** * A URL-friendly name of the project (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the project. - * @type {string} - * @memberof ProjectRead */ key: string; /** * Optional namespace for URNs. If empty, URNs will be generated from project key. - * @type {string} - * @memberof ProjectRead */ urn_namespace?: string; /** * Unique id of the project - * @type {string} - * @memberof ProjectRead */ id: string; /** * Unique id of the organization that the project belongs to. - * @type {string} - * @memberof ProjectRead */ organization_id: string; /** * Date and time when the project was created (ISO_8601 format). - * @type {string} - * @memberof ProjectRead */ created_at: string; /** * Date and time when the project was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ProjectRead */ updated_at: string; /** * The name of the project - * @type {string} - * @memberof ProjectRead */ name: string; /** * a longer description outlining the project objectives - * @type {string} - * @memberof ProjectRead */ description?: string; /** * the settings for this project - * @type {object} - * @memberof ProjectRead */ settings?: object; /** * the id of the policy repo to use for this project - * @type {string} - * @memberof ProjectRead */ active_policy_repo_id?: string; } diff --git a/src/openapi/types/project-regeneration.ts b/src/openapi/types/project-regeneration.ts deleted file mode 100644 index 3f698e11..00000000 --- a/src/openapi/types/project-regeneration.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface ProjectRegeneration - */ -export interface ProjectRegeneration { - /** - * - * @type {string} - * @memberof ProjectRegeneration - */ - scope: ProjectRegenerationScopeEnum; - /** - * - * @type {string} - * @memberof ProjectRegeneration - */ - org_id: string; - /** - * - * @type {string} - * @memberof ProjectRegeneration - */ - proj_id: string; -} - -export const ProjectRegenerationScopeEnum = { - Project: 'project', -} as const; - -export type ProjectRegenerationScopeEnum = - (typeof ProjectRegenerationScopeEnum)[keyof typeof ProjectRegenerationScopeEnum]; diff --git a/src/openapi/types/project-update.ts b/src/openapi/types/project-update.ts index e1bdb278..9b0d643b 100644 --- a/src/openapi/types/project-update.ts +++ b/src/openapi/types/project-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ProjectUpdate - */ export interface ProjectUpdate { /** * The name of the project - * @type {string} - * @memberof ProjectUpdate */ name?: string; /** * a longer description outlining the project objectives - * @type {string} - * @memberof ProjectUpdate */ description?: string; /** * the settings for this project - * @type {object} - * @memberof ProjectUpdate */ settings?: object; /** * the id of the policy repo to use for this project - * @type {string} - * @memberof ProjectUpdate */ active_policy_repo_id?: string; } diff --git a/src/openapi/types/proxy-config-create.ts b/src/openapi/types/proxy-config-create.ts index 68652a6e..59b1d7f3 100644 --- a/src/openapi/types/proxy-config-create.ts +++ b/src/openapi/types/proxy-config-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,28 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AuthMechanism } from './auth-mechanism'; +import type { AuthMechanism } from './auth-mechanism'; // May contain unused imports in some cases -// @ts-ignore -import { MappingRule } from './mapping-rule'; +import type { MappingRule } from './mapping-rule'; // May contain unused imports in some cases -// @ts-ignore -import { Secret } from './secret'; +import type { Secret } from './secret'; -/** - * - * @export - * @interface ProxyConfigCreate - */ export interface ProxyConfigCreate { - /** - * - * @type {Secret} - * @memberof ProxyConfigCreate - */ secret: Secret; /** * Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ. - * @type {string} - * @memberof ProxyConfigCreate */ key: string; /** * The name of the proxy config, for example: \'Stripe API\' - * @type {string} - * @memberof ProxyConfigCreate */ name: string; /** * Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method. - * @type {Array} - * @memberof ProxyConfigCreate */ mapping_rules?: Array; /** * Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request. Bearer injects the secret into the Authorization header as a Bearer token, Basic injects the secret into the Authorization header as a Basic user:password, Headers injects plain headers into the request. - * @type {AuthMechanism} - * @memberof ProxyConfigCreate */ auth_mechanism?: AuthMechanism; } diff --git a/src/openapi/types/proxy-config-read.ts b/src/openapi/types/proxy-config-read.ts index 9c1b1f21..116eb73f 100644 --- a/src/openapi/types/proxy-config-read.ts +++ b/src/openapi/types/proxy-config-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,85 +11,52 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AuthMechanism } from './auth-mechanism'; +import type { AuthMechanism } from './auth-mechanism'; // May contain unused imports in some cases -// @ts-ignore -import { MappingRule } from './mapping-rule'; +import type { MappingRule } from './mapping-rule'; // May contain unused imports in some cases -// @ts-ignore -import { Secret } from './secret'; +import type { Secret } from './secret'; -/** - * - * @export - * @interface ProxyConfigRead - */ export interface ProxyConfigRead { /** * Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ. - * @type {string} - * @memberof ProxyConfigRead */ key: string; /** * Unique id of the proxy config - * @type {string} - * @memberof ProxyConfigRead */ id: string; /** * Unique id of the organization that the proxy config belongs to. - * @type {string} - * @memberof ProxyConfigRead */ organization_id: string; /** * Unique id of the project that the proxy config belongs to. - * @type {string} - * @memberof ProxyConfigRead */ project_id: string; /** * Unique id of the environment that the proxy config belongs to. - * @type {string} - * @memberof ProxyConfigRead */ environment_id: string; /** * Date and time when the proxy config was created (ISO_8601 format). - * @type {string} - * @memberof ProxyConfigRead */ created_at: string; /** * Date and time when the proxy config was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ProxyConfigRead */ updated_at: string; - /** - * - * @type {Secret} - * @memberof ProxyConfigRead - */ secret: Secret; /** * The name of the proxy config, for example: \'Stripe API\' - * @type {string} - * @memberof ProxyConfigRead */ name: string; /** * Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method. - * @type {Array} - * @memberof ProxyConfigRead */ mapping_rules?: Array; /** * Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request. Bearer injects the secret into the Authorization header as a Bearer token, Basic injects the secret into the Authorization header as a Basic user:password, Headers injects plain headers into the request. - * @type {AuthMechanism} - * @memberof ProxyConfigRead */ auth_mechanism?: AuthMechanism; } diff --git a/src/openapi/types/proxy-config-update.ts b/src/openapi/types/proxy-config-update.ts index 96665799..190c07ba 100644 --- a/src/openapi/types/proxy-config-update.ts +++ b/src/openapi/types/proxy-config-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,24 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AuthMechanism } from './auth-mechanism'; +import type { AuthMechanism } from './auth-mechanism'; // May contain unused imports in some cases -// @ts-ignore -import { MappingRule } from './mapping-rule'; +import type { MappingRuleUpdate } from './mapping-rule-update'; // May contain unused imports in some cases -// @ts-ignore -import { Secret } from './secret'; +import type { Secret } from './secret'; -/** - * - * @export - * @interface ProxyConfigUpdate - */ export interface ProxyConfigUpdate { - /** - * - * @type {Secret} - * @memberof ProxyConfigUpdate - */ secret?: Secret; /** * The name of the proxy config, for example: \'Stripe API\' - * @type {string} - * @memberof ProxyConfigUpdate */ name?: string; /** - * Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method. - * @type {Array} - * @memberof ProxyConfigUpdate + * Proxy config mapping rules, with optional should_delete flag to indicate deletion. */ - mapping_rules?: Array; + mapping_rules?: Array; /** * Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request. Bearer injects the secret into the Authorization header as a Bearer token, Basic injects the secret into the Authorization header as a Basic user:password, Headers injects plain headers into the request. - * @type {AuthMechanism} - * @memberof ProxyConfigUpdate */ auth_mechanism?: AuthMechanism; } diff --git a/src/openapi/types/raw-data.ts b/src/openapi/types/raw-data.ts index 321c0977..c2e3dcd9 100644 --- a/src/openapi/types/raw-data.ts +++ b/src/openapi/types/raw-data.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,88 +11,19 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AVPEngineDecisionLog } from './avpengine-decision-log'; +import type { AVPEngineDecisionLog } from './avpengine-decision-log'; // May contain unused imports in some cases -// @ts-ignore -import { DummyEngineModel } from './dummy-engine-model'; +import type { DummyEngineModel } from './dummy-engine-model'; // May contain unused imports in some cases -// @ts-ignore -import { Engine } from './engine'; // May contain unused imports in some cases -// @ts-ignore -import { OPAEngineDecisionLog } from './opaengine-decision-log'; +import type { GenericEngineDecisionLog } from './generic-engine-decision-log'; +// May contain unused imports in some cases +import type { OPAEngineDecisionLog } from './opaengine-decision-log'; // May contain unused imports in some cases -// @ts-ignore -import { OPALabels } from './opalabels'; // May contain unused imports in some cases -// @ts-ignore -import { OPAMetrics } from './opametrics'; -/** - * - * @export - * @interface RawData - */ -export interface RawData { - /** - * - * @type {Engine} - * @memberof RawData - */ - engine?: Engine; - /** - * - * @type {string} - * @memberof RawData - */ - decision_id: string; - /** - * - * @type {OPALabels} - * @memberof RawData - */ - labels: OPALabels; - /** - * - * @type {string} - * @memberof RawData - */ - timestamp: string; - /** - * - * @type {string} - * @memberof RawData - */ - path: string; - /** - * - * @type {object} - * @memberof RawData - */ - input: object; - /** - * - * @type {object} - * @memberof RawData - */ - result: object; - /** - * - * @type {OPAMetrics} - * @memberof RawData - */ - metrics: OPAMetrics; - /** - * - * @type {string} - * @memberof RawData - */ - tenant: string; - /** - * - * @type {number} - * @memberof RawData - */ - process_time_ms?: number; -} +export type RawData = + | AVPEngineDecisionLog + | DummyEngineModel + | GenericEngineDecisionLog + | OPAEngineDecisionLog; diff --git a/src/openapi/types/raw-data1.ts b/src/openapi/types/raw-data1.ts new file mode 100644 index 00000000..8dc84784 --- /dev/null +++ b/src/openapi/types/raw-data1.ts @@ -0,0 +1,29 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { AVPEngineDecisionLog } from './avpengine-decision-log'; +// May contain unused imports in some cases +import type { DummyEngineModel } from './dummy-engine-model'; +// May contain unused imports in some cases +// May contain unused imports in some cases +import type { GenericEngineDecisionLog } from './generic-engine-decision-log'; +// May contain unused imports in some cases +import type { OPAEngineDecisionLog } from './opaengine-decision-log'; +// May contain unused imports in some cases +// May contain unused imports in some cases + +export type RawData1 = + | AVPEngineDecisionLog + | DummyEngineModel + | GenericEngineDecisionLog + | OPAEngineDecisionLog; diff --git a/src/openapi/types/relation-block-read.ts b/src/openapi/types/relation-block-read.ts index 772b72fb..d60c79f1 100644 --- a/src/openapi/types/relation-block-read.ts +++ b/src/openapi/types/relation-block-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationBlockRead - */ export interface RelationBlockRead { + /** + * An optional longer description of what this relation represents in your system + */ + description?: string; /** * Unique id of the relation - * @type {string} - * @memberof RelationBlockRead */ resource_id: string; + /** + * a more descriptive name for the relation + */ + relation_name?: string; /** * The resource key - * @type {string} - * @memberof RelationBlockRead */ resource: string; } diff --git a/src/openapi/types/relation-create.ts b/src/openapi/types/relation-create.ts index d5bf159a..5c39ca14 100644 --- a/src/openapi/types/relation-create.ts +++ b/src/openapi/types/relation-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationCreate - */ export interface RelationCreate { /** * A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation. - * @type {string} - * @memberof RelationCreate */ key: string; /** * The name of the relation - * @type {string} - * @memberof RelationCreate */ name: string; /** - * An optional longer description of what this relation respresents in your system - * @type {string} - * @memberof RelationCreate + * An optional longer description of what this relation represents in your system */ description?: string; /** * The subject resource ID or key - * @type {string} - * @memberof RelationCreate */ subject_resource: string; } diff --git a/src/openapi/types/relation-read.ts b/src/openapi/types/relation-read.ts index d5d2489e..35d6beb2 100644 --- a/src/openapi/types/relation-read.ts +++ b/src/openapi/types/relation-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,88 +10,57 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationRead - */ export interface RelationRead { /** - * An optional longer description of what this relation respresents in your system - * @type {string} - * @memberof RelationRead + * An optional longer description of what this relation represents in your system */ description?: string; /** * The subject resource ID or key - * @type {string} - * @memberof RelationRead */ subject_resource: string; /** * A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation. - * @type {string} - * @memberof RelationRead */ key: string; /** * The name of the relation - * @type {string} - * @memberof RelationRead */ name: string; /** * Unique id of the relation - * @type {string} - * @memberof RelationRead */ id: string; /** * Unique id of the organization that the relation belongs to. - * @type {string} - * @memberof RelationRead */ organization_id: string; /** * Unique id of the project that the relation belongs to. - * @type {string} - * @memberof RelationRead */ project_id: string; /** * Unique id of the environment that the relation belongs to. - * @type {string} - * @memberof RelationRead */ environment_id: string; /** * Date and time when the relation was created (ISO_8601 format). - * @type {string} - * @memberof RelationRead */ created_at: string; /** * Date and time when the relation was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof RelationRead */ updated_at: string; /** * The object resource id - * @type {string} - * @memberof RelationRead */ object_resource_id: string; /** * The object resource key - * @type {string} - * @memberof RelationRead */ object_resource: string; /** * The subject resource id - * @type {string} - * @memberof RelationRead */ subject_resource_id: string; } diff --git a/src/openapi/types/relationship-tuple-block-read.ts b/src/openapi/types/relationship-tuple-block-read.ts new file mode 100644 index 00000000..2171f59f --- /dev/null +++ b/src/openapi/types/relationship-tuple-block-read.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface RelationshipTupleBlockRead { + /** + * resource_key:resource_instance_key of the subject + */ + subject: string; + /** + * key of the assigned relation + */ + relation: string; + /** + * resource_key:resource_instance_key of the object + */ + object: string; +} diff --git a/src/openapi/types/relationship-tuple-create-bulk-operation.ts b/src/openapi/types/relationship-tuple-create-bulk-operation.ts index 0ffebd8f..58357466 100644 --- a/src/openapi/types/relationship-tuple-create-bulk-operation.ts +++ b/src/openapi/types/relationship-tuple-create-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationshipTupleCreateBulkOperation - */ +// May contain unused imports in some cases +import type { RelationshipTupleCreate } from './relationship-tuple-create'; + export interface RelationshipTupleCreateBulkOperation { - /** - * - * @type {any} - * @memberof RelationshipTupleCreateBulkOperation - */ - operations: any; + operations: Array; } diff --git a/src/openapi/types/relationship-tuple-create.ts b/src/openapi/types/relationship-tuple-create.ts index 5eaec7ce..d4fd5b6c 100644 --- a/src/openapi/types/relationship-tuple-create.ts +++ b/src/openapi/types/relationship-tuple-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationshipTupleCreate - */ export interface RelationshipTupleCreate { /** * the resource instance assigned the new relation (accepts either the resource instance id or resource_key:resource_instance_key) - * @type {string} - * @memberof RelationshipTupleCreate */ subject: string; /** * the relation to assign between the subject and object - * @type {string} - * @memberof RelationshipTupleCreate */ relation: string; /** * the resource instance on which the new relation is assigned (accepts either the resource instance id or resource_key:resource_instance_key) - * @type {string} - * @memberof RelationshipTupleCreate */ object: string; /** - * The tenant the subject and object belong to, if the resource instances don\'t exist yet, the tenant is required to create them. otherwise it is ignored - * @type {string} - * @memberof RelationshipTupleCreate + * The tenant the subject and object belong to. Required when neither resource instance exists yet - both are created in it. When exactly one exists, a tenant that disagrees with that instance\'s tenant is rejected; when both exist it is ignored, since each instance\'s tenant is taken from storage. Either way both instances must end up in the same tenant or the request is rejected. Accepts a tenant key, or a tenant id except on the bulk endpoint when neither instance exists yet (there a key is required). */ tenant?: string; } diff --git a/src/openapi/types/relationship-tuple-delete-bulk-operation.ts b/src/openapi/types/relationship-tuple-delete-bulk-operation.ts index 8edd2ca4..a8823278 100644 --- a/src/openapi/types/relationship-tuple-delete-bulk-operation.ts +++ b/src/openapi/types/relationship-tuple-delete-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,12 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationshipTupleDeleteBulkOperation - */ +// May contain unused imports in some cases +import type { RelationshipTupleDelete } from './relationship-tuple-delete'; + export interface RelationshipTupleDeleteBulkOperation { /** - * - * @type {any} - * @memberof RelationshipTupleDeleteBulkOperation + * List of relationship tuples objects to delete */ - idents: any; + idents: Array; } diff --git a/src/openapi/types/relationship-tuple-delete.ts b/src/openapi/types/relationship-tuple-delete.ts index beebe360..4895e76c 100644 --- a/src/openapi/types/relationship-tuple-delete.ts +++ b/src/openapi/types/relationship-tuple-delete.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationshipTupleDelete - */ export interface RelationshipTupleDelete { /** * the resource instance assigned the new relation (accepts either the resource instance id or resource_key:resource_instance_key) - * @type {string} - * @memberof RelationshipTupleDelete */ subject: string; /** * the relation to assign between the subject and object - * @type {string} - * @memberof RelationshipTupleDelete */ relation: string; /** * the resource instance on which the new relation is assigned (accepts either the resource instance id or resource_key:resource_instance_key) - * @type {string} - * @memberof RelationshipTupleDelete */ object: string; } diff --git a/src/openapi/types/relationship-tuple-detailed-read.ts b/src/openapi/types/relationship-tuple-detailed-read.ts new file mode 100644 index 00000000..171ea8d7 --- /dev/null +++ b/src/openapi/types/relationship-tuple-detailed-read.ts @@ -0,0 +1,93 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ResourceInstanceBlockRead } from './resource-instance-block-read'; +// May contain unused imports in some cases +import type { StrippedRelationBlockRead } from './stripped-relation-block-read'; +// May contain unused imports in some cases +import type { TenantBlockRead } from './tenant-block-read'; + +export interface RelationshipTupleDetailedRead { + /** + * resource_key:resource_instance_key of the subject + */ + subject: string; + /** + * key of the assigned relation + */ + relation: string; + /** + * resource_key:resource_instance_key of the object + */ + object: string; + /** + * Unique id of the relationship tuple + */ + id: string; + /** + * The tenant the relationship tuple is associated with + */ + tenant: string; + /** + * Unique id of the subject + */ + subject_id: string; + /** + * Unique id of the relation + */ + relation_id: string; + /** + * Unique id of the object (null = all resources of this type) + */ + object_id?: string; + /** + * Unique id of the tenant + */ + tenant_id: string; + /** + * Unique id of the organization that the relationship tuple belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the relationship tuple belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the relationship tuple belongs to. + */ + environment_id: string; + /** + * Date and time when the relationship tuple was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the relationship tuple was created (ISO_8601 format). + */ + updated_at: string; + /** + * The subject details of the relationship tuple + */ + subject_details?: ResourceInstanceBlockRead; + /** + * The relation details of the relationship tuple + */ + relation_details?: StrippedRelationBlockRead; + /** + * The object details of the relationship tuple + */ + object_details?: ResourceInstanceBlockRead; + /** + * The tenant details of the relationship tuple + */ + tenant_details?: TenantBlockRead; +} diff --git a/src/openapi/types/relationship-tuple-obj.ts b/src/openapi/types/relationship-tuple-obj.ts index ec7bdd94..51263012 100644 --- a/src/openapi/types/relationship-tuple-obj.ts +++ b/src/openapi/types/relationship-tuple-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,8 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationshipTupleObj - */ export interface RelationshipTupleObj { - /** - * - * @type {string} - * @memberof RelationshipTupleObj - */ subject_str: string; - /** - * - * @type {string} - * @memberof RelationshipTupleObj - */ relation_str: string; - /** - * - * @type {string} - * @memberof RelationshipTupleObj - */ object_str: string; } diff --git a/src/openapi/types/relationship-tuple-read.ts b/src/openapi/types/relationship-tuple-read.ts index abd6fcfd..f921fc92 100644 --- a/src/openapi/types/relationship-tuple-read.ts +++ b/src/openapi/types/relationship-tuple-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,88 +10,84 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RelationshipTupleRead - */ +// May contain unused imports in some cases +import type { ResourceInstanceBlockRead } from './resource-instance-block-read'; +// May contain unused imports in some cases +import type { StrippedRelationBlockRead } from './stripped-relation-block-read'; +// May contain unused imports in some cases +import type { TenantBlockRead } from './tenant-block-read'; + export interface RelationshipTupleRead { - /** - * Unique id of the relationship tuple - * @type {string} - * @memberof RelationshipTupleRead - */ - id: string; /** * resource_key:resource_instance_key of the subject - * @type {string} - * @memberof RelationshipTupleRead */ subject: string; /** * key of the assigned relation - * @type {string} - * @memberof RelationshipTupleRead */ relation: string; /** * resource_key:resource_instance_key of the object - * @type {string} - * @memberof RelationshipTupleRead */ object: string; + /** + * Unique id of the relationship tuple + */ + id: string; + /** + * The tenant the relationship tuple is associated with + */ + tenant: string; /** * Unique id of the subject - * @type {string} - * @memberof RelationshipTupleRead */ subject_id: string; /** * Unique id of the relation - * @type {string} - * @memberof RelationshipTupleRead */ relation_id: string; /** - * Unique id of the object - * @type {string} - * @memberof RelationshipTupleRead + * Unique id of the object (null = all resources of this type) */ - object_id: string; + object_id?: string; /** * Unique id of the tenant - * @type {string} - * @memberof RelationshipTupleRead */ tenant_id: string; /** * Unique id of the organization that the relationship tuple belongs to. - * @type {string} - * @memberof RelationshipTupleRead */ organization_id: string; /** * Unique id of the project that the relationship tuple belongs to. - * @type {string} - * @memberof RelationshipTupleRead */ project_id: string; /** * Unique id of the environment that the relationship tuple belongs to. - * @type {string} - * @memberof RelationshipTupleRead */ environment_id: string; /** * Date and time when the relationship tuple was created (ISO_8601 format). - * @type {string} - * @memberof RelationshipTupleRead */ created_at: string; /** * Date and time when the relationship tuple was created (ISO_8601 format). - * @type {string} - * @memberof RelationshipTupleRead */ updated_at: string; + /** + * The subject details of the relationship tuple + */ + subject_details?: ResourceInstanceBlockRead; + /** + * The relation details of the relationship tuple + */ + relation_details?: StrippedRelationBlockRead; + /** + * The object details of the relationship tuple + */ + object_details?: ResourceInstanceBlockRead; + /** + * The tenant details of the relationship tuple + */ + tenant_details?: TenantBlockRead; } diff --git a/src/openapi/types/remote-config.ts b/src/openapi/types/remote-config.ts index 09cf3899..6502cbb2 100644 --- a/src/openapi/types/remote-config.ts +++ b/src/openapi/types/remote-config.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,46 +11,17 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OPALClient } from './opalclient'; +import type { OPALClient } from './opalclient'; // May contain unused imports in some cases -// @ts-ignore -import { OpalCommon } from './opal-common'; +import type { OPALCommon } from './opalcommon'; // May contain unused imports in some cases -// @ts-ignore -import { PDPContext } from './pdpcontext'; +import type { PDPContext } from './pdpcontext'; // May contain unused imports in some cases -// @ts-ignore -import { Pdp } from './pdp'; +import type { PdpValues } from './pdp-values'; -/** - * - * @export - * @interface RemoteConfig - */ export interface RemoteConfig { - /** - * - * @type {OpalCommon} - * @memberof RemoteConfig - */ - opal_common?: OpalCommon; - /** - * - * @type {OPALClient} - * @memberof RemoteConfig - */ + opal_common: OPALCommon; opal_client: OPALClient; - /** - * - * @type {Pdp} - * @memberof RemoteConfig - */ - pdp?: Pdp; - /** - * - * @type {PDPContext} - * @memberof RemoteConfig - */ + pdp?: PdpValues; context: PDPContext; } diff --git a/src/openapi/types/remove-role-permissions.ts b/src/openapi/types/remove-role-permissions.ts index ca883066..1c080095 100644 --- a/src/openapi/types/remove-role-permissions.ts +++ b/src/openapi/types/remove-role-permissions.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RemoveRolePermissions - */ export interface RemoveRolePermissions { /** * List of permissions to remove from the role. If a permission is not found it is skipped. Each permission can be either a resource action id, or `{resource_key}:{action_key}`,i.e: the \"permission name\". - * @type {Array} - * @memberof RemoveRolePermissions */ permissions: Array; } diff --git a/src/openapi/types/request-status.ts b/src/openapi/types/request-status.ts new file mode 100644 index 00000000..4c68a98e --- /dev/null +++ b/src/openapi/types/request-status.ts @@ -0,0 +1,24 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const RequestStatus = { + Pending: 'pending', + Approved: 'approved', + Denied: 'denied', + Canceled: 'canceled', +} as const; + +export type RequestStatus = (typeof RequestStatus)[keyof typeof RequestStatus]; diff --git a/src/openapi/types/request-type.ts b/src/openapi/types/request-type.ts new file mode 100644 index 00000000..ae0e9096 --- /dev/null +++ b/src/openapi/types/request-type.ts @@ -0,0 +1,22 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const RequestType = { + AccessRequest: 'access_request', + OperationApproval: 'operation_approval', +} as const; + +export type RequestType = (typeof RequestType)[keyof typeof RequestType]; diff --git a/src/openapi/types/resource-action-create.ts b/src/openapi/types/resource-action-create.ts index a4aa67b6..a0540be1 100644 --- a/src/openapi/types/resource-action-create.ts +++ b/src/openapi/types/resource-action-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,24 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceActionCreate - */ export interface ResourceActionCreate { /** * A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action. - * @type {string} - * @memberof ResourceActionCreate */ key: string; /** * The name of the action - * @type {string} - * @memberof ResourceActionCreate */ name: string; /** * An optional longer description of what this action respresents in your system - * @type {string} - * @memberof ResourceActionCreate */ description?: string; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix - * @type {object} - * @memberof ResourceActionCreate */ attributes?: object; + v1compat_path?: string; + v1compat_is_built_in?: boolean; + v1compat_name?: string; } diff --git a/src/openapi/types/resource-action-group-create.ts b/src/openapi/types/resource-action-group-create.ts index 4950b521..d51abbfe 100644 --- a/src/openapi/types/resource-action-group-create.ts +++ b/src/openapi/types/resource-action-group-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,40 +10,22 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceActionGroupCreate - */ export interface ResourceActionGroupCreate { /** * A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group. - * @type {string} - * @memberof ResourceActionGroupCreate */ key: string; /** * The name of the action group - * @type {string} - * @memberof ResourceActionGroupCreate */ name: string; /** * An optional longer description of what this action group represents in your system - * @type {string} - * @memberof ResourceActionGroupCreate */ description?: string; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix - * @type {object} - * @memberof ResourceActionGroupCreate */ attributes?: object; - /** - * - * @type {Array} - * @memberof ResourceActionGroupCreate - */ actions?: Array; } diff --git a/src/openapi/types/resource-action-group-read.ts b/src/openapi/types/resource-action-group-read.ts index 60e062f1..caabd5ef 100644 --- a/src/openapi/types/resource-action-group-read.ts +++ b/src/openapi/types/resource-action-group-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,82 +10,50 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceActionGroupRead - */ export interface ResourceActionGroupRead { /** * The name of the action group - * @type {string} - * @memberof ResourceActionGroupRead */ name: string; /** * An optional longer description of what this action group represents in your system - * @type {string} - * @memberof ResourceActionGroupRead */ description?: string; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix - * @type {object} - * @memberof ResourceActionGroupRead */ attributes?: object; - /** - * - * @type {Array} - * @memberof ResourceActionGroupRead - */ actions?: Array; /** * A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group. - * @type {string} - * @memberof ResourceActionGroupRead */ key: string; /** * Unique id of the action group - * @type {string} - * @memberof ResourceActionGroupRead */ id: string; /** * Unique id of the organization that the action group belongs to. - * @type {string} - * @memberof ResourceActionGroupRead */ organization_id: string; /** * Unique id of the project that the action group belongs to. - * @type {string} - * @memberof ResourceActionGroupRead */ project_id: string; /** * Unique id of the environment that the action group belongs to. - * @type {string} - * @memberof ResourceActionGroupRead */ environment_id: string; /** * Unique id of the resource that the action group belongs to. - * @type {string} - * @memberof ResourceActionGroupRead */ resource_id: string; /** * Date and time when the action group was created (ISO_8601 format). - * @type {string} - * @memberof ResourceActionGroupRead */ created_at: string; /** * Date and time when the action group was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ResourceActionGroupRead */ updated_at: string; } diff --git a/src/openapi/types/resource-action-group-update.ts b/src/openapi/types/resource-action-group-update.ts index deb98f00..c968bf00 100644 --- a/src/openapi/types/resource-action-group-update.ts +++ b/src/openapi/types/resource-action-group-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,18 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceActionGroupUpdate - */ export interface ResourceActionGroupUpdate { /** * The name of the action group - * @type {string} - * @memberof ResourceActionGroupUpdate */ name?: string; /** * An optional longer description of what this action group represents in your system - * @type {string} - * @memberof ResourceActionGroupUpdate */ description?: string; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix - * @type {object} - * @memberof ResourceActionGroupUpdate */ attributes?: object; - /** - * - * @type {Array} - * @memberof ResourceActionGroupUpdate - */ actions?: Array; } diff --git a/src/openapi/types/resource-action-read.ts b/src/openapi/types/resource-action-read.ts index 447d664a..b5fff992 100644 --- a/src/openapi/types/resource-action-read.ts +++ b/src/openapi/types/resource-action-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,82 +10,56 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceActionRead - */ export interface ResourceActionRead { /** * The name of the action - * @type {string} - * @memberof ResourceActionRead */ name: string; /** * An optional longer description of what this action respresents in your system - * @type {string} - * @memberof ResourceActionRead */ description?: string; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix - * @type {object} - * @memberof ResourceActionRead */ attributes?: object; + v1compat_path?: string; + v1compat_is_built_in?: boolean; + v1compat_name?: string; /** * A URL-friendly name of the action (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action. - * @type {string} - * @memberof ResourceActionRead */ key: string; /** * Unique id of the action - * @type {string} - * @memberof ResourceActionRead */ id: string; /** * The name of the action, prefixed by the resource the action is acting upon. - * @type {string} - * @memberof ResourceActionRead */ permission_name: string; /** * Unique id of the organization that the action belongs to. - * @type {string} - * @memberof ResourceActionRead */ organization_id: string; /** * Unique id of the project that the action belongs to. - * @type {string} - * @memberof ResourceActionRead */ project_id: string; /** * Unique id of the environment that the action belongs to. - * @type {string} - * @memberof ResourceActionRead */ environment_id: string; /** * Unique id of the resource that the action belongs to. - * @type {string} - * @memberof ResourceActionRead */ resource_id: string; /** * Date and time when the action was created (ISO_8601 format). - * @type {string} - * @memberof ResourceActionRead */ created_at: string; /** * Date and time when the action was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ResourceActionRead */ updated_at: string; } diff --git a/src/openapi/types/resource-action-update.ts b/src/openapi/types/resource-action-update.ts index 04a88d4c..82d06ffb 100644 --- a/src/openapi/types/resource-action-update.ts +++ b/src/openapi/types/resource-action-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,20 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceActionUpdate - */ export interface ResourceActionUpdate { /** * The name of the action - * @type {string} - * @memberof ResourceActionUpdate */ name?: string; /** * An optional longer description of what this action respresents in your system - * @type {string} - * @memberof ResourceActionUpdate */ description?: string; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix - * @type {object} - * @memberof ResourceActionUpdate */ attributes?: object; + v1compat_path?: string; + v1compat_is_built_in?: boolean; + v1compat_name?: string; } diff --git a/src/openapi/types/resource-attribute-create.ts b/src/openapi/types/resource-attribute-create.ts index 2dcec356..4b46fc25 100644 --- a/src/openapi/types/resource-attribute-create.ts +++ b/src/openapi/types/resource-attribute-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,19 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AttributeType } from './attribute-type'; +import type { AttributeType } from './attribute-type'; -/** - * - * @export - * @interface ResourceAttributeCreate - */ export interface ResourceAttributeCreate { /** * A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute. - * @type {string} - * @memberof ResourceAttributeCreate */ key: string; /** * The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`. - * @type {AttributeType} - * @memberof ResourceAttributeCreate */ type: AttributeType; /** * An optional longer description of what this attribute respresents in your system - * @type {string} - * @memberof ResourceAttributeCreate */ description?: string; } diff --git a/src/openapi/types/resource-attribute-read.ts b/src/openapi/types/resource-attribute-read.ts index a9aecae8..6eb523bd 100644 --- a/src/openapi/types/resource-attribute-read.ts +++ b/src/openapi/types/resource-attribute-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,85 +11,55 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AttributeType } from './attribute-type'; +import type { AttributeType } from './attribute-type'; -/** - * - * @export - * @interface ResourceAttributeRead - */ export interface ResourceAttributeRead { /** * The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`. - * @type {AttributeType} - * @memberof ResourceAttributeRead */ type: AttributeType; /** * An optional longer description of what this attribute respresents in your system - * @type {string} - * @memberof ResourceAttributeRead */ description?: string; /** * A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute. - * @type {string} - * @memberof ResourceAttributeRead */ key: string; /** * Unique id of the attribute - * @type {string} - * @memberof ResourceAttributeRead */ id: string; /** * Unique id of the resource that the attribute belongs to. - * @type {string} - * @memberof ResourceAttributeRead */ resource_id: string; /** * A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource. - * @type {string} - * @memberof ResourceAttributeRead */ resource_key: string; /** * Unique id of the organization that the attribute belongs to. - * @type {string} - * @memberof ResourceAttributeRead */ organization_id: string; /** * Unique id of the project that the attribute belongs to. - * @type {string} - * @memberof ResourceAttributeRead */ project_id: string; /** * Unique id of the environment that the attribute belongs to. - * @type {string} - * @memberof ResourceAttributeRead */ environment_id: string; /** * Date and time when the attribute was created (ISO_8601 format). - * @type {string} - * @memberof ResourceAttributeRead */ created_at: string; /** * Date and time when the attribute was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ResourceAttributeRead */ updated_at: string; /** * Whether the attribute is built-in, and managed by the Permit system. - * @type {boolean} - * @memberof ResourceAttributeRead */ built_in: boolean; } diff --git a/src/openapi/types/resource-attribute-update.ts b/src/openapi/types/resource-attribute-update.ts index c1113163..525b7d59 100644 --- a/src/openapi/types/resource-attribute-update.ts +++ b/src/openapi/types/resource-attribute-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,15 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AttributeType } from './attribute-type'; +import type { AttributeType } from './attribute-type'; -/** - * - * @export - * @interface ResourceAttributeUpdate - */ export interface ResourceAttributeUpdate { /** * The type of the attribute, we currently support: `bool`, `number` (ints, floats), `time` (a timestamp), `string`, and `json`. - * @type {AttributeType} - * @memberof ResourceAttributeUpdate */ type?: AttributeType; /** * An optional longer description of what this attribute respresents in your system - * @type {string} - * @memberof ResourceAttributeUpdate */ description?: string; } diff --git a/src/openapi/types/resource-attributes.ts b/src/openapi/types/resource-attributes.ts index 7630067d..ea35a770 100644 --- a/src/openapi/types/resource-attributes.ts +++ b/src/openapi/types/resource-attributes.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,25 +11,9 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { AttributeType } from './attribute-type'; +import type { AttributeType } from './attribute-type'; -/** - * - * @export - * @interface ResourceAttributes - */ export interface ResourceAttributes { - /** - * - * @type {AttributeType} - * @memberof ResourceAttributes - */ type: AttributeType; - /** - * - * @type {string} - * @memberof ResourceAttributes - */ key: string; } diff --git a/src/openapi/types/resource-create.ts b/src/openapi/types/resource-create.ts index dfe132d6..38ee7210 100644 --- a/src/openapi/types/resource-create.ts +++ b/src/openapi/types/resource-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,64 +11,50 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActionBlockEditable } from './action-block-editable'; +import type { ActionBlockEditable } from './action-block-editable'; // May contain unused imports in some cases -// @ts-ignore -import { AttributeBlockEditable } from './attribute-block-editable'; +import type { AttributeBlockEditable } from './attribute-block-editable'; +// May contain unused imports in some cases +import type { RoleBlockEditable } from './role-block-editable'; -/** - * - * @export - * @interface ResourceCreate - */ export interface ResourceCreate { /** * A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource. - * @type {string} - * @memberof ResourceCreate */ key: string; /** * The name of the resource - * @type {string} - * @memberof ResourceCreate */ name: string; /** * The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource - * @type {string} - * @memberof ResourceCreate */ urn?: string; /** * An optional longer description of what this resource respresents in your system - * @type {string} - * @memberof ResourceCreate */ description?: string; /** * A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource. - * @type {{ [key: string]: ActionBlockEditable; }} - * @memberof ResourceCreate */ actions: { [key: string]: ActionBlockEditable }; + /** + * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix + */ + type_attributes?: object; /** * Attributes that each resource of this type defines, and can be used in your ABAC policies. - * @type {{ [key: string]: AttributeBlockEditable; }} - * @memberof ResourceCreate */ attributes?: { [key: string]: AttributeBlockEditable }; /** * Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc. - * @type {object} - * @memberof ResourceCreate */ - roles?: object; + roles?: { [key: string]: RoleBlockEditable }; /** * Relations to other resources. The key is the relation key, and the value is the related resource. - * @type {object} - * @memberof ResourceCreate */ - relations?: object; + relations?: { [key: string]: string }; + v1compat_path?: string; + v1compat_type?: string; + v1compat_name?: string; } diff --git a/src/openapi/types/resource-id.ts b/src/openapi/types/resource-id.ts index 56dd7e95..49c2cd27 100644 --- a/src/openapi/types/resource-id.ts +++ b/src/openapi/types/resource-id.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,4 @@ * Do not edit the class manually. */ -/** - * For ResourceSets, the id of the base resource. - * @export - * @interface ResourceId - */ -export interface ResourceId {} +export type ResourceId = string; diff --git a/src/openapi/types/resource-instance-block-read.ts b/src/openapi/types/resource-instance-block-read.ts new file mode 100644 index 00000000..618e291e --- /dev/null +++ b/src/openapi/types/resource-instance-block-read.ts @@ -0,0 +1,30 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface ResourceInstanceBlockRead { + /** + * A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it\'s unique on your end. The resource instance key must be url-friendly. + */ + key: string; + /** + * the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps. + */ + tenant: string; + /** + * the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`. + */ + resource: string; + /** + * Arbitrary resource attributes that will be used to enforce attribute-based access control policies. + */ + attributes?: object; +} diff --git a/src/openapi/types/resource-instance-create-bulk-operation.ts b/src/openapi/types/resource-instance-create-bulk-operation.ts new file mode 100644 index 00000000..7825b41a --- /dev/null +++ b/src/openapi/types/resource-instance-create-bulk-operation.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ResourceInstanceCreate } from './resource-instance-create'; + +export interface ResourceInstanceCreateBulkOperation { + operations: Array; +} diff --git a/src/openapi/types/resource-instance-create.ts b/src/openapi/types/resource-instance-create.ts index 411d67bf..a8b380d6 100644 --- a/src/openapi/types/resource-instance-create.ts +++ b/src/openapi/types/resource-instance-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceInstanceCreate - */ export interface ResourceInstanceCreate { /** * A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it\'s unique on your end. The resource instance key must be url-friendly. - * @type {string} - * @memberof ResourceInstanceCreate */ key: string; /** * the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps. - * @type {string} - * @memberof ResourceInstanceCreate */ - tenant?: string; + tenant: string; /** * the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`. - * @type {string} - * @memberof ResourceInstanceCreate */ resource: string; /** - * Arbitraty resource attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof ResourceInstanceCreate + * Arbitrary resource attributes that will be used to enforce attribute-based access control policies. */ attributes?: object; } diff --git a/src/openapi/types/dev-login.ts b/src/openapi/types/resource-instance-delete-bulk-operation.ts similarity index 52% rename from src/openapi/types/dev-login.ts rename to src/openapi/types/resource-instance-delete-bulk-operation.ts index 2203ae1c..e8141756 100644 --- a/src/openapi/types/dev-login.ts +++ b/src/openapi/types/resource-instance-delete-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface DevLogin - */ -export interface DevLogin { +export interface ResourceInstanceDeleteBulkOperation { /** - * an email address from which to create a DEV MODE session - * @type {string} - * @memberof DevLogin + * List of resource instance idents to delete. Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file) */ - username: string; + idents: Array; } diff --git a/src/openapi/types/resource-instance-detailed-read.ts b/src/openapi/types/resource-instance-detailed-read.ts new file mode 100644 index 00000000..57a3bdc3 --- /dev/null +++ b/src/openapi/types/resource-instance-detailed-read.ts @@ -0,0 +1,69 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { RelationshipTupleBlockRead } from './relationship-tuple-block-read'; + +export interface ResourceInstanceDetailedRead { + /** + * A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it\'s unique on your end. The resource instance key must be url-friendly. + */ + key: string; + /** + * the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps. + */ + tenant: string; + /** + * the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`. + */ + resource: string; + /** + * Unique id of the resource instance + */ + id: string; + /** + * Unique id of the organization that the resource instance belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the resource instance belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the resource instance belongs to. + */ + environment_id: string; + /** + * Date and time when the resource instance was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the resource instance was created (ISO_8601 format). + */ + updated_at: string; + /** + * Unique id of the resource + */ + resource_id: string; + /** + * Unique id of the tenant + */ + tenant_id: string; + /** + * Arbitrary resource attributes that will be used to enforce attribute-based access control policies. + */ + attributes?: object; + /** + * The relationships of the resource instance. + */ + relationships: Array; +} diff --git a/src/openapi/types/resource-instance-read.ts b/src/openapi/types/resource-instance-read.ts index 62c34d1a..9abce6b4 100644 --- a/src/openapi/types/resource-instance-read.ts +++ b/src/openapi/types/resource-instance-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,82 +10,60 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceInstanceRead - */ +// May contain unused imports in some cases +import type { RelationshipTupleBlockRead } from './relationship-tuple-block-read'; + export interface ResourceInstanceRead { /** * A unique identifier by which Permit will identify the resource instance for permission checks. You will later pass this identifier to the `permit.check()` API. A key can be anything: for example the resource db id, a url slug, a UUID or anything else as long as it\'s unique on your end. The resource instance key must be url-friendly. - * @type {string} - * @memberof ResourceInstanceRead */ key: string; /** * the *key* of the tenant that this resource belongs to, used to enforce tenant boundaries in multi-tenant apps. - * @type {string} - * @memberof ResourceInstanceRead */ - tenant?: string; + tenant: string; /** * the *key* of the resource (type) of this resource instance. For example: if this resource instance is the annual budget document, the key of the resource might be `document`. - * @type {string} - * @memberof ResourceInstanceRead */ resource: string; /** * Unique id of the resource instance - * @type {string} - * @memberof ResourceInstanceRead */ id: string; /** * Unique id of the organization that the resource instance belongs to. - * @type {string} - * @memberof ResourceInstanceRead */ organization_id: string; /** * Unique id of the project that the resource instance belongs to. - * @type {string} - * @memberof ResourceInstanceRead */ project_id: string; /** * Unique id of the environment that the resource instance belongs to. - * @type {string} - * @memberof ResourceInstanceRead */ environment_id: string; /** * Date and time when the resource instance was created (ISO_8601 format). - * @type {string} - * @memberof ResourceInstanceRead */ created_at: string; /** * Date and time when the resource instance was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ResourceInstanceRead */ updated_at: string; /** * the id of the resource (type) of this resource instance. - * @type {string} - * @memberof ResourceInstanceRead */ resource_id: string; /** * the id of the tenant of this resource instance. - * @type {string} - * @memberof ResourceInstanceRead */ - tenant_id?: string; + tenant_id: string; /** - * Arbitraty resource attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof ResourceInstanceRead + * Arbitrary resource attributes that will be used to enforce attribute-based access control policies. */ attributes?: object; + /** + * The relationships of the resource instance. + */ + relationships?: Array; } diff --git a/src/openapi/types/resource-instance-update.ts b/src/openapi/types/resource-instance-update.ts index 9b7dd927..cf2d6627 100644 --- a/src/openapi/types/resource-instance-update.ts +++ b/src/openapi/types/resource-instance-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface ResourceInstanceUpdate - */ export interface ResourceInstanceUpdate { /** - * Arbitraty resource attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof ResourceInstanceUpdate + * Arbitrary resource attributes that will be used to enforce attribute-based access control policies. */ attributes?: object; } diff --git a/src/openapi/types/resource-read.ts b/src/openapi/types/resource-read.ts index e0296ca7..06c3ddae 100644 --- a/src/openapi/types/resource-read.ts +++ b/src/openapi/types/resource-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,109 +11,77 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActionBlockRead } from './action-block-read'; +import type { ActionBlockRead } from './action-block-read'; // May contain unused imports in some cases -// @ts-ignore -import { AttributeBlockRead } from './attribute-block-read'; +import type { AttributeBlockRead } from './attribute-block-read'; // May contain unused imports in some cases -// @ts-ignore -import { RelationBlockRead } from './relation-block-read'; +import type { RelationBlockRead } from './relation-block-read'; +// May contain unused imports in some cases +import type { ResourceRoleRead } from './resource-role-read'; -/** - * - * @export - * @interface ResourceRead - */ export interface ResourceRead { /** * A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource. - * @type {string} - * @memberof ResourceRead */ key: string; /** * Unique id of the resource - * @type {string} - * @memberof ResourceRead */ id: string; /** * Unique id of the organization that the resource belongs to. - * @type {string} - * @memberof ResourceRead */ organization_id: string; /** * Unique id of the project that the resource belongs to. - * @type {string} - * @memberof ResourceRead */ project_id: string; /** * Unique id of the environment that the resource belongs to. - * @type {string} - * @memberof ResourceRead */ environment_id: string; /** * Date and time when the resource was created (ISO_8601 format). - * @type {string} - * @memberof ResourceRead */ created_at: string; /** * Date and time when the resource was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ResourceRead */ updated_at: string; /** * The name of the resource - * @type {string} - * @memberof ResourceRead */ name: string; /** * The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource - * @type {string} - * @memberof ResourceRead */ urn?: string; /** * An optional longer description of what this resource respresents in your system - * @type {string} - * @memberof ResourceRead */ description?: string; /** * A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource. - * @type {{ [key: string]: ActionBlockRead; }} - * @memberof ResourceRead */ actions?: { [key: string]: ActionBlockRead }; + /** + * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix + */ + type_attributes?: object; /** * Attributes that each resource of this type defines, and can be used in your ABAC policies. - * @type {{ [key: string]: AttributeBlockRead; }} - * @memberof ResourceRead */ attributes?: { [key: string]: AttributeBlockRead }; /** * Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, etc. - * @type {object} - * @memberof ResourceRead */ - roles?: object; + roles?: { [key: string]: ResourceRoleRead }; /** * A relations definition block, typically contained within a resource type definition block. The relations represents the ways you can interact with a protected resource. - * @type {{ [key: string]: RelationBlockRead; }} - * @memberof ResourceRead */ relations?: { [key: string]: RelationBlockRead }; - /** - * - * @type {{ [key: string]: Array; }} - * @memberof ResourceRead - */ + v1compat_path?: string; + v1compat_type?: string; + v1compat_name?: string; action_groups?: { [key: string]: Array }; } diff --git a/src/openapi/types/resource-replace.ts b/src/openapi/types/resource-replace.ts index b907077b..74b85536 100644 --- a/src/openapi/types/resource-replace.ts +++ b/src/openapi/types/resource-replace.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,58 +11,46 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActionBlockEditable } from './action-block-editable'; +import type { ActionBlockEditable } from './action-block-editable'; // May contain unused imports in some cases -// @ts-ignore -import { AttributeBlockEditable } from './attribute-block-editable'; +import type { AttributeBlockEditable } from './attribute-block-editable'; +// May contain unused imports in some cases +import type { RoleBlockEditable } from './role-block-editable'; -/** - * - * @export - * @interface ResourceReplace - */ export interface ResourceReplace { /** * The name of the resource - * @type {string} - * @memberof ResourceReplace */ name: string; /** * The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource - * @type {string} - * @memberof ResourceReplace */ urn?: string; /** * An optional longer description of what this resource respresents in your system - * @type {string} - * @memberof ResourceReplace */ description?: string; /** * A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource. - * @type {{ [key: string]: ActionBlockEditable; }} - * @memberof ResourceReplace */ actions: { [key: string]: ActionBlockEditable }; + /** + * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix + */ + type_attributes?: object; /** * Attributes that each resource of this type defines, and can be used in your ABAC policies. - * @type {{ [key: string]: AttributeBlockEditable; }} - * @memberof ResourceReplace */ attributes?: { [key: string]: AttributeBlockEditable }; /** * Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc. - * @type {object} - * @memberof ResourceReplace */ - roles?: object; + roles?: { [key: string]: RoleBlockEditable }; /** * Relations to other resources. The key is the relation key, and the value is the related resource. - * @type {object} - * @memberof ResourceReplace */ - relations?: object; + relations?: { [key: string]: string }; + v1compat_path?: string; + v1compat_type?: string; + v1compat_name?: string; } diff --git a/src/openapi/types/resource-role-create.ts b/src/openapi/types/resource-role-create.ts index 1257d6a6..64f2e8fe 100644 --- a/src/openapi/types/resource-role-create.ts +++ b/src/openapi/types/resource-role-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,55 +11,37 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo1 } from './granted-to1'; +import type { DerivedRoleBlockEdit } from './derived-role-block-edit'; -/** - * - * @export - * @interface ResourceRoleCreate - */ export interface ResourceRoleCreate { /** * A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role. - * @type {string} - * @memberof ResourceRoleCreate */ key: string; /** * The name of the role - * @type {string} - * @memberof ResourceRoleCreate */ name: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof ResourceRoleCreate */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof ResourceRoleCreate */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof ResourceRoleCreate */ attributes?: object; /** * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. - * @type {Array} - * @memberof ResourceRoleCreate */ extends?: Array; /** - * - * @type {GrantedTo1} - * @memberof ResourceRoleCreate + * Derived role that inherit will be applied on this role */ - granted_to?: GrantedTo1; + granted_to?: DerivedRoleBlockEdit; + v1compat_settings?: object; + v1compat_attributes?: object; } diff --git a/src/openapi/types/pdp.ts b/src/openapi/types/resource-role-list.ts similarity index 66% rename from src/openapi/types/pdp.ts rename to src/openapi/types/resource-role-list.ts index f6203f7c..ee6ee254 100644 --- a/src/openapi/types/pdp.ts +++ b/src/openapi/types/resource-role-list.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,11 +11,8 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { PdpValues } from './pdp-values'; +import type { Roles } from './roles'; -/** - * @type Pdp - * @export - */ -export type Pdp = PdpValues; +export interface ResourceRoleList { + roles: Roles; +} diff --git a/src/openapi/types/resource-role-read.ts b/src/openapi/types/resource-role-read.ts index 506459ec..7dd935e1 100644 --- a/src/openapi/types/resource-role-read.ts +++ b/src/openapi/types/resource-role-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,103 +11,67 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo2 } from './granted-to2'; +import type { DerivedRoleBlockRead } from './derived-role-block-read'; -/** - * - * @export - * @interface ResourceRoleRead - */ export interface ResourceRoleRead { /** * The name of the role - * @type {string} - * @memberof ResourceRoleRead */ name: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof ResourceRoleRead */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof ResourceRoleRead */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof ResourceRoleRead */ attributes?: object; /** * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. - * @type {Array} - * @memberof ResourceRoleRead */ extends?: Array; /** - * - * @type {GrantedTo2} - * @memberof ResourceRoleRead + * Derived role that inherit will be applied on this role */ - granted_to?: GrantedTo2; + granted_to?: DerivedRoleBlockRead; /** * A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role. - * @type {string} - * @memberof ResourceRoleRead */ key: string; /** * Unique id of the role - * @type {string} - * @memberof ResourceRoleRead */ id: string; /** * Unique id of the organization that the role belongs to. - * @type {string} - * @memberof ResourceRoleRead */ organization_id: string; /** * Unique id of the project that the role belongs to. - * @type {string} - * @memberof ResourceRoleRead */ project_id: string; /** * Unique id of the environment that the role belongs to. - * @type {string} - * @memberof ResourceRoleRead */ environment_id: string; /** * Unique id of the resource that the role belongs to. - * @type {string} - * @memberof ResourceRoleRead */ resource_id: string; /** * The unique resource key that the role belongs to. - * @type {string} - * @memberof ResourceRoleRead */ resource: string; /** * Date and time when the role was created (ISO_8601 format). - * @type {string} - * @memberof ResourceRoleRead */ created_at: string; /** * Date and time when the role was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ResourceRoleRead */ updated_at: string; } diff --git a/src/openapi/types/resource-role-update.ts b/src/openapi/types/resource-role-update.ts index 230be018..24853fda 100644 --- a/src/openapi/types/resource-role-update.ts +++ b/src/openapi/types/resource-role-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,31 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo1 } from './granted-to1'; +import type { DerivedRoleBlockEdit } from './derived-role-block-edit'; -/** - * - * @export - * @interface ResourceRoleUpdate - */ export interface ResourceRoleUpdate { /** * The name of the role - * @type {string} - * @memberof ResourceRoleUpdate */ name?: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof ResourceRoleUpdate */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof ResourceRoleUpdate */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof ResourceRoleUpdate */ attributes?: object; /** * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. - * @type {Array} - * @memberof ResourceRoleUpdate */ extends?: Array; /** - * - * @type {GrantedTo1} - * @memberof ResourceRoleUpdate + * Derived role that inherit will be applied on this role */ - granted_to?: GrantedTo1; + granted_to?: DerivedRoleBlockEdit; } diff --git a/src/openapi/types/resource-sets.ts b/src/openapi/types/resource-sets.ts deleted file mode 100644 index d1fa7e1a..00000000 --- a/src/openapi/types/resource-sets.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCopyScopeFilters } from './environment-copy-scope-filters'; - -/** - * @type ResourceSets - * Resource sets to copy - * @export - */ -export type ResourceSets = EnvironmentCopyScopeFilters; diff --git a/src/openapi/types/resource-type-data.ts b/src/openapi/types/resource-type-data.ts deleted file mode 100644 index 1fddf421..00000000 --- a/src/openapi/types/resource-type-data.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { DerivedRole } from './derived-role'; - -/** - * - * @export - * @interface ResourceTypeData - */ -export interface ResourceTypeData { - /** - * - * @type {Array} - * @memberof ResourceTypeData - */ - actions: Array; - /** - * - * @type {{ [key: string]: DerivedRole; }} - * @memberof ResourceTypeData - */ - derived_roles: { [key: string]: DerivedRole }; -} diff --git a/src/openapi/types/resource-type-obj.ts b/src/openapi/types/resource-type-obj.ts index 362bd6a2..c0414748 100644 --- a/src/openapi/types/resource-type-obj.ts +++ b/src/openapi/types/resource-type-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ResourceAttributes } from './resource-attributes'; +import type { ResourceAttributes } from './resource-attributes'; -/** - * - * @export - * @interface ResourceTypeObj - */ export interface ResourceTypeObj { - /** - * - * @type {string} - * @memberof ResourceTypeObj - */ id: string; - /** - * - * @type {string} - * @memberof ResourceTypeObj - */ key: string; - /** - * - * @type {string} - * @memberof ResourceTypeObj - */ - name?: string; - /** - * - * @type {Array} - * @memberof ResourceTypeObj - */ - attributes?: Array; - /** - * - * @type {string} - * @memberof ResourceTypeObj - */ + name?: string | null; + attributes?: Array | null; created_at: string; - /** - * - * @type {string} - * @memberof ResourceTypeObj - */ updated_at: string; } diff --git a/src/openapi/types/resource-update.ts b/src/openapi/types/resource-update.ts index 7e4a9f8b..41f57ccf 100644 --- a/src/openapi/types/resource-update.ts +++ b/src/openapi/types/resource-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,58 +11,46 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { ActionBlockEditable } from './action-block-editable'; +import type { ActionBlockEditable } from './action-block-editable'; // May contain unused imports in some cases -// @ts-ignore -import { AttributeBlockEditable } from './attribute-block-editable'; +import type { AttributeBlockEditable } from './attribute-block-editable'; +// May contain unused imports in some cases +import type { RoleBlockEditable } from './role-block-editable'; -/** - * - * @export - * @interface ResourceUpdate - */ export interface ResourceUpdate { /** * The name of the resource - * @type {string} - * @memberof ResourceUpdate */ name?: string; /** * The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource - * @type {string} - * @memberof ResourceUpdate */ urn?: string; /** * An optional longer description of what this resource respresents in your system - * @type {string} - * @memberof ResourceUpdate */ description?: string; /** * A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource. - * @type {{ [key: string]: ActionBlockEditable; }} - * @memberof ResourceUpdate */ actions?: { [key: string]: ActionBlockEditable }; + /** + * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix + */ + type_attributes?: object; /** * Attributes that each resource of this type defines, and can be used in your ABAC policies. - * @type {{ [key: string]: AttributeBlockEditable; }} - * @memberof ResourceUpdate */ attributes?: { [key: string]: AttributeBlockEditable }; /** * Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, base roles, etc. - * @type {object} - * @memberof ResourceUpdate */ - roles?: object; + roles?: { [key: string]: RoleBlockEditable }; /** * Relations to other resources. The key is the relation key, and the value is the related resource. - * @type {object} - * @memberof ResourceUpdate */ - relations?: object; + relations?: { [key: string]: string }; + v1compat_path?: string; + v1compat_type?: string; + v1compat_name?: string; } diff --git a/src/openapi/types/resources.ts b/src/openapi/types/resources.ts deleted file mode 100644 index 2ff183a3..00000000 --- a/src/openapi/types/resources.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCopyScopeFilters } from './environment-copy-scope-filters'; - -/** - * @type Resources - * Resources to copy - * @export - */ -export type Resources = EnvironmentCopyScopeFilters; diff --git a/src/openapi/types/scope.ts b/src/openapi/types/response-elements-create-user-v2-elements-proj-id-env-id-config-elements-config-id-data-users-post.ts similarity index 51% rename from src/openapi/types/scope.ts rename to src/openapi/types/response-elements-create-user-v2-elements-proj-id-env-id-config-elements-config-id-data-users-post.ts index 018a483f..fda274a8 100644 --- a/src/openapi/types/scope.ts +++ b/src/openapi/types/response-elements-create-user-v2-elements-proj-id-env-id-config-elements-config-id-data-users-post.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,24 +11,13 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCopyScope } from './environment-copy-scope'; +import type { ElementsUserInviteRead } from './elements-user-invite-read'; // May contain unused imports in some cases -// @ts-ignore -import { ResourceSets } from './resource-sets'; // May contain unused imports in some cases -// @ts-ignore -import { Resources } from './resources'; // May contain unused imports in some cases -// @ts-ignore -import { Roles } from './roles'; +import type { UserRead } from './user-read'; // May contain unused imports in some cases -// @ts-ignore -import { UserSets } from './user-sets'; -/** - * @type Scope - * Filters to include and exclude copied objects - * @export - */ -export type Scope = EnvironmentCopyScope; +export type ResponseElementsCreateUserV2ElementsProjIdEnvIdConfigElementsConfigIdDataUsersPost = + | ElementsUserInviteRead + | UserRead; diff --git a/src/openapi/types/response-get-all-data-v2-internal-opal-data-org-id-proj-id-env-id-get.ts b/src/openapi/types/response-get-all-data-v2-internal-opal-data-org-id-proj-id-env-id-get.ts new file mode 100644 index 00000000..7ba0e0ed --- /dev/null +++ b/src/openapi/types/response-get-all-data-v2-internal-opal-data-org-id-proj-id-env-id-get.ts @@ -0,0 +1,27 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataFullData } from './data-generator-lib-schemas-schema-opal-data-full-data'; +// May contain unused imports in some cases +// May contain unused imports in some cases +// May contain unused imports in some cases +// May contain unused imports in some cases +// May contain unused imports in some cases +// May contain unused imports in some cases +import type { PermitBackendSchemasSchemaOpalDataFullData } from './permit-backend-schemas-schema-opal-data-full-data'; +// May contain unused imports in some cases + +export type ResponseGetAllDataV2InternalOpalDataOrgIdProjIdEnvIdGet = + | DataGeneratorLibSchemasSchemaOpalDataFullData + | PermitBackendSchemasSchemaOpalDataFullData; diff --git a/src/openapi/types/response-get-all-resource-instances-data-v2-internal-opal-data-org-id-proj-id-env-id-resource-instances-get.ts b/src/openapi/types/response-get-all-resource-instances-data-v2-internal-opal-data-org-id-proj-id-env-id-resource-instances-get.ts new file mode 100644 index 00000000..ec612527 --- /dev/null +++ b/src/openapi/types/response-get-all-resource-instances-data-v2-internal-opal-data-org-id-proj-id-env-id-resource-instances-get.ts @@ -0,0 +1,17 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData } from './data-generator-lib-schemas-schema-opal-data-resource-instance-attribute-data'; + +export type ResponseGetAllResourceInstancesDataV2InternalOpalDataOrgIdProjIdEnvIdResourceInstancesGet = + { [key: string]: DataGeneratorLibSchemasSchemaOpalDataResourceInstanceAttributeData }; diff --git a/src/openapi/types/response-get-all-users-data-v2-internal-opal-data-org-id-proj-id-env-id-users-get.ts b/src/openapi/types/response-get-all-users-data-v2-internal-opal-data-org-id-proj-id-env-id-users-get.ts new file mode 100644 index 00000000..2ba67ea9 --- /dev/null +++ b/src/openapi/types/response-get-all-users-data-v2-internal-opal-data-org-id-proj-id-env-id-users-get.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DataGeneratorLibSchemasSchemaOpalDataUserData } from './data-generator-lib-schemas-schema-opal-data-user-data'; + +export type ResponseGetAllUsersDataV2InternalOpalDataOrgIdProjIdEnvIdUsersGet = { + [key: string]: DataGeneratorLibSchemasSchemaOpalDataUserData; +}; diff --git a/src/openapi/types/response-get-data-for-condition-set-v2-internal-opal-data-org-id-proj-id-env-id-condition-sets-condition-set-id-get.ts b/src/openapi/types/response-get-data-for-condition-set-v2-internal-opal-data-org-id-proj-id-env-id-condition-sets-condition-set-id-get.ts deleted file mode 100644 index af016183..00000000 --- a/src/openapi/types/response-get-data-for-condition-set-v2-internal-opal-data-org-id-proj-id-env-id-condition-sets-condition-set-id-get.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { ConditionSetData } from './condition-set-data'; -// May contain unused imports in some cases -// @ts-ignore -import { ConditionSetType } from './condition-set-type'; - -/** - * - * @export - * @interface ResponseGetDataForConditionSetV2InternalOpalDataOrgIdProjIdEnvIdConditionSetsConditionSetIdGet - */ -export interface ResponseGetDataForConditionSetV2InternalOpalDataOrgIdProjIdEnvIdConditionSetsConditionSetIdGet { - /** - * - * @type {ConditionSetType} - * @memberof ResponseGetDataForConditionSetV2InternalOpalDataOrgIdProjIdEnvIdConditionSetsConditionSetIdGet - */ - type: ConditionSetType; - /** - * - * @type {string} - * @memberof ResponseGetDataForConditionSetV2InternalOpalDataOrgIdProjIdEnvIdConditionSetsConditionSetIdGet - */ - key: string; -} diff --git a/src/openapi/types/response-get-data-for-resource-v2-internal-opal-data-org-id-proj-id-env-id-resource-types-resource-id-get.ts b/src/openapi/types/response-get-data-for-resource-v2-internal-opal-data-org-id-proj-id-env-id-resource-types-resource-id-get.ts deleted file mode 100644 index 52085424..00000000 --- a/src/openapi/types/response-get-data-for-resource-v2-internal-opal-data-org-id-proj-id-env-id-resource-types-resource-id-get.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { ResourceTypeData } from './resource-type-data'; - -/** - * - * @export - * @interface ResponseGetDataForResourceV2InternalOpalDataOrgIdProjIdEnvIdResourceTypesResourceIdGet - */ -export interface ResponseGetDataForResourceV2InternalOpalDataOrgIdProjIdEnvIdResourceTypesResourceIdGet { - /** - * - * @type {Array} - * @memberof ResponseGetDataForResourceV2InternalOpalDataOrgIdProjIdEnvIdResourceTypesResourceIdGet - */ - actions: Array; -} diff --git a/src/openapi/types/response-get-data-for-role-v2-internal-opal-data-org-id-proj-id-env-id-roles-role-id-get.ts b/src/openapi/types/response-get-data-for-role-v2-internal-opal-data-org-id-proj-id-env-id-roles-role-id-get.ts deleted file mode 100644 index 61a0b1f6..00000000 --- a/src/openapi/types/response-get-data-for-role-v2-internal-opal-data-org-id-proj-id-env-id-roles-role-id-get.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { RoleData } from './role-data'; - -/** - * - * @export - * @interface ResponseGetDataForRoleV2InternalOpalDataOrgIdProjIdEnvIdRolesRoleIdGet - */ -export interface ResponseGetDataForRoleV2InternalOpalDataOrgIdProjIdEnvIdRolesRoleIdGet { - /** - * - * @type {{ [key: string]: Array; }} - * @memberof ResponseGetDataForRoleV2InternalOpalDataOrgIdProjIdEnvIdRolesRoleIdGet - */ - grants?: { [key: string]: Array }; -} diff --git a/src/openapi/types/response-get-data-for-tenant-v2-internal-opal-data-org-id-proj-id-env-id-tenants-tenant-id-get.ts b/src/openapi/types/response-get-data-for-tenant-v2-internal-opal-data-org-id-proj-id-env-id-tenants-tenant-id-get.ts deleted file mode 100644 index 72774513..00000000 --- a/src/openapi/types/response-get-data-for-tenant-v2-internal-opal-data-org-id-proj-id-env-id-tenants-tenant-id-get.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { TenantData } from './tenant-data'; - -/** - * - * @export - * @interface ResponseGetDataForTenantV2InternalOpalDataOrgIdProjIdEnvIdTenantsTenantIdGet - */ -export interface ResponseGetDataForTenantV2InternalOpalDataOrgIdProjIdEnvIdTenantsTenantIdGet { - /** - * - * @type {{ [key: string]: Array; }} - * @memberof ResponseGetDataForTenantV2InternalOpalDataOrgIdProjIdEnvIdTenantsTenantIdGet - */ - roleAssignments?: { [key: string]: Array }; - /** - * - * @type {object} - * @memberof ResponseGetDataForTenantV2InternalOpalDataOrgIdProjIdEnvIdTenantsTenantIdGet - */ - attributes?: object; -} diff --git a/src/openapi/types/response-get-data-for-user-v2-internal-opal-data-org-id-proj-id-env-id-users-user-id-get.ts b/src/openapi/types/response-get-data-for-user-v2-internal-opal-data-org-id-proj-id-env-id-users-user-id-get.ts deleted file mode 100644 index 7dc77bde..00000000 --- a/src/openapi/types/response-get-data-for-user-v2-internal-opal-data-org-id-proj-id-env-id-users-user-id-get.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { UserData } from './user-data'; - -/** - * - * @export - * @interface ResponseGetDataForUserV2InternalOpalDataOrgIdProjIdEnvIdUsersUserIdGet - */ -export interface ResponseGetDataForUserV2InternalOpalDataOrgIdProjIdEnvIdUsersUserIdGet { - /** - * - * @type {{ [key: string]: Array; }} - * @memberof ResponseGetDataForUserV2InternalOpalDataOrgIdProjIdEnvIdUsersUserIdGet - */ - roleAssignments?: { [key: string]: Array }; - /** - * - * @type {object} - * @memberof ResponseGetDataForUserV2InternalOpalDataOrgIdProjIdEnvIdUsersUserIdGet - */ - attributes?: object; -} diff --git a/src/openapi/types/new.ts b/src/openapi/types/response-list-condition-sets-v2-schema-proj-id-env-id-condition-sets-get.ts similarity index 53% rename from src/openapi/types/new.ts rename to src/openapi/types/response-list-condition-sets-v2-schema-proj-id-env-id-condition-sets-get.ts index ac0c258b..31421924 100644 --- a/src/openapi/types/new.ts +++ b/src/openapi/types/response-list-condition-sets-v2-schema-proj-id-env-id-condition-sets-get.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,15 +11,10 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCreate } from './environment-create'; +import type { ConditionSetRead } from './condition-set-read'; // May contain unused imports in some cases -// @ts-ignore -import { Jwks } from './jwks'; +import type { PaginatedResultConditionSetRead } from './paginated-result-condition-set-read'; -/** - * @type New - * Description of the environment to create. This environment must not already exist. - * @export - */ -export type New = EnvironmentCreate; +export type ResponseListConditionSetsV2SchemaProjIdEnvIdConditionSetsGet = + | Array + | PaginatedResultConditionSetRead; diff --git a/src/openapi/types/message.ts b/src/openapi/types/response-list-elements-configs-v2-elements-proj-id-env-id-config-get.ts similarity index 51% rename from src/openapi/types/message.ts rename to src/openapi/types/response-list-elements-configs-v2-elements-proj-id-env-id-config-get.ts index c7ecc6cb..48f201ec 100644 --- a/src/openapi/types/message.ts +++ b/src/openapi/types/response-list-elements-configs-v2-elements-proj-id-env-id-config-get.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,15 +11,10 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { Payload } from './payload'; +import type { ElementsConfigRead } from './elements-config-read'; // May contain unused imports in some cases -// @ts-ignore -import { PolicySynchronizerRegeneration } from './policy-synchronizer-regeneration'; +import type { PaginatedResultElementsConfigRead } from './paginated-result-elements-config-read'; -/** - * @type Message - * Message containing the scope of regeneration and the id - * @export - */ -export type Message = PolicySynchronizerRegeneration; +export type ResponseListElementsConfigsV2ElementsProjIdEnvIdConfigGet = + | Array + | PaginatedResultElementsConfigRead; diff --git a/src/openapi/types/response-list-relationship-tuples-v2-facts-proj-id-env-id-relationship-tuples-get.ts b/src/openapi/types/response-list-relationship-tuples-v2-facts-proj-id-env-id-relationship-tuples-get.ts new file mode 100644 index 00000000..9d4381f7 --- /dev/null +++ b/src/openapi/types/response-list-relationship-tuples-v2-facts-proj-id-env-id-relationship-tuples-get.ts @@ -0,0 +1,20 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultRelationshipTupleRead } from './paginated-result-relationship-tuple-read'; +// May contain unused imports in some cases +import type { RelationshipTupleRead } from './relationship-tuple-read'; + +export type ResponseListRelationshipTuplesV2FactsProjIdEnvIdRelationshipTuplesGet = + | Array + | PaginatedResultRelationshipTupleRead; diff --git a/src/openapi/types/response-list-resource-instances-v2-facts-proj-id-env-id-resource-instances-get.ts b/src/openapi/types/response-list-resource-instances-v2-facts-proj-id-env-id-resource-instances-get.ts new file mode 100644 index 00000000..463e3328 --- /dev/null +++ b/src/openapi/types/response-list-resource-instances-v2-facts-proj-id-env-id-resource-instances-get.ts @@ -0,0 +1,20 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultResourceInstanceRead } from './paginated-result-resource-instance-read'; +// May contain unused imports in some cases +import type { ResourceInstanceRead } from './resource-instance-read'; + +export type ResponseListResourceInstancesV2FactsProjIdEnvIdResourceInstancesGet = + | Array + | PaginatedResultResourceInstanceRead; diff --git a/src/openapi/types/response-list-resources-v2-schema-proj-id-env-id-resources-get.ts b/src/openapi/types/response-list-resources-v2-schema-proj-id-env-id-resources-get.ts new file mode 100644 index 00000000..7f37ad90 --- /dev/null +++ b/src/openapi/types/response-list-resources-v2-schema-proj-id-env-id-resources-get.ts @@ -0,0 +1,20 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultResourceRead } from './paginated-result-resource-read'; +// May contain unused imports in some cases +import type { ResourceRead } from './resource-read'; + +export type ResponseListResourcesV2SchemaProjIdEnvIdResourcesGet = + | Array + | PaginatedResultResourceRead; diff --git a/src/openapi/types/response-list-role-assignments-v2-facts-proj-id-env-id-role-assignments-get.ts b/src/openapi/types/response-list-role-assignments-v2-facts-proj-id-env-id-role-assignments-get.ts new file mode 100644 index 00000000..d0cc47bc --- /dev/null +++ b/src/openapi/types/response-list-role-assignments-v2-facts-proj-id-env-id-role-assignments-get.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultRoleAssignmentDetailedRead } from './paginated-result-role-assignment-detailed-read'; +// May contain unused imports in some cases +import type { PaginatedResultRoleAssignmentRead } from './paginated-result-role-assignment-read'; +// May contain unused imports in some cases +import type { RoleAssignmentDetailedRead } from './role-assignment-detailed-read'; +// May contain unused imports in some cases +import type { RoleAssignmentRead } from './role-assignment-read'; + +export type ResponseListRoleAssignmentsV2FactsProjIdEnvIdRoleAssignmentsGet = + | Array + | Array + | PaginatedResultRoleAssignmentDetailedRead + | PaginatedResultRoleAssignmentRead; diff --git a/src/openapi/types/response-list-roles-v2-schema-proj-id-env-id-roles-get.ts b/src/openapi/types/response-list-roles-v2-schema-proj-id-env-id-roles-get.ts new file mode 100644 index 00000000..3c9b90d9 --- /dev/null +++ b/src/openapi/types/response-list-roles-v2-schema-proj-id-env-id-roles-get.ts @@ -0,0 +1,20 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultRoleRead } from './paginated-result-role-read'; +// May contain unused imports in some cases +import type { RoleRead } from './role-read'; + +export type ResponseListRolesV2SchemaProjIdEnvIdRolesGet = + | Array + | PaginatedResultRoleRead; diff --git a/src/openapi/types/response-list-tenants-v2-facts-proj-id-env-id-tenants-get.ts b/src/openapi/types/response-list-tenants-v2-facts-proj-id-env-id-tenants-get.ts new file mode 100644 index 00000000..69f63f38 --- /dev/null +++ b/src/openapi/types/response-list-tenants-v2-facts-proj-id-env-id-tenants-get.ts @@ -0,0 +1,20 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultTenantRead } from './paginated-result-tenant-read'; +// May contain unused imports in some cases +import type { TenantRead } from './tenant-read'; + +export type ResponseListTenantsV2FactsProjIdEnvIdTenantsGet = + | Array + | PaginatedResultTenantRead; diff --git a/src/openapi/types/role-assignment-create.ts b/src/openapi/types/role-assignment-create.ts index 2ceed946..93ccf5a3 100644 --- a/src/openapi/types/role-assignment-create.ts +++ b/src/openapi/types/role-assignment-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentCreate - */ export interface RoleAssignmentCreate { /** * the role that will be assigned (accepts either the role id or the role key) - * @type {string} - * @memberof RoleAssignmentCreate */ role: string; /** * the tenant the role is associated with (accepts either the tenant id or the tenant key) - * @type {string} - * @memberof RoleAssignmentCreate */ tenant?: string; /** - * the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance) - * @type {string} - * @memberof RoleAssignmentCreate + * the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)The resource instance will be implicitly created if the tenant parameter is specified and the resource instance does not exist. */ resource_instance?: string; /** * the user the role will be assigned to (accepts either the user id or the user key) - * @type {string} - * @memberof RoleAssignmentCreate */ user: string; } diff --git a/src/openapi/types/role-assignment-detailed-read.ts b/src/openapi/types/role-assignment-detailed-read.ts index b874e178..5a3b3524 100644 --- a/src/openapi/types/role-assignment-detailed-read.ts +++ b/src/openapi/types/role-assignment-detailed-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,73 +11,46 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { RoleAssignmentResourceInstance } from './role-assignment-resource-instance'; -// @ts-ignore -import { RoleAssignmentRole } from './role-assignment-role'; -// @ts-ignore -import { RoleAssignmentTenant } from './role-assignment-tenant'; -// @ts-ignore -import { RoleAssignmentUser } from './role-assignment-user'; +import type { RoleAssignmentResourceInstance } from './role-assignment-resource-instance'; +// May contain unused imports in some cases +import type { RoleAssignmentRole } from './role-assignment-role'; +// May contain unused imports in some cases +import type { RoleAssignmentTenant } from './role-assignment-tenant'; +// May contain unused imports in some cases +import type { RoleAssignmentUser } from './role-assignment-user'; -/** - * - * @export - * @interface RoleAssignmentDetailedRead - */ export interface RoleAssignmentDetailedRead { /** * Unique id of the role assignment - * @type {string} - * @memberof RoleAssignmentDetailedRead */ id: string; /** * the role that is assigned - * @type {RoleAssignmentRole} - * @memberof RoleAssignmentDetailedRead */ role: RoleAssignmentRole; /** * the user the role is assigned to - * @type {RoleAssignmentUser} - * @memberof RoleAssignmentDetailedRead */ user: RoleAssignmentUser; /** * the tenant the role is associated with - * @type {RoleAssignmentTenant} - * @memberof RoleAssignmentDetailedRead */ tenant: RoleAssignmentTenant; - /** - * - * @type {RoleAssignmentResourceInstance} - * @memberof RoleAssignmentDetailedRead - */ resource_instance?: RoleAssignmentResourceInstance; /** * Unique id of the organization that the role assignment belongs to. - * @type {string} - * @memberof RoleAssignmentDetailedRead */ organization_id: string; /** * Unique id of the project that the role assignment belongs to. - * @type {string} - * @memberof RoleAssignmentDetailedRead */ project_id: string; /** * Unique id of the environment that the role assignment belongs to. - * @type {string} - * @memberof RoleAssignmentDetailedRead */ environment_id: string; /** * Date and time when the role assignment was created (ISO_8601 format). - * @type {string} - * @memberof RoleAssignmentDetailedRead */ created_at: string; } diff --git a/src/openapi/types/role-assignment-read.ts b/src/openapi/types/role-assignment-read.ts index 7535ea8c..e63a61a1 100644 --- a/src/openapi/types/role-assignment-read.ts +++ b/src/openapi/types/role-assignment-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,88 +10,57 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentRead - */ export interface RoleAssignmentRead { /** * Unique id of the role assignment - * @type {string} - * @memberof RoleAssignmentRead */ id: string; /** * the user the role is assigned to - * @type {string} - * @memberof RoleAssignmentRead */ user: string; /** * the role that is assigned - * @type {string} - * @memberof RoleAssignmentRead */ role: string; /** * the tenant the role is associated with - * @type {string} - * @memberof RoleAssignmentRead */ tenant?: string; /** * the resource instance the role is associated with - * @type {string} - * @memberof RoleAssignmentRead */ resource_instance?: string; /** * Unique id of the resource instance - * @type {string} - * @memberof RoleAssignmentRead */ resource_instance_id?: string; /** * Unique id of the user - * @type {string} - * @memberof RoleAssignmentRead */ user_id: string; /** * Unique id of the role - * @type {string} - * @memberof RoleAssignmentRead */ role_id: string; /** * Unique id of the tenant - * @type {string} - * @memberof RoleAssignmentRead */ tenant_id: string; /** * Unique id of the organization that the role assignment belongs to. - * @type {string} - * @memberof RoleAssignmentRead */ organization_id: string; /** * Unique id of the project that the role assignment belongs to. - * @type {string} - * @memberof RoleAssignmentRead */ project_id: string; /** * Unique id of the environment that the role assignment belongs to. - * @type {string} - * @memberof RoleAssignmentRead */ environment_id: string; /** * Date and time when the role assignment was created (ISO_8601 format). - * @type {string} - * @memberof RoleAssignmentRead */ created_at: string; } diff --git a/src/openapi/types/role-assignment-remove.ts b/src/openapi/types/role-assignment-remove.ts index 4f86a53c..80b743fa 100644 --- a/src/openapi/types/role-assignment-remove.ts +++ b/src/openapi/types/role-assignment-remove.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentRemove - */ export interface RoleAssignmentRemove { /** * the role that will be unassigned (accepts either the role id or the role key) - * @type {string} - * @memberof RoleAssignmentRemove */ role: string; /** * the tenant the role is associated with (accepts either the tenant id or the tenant key) - * @type {string} - * @memberof RoleAssignmentRemove */ - tenant?: string; + tenant: string; /** * the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance) - * @type {string} - * @memberof RoleAssignmentRemove */ resource_instance?: string; /** * the user the role will be unassigned from (accepts either the user id or the user key) - * @type {string} - * @memberof RoleAssignmentRemove */ user: string; } diff --git a/src/openapi/types/role-assignment-resource-instance.ts b/src/openapi/types/role-assignment-resource-instance.ts index 5c9f7bbf..5026cd9b 100644 --- a/src/openapi/types/role-assignment-resource-instance.ts +++ b/src/openapi/types/role-assignment-resource-instance.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentResourceInstance - */ export interface RoleAssignmentResourceInstance { - /** - * - * @type {string} - * @memberof RoleAssignmentResourceInstance - */ id: string; - /** - * - * @type {string} - * @memberof RoleAssignmentResourceInstance - */ key: string; - /** - * - * @type {string} - * @memberof RoleAssignmentResourceInstance - */ resource: string; - /** - * - * @type {Record} - * @memberof RoleAssignmentResourceInstance - */ - attributes?: Record; + attributes?: object; } diff --git a/src/openapi/types/role-assignment-role.ts b/src/openapi/types/role-assignment-role.ts index f2640fe9..ef89e19c 100644 --- a/src/openapi/types/role-assignment-role.ts +++ b/src/openapi/types/role-assignment-role.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentRole - */ export interface RoleAssignmentRole { - /** - * - * @type {string} - * @memberof RoleAssignmentRole - */ id: string; - /** - * - * @type {string} - * @memberof RoleAssignmentRole - */ key: string; - /** - * - * @type {string} - * @memberof RoleAssignmentRole - */ name: string; - /** - * - * @type {Array} - * @memberof RoleAssignmentRole - */ permissions?: Array; } diff --git a/src/openapi/types/role-assignment-tenant.ts b/src/openapi/types/role-assignment-tenant.ts index 99ecb79d..b83a7d84 100644 --- a/src/openapi/types/role-assignment-tenant.ts +++ b/src/openapi/types/role-assignment-tenant.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentTenant - */ export interface RoleAssignmentTenant { - /** - * - * @type {string} - * @memberof RoleAssignmentTenant - */ id: string; - /** - * - * @type {string} - * @memberof RoleAssignmentTenant - */ key: string; - /** - * - * @type {string} - * @memberof RoleAssignmentTenant - */ name: string; - /** - * - * @type {Record} - * @memberof RoleAssignmentTenant - */ - attributes?: Record; + attributes?: object; } diff --git a/src/openapi/types/role-assignment-user.ts b/src/openapi/types/role-assignment-user.ts index db522004..0312d5d3 100644 --- a/src/openapi/types/role-assignment-user.ts +++ b/src/openapi/types/role-assignment-user.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,11 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface RoleAssignmentUser - */ export interface RoleAssignmentUser { - /** - * - * @type {string} - * @memberof RoleAssignmentUser - */ id: string; - /** - * - * @type {string} - * @memberof RoleAssignmentUser - */ key: string; - /** - * - * @type {string} - * @memberof RoleAssignmentUser - */ email?: string; - /** - * - * @type {string} - * @memberof RoleAssignmentUser - */ first_name?: string; - /** - * - * @type {string} - * @memberof RoleAssignmentUser - */ last_name?: string; - /** - * - * @type {Record} - * @memberof RoleAssignmentUser - */ - attributes?: Record; + attributes?: object; } diff --git a/src/openapi/types/editable.ts b/src/openapi/types/role-block-editable.ts similarity index 66% rename from src/openapi/types/editable.ts rename to src/openapi/types/role-block-editable.ts index c972d221..af376995 100644 --- a/src/openapi/types/editable.ts +++ b/src/openapi/types/role-block-editable.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,43 +11,33 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo1 } from './granted-to1'; +import type { DerivedRoleBlockEdit } from './derived-role-block-edit'; -/** - * - * @export - * @interface Editable - */ -export interface Editable { +export interface RoleBlockEditable { /** * The name of the role - * @type {string} - * @memberof Editable */ name: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof Editable */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof Editable */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof Editable */ attributes?: object; /** - * - * @type {GrantedTo1} - * @memberof Editable + * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. + */ + extends?: Array; + /** + * Derived role that inherit will be applied on this role */ - granted_to?: GrantedTo1; + granted_to?: DerivedRoleBlockEdit; + v1compat_settings?: object; + v1compat_attributes?: object; } diff --git a/src/openapi/types/role-block.ts b/src/openapi/types/role-block.ts deleted file mode 100644 index 080bbcbe..00000000 --- a/src/openapi/types/role-block.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface RoleBlock - */ -export interface RoleBlock { - /** - * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof RoleBlock - */ - description?: string; - /** - * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof RoleBlock - */ - permissions?: Array; -} diff --git a/src/openapi/types/role-create-bulk-operation-result.ts b/src/openapi/types/role-create-bulk-operation-result.ts new file mode 100644 index 00000000..b496a65d --- /dev/null +++ b/src/openapi/types/role-create-bulk-operation-result.ts @@ -0,0 +1,16 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface RoleCreateBulkOperationResult { + created: Array; + updated: Array; +} diff --git a/src/openapi/types/opal-common.ts b/src/openapi/types/role-create-bulk-operation.ts similarity index 64% rename from src/openapi/types/opal-common.ts rename to src/openapi/types/role-create-bulk-operation.ts index 4b8fafb3..6f5a8d62 100644 --- a/src/openapi/types/opal-common.ts +++ b/src/openapi/types/role-create-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,11 +11,8 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OPALCommon } from './opalcommon'; +import type { RoleCreateBulk } from './role-create-bulk'; -/** - * @type OpalCommon - * @export - */ -export type OpalCommon = OPALCommon; +export interface RoleCreateBulkOperation { + operations: Array; +} diff --git a/src/openapi/types/role-create-bulk.ts b/src/openapi/types/role-create-bulk.ts new file mode 100644 index 00000000..f52eb49a --- /dev/null +++ b/src/openapi/types/role-create-bulk.ts @@ -0,0 +1,51 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { DerivedRoleBlockEdit } from './derived-role-block-edit'; + +export interface RoleCreateBulk { + /** + * The name of the role + */ + name: string; + /** + * optional description string explaining what this role represents, or what permissions are granted to it. + */ + description?: string; + /** + * list of action keys that define what actions this resource role is permitted to do + */ + permissions?: Array; + /** + * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator + */ + attributes?: object; + /** + * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. + */ + extends?: Array; + /** + * Derived role that inherit will be applied on this role + */ + granted_to?: DerivedRoleBlockEdit; + v1compat_settings?: object; + v1compat_attributes?: object; + /** + * A URL-friendly name of the Role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the Role. + */ + key: string; + /** + * The resource key for the role. Optional; for tenant roles, leave empty. + */ + resource?: string; +} diff --git a/src/openapi/types/role-create.ts b/src/openapi/types/role-create.ts index 0f9bbca8..10424be7 100644 --- a/src/openapi/types/role-create.ts +++ b/src/openapi/types/role-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,55 +11,38 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo1 } from './granted-to1'; +import type { DerivedRoleBlockEdit } from './derived-role-block-edit'; -/** - * - * @export - * @interface RoleCreate - */ export interface RoleCreate { /** * A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role. - * @type {string} - * @memberof RoleCreate */ key: string; /** * The name of the role - * @type {string} - * @memberof RoleCreate */ name: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof RoleCreate */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof RoleCreate */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof RoleCreate */ attributes?: object; /** * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. - * @type {Array} - * @memberof RoleCreate */ extends?: Array; /** - * - * @type {GrantedTo1} - * @memberof RoleCreate + * Derived role that inherit will be applied on this role */ - granted_to?: GrantedTo1; + granted_to?: DerivedRoleBlockEdit; + v1compat_settings?: object; + v1compat_attributes?: object; + v1compat_is_built_in?: boolean; } diff --git a/src/openapi/types/role-list.ts b/src/openapi/types/role-list.ts new file mode 100644 index 00000000..0871a1a6 --- /dev/null +++ b/src/openapi/types/role-list.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { Roles1 } from './roles1'; + +export interface RoleList { + roles: Roles1; +} diff --git a/src/openapi/types/role-read.ts b/src/openapi/types/role-read.ts index 26863dfa..ab4c9f0d 100644 --- a/src/openapi/types/role-read.ts +++ b/src/openapi/types/role-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,91 +11,61 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo } from './granted-to'; +import type { DerivedRoleBlockRead } from './derived-role-block-read'; -/** - * - * @export - * @interface RoleRead - */ export interface RoleRead { /** * The name of the role - * @type {string} - * @memberof RoleRead */ name: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof RoleRead */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof RoleRead */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof RoleRead */ attributes?: object; /** * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. - * @type {Array} - * @memberof RoleRead */ extends?: Array; /** - * - * @type {GrantedTo} - * @memberof RoleRead + * A derived role defintion block, typically contained whithin a role definition. The derived role is a role that is derived from the role definition. */ - granted_to?: GrantedTo; + granted_to?: DerivedRoleBlockRead; + v1compat_settings?: object; + v1compat_attributes?: object; /** * A URL-friendly name of the role (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the role. - * @type {string} - * @memberof RoleRead */ key: string; /** * Unique id of the role - * @type {string} - * @memberof RoleRead */ id: string; /** * Unique id of the organization that the role belongs to. - * @type {string} - * @memberof RoleRead */ organization_id: string; /** * Unique id of the project that the role belongs to. - * @type {string} - * @memberof RoleRead */ project_id: string; /** * Unique id of the environment that the role belongs to. - * @type {string} - * @memberof RoleRead */ environment_id: string; /** * Date and time when the role was created (ISO_8601 format). - * @type {string} - * @memberof RoleRead */ created_at: string; /** * Date and time when the role was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof RoleRead */ updated_at: string; } diff --git a/src/openapi/types/role-update.ts b/src/openapi/types/role-update.ts index 23ca51da..ddef3023 100644 --- a/src/openapi/types/role-update.ts +++ b/src/openapi/types/role-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,49 +11,33 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { GrantedTo1 } from './granted-to1'; +import type { DerivedRoleBlockEdit } from './derived-role-block-edit'; -/** - * - * @export - * @interface RoleUpdate - */ export interface RoleUpdate { /** * The name of the role - * @type {string} - * @memberof RoleUpdate */ name?: string; /** * optional description string explaining what this role represents, or what permissions are granted to it. - * @type {string} - * @memberof RoleUpdate */ description?: string; /** * list of action keys that define what actions this resource role is permitted to do - * @type {Array} - * @memberof RoleUpdate */ permissions?: Array; /** * optional dictionary of key-value pairs that can be used to store arbitrary metadata about this role. This metadata can be used to filter role using query parameters with attr_ prefix, currently supports only \'equals\' operator - * @type {object} - * @memberof RoleUpdate */ attributes?: object; /** * list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list. - * @type {Array} - * @memberof RoleUpdate */ extends?: Array; /** - * - * @type {GrantedTo1} - * @memberof RoleUpdate + * Derived role that inherit will be applied on this role */ - granted_to?: GrantedTo1; + granted_to?: DerivedRoleBlockEdit; + v1compat_settings?: object; + v1compat_attributes?: object; } diff --git a/src/openapi/types/roles.ts b/src/openapi/types/roles.ts index 3bb8dfbc..a5ec1af3 100644 --- a/src/openapi/types/roles.ts +++ b/src/openapi/types/roles.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,12 +11,8 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCopyScopeFilters } from './environment-copy-scope-filters'; +import type { PaginatedResultResourceRoleRead } from './paginated-result-resource-role-read'; +// May contain unused imports in some cases +import type { ResourceRoleRead } from './resource-role-read'; -/** - * @type Roles - * Roles to copy - * @export - */ -export type Roles = EnvironmentCopyScopeFilters; +export type Roles = Array | PaginatedResultResourceRoleRead; diff --git a/src/openapi/types/roles1.ts b/src/openapi/types/roles1.ts new file mode 100644 index 00000000..e05459f0 --- /dev/null +++ b/src/openapi/types/roles1.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { PaginatedResultRoleRead } from './paginated-result-role-read'; +// May contain unused imports in some cases +import type { RoleRead } from './role-read'; + +export type Roles1 = Array | PaginatedResultRoleRead; diff --git a/src/openapi/types/scope-config-read.ts b/src/openapi/types/scope-config-read.ts index b783b960..13c20472 100644 --- a/src/openapi/types/scope-config-read.ts +++ b/src/openapi/types/scope-config-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,55 +11,32 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OpalCommonSchemasDataDataSourceConfig } from './opal-common-schemas-data-data-source-config'; +import type { DataSourceConfig } from './data-source-config'; -/** - * - * @export - * @interface ScopeConfigRead - */ export interface ScopeConfigRead { - /** - * - * @type {OpalCommonSchemasDataDataSourceConfig} - * @memberof ScopeConfigRead - */ - data?: OpalCommonSchemasDataDataSourceConfig; + data?: DataSourceConfig; /** * Unique id of the ScopeConfig - * @type {string} - * @memberof ScopeConfigRead */ id: string; /** * Unique id of the organization that the ScopeConfig belongs to. - * @type {string} - * @memberof ScopeConfigRead */ organization_id: string; /** * Unique id of the project that the ScopeConfig belongs to. - * @type {string} - * @memberof ScopeConfigRead */ project_id: string; /** * Unique id of the environment that the ScopeConfig belongs to. - * @type {string} - * @memberof ScopeConfigRead */ environment_id: string; /** * Date and time when the ScopeConfig was created (ISO_8601 format). - * @type {string} - * @memberof ScopeConfigRead */ created_at: string; /** * Date and time when the ScopeConfig was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof ScopeConfigRead */ updated_at: string; } diff --git a/src/openapi/types/scope-config-set.ts b/src/openapi/types/scope-config-set.ts index fb69fd48..656ff30a 100644 --- a/src/openapi/types/scope-config-set.ts +++ b/src/openapi/types/scope-config-set.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,19 +11,8 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { OpalCommonSchemasDataDataSourceConfig } from './opal-common-schemas-data-data-source-config'; +import type { DataSourceConfig } from './data-source-config'; -/** - * - * @export - * @interface ScopeConfigSet - */ export interface ScopeConfigSet { - /** - * - * @type {OpalCommonSchemasDataDataSourceConfig} - * @memberof ScopeConfigSet - */ - data?: OpalCommonSchemasDataDataSourceConfig; + data?: DataSourceConfig; } diff --git a/src/openapi/types/search-operator.ts b/src/openapi/types/search-operator.ts new file mode 100644 index 00000000..5e633d0e --- /dev/null +++ b/src/openapi/types/search-operator.ts @@ -0,0 +1,23 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const SearchOperator = { + Startswith: 'startswith', + Endswith: 'endswith', + Contains: 'contains', +} as const; + +export type SearchOperator = (typeof SearchOperator)[keyof typeof SearchOperator]; diff --git a/src/openapi/types/search.ts b/src/openapi/types/search.ts new file mode 100644 index 00000000..73750b49 --- /dev/null +++ b/src/openapi/types/search.ts @@ -0,0 +1,13 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export type Search = string; diff --git a/src/openapi/types/secret.ts b/src/openapi/types/secret.ts index 75aee0a3..589e70e4 100644 --- a/src/openapi/types/secret.ts +++ b/src/openapi/types/secret.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,9 +10,4 @@ * Do not edit the class manually. */ -/** - * Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service. - * @export - * @interface Secret - */ -export interface Secret {} +export type Secret = string | { [key: string]: string }; diff --git a/src/openapi/types/settings-value.ts b/src/openapi/types/settings-value.ts new file mode 100644 index 00000000..516822fe --- /dev/null +++ b/src/openapi/types/settings-value.ts @@ -0,0 +1,13 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export type SettingsValue = boolean | number | string; diff --git a/src/openapi/types/smtpemail-configuration-create.ts b/src/openapi/types/smtpemail-configuration-create.ts new file mode 100644 index 00000000..0cc3f311 --- /dev/null +++ b/src/openapi/types/smtpemail-configuration-create.ts @@ -0,0 +1,45 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface SMTPEmailConfigurationCreate { + /** + * The host of the SMTP provider + */ + host: string; + /** + * The from address the mails will be sent from + */ + from_address: string; + /** + * The port of the SMTP provider + */ + port: number; + /** + * The username of the SMTP provider + */ + username: string; + /** + * The password of the SMTP provider + */ + password: string; + /** + * The type of the email provider + */ + email_provider_type?: SMTPEmailConfigurationCreateEmailProviderTypeEnum; +} + +export const SMTPEmailConfigurationCreateEmailProviderTypeEnum = { + Smtp: 'smtp', +} as const; + +export type SMTPEmailConfigurationCreateEmailProviderTypeEnum = + (typeof SMTPEmailConfigurationCreateEmailProviderTypeEnum)[keyof typeof SMTPEmailConfigurationCreateEmailProviderTypeEnum]; diff --git a/src/openapi/types/smtpemail-configuration-read.ts b/src/openapi/types/smtpemail-configuration-read.ts new file mode 100644 index 00000000..732dc2ac --- /dev/null +++ b/src/openapi/types/smtpemail-configuration-read.ts @@ -0,0 +1,61 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface SMTPEmailConfigurationRead { + /** + * The host of the SMTP provider + */ + host: string; + /** + * The from address the mails will be sent from + */ + from_address: string; + /** + * The port of the SMTP provider + */ + port: number; + /** + * The username of the SMTP provider + */ + username: string; + /** + * The password of the SMTP provider + */ + password: string; + /** + * The type of the email provider + */ + email_provider_type?: SMTPEmailConfigurationReadEmailProviderTypeEnum; + /** + * Unique id of the email_configuration + */ + id: string; + /** + * Unique id of the organization that the email_configuration belongs to. + */ + organization_id: string; + /** + * Unique id of the project that the email_configuration belongs to. + */ + project_id: string; + /** + * Unique id of the environment that the email_configuration belongs to. + */ + environment_id: string; +} + +export const SMTPEmailConfigurationReadEmailProviderTypeEnum = { + Smtp: 'smtp', +} as const; + +export type SMTPEmailConfigurationReadEmailProviderTypeEnum = + (typeof SMTPEmailConfigurationReadEmailProviderTypeEnum)[keyof typeof SMTPEmailConfigurationReadEmailProviderTypeEnum]; diff --git a/src/openapi/types/sshauth-data-read.ts b/src/openapi/types/sshauth-data-read.ts new file mode 100644 index 00000000..8590d568 --- /dev/null +++ b/src/openapi/types/sshauth-data-read.ts @@ -0,0 +1,34 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface SSHAuthDataRead { + auth_type?: SSHAuthDataReadAuthTypeEnum; + /** + * SSH username + */ + username: string; + /** + * SSH public key + */ + public_key?: string; + /** + * SSH private key + */ + private_key: string; +} + +export const SSHAuthDataReadAuthTypeEnum = { + Ssh: 'ssh', +} as const; + +export type SSHAuthDataReadAuthTypeEnum = + (typeof SSHAuthDataReadAuthTypeEnum)[keyof typeof SSHAuthDataReadAuthTypeEnum]; diff --git a/src/openapi/types/sshauth-data.ts b/src/openapi/types/sshauth-data.ts index dd273eea..2ce298a9 100644 --- a/src/openapi/types/sshauth-data.ts +++ b/src/openapi/types/sshauth-data.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,18 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface SSHAuthData - */ export interface SSHAuthData { - /** - * - * @type {string} - * @memberof SSHAuthData - */ auth_type?: SSHAuthDataAuthTypeEnum; /** * SSH username - * @type {string} - * @memberof SSHAuthData */ username: string; /** * SSH public key - * @type {string} - * @memberof SSHAuthData */ public_key?: string; /** * SSH private key - * @type {string} - * @memberof SSHAuthData */ private_key: string; } diff --git a/src/openapi/types/statistics.ts b/src/openapi/types/statistics.ts deleted file mode 100644 index bbffcb19..00000000 --- a/src/openapi/types/statistics.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { OrgMemberReadWithGrants } from './org-member-read-with-grants'; - -/** - * - * @export - * @interface Statistics - */ -export interface Statistics { - /** - * - * @type {number} - * @memberof Statistics - */ - roles: number; - /** - * - * @type {number} - * @memberof Statistics - */ - users: number; - /** - * - * @type {number} - * @memberof Statistics - */ - policies: number; - /** - * - * @type {number} - * @memberof Statistics - */ - resources: number; - /** - * - * @type {number} - * @memberof Statistics - */ - tenants: number; - /** - * - * @type {boolean} - * @memberof Statistics - */ - has_decision_logs: boolean; - /** - * - * @type {Array} - * @memberof Statistics - */ - members: Array; -} diff --git a/src/openapi/types/stripped-relation-block-read.ts b/src/openapi/types/stripped-relation-block-read.ts new file mode 100644 index 00000000..f8114349 --- /dev/null +++ b/src/openapi/types/stripped-relation-block-read.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface StrippedRelationBlockRead { + /** + * A URL-friendly name of the relation (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the relation. + */ + key: string; + /** + * The name of the relation + */ + name: string; + /** + * An optional longer description of what this relation represents in your system + */ + description?: string; +} diff --git a/src/openapi/types/target-env.ts b/src/openapi/types/target-env.ts deleted file mode 100644 index 465e3a97..00000000 --- a/src/openapi/types/target-env.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCopyTarget } from './environment-copy-target'; -// May contain unused imports in some cases -// @ts-ignore -import { New } from './new'; - -/** - * @type TargetEnv - * If copying a new environment, the environment configuration. If copying to an existing environment, the environment identifier - * @export - */ -export type TargetEnv = EnvironmentCopyTarget; diff --git a/src/openapi/types/task-result-environment-read.ts b/src/openapi/types/task-result-environment-read.ts new file mode 100644 index 00000000..dfc114bd --- /dev/null +++ b/src/openapi/types/task-result-environment-read.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { EnvironmentRead } from './environment-read'; +// May contain unused imports in some cases +import type { ErrorDetails } from './error-details'; +// May contain unused imports in some cases +import type { TaskStatus } from './task-status'; + +export interface TaskResultEnvironmentRead { + /** + * The unique id of the task. + */ + task_id: string; + /** + * The status of the task. + */ + status: TaskStatus; + /** + * The result of the task when the task finished. + */ + result?: EnvironmentRead | null; + /** + * The error details when the task failed. + */ + error?: ErrorDetails | null; +} diff --git a/src/openapi/types/task-result-org-export-result.ts b/src/openapi/types/task-result-org-export-result.ts new file mode 100644 index 00000000..ea7ee701 --- /dev/null +++ b/src/openapi/types/task-result-org-export-result.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ErrorDetails } from './error-details'; +// May contain unused imports in some cases +import type { OrgExportResult } from './org-export-result'; +// May contain unused imports in some cases +import type { TaskStatus } from './task-status'; + +export interface TaskResultOrgExportResult { + /** + * The unique id of the task. + */ + task_id: string; + /** + * The status of the task. + */ + status: TaskStatus; + /** + * The result of the task when the task finished. + */ + result?: OrgExportResult; + /** + * The error details when the task failed. + */ + error?: ErrorDetails; +} diff --git a/src/openapi/types/task-result-policy-guard-scope-read.ts b/src/openapi/types/task-result-policy-guard-scope-read.ts new file mode 100644 index 00000000..36bc4256 --- /dev/null +++ b/src/openapi/types/task-result-policy-guard-scope-read.ts @@ -0,0 +1,37 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { ErrorDetails } from './error-details'; +// May contain unused imports in some cases +import type { PolicyGuardScopeRead } from './policy-guard-scope-read'; +// May contain unused imports in some cases +import type { TaskStatus } from './task-status'; + +export interface TaskResultPolicyGuardScopeRead { + /** + * The unique id of the task. + */ + task_id: string; + /** + * The status of the task. + */ + status: TaskStatus; + /** + * The result of the task when the task finished. + */ + result?: PolicyGuardScopeRead; + /** + * The error details when the task failed. + */ + error?: ErrorDetails; +} diff --git a/src/openapi/types/task-status.ts b/src/openapi/types/task-status.ts new file mode 100644 index 00000000..d702cc03 --- /dev/null +++ b/src/openapi/types/task-status.ts @@ -0,0 +1,24 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const TaskStatus = { + Processing: 'processing', + Success: 'success', + Failure: 'failure', + Cancelled: 'cancelled', +} as const; + +export type TaskStatus = (typeof TaskStatus)[keyof typeof TaskStatus]; diff --git a/src/openapi/types/tenant-block-read.ts b/src/openapi/types/tenant-block-read.ts new file mode 100644 index 00000000..186b1463 --- /dev/null +++ b/src/openapi/types/tenant-block-read.ts @@ -0,0 +1,31 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface TenantBlockRead { + /** + * A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified). + */ + key: string; + /** + * A descriptive name for the tenant + */ + name: string; + /** + * an optional longer description of the tenant + */ + description?: string; + /** + * Arbitrary tenant attributes that will be used to enforce + * attribute-based access control policies. + */ + attributes?: object; +} diff --git a/src/openapi/types/tenant-create-bulk-operation.ts b/src/openapi/types/tenant-create-bulk-operation.ts new file mode 100644 index 00000000..252bf2c8 --- /dev/null +++ b/src/openapi/types/tenant-create-bulk-operation.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { TenantCreate } from './tenant-create'; + +export interface TenantCreateBulkOperation { + operations: Array; +} diff --git a/src/openapi/types/tenant-create.ts b/src/openapi/types/tenant-create.ts index b1f2ee0d..33b16999 100644 --- a/src/openapi/types/tenant-create.ts +++ b/src/openapi/types/tenant-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface TenantCreate - */ export interface TenantCreate { /** * A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified). - * @type {string} - * @memberof TenantCreate */ key: string; /** * A descriptive name for the tenant - * @type {string} - * @memberof TenantCreate */ name: string; /** * an optional longer description of the tenant - * @type {string} - * @memberof TenantCreate */ description?: string; /** * Arbitraty tenant attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof TenantCreate */ attributes?: object; } diff --git a/src/openapi/types/tenant-delete-bulk-operation.ts b/src/openapi/types/tenant-delete-bulk-operation.ts new file mode 100644 index 00000000..a39735a3 --- /dev/null +++ b/src/openapi/types/tenant-delete-bulk-operation.ts @@ -0,0 +1,18 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface TenantDeleteBulkOperation { + /** + * List of tenant idents to delete. Either the unique id or the key of the tenants. + */ + idents: Array; +} diff --git a/src/openapi/types/tenant-obj.ts b/src/openapi/types/tenant-obj.ts index 4c4ba7c8..06f32386 100644 --- a/src/openapi/types/tenant-obj.ts +++ b/src/openapi/types/tenant-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,46 +10,11 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface TenantObj - */ export interface TenantObj { - /** - * - * @type {string} - * @memberof TenantObj - */ id: string; - /** - * - * @type {string} - * @memberof TenantObj - */ key: string; - /** - * - * @type {string} - * @memberof TenantObj - */ - name?: string; - /** - * - * @type {object} - * @memberof TenantObj - */ - attributes?: object; - /** - * - * @type {string} - * @memberof TenantObj - */ + name?: string | null; + attributes?: object | null; created_at: string; - /** - * - * @type {string} - * @memberof TenantObj - */ updated_at: string; } diff --git a/src/openapi/types/tenant-read.ts b/src/openapi/types/tenant-read.ts index 48b7cf86..f4200744 100644 --- a/src/openapi/types/tenant-read.ts +++ b/src/openapi/types/tenant-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,76 +10,49 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface TenantRead - */ export interface TenantRead { /** * A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified). - * @type {string} - * @memberof TenantRead */ key: string; /** * Unique id of the tenant - * @type {string} - * @memberof TenantRead */ id: string; /** * Unique id of the organization that the tenant belongs to. - * @type {string} - * @memberof TenantRead */ organization_id: string; /** * Unique id of the project that the tenant belongs to. - * @type {string} - * @memberof TenantRead */ project_id: string; /** * Unique id of the environment that the tenant belongs to. - * @type {string} - * @memberof TenantRead */ environment_id: string; /** * Date and time when the tenant was created (ISO_8601 format). - * @type {string} - * @memberof TenantRead */ created_at: string; /** * Date and time when the tenant was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof TenantRead */ updated_at: string; /** * Date and time when the tenant was last active (ISO_8601 format). In other words, this is the last time a permission check was done on a resource belonging to this tenant. - * @type {string} - * @memberof TenantRead */ last_action_at: string; /** * A descriptive name for the tenant - * @type {string} - * @memberof TenantRead */ name: string; /** * an optional longer description of the tenant - * @type {string} - * @memberof TenantRead */ description?: string; /** * Arbitraty tenant attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof TenantRead */ attributes?: object; } diff --git a/src/openapi/types/tenant-update.ts b/src/openapi/types/tenant-update.ts index b70d1e32..525b827e 100644 --- a/src/openapi/types/tenant-update.ts +++ b/src/openapi/types/tenant-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface TenantUpdate - */ export interface TenantUpdate { /** * A descriptive name for the tenant - * @type {string} - * @memberof TenantUpdate */ name?: string; /** * an optional longer description of the tenant - * @type {string} - * @memberof TenantUpdate */ description?: string; /** * Arbitraty tenant attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof TenantUpdate */ attributes?: object; } diff --git a/src/openapi/types/usage-limits.ts b/src/openapi/types/usage-limits.ts new file mode 100644 index 00000000..c477846b --- /dev/null +++ b/src/openapi/types/usage-limits.ts @@ -0,0 +1,29 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +import type { BillingTierType } from './billing-tier-type'; + +export interface UsageLimits { + /** + * Monthly active users limit. Default for trial is 5000. + */ + mau?: number; + /** + * Number of tenants limit. Default for trial is 50. + */ + tenants?: number; + /** + * Billing tier. Default is trial. + */ + billing_tier?: BillingTierType; +} diff --git a/src/openapi/types/user-create-bulk-operation.ts b/src/openapi/types/user-create-bulk-operation.ts index ddca6a7f..879e55f4 100644 --- a/src/openapi/types/user-create-bulk-operation.ts +++ b/src/openapi/types/user-create-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserCreateBulkOperation - */ +// May contain unused imports in some cases +import type { UserCreate } from './user-create'; + export interface UserCreateBulkOperation { - /** - * - * @type {any} - * @memberof UserCreateBulkOperation - */ - operations: any; + operations: Array; } diff --git a/src/openapi/types/user-create.ts b/src/openapi/types/user-create.ts index d1f3d071..edd11e36 100644 --- a/src/openapi/types/user-create.ts +++ b/src/openapi/types/user-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,48 +10,32 @@ * Do not edit the class manually. */ -import { UserRoleCreate } from './user-role-create'; +// May contain unused imports in some cases +import type { UserRoleCreate } from './user-role-create'; -/** - * - * @export - * @interface UserCreate - */ export interface UserCreate { /** * A unique id by which Permit will identify the user for permission checks. - * @type {string} - * @memberof UserCreate */ key: string; /** * The email of the user. If synced, will be unique inside the environment. - * @type {string} - * @memberof UserCreate */ email?: string; /** * First name of the user. - * @type {string} - * @memberof UserCreate */ first_name?: string; /** * Last name of the user. - * @type {string} - * @memberof UserCreate */ last_name?: string; /** * Arbitrary user attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof UserCreate */ attributes?: object; /** * List of roles to assign to the user in the environment. - * @type {UserRoleCreate[]} - * @memberof UserCreate */ - role_assignments?: UserRoleCreate[]; + role_assignments?: Array; } diff --git a/src/openapi/types/user-data.ts b/src/openapi/types/user-data.ts deleted file mode 100644 index 0c0cb8b2..00000000 --- a/src/openapi/types/user-data.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface UserData - */ -export interface UserData { - /** - * - * @type {{ [key: string]: Array; }} - * @memberof UserData - */ - roleAssignments?: { [key: string]: Array }; - /** - * - * @type {object} - * @memberof UserData - */ - attributes?: object; -} diff --git a/src/openapi/types/user-delete-bulk-operation.ts b/src/openapi/types/user-delete-bulk-operation.ts index 8f9f4cbc..7519d207 100644 --- a/src/openapi/types/user-delete-bulk-operation.ts +++ b/src/openapi/types/user-delete-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserDeleteBulkOperation - */ export interface UserDeleteBulkOperation { /** - * - * @type {any} - * @memberof UserDeleteBulkOperation + * List of user idents to delete. Either the unique id or the key of the users. */ - idents: any; + idents: Array; } diff --git a/src/openapi/types/user-felogin-request-input.ts b/src/openapi/types/user-felogin-request-input.ts deleted file mode 100644 index 98b3abdc..00000000 --- a/src/openapi/types/user-felogin-request-input.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - * @export - * @interface UserFELoginRequestInput - */ -export interface UserFELoginRequestInput { - /** - * jwt of the user for whom to generate a token, Note: the sub of this jwt must match the user key that exists in permit database - * @type {string} - * @memberof UserFELoginRequestInput - */ - user_jwt: string; - /** - * ID or key of the tenant to which access is requested - * @type {string} - * @memberof UserFELoginRequestInput - */ - tenant_id: string; -} diff --git a/src/openapi/types/user-in-tenant.ts b/src/openapi/types/user-in-tenant.ts index a78317bc..64384172 100644 --- a/src/openapi/types/user-in-tenant.ts +++ b/src/openapi/types/user-in-tenant.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,22 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { UserStatus } from './user-status'; +import type { UserResourceInstanceRole } from './user-resource-instance-role'; +// May contain unused imports in some cases +import type { UserStatus } from './user-status'; -/** - * - * @export - * @interface UserInTenant - */ export interface UserInTenant { /** * The tenant key which the user is associated with - * @type {string} - * @memberof UserInTenant */ tenant: string; /** * List of roles assigned to the user in that tenant - * @type {Array} - * @memberof UserInTenant */ roles: Array; /** * Whether the user has signed in or not - * @type {UserStatus} - * @memberof UserInTenant */ status: UserStatus; + resource_instance_roles?: Array; } diff --git a/src/openapi/types/user-invite-status.ts b/src/openapi/types/user-invite-status.ts new file mode 100644 index 00000000..5bc441f0 --- /dev/null +++ b/src/openapi/types/user-invite-status.ts @@ -0,0 +1,22 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const UserInviteStatus = { + Pending: 'pending', + Approved: 'approved', +} as const; + +export type UserInviteStatus = (typeof UserInviteStatus)[keyof typeof UserInviteStatus]; diff --git a/src/openapi/types/user-login-request-input.ts b/src/openapi/types/user-login-request-input.ts index 99115a58..84bc452c 100644 --- a/src/openapi/types/user-login-request-input.ts +++ b/src/openapi/types/user-login-request-input.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,13 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserLoginRequestInput - */ export interface UserLoginRequestInput { /** * ID or key of the user for whom to generate a token - * @type {string} - * @memberof UserLoginRequestInput */ user_id: string; /** * ID or key of the tenant to which access is requested - * @type {string} - * @memberof UserLoginRequestInput */ tenant_id: string; } diff --git a/src/openapi/types/user-obj.ts b/src/openapi/types/user-obj.ts index c61589c0..e15fe11b 100644 --- a/src/openapi/types/user-obj.ts +++ b/src/openapi/types/user-obj.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,64 +10,18 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserObj - */ +// May contain unused imports in some cases +import type { RelationshipTupleObj } from './relationship-tuple-obj'; + export interface UserObj { - /** - * - * @type {string} - * @memberof UserObj - */ id: string; - /** - * - * @type {string} - * @memberof UserObj - */ key: string; - /** - * - * @type {string} - * @memberof UserObj - */ - email?: string; - /** - * - * @type {string} - * @memberof UserObj - */ - first_name?: string; - /** - * - * @type {string} - * @memberof UserObj - */ - last_name?: string; - /** - * - * @type {object} - * @memberof UserObj - */ - attributes?: object; - /** - * - * @type {Array} - * @memberof UserObj - */ - assigned_roles?: Array; - /** - * - * @type {string} - * @memberof UserObj - */ + email?: string | null; + first_name?: string | null; + last_name?: string | null; + attributes?: object | null; + roles?: Array | null; + assigned_roles?: Array | null; created_at: string; - /** - * - * @type {string} - * @memberof UserObj - */ updated_at: string; } diff --git a/src/openapi/types/user-read.ts b/src/openapi/types/user-read.ts index 03ee41af..44689493 100644 --- a/src/openapi/types/user-read.ts +++ b/src/openapi/types/user-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,95 +11,58 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { UserInTenant } from './user-in-tenant'; +import type { UserInTenant } from './user-in-tenant'; // May contain unused imports in some cases -// @ts-ignore -import { UserRole } from './user-role'; +import type { UserRole } from './user-role'; -/** - * - * @export - * @interface UserRead - */ export interface UserRead { /** * A unique id by which Permit will identify the user for permission checks. - * @type {string} - * @memberof UserRead */ key: string; /** * Unique id of the user - * @type {string} - * @memberof UserRead */ id: string; /** * Unique id of the organization that the user belongs to. - * @type {string} - * @memberof UserRead */ organization_id: string; /** * Unique id of the project that the user belongs to. - * @type {string} - * @memberof UserRead */ project_id: string; /** * Unique id of the environment that the user belongs to. - * @type {string} - * @memberof UserRead */ environment_id: string; - /** - * - * @type {Array} - * @memberof UserRead - */ associated_tenants?: Array; /** - * - * @type {Array} - * @memberof UserRead * @deprecated */ roles?: Array; + /** + * Date and time when the user was created (ISO_8601 format). + */ + created_at: string; + /** + * Date and time when the user was last updated/modified (ISO_8601 format). + */ + updated_at: string; /** * The email of the user. If synced, will be unique inside the environment. - * @type {string} - * @memberof UserRead */ email?: string; /** * First name of the user. - * @type {string} - * @memberof UserRead */ first_name?: string; /** * Last name of the user. - * @type {string} - * @memberof UserRead */ last_name?: string; /** * Arbitrary user attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof UserRead */ attributes?: object; - /** - * The date the user was created. - * @type {string} - * @memberof UserRead - */ - created_at: string; - /** - * The date the user was last updated. - * @type {string} - * @memberof UserRead - */ - updated_at: string; } diff --git a/src/openapi/types/user-replace-bulk-operation.ts b/src/openapi/types/user-replace-bulk-operation.ts index 5110888e..4c372dd2 100644 --- a/src/openapi/types/user-replace-bulk-operation.ts +++ b/src/openapi/types/user-replace-bulk-operation.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,16 +10,9 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserReplaceBulkOperation - */ +// May contain unused imports in some cases +import type { UserCreate } from './user-create'; + export interface UserReplaceBulkOperation { - /** - * - * @type {any} - * @memberof UserReplaceBulkOperation - */ - operations: any; + operations: Array; } diff --git a/src/openapi/types/user-resource-instance-role.ts b/src/openapi/types/user-resource-instance-role.ts new file mode 100644 index 00000000..9c6f36f7 --- /dev/null +++ b/src/openapi/types/user-resource-instance-role.ts @@ -0,0 +1,26 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface UserResourceInstanceRole { + /** + * The resource instance key which the role is associated with + */ + resource_instance: string; + /** + * The resource type which the role is associated with + */ + resource: string; + /** + * The role key of this resource role + */ + role: string; +} diff --git a/src/openapi/types/user-role-create.ts b/src/openapi/types/user-role-create.ts index 6204015f..44d6aa9e 100644 --- a/src/openapi/types/user-role-create.ts +++ b/src/openapi/types/user-role-create.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserRoleCreate - */ export interface UserRoleCreate { /** * the role that will be assigned (accepts either the role id or the role key) - * @type {string} - * @memberof UserRoleCreate */ role: string; /** * the tenant the role is associated with (accepts either the tenant id or the tenant key) - * @type {string} - * @memberof UserRoleCreate */ tenant?: string; /** - * the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance) - * @type {string} - * @memberof UserRoleCreate + * the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)The resource instance will be implicitly created if the tenant parameter is specified and the resource instance does not exist. */ resource_instance?: string; } diff --git a/src/openapi/types/user-role-remove.ts b/src/openapi/types/user-role-remove.ts index 7b7d1d10..fe7c42b1 100644 --- a/src/openapi/types/user-role-remove.ts +++ b/src/openapi/types/user-role-remove.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,28 +10,17 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserRoleRemove - */ export interface UserRoleRemove { /** * the role that will be unassigned (accepts either the role id or the role key) - * @type {string} - * @memberof UserRoleRemove */ role: string; /** * the tenant the role is associated with (accepts either the tenant id or the tenant key) - * @type {string} - * @memberof UserRoleRemove */ - tenant?: string; + tenant: string; /** * the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance) - * @type {string} - * @memberof UserRoleRemove */ resource_instance?: string; } diff --git a/src/openapi/types/user-role.ts b/src/openapi/types/user-role.ts index a52c195a..b9595512 100644 --- a/src/openapi/types/user-role.ts +++ b/src/openapi/types/user-role.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,13 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserRole - */ export interface UserRole { /** * the role that is assigned - * @type {string} - * @memberof UserRole */ role: string; /** * the tenant the role is associated with - * @type {string} - * @memberof UserRole */ tenant: string; } diff --git a/src/openapi/types/user-sets.ts b/src/openapi/types/user-sets.ts deleted file mode 100644 index 4ba22d21..00000000 --- a/src/openapi/types/user-sets.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { EnvironmentCopyScopeFilters } from './environment-copy-scope-filters'; - -/** - * @type UserSets - * User sets to copy - * @export - */ -export type UserSets = EnvironmentCopyScopeFilters; diff --git a/src/openapi/types/user-status.ts b/src/openapi/types/user-status.ts index 37099aa4..fe040e78 100644 --- a/src/openapi/types/user-status.ts +++ b/src/openapi/types/user-status.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -14,8 +12,6 @@ /** * An enumeration. - * @export - * @enum {string} */ export const UserStatus = { diff --git a/src/openapi/types/user-update.ts b/src/openapi/types/user-update.ts index 33adbbdc..e37edd7a 100644 --- a/src/openapi/types/user-update.ts +++ b/src/openapi/types/user-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,34 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface UserUpdate - */ export interface UserUpdate { /** * The email of the user. If synced, will be unique inside the environment. - * @type {string} - * @memberof UserUpdate */ email?: string; /** * First name of the user. - * @type {string} - * @memberof UserUpdate */ first_name?: string; /** * Last name of the user. - * @type {string} - * @memberof UserUpdate */ last_name?: string; /** * Arbitrary user attributes that will be used to enforce attribute-based access control policies. - * @type {object} - * @memberof UserUpdate */ attributes?: object; } diff --git a/src/openapi/types/validation-error.ts b/src/openapi/types/validation-error.ts index 71e3ff06..6f7cbce1 100644 --- a/src/openapi/types/validation-error.ts +++ b/src/openapi/types/validation-error.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -13,31 +11,10 @@ */ // May contain unused imports in some cases -// @ts-ignore -import { LocationInner } from './location-inner'; +import type { LocationInner } from './location-inner'; -/** - * - * @export - * @interface ValidationError - */ export interface ValidationError { - /** - * - * @type {Array} - * @memberof ValidationError - */ loc: Array; - /** - * - * @type {string} - * @memberof ValidationError - */ msg: string; - /** - * - * @type {string} - * @memberof ValidationError - */ type: string; } diff --git a/src/openapi/types/viewer-context.ts b/src/openapi/types/viewer-context.ts deleted file mode 100644 index c905e9e0..00000000 --- a/src/openapi/types/viewer-context.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { Viewer } from './viewer'; -// May contain unused imports in some cases -// @ts-ignore -import { ViewerGrant } from './viewer-grant'; - -/** - * A Viewer Context object represents the currently logged in actor. - It can be a human user of permit.io - It can be a machine (using an api key) that directly interacts with the api - It can be an (embedded) human user of one of our customers, using an embedded UI interface. A VC object should contain *all* the data required by the internal authz layer to verify whether an api request is allowed to run. This model allows us to avoid expensive SQL queries for internal AuthZ logic. - * @export - * @interface ViewerContext - */ -export interface ViewerContext { - /** - * - * @type {Viewer} - * @memberof ViewerContext - */ - viewer: Viewer; - /** - * - * @type {Array} - * @memberof ViewerContext - */ - grants: Array; - /** - * the active organization id - * @type {string} - * @memberof ViewerContext - */ - active_org_id?: string; -} diff --git a/src/openapi/types/viewer-grant.ts b/src/openapi/types/viewer-grant.ts deleted file mode 100644 index ac37e0a7..00000000 --- a/src/openapi/types/viewer-grant.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { MemberAccessLevel } from './member-access-level'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberAccessObj } from './member-access-obj'; - -/** - * - * @export - * @interface ViewerGrant - */ -export interface ViewerGrant { - /** - * - * @type {MemberAccessLevel} - * @memberof ViewerGrant - */ - role: MemberAccessLevel; - /** - * - * @type {MemberAccessObj} - * @memberof ViewerGrant - */ - type: MemberAccessObj; - /** - * - * @type {string} - * @memberof ViewerGrant - */ - org_id?: string; - /** - * - * @type {string} - * @memberof ViewerGrant - */ - project_id?: string; - /** - * - * @type {string} - * @memberof ViewerGrant - */ - env_id?: string; -} diff --git a/src/openapi/types/viewer.ts b/src/openapi/types/viewer.ts deleted file mode 100644 index a2956dde..00000000 --- a/src/openapi/types/viewer.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { APIKeyInfo } from './apikey-info'; -// May contain unused imports in some cases -// @ts-ignore -import { APIKeyViewerContext } from './apikey-viewer-context'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberInfo } from './member-info'; -// May contain unused imports in some cases -// @ts-ignore -import { MemberViewerContext } from './member-viewer-context'; - -/** - * @type Viewer - * @export - */ -export type Viewer = - | ({ type: 'api_key' } & APIKeyViewerContext) - | ({ type: 'member' } & MemberViewerContext); diff --git a/src/openapi/types/webhook-create.ts b/src/openapi/types/webhook-create-with-elements.ts similarity index 57% rename from src/openapi/types/webhook-create.ts rename to src/openapi/types/webhook-create-with-elements.ts index 2caf9de9..cd579f58 100644 --- a/src/openapi/types/webhook-create.ts +++ b/src/openapi/types/webhook-create-with-elements.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,21 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface WebhookCreate - */ -export interface WebhookCreate { +export interface WebhookCreateWithElements { + type?: WebhookCreateWithElementsTypeEnum; /** * The url to POST the webhook to - * @type {string} - * @memberof WebhookCreate */ url: string; /** * An optional bearer token to use to authenticate the request - * @type {string} - * @memberof WebhookCreate */ bearer_token?: string; } + +export const WebhookCreateWithElementsTypeEnum = { + Elements: 'elements', +} as const; + +export type WebhookCreateWithElementsTypeEnum = + (typeof WebhookCreateWithElementsTypeEnum)[keyof typeof WebhookCreateWithElementsTypeEnum]; diff --git a/src/openapi/types/webhook-read.ts b/src/openapi/types/webhook-read.ts index fc337ac0..0abcc330 100644 --- a/src/openapi/types/webhook-read.ts +++ b/src/openapi/types/webhook-read.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,52 +10,37 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface WebhookRead - */ +// May contain unused imports in some cases +import type { WebhookType } from './webhook-type'; + export interface WebhookRead { + type: WebhookType; /** * Unique id of the webhook - * @type {string} - * @memberof WebhookRead */ id: string; /** * Unique id of the organization that the webhook belongs to. - * @type {string} - * @memberof WebhookRead */ organization_id: string; /** * Unique id of the project that the webhook belongs to. - * @type {string} - * @memberof WebhookRead */ project_id: string; /** * Unique id of the environment that the webhook belongs to. - * @type {string} - * @memberof WebhookRead */ environment_id: string; /** * Date and time when the webhook was created (ISO_8601 format). - * @type {string} - * @memberof WebhookRead */ created_at: string; /** * Date and time when the webhook was last updated/modified (ISO_8601 format). - * @type {string} - * @memberof WebhookRead */ updated_at: string; /** * The url to POST the webhook to - * @type {string} - * @memberof WebhookRead */ url: string; } diff --git a/src/openapi/types/webhook-type.ts b/src/openapi/types/webhook-type.ts new file mode 100644 index 00000000..4085c03b --- /dev/null +++ b/src/openapi/types/webhook-type.ts @@ -0,0 +1,22 @@ +/** + * Permit.io API + * Authorization as a service + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * An enumeration. + */ + +export const WebhookType = { + Elements: 'elements', + PdpSyncError: 'pdp_sync_error', +} as const; + +export type WebhookType = (typeof WebhookType)[keyof typeof WebhookType]; diff --git a/src/openapi/types/webhook-update.ts b/src/openapi/types/webhook-update.ts index 0b8e1704..6babe8da 100644 --- a/src/openapi/types/webhook-update.ts +++ b/src/openapi/types/webhook-update.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Permit.io API * Authorization as a service @@ -12,22 +10,13 @@ * Do not edit the class manually. */ -/** - * - * @export - * @interface WebhookUpdate - */ export interface WebhookUpdate { /** * The url to POST the webhook to - * @type {string} - * @memberof WebhookUpdate */ url?: string; /** * An optional bearer token to use to authenticate the request - * @type {string} - * @memberof WebhookUpdate */ bearer_token?: string; } diff --git a/src/openapi/types/when.ts b/src/openapi/types/when.ts deleted file mode 100644 index a02518e4..00000000 --- a/src/openapi/types/when.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Permit.io API - * Authorization as a service - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// May contain unused imports in some cases -// @ts-ignore -import { PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings } from './permit-backend-schemas-schema-derived-role-derived-role-settings'; - -/** - * @type When - * the settings of the derived role - * @export - */ -export type When = PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings; diff --git a/src/package.json b/src/package.json new file mode 100644 index 00000000..e986b24b --- /dev/null +++ b/src/package.json @@ -0,0 +1,4 @@ +{ + "private": true, + "type": "module" +} diff --git a/src/tests/bulk_test.spec.ts b/src/tests/bulk_test.spec.ts deleted file mode 100644 index f677d483..00000000 --- a/src/tests/bulk_test.spec.ts +++ /dev/null @@ -1,106 +0,0 @@ -import anyTest, { TestInterface } from 'ava'; - -import { provideTestExecutionContext, TestContext } from './fixtures'; - -const test_relationship_tuples = anyTest as TestInterface; -test_relationship_tuples.before(provideTestExecutionContext); -test_relationship_tuples('Bulk relationship tuples test', async (t) => { - const permit = t.context.permit; - const logger = t.context.logger; - - try { - const tuples = [ - { - subject: 'folders:pdf', - relation: 'parent', - object: 'docs:tasks', - tenant: 'default', - }, - { - subject: 'folders:png', - relation: 'parent', - object: 'docs:files', - tenant: 'default', - }, - ]; - logger.info('Tuples: ' + JSON.stringify(tuples)); - await permit.api.relationshipTuples.bulkRelationshipTuples(tuples); - } catch (error) { - logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } -}); - -const test_bulk_add_users = anyTest as TestInterface; -test_bulk_add_users.before(provideTestExecutionContext); -test_bulk_add_users('Bulk users test', async (t) => { - const permit = t.context.permit; - const logger = t.context.logger; - - try { - const users = [ - { - key: 'user_maya_test_1', - }, - { - key: 'user_maya_test_2', - }, - ]; - logger.info('users: ' + JSON.stringify(users)); - await permit.api.users.bulkUserCreate(users); - } catch (error) { - logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } -}); - -const test_bulk_replace_users = anyTest as TestInterface; -test_bulk_replace_users.before(provideTestExecutionContext); -test_bulk_replace_users('Bulk users replace test', async (t) => { - const permit = t.context.permit; - const logger = t.context.logger; - - try { - const users = [ - { - key: 'user_maya_test_1', - first_name: '1', - }, - { - key: 'user_maya_test_2', - first_name: '2', - }, - ]; - logger.info('users: ' + JSON.stringify(users)); - await permit.api.users.bulkUserReplace(users); - } catch (error) { - logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } -}); - -const test_bulk_delete_users = anyTest as TestInterface; -test_bulk_delete_users.before(provideTestExecutionContext); -test_bulk_delete_users('Bulk users delete test', async (t) => { - const permit = t.context.permit; - const logger = t.context.logger; - - try { - const users = [ - { - key: 'user_maya_1', - }, - { - key: 'user_maya_2', - }, - ]; - logger.info('users: ' + JSON.stringify(users)); - await permit.api.users.bulkUserCreate(users); - const users_key = ['user_maya_1', 'user_maya_2']; - logger.info('users: ' + JSON.stringify(users_key)); - await permit.api.users.bulkUserDelete(users_key); - } catch (error) { - logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } -}); diff --git a/src/tests/codegen/fixtures/README.md b/src/tests/codegen/fixtures/README.md index 446a64c3..89b4f8cf 100644 --- a/src/tests/codegen/fixtures/README.md +++ b/src/tests/codegen/fixtures/README.md @@ -1,52 +1,19 @@ -# Codegen guard fixture - -`openapi-3.1.0.json` contains the snapshot of - committed in `4993c341` on 2026-06-28. -The original capture date was not recorded. The snapshot has 329 API schemas and -160 paths. Its API data is unchanged; the JSON is formatted for review. - -Two synthetic schemas, `CodegenProbe` and `CodegenProbeInner`, exercise OpenAPI 3.1 -nullable type arrays, `anyOf` with `null`, nullable references and nullable arrays. -The guard checks their generated property types as well as role inheritance and -scalar canaries. The fixture must retain its `3.1.0` header. - -Run `yarn test:codegen` for Java-free AVA regression tests and `yarn check:codegen` -for generation (Java 11+ required). The guard reads the generator version from -`openapitools.json` and the options from `generate-openapi-client` in `package.json`. -It rejects new options it cannot reproduce. Temporary output is removed after each run. - -Generator 7.25.0 was selected using the Maven Central release metadata captured -2026-09-29. It supports all four existing `typescript-axios` options and removes -the extra index signatures emitted by 7.12.0 in two derived-role models. Its -output is checked with the existing TypeScript compiler; the shipped client in -`src/openapi/` is not regenerated here (PER-16500's semver-major follow-up). - -The guard checks completion metadata, unexpected `any` in all models and 11 -specific property shapes. Its 20 permitted bare-`any` fields represent deliberately -unconstrained API data. Nested free-form dictionaries are also permitted. This is -not proof of complete JSON Schema support: both 7.12.0 and 7.25.0 turn an untyped -`const` into `any`, and the API's nonstandard `HeadersAuth`, `BasicAuth` and -`BearerAuth` schema types still produce an empty `Secret` interface. These upstream -limitations and live-spec drift belong to the PER-16500 follow-up; no entire model -is exempted from the `any` checks. The older npm wrapper also emits Node 24's -DEP0190 warning because it invokes Java through a shell; updating that dependency -and its lockfile is separate work. Relative generator arguments avoid its path -splitting bug, and completion metadata catches its false-success signal exits. - -To refresh the API snapshot intentionally: - -1. Save the current `CodegenProbe` and `CodegenProbeInner` schemas. -2. Download the source: - - ```sh - curl --fail https://api.permit.io/v2/openapi.json -o /tmp/permit-openapi.json - ``` - -3. Merge the two probes into `components.schemas`, then write the fixture with - `JSON.stringify(spec, null, 2) + '\n'`. Run Prettier on the fixture and record - the capture date here. -4. Review schema changes and any changes to the exact free-form property list in - `scripts/check-codegen.mjs`; do not exempt new degradation just to pass the guard. -5. Run `yarn test:codegen` and `yarn check:codegen`. Check that generator 6.2.1 - still fails in an isolated checkout. Do not regenerate `src/openapi/` as part - of refreshing this fixture. +# Historical OpenAPI regression fixture + +`openapi-3.1.0.json` retains the public API snapshot committed in `4993c341` on 2026-06-28. +Its original capture date was not recorded. The API data contains 329 schemas and 160 paths; +two synthetic schemas, `CodegenProbe` and `CodegenProbeInner`, exercise OpenAPI 3.1 nullable +primitive arrays, `anyOf` with `null`, nullable references and nullable arrays. + +Run `pnpm test:codegen` for local Java-free regression tests and `pnpm check:codegen` for real +fixture generation with Java 17. The fixture guard uses the same `openapi/generator.json`, pinned +7.25.0 generator, union templates, checked source corrections and tuple repair as production. +It validates the prepared OpenAPI document, completion metadata and all model shapes, including +11 historical property canaries. Temporary output is removed after success or failure. + +The original fixture remains unchanged so generator upgrades retain a stable comparison point. +The current production snapshot, provenance, corrections, known generator diagnostics and refresh +procedure are documented in [openapi/README.md](../../../../openapi/README.md). Production +regeneration is separately checked twice for determinism and against committed output with +`pnpm check:openapi`. The shared model guard rejects unexpected `any`, empty interfaces and lost +union branches; it permits only reviewed free-form source contracts. diff --git a/src/tests/e2e/bulk.e2e.spec.ts b/src/tests/e2e/bulk.e2e.spec.ts new file mode 100644 index 00000000..9a7dfe02 --- /dev/null +++ b/src/tests/e2e/bulk.e2e.spec.ts @@ -0,0 +1,155 @@ +import { randomUUID } from 'node:crypto'; + +import pino from 'pino'; + +import { type IPermitClient } from '#src/index'; +import { cleanUp, createTestClient, expectNotFound } from '#src/tests/fixtures'; +import { waitFor } from '#src/tests/helpers/wait-for'; + +let permit: IPermitClient; +let logger: pino.Logger; + +// Keys unique to this run, so entities left by another spec or an earlier run can't collide +// with the ones created here. +const RUN_ID = `${process.pid}_${Date.now()}_${randomUUID().slice(0, 8)}`; +const unique = (key: string) => `bulk_${key}_${RUN_ID}`; + +const BULK_USER_1 = unique('user_maya_test_1'); +const BULK_USER_2 = unique('user_maya_test_2'); +// The delete test's users share a prefix, so searching for it lists exactly those users. +const DELETED_PREFIX = unique('user_maya_deleted'); +const DELETED_USER_1 = `${DELETED_PREFIX}_1`; +const DELETED_USER_2 = `${DELETED_PREFIX}_2`; +// Every user key this spec creates, so afterAll can delete whichever ones remain. +const CREATED_USER_KEYS = [BULK_USER_1, BULK_USER_2, DELETED_USER_1, DELETED_USER_2]; + +// Resources/relation backing the relationship-tuple test. Created here so the +// test is self-contained in a shared backend (rebac uses its own schema). +const FOLDERS_RESOURCE = unique('folders'); +const DOCS_RESOURCE = unique('docs'); + +beforeAll(async () => { + ({ permit, logger } = createTestClient()); + + await permit.api.resources.create({ + key: FOLDERS_RESOURCE, + name: 'Folders', + actions: { read: {} }, + }); + await permit.api.resources.create({ key: DOCS_RESOURCE, name: 'Docs', actions: { read: {} } }); + // docs: --parent--> folders:; subject of the relation is a folder. + await permit.api.resourceRelations.create(DOCS_RESOURCE, { + key: 'parent', + name: 'Parent', + subject_resource: FOLDERS_RESOURCE, + }); +}); + +afterAll(async () => { + if (!permit) return; // beforeAll never initialized the client (e.g. missing key) + // Deleting the resources removes their instances and relationship tuples. + const steps: Record Promise> = {}; + for (const key of CREATED_USER_KEYS) { + steps[`user ${key}`] = () => permit.api.users.delete(key); + steps[`verify user ${key} absent`] = () => + expectNotFound(permit.api.users.get(key), `user ${key}`); + } + steps[`resource ${DOCS_RESOURCE}`] = () => permit.api.resources.delete(DOCS_RESOURCE); + steps[`resource ${FOLDERS_RESOURCE}`] = () => permit.api.resources.delete(FOLDERS_RESOURCE); + steps[`verify resource ${DOCS_RESOURCE} absent`] = () => + expectNotFound(permit.api.resources.get(DOCS_RESOURCE), `resource ${DOCS_RESOURCE}`); + steps[`verify resource ${FOLDERS_RESOURCE} absent`] = () => + expectNotFound(permit.api.resources.get(FOLDERS_RESOURCE), `resource ${FOLDERS_RESOURCE}`); + await cleanUp(steps); +}); + +it('Bulk relationship tuples test', async () => { + const tuples = [ + { + subject: `${FOLDERS_RESOURCE}:pdf`, + relation: 'parent', + object: `${DOCS_RESOURCE}:tasks`, + tenant: 'default', + }, + { + subject: `${FOLDERS_RESOURCE}:png`, + relation: 'parent', + object: `${DOCS_RESOURCE}:files`, + tenant: 'default', + }, + ]; + for (const [resource, key] of [ + [FOLDERS_RESOURCE, 'pdf'], + [FOLDERS_RESOURCE, 'png'], + [DOCS_RESOURCE, 'tasks'], + [DOCS_RESOURCE, 'files'], + ] as const) { + await permit.api.resourceInstances.create({ resource, key, tenant: 'default' }); + } + logger.info('Tuples: ' + JSON.stringify(tuples)); + await permit.api.relationshipTuples.bulkRelationshipTuples(tuples); + for (const tuple of tuples) { + const persisted = await waitFor( + () => permit.api.relationshipTuples.list(tuple), + (list) => list.length === 1, + { timeoutMs: 60_000, message: 'bulk-created tuple not yet persisted' }, + ); + expect(persisted).toHaveLength(1); + expect(persisted[0]).toMatchObject(tuple); + expect(persisted[0]?.id).toEqual(expect.any(String)); + } +}); + +it('Bulk users test', async () => { + const users = [{ key: BULK_USER_1 }, { key: BULK_USER_2 }]; + logger.info('users: ' + JSON.stringify(users)); + await permit.api.users.bulkUserCreate(users); + for (const user of users) { + const persisted = await waitFor( + () => permit.api.users.list({ search: user.key }), + (list) => list.data.some((item) => item.key === user.key), + { timeoutMs: 60_000, message: 'bulk-created user not yet persisted' }, + ); + expect(persisted.data.find((item) => item.key === user.key)).toMatchObject(user); + } +}); + +it('Bulk users replace test', async () => { + const users = [ + { key: BULK_USER_1, first_name: '1' }, + { key: BULK_USER_2, first_name: '2' }, + ]; + logger.info('users: ' + JSON.stringify(users)); + await permit.api.users.bulkUserReplace(users); + for (const user of users) { + const persisted = await waitFor( + () => permit.api.users.list({ search: user.key }), + (list) => + list.data.some((item) => item.key === user.key && item.first_name === user.first_name), + { timeoutMs: 60_000, message: 'bulk-replaced user fields not yet persisted' }, + ); + expect(persisted.data.find((item) => item.key === user.key)).toMatchObject(user); + } +}); + +it('Bulk users delete test', async () => { + const listDeletedUsers = () => permit.api.users.list({ search: DELETED_PREFIX }); + const users = [{ key: DELETED_USER_1 }, { key: DELETED_USER_2 }]; + logger.info('users: ' + JSON.stringify(users)); + await permit.api.users.bulkUserCreate(users); + // Bulk create is eventually consistent; wait until both users are listable, so the delete + // below acts on users that exist. + await waitFor(listDeletedUsers, (list) => list.total_count === 2, { + timeoutMs: 60_000, + message: 'bulk-created users not yet listable', + describe: (list) => `total_count=${list.total_count}`, + }); + const users_key = [DELETED_USER_1, DELETED_USER_2]; + logger.info('users: ' + JSON.stringify(users_key)); + await permit.api.users.bulkUserDelete(users_key); + await waitFor(listDeletedUsers, (list) => list.total_count === 0, { + timeoutMs: 60_000, + message: 'bulk-deleted users still listed', + describe: (list) => `total_count=${list.total_count}`, + }); +}); diff --git a/src/tests/e2e/condition-sets.e2e.spec.ts b/src/tests/e2e/condition-sets.e2e.spec.ts new file mode 100644 index 00000000..bd356acd --- /dev/null +++ b/src/tests/e2e/condition-sets.e2e.spec.ts @@ -0,0 +1,173 @@ +import pino from 'pino'; + +import { type IPermitClient } from '#src/index'; +import { cleanUp, createTestClient, expectNotFound } from '#src/tests/fixtures'; +import { waitForCheck } from '#src/tests/helpers/wait-for'; + +let permit: IPermitClient; +let logger: pino.Logger; + +// Unique per-run suffix so concurrent/repeated runs never collide on the shared +// environment, and so the afterAll cleanup only ever touches what this spec made. +const rand = Math.random().toString(36).slice(2, 8); +const RESOURCE_KEY = `cs_e2e_doc_${rand}`; +const USERSET_KEY = `cs_e2e_userset_${rand}`; +const RESOURCESET_KEY = `cs_e2e_resourceset_${rand}`; +const MATCHING_USER_KEY = `cs_e2e_user_match_${rand}`; +const OTHER_USER_KEY = `cs_e2e_user_other_${rand}`; +// Built-in 'user' resource key in Permit. A userset condition that references +// user. requires the attribute to exist on this resource first. +const USER_RESOURCE_KEY = '__user'; +const USER_ATTR = `cs_e2e_clearance_${rand}`; +const ACTION = 'read'; +const PERMISSION = `${RESOURCE_KEY}:${ACTION}`; +const TENANT = 'default'; +const RULE = { user_set: USERSET_KEY, permission: PERMISSION, resource_set: RESOURCESET_KEY }; + +const documentInTenant = { type: RESOURCE_KEY, tenant: TENANT }; +const confidentialResource = { ...documentInTenant, attributes: { confidential: true } }; + +beforeAll(() => { + ({ permit, logger } = createTestClient()); +}); + +/** Rejects while a rule linking the two sets still grants the permission. */ +async function expectRuleGone(): Promise { + const rules = await permit.api.conditionSetRules.list({ + userSetKey: USERSET_KEY, + permissionKey: PERMISSION, + resourceSetKey: RESOURCESET_KEY, + }); + expect(rules).toEqual([]); +} + +afterAll(async () => { + if (!permit) return; // beforeAll never initialized the client (e.g. missing key) + // Teardown in dependency order (rule -> condition sets -> user attribute -> users -> + // resource). Every step runs even if an earlier one failed; a 404 means the entity was never + // created. The rule is checked while its sets still exist, then each entity by its key. + await cleanUp({ + [`condition set rule ${USERSET_KEY} -> ${RESOURCESET_KEY}`]: () => + permit.api.conditionSetRules.delete(RULE), + [`check that the rule is gone`]: expectRuleGone, + [`condition set ${USERSET_KEY}`]: () => permit.api.conditionSets.delete(USERSET_KEY), + [`condition set ${RESOURCESET_KEY}`]: () => permit.api.conditionSets.delete(RESOURCESET_KEY), + // The built-in '__user' resource itself is never deleted, only the attribute added to it. + [`attribute ${USER_ATTR} of ${USER_RESOURCE_KEY}`]: () => + permit.api.resourceAttributes.delete(USER_RESOURCE_KEY, USER_ATTR), + [`user ${MATCHING_USER_KEY}`]: () => permit.api.users.delete(MATCHING_USER_KEY), + [`user ${OTHER_USER_KEY}`]: () => permit.api.users.delete(OTHER_USER_KEY), + [`resource ${RESOURCE_KEY}`]: () => permit.api.resources.delete(RESOURCE_KEY), + }); + + await expectNotFound(permit.api.conditionSets.get(USERSET_KEY), `condition set ${USERSET_KEY}`); + await expectNotFound( + permit.api.conditionSets.get(RESOURCESET_KEY), + `condition set ${RESOURCESET_KEY}`, + ); + await expectNotFound( + permit.api.resourceAttributes.get(USER_RESOURCE_KEY, USER_ATTR), + `attribute ${USER_ATTR} of ${USER_RESOURCE_KEY}`, + ); + await expectNotFound(permit.api.users.get(MATCHING_USER_KEY), `user ${MATCHING_USER_KEY}`); + await expectNotFound(permit.api.users.get(OTHER_USER_KEY), `user ${OTHER_USER_KEY}`); + await expectNotFound(permit.api.resources.get(RESOURCE_KEY), `resource ${RESOURCE_KEY}`); +}); + +it('ABAC condition sets, rule and users are set up', async () => { + logger.info('creating an attributed resource for ABAC'); + const resource = await permit.api.resources.create({ + key: RESOURCE_KEY, + name: RESOURCE_KEY, + actions: { [ACTION]: {} }, + attributes: { + confidential: { + type: 'bool', + description: 'whether the document is confidential', + }, + }, + }); + expect(resource.key).toBe(RESOURCE_KEY); + expect((resource.actions ?? {})[ACTION]).not.toBe(undefined); + + logger.info('registering the user attribute referenced by the userset condition'); + const userAttribute = await permit.api.resourceAttributes.create(USER_RESOURCE_KEY, { + key: USER_ATTR, + type: 'string', + }); + expect(userAttribute.key).toBe(USER_ATTR); + + logger.info('creating the userset condition set (matches a user attribute)'); + const userSet = await permit.api.conditionSets.create({ + key: USERSET_KEY, + name: USERSET_KEY, + type: 'userset', + conditions: { + allOf: [{ [`user.${USER_ATTR}`]: { equals: 'top_secret' } }], + }, + }); + expect(userSet.key).toBe(USERSET_KEY); + expect(userSet.type).toBe('userset'); + + logger.info('creating the resourceset condition set (matches a resource attribute)'); + const resourceSet = await permit.api.conditionSets.create({ + key: RESOURCESET_KEY, + name: RESOURCESET_KEY, + type: 'resourceset', + resource_id: RESOURCE_KEY, + conditions: { + allOf: [{ 'resource.confidential': { equals: true } }], + }, + }); + expect(resourceSet.key).toBe(RESOURCESET_KEY); + expect(resourceSet.type).toBe('resourceset'); + + logger.info('linking the sets with a condition-set rule that grants the action'); + const rule = await permit.api.conditionSetRules.create(RULE); + expect(rule.user_set).toBe(USERSET_KEY); + expect(rule.resource_set).toBe(RESOURCESET_KEY); + expect(rule.permission).toBe(PERMISSION); + + logger.info('syncing a user that matches the userset, and one that does not'); + const { user: matchingUser } = await permit.api.users.sync({ + key: MATCHING_USER_KEY, + attributes: { [USER_ATTR]: 'top_secret' }, + }); + expect(matchingUser.key).toBe(MATCHING_USER_KEY); + expect(matchingUser.attributes).toHaveProperty([USER_ATTR], 'top_secret'); + + const { user: otherUser } = await permit.api.users.sync({ + key: OTHER_USER_KEY, + attributes: { [USER_ATTR]: 'public' }, + }); + expect(otherUser.key).toBe(OTHER_USER_KEY); +}); + +// New condition sets' policy doesn't reliably reach the PDP (PER-16553); remove .skip once fixed. +it.skip( + 'ABAC decisions (pending PER-16553)', + { + meta: { + coverageUnavailable: 'PER-16553: condition-set policy does not reliably reach the PDP', + }, + }, + async () => { + // Positive ABAC check: the matching user reads a confidential document. It is polled until + // the previous test's writes have propagated from the control plane to the PDP. Condition sets + // compile to new policy (rego), which takes longer to take effect than plain role/fact + // propagation, so allow a wider budget. + logger.info('positive ABAC check: matching user reads a confidential document'); + await waitForCheck(() => permit.check(MATCHING_USER_KEY, ACTION, confidentialResource), true, { + timeoutMs: 180_000, + }); + + // The policy is in place now, so each half of the rule can be checked on its own. + logger.info('negative ABAC check: non-matching user is denied'); + expect(await permit.check(OTHER_USER_KEY, ACTION, confidentialResource)).toBe(false); + + logger.info('negative ABAC check: matching user is denied a document that is not confidential'); + const publicResource = { ...documentInTenant, attributes: { confidential: false } }; + expect(await permit.check(MATCHING_USER_KEY, ACTION, publicResource)).toBe(false); + expect(await permit.check(MATCHING_USER_KEY, ACTION, documentInTenant)).toBe(false); + }, +); diff --git a/src/tests/e2e/lists.e2e.spec.ts b/src/tests/e2e/lists.e2e.spec.ts index 97b5bec2..00735a9a 100644 --- a/src/tests/e2e/lists.e2e.spec.ts +++ b/src/tests/e2e/lists.e2e.spec.ts @@ -1,39 +1,54 @@ -import anyTest, { TestInterface } from 'ava'; - -import { printBreak, provideTestExecutionContext, TestContext } from '../fixtures'; - -const sleepTimeMs = 10000; - -const test = anyTest as TestInterface; -test.before(provideTestExecutionContext); -test.before(async (t) => { - const permit = t.context.permit; - await permit.api.users - .bulkUserCreate(Array.from({ length: 10 }).map((_, i) => ({ key: `user-${i}` }))) - .catch(() => null); +import { type IPermitClient } from '#src/index'; +import { cleanUp, createTestClient } from '#src/tests/fixtures'; +import { waitFor } from '#src/tests/helpers/wait-for'; + +let permit: IPermitClient; + +// A run-unique prefix keeps these assertions scoped to the users this spec +// created, so they hold regardless of what other suites leave in the shared +// environment (no absolute-count assertions). +const PREFIX = `lists-${process.pid}-${Date.now()}`; +const USER_KEYS = Array.from({ length: 10 }).map((_, i) => `${PREFIX}-user-${i}`); + +beforeAll(async () => { + ({ permit } = createTestClient()); + await permit.api.users.bulkUserCreate(USER_KEYS.map((key) => ({ key }))); + // Bulk create is eventually consistent; gate until all 10 users are listable + // so the exact-count assertions below don't race the write propagating. + await waitFor( + () => permit.api.users.list({ search: PREFIX, perPage: 100 }), + (users) => users.total_count === 10, + { + timeoutMs: 60_000, + intervalMs: 1_000, + message: 'created users not yet listable', + describe: (users) => `total_count=${users.total_count}`, + }, + ); }); -test('List users', async (t) => { - const permit = t.context.permit; - - const users = await permit.api.users.list(); - t.is(users.total_count, 10); - t.is(users.data.length, 10); +afterAll(async () => { + if (!permit) return; // beforeAll never initialized the client (e.g. missing key) + await cleanUp({ [`users ${PREFIX}-user-*`]: () => permit.api.users.bulkUserDelete(USER_KEYS) }); }); -test('List users with pagination', async (t) => { - const permit = t.context.permit; - - const users = await permit.api.users.list({ page: 1, perPage: 5 }); - t.is(users.total_count, 10); - t.is(users.data.length, 5); +it('List users scoped by prefix returns exactly the created users', async () => { + const users = await permit.api.users.list({ search: PREFIX }); + expect(users.total_count).toBe(10); + expect(users.data.length).toBe(10); }); -test('List users with search', async (t) => { - const permit = t.context.permit; +it('List users with pagination over the scoped subset', async () => { + const users = await permit.api.users.list({ search: PREFIX, page: 1, perPage: 5 }); + expect(users.total_count).toBe(10); + expect(users.data.length).toBe(5); +}); - const users = await permit.api.users.list({ search: 'user-1' }); - t.is(users.total_count, 1); - t.is(users.data.length, 1); - t.is(users.data[0].key, 'user-1'); +it('List users searching a single full key returns one user', async () => { + const oneKey = USER_KEYS[0]; + assert(oneKey !== undefined); + const users = await permit.api.users.list({ search: oneKey }); + expect(users.total_count).toBe(1); + expect(users.data.length).toBe(1); + expect(users.data[0]?.key).toBe(oneKey); }); diff --git a/src/tests/e2e/local_facts.e2e.spec.ts b/src/tests/e2e/local_facts.e2e.spec.ts index 7192dbb9..ebe039ee 100644 --- a/src/tests/e2e/local_facts.e2e.spec.ts +++ b/src/tests/e2e/local_facts.e2e.spec.ts @@ -1,124 +1,134 @@ -import anyTest, { TestInterface } from 'ava'; -import pino from 'pino'; - -import { Permit } from '../../index'; -import { LoggerFactory } from '../../logger'; - -interface TestContext { - permit: Permit; - logger: pino.Logger; -} - -const test = anyTest as TestInterface; - -test.before(async (t) => { - if (process.env.CLOUD_PDP === 'true') { - t.fail('This test is not supported with cloud PDP'); +import { type IPermitClient, type IResource } from '#src/index'; +import { cleanUp, createTestClient } from '#src/tests/fixtures'; +import { waitForCheck } from '#src/tests/helpers/wait-for'; + +let permit: IPermitClient; + +// Keys unique to this run, so entities left by another spec or an earlier run can't change the +// results. +const RUN_ID = `${process.pid}_${Date.now()}`; +const unique = (key: string) => `local_facts_${key}_${RUN_ID}`; +const ADMIN = unique('admin'); +const REPO = unique('repo'); +const EDITOR = 'editor'; +const TENANT = 'default'; + +// With proxyFactsViaPdp, a write sent with waitForSync(FACT_SYNC_TIMEOUT_S, 'fail') returns +// only after the PDP has applied it, and fails with 424 if that takes longer. A check made right +// after the write must therefore see it; these tests assert exactly that, without polling. +const FACT_SYNC_TIMEOUT_S = 30; + +// Keys this spec creates at runtime, tracked so afterAll can delete exactly what was created. +const createdUserKeys: string[] = []; +const createdTenantKeys: string[] = []; + +beforeAll(async () => { + if (process.env['CLOUD_PDP'] === 'true') { + throw new Error('This test is not supported with cloud PDP'); } - const defaultPDPAddress = 'http://localhost:7766'; - const defaultApiAddress = - process.env.API_TIER === 'prod' ? 'https://api.permit.io' : 'http://localhost:8000'; - - const token: string = process.env.PDP_API_KEY || ''; - const pdpAddress: string = process.env.PDP_URL || defaultPDPAddress; - const apiUrl = process.env.PDP_CONTROL_PLANE || defaultApiAddress; + ({ permit } = createTestClient({ proxyFactsViaPdp: true })); + await setupSchema(permit); + await waitForSchema(permit); +}); - if (!token) { - t.fail('PDP_API_KEY is not configured, test cannot run!'); +afterAll(async () => { + if (!permit) return; // beforeAll never initialized the client (e.g. missing key) + // Deleting the resource removes its resource role and instances. + const steps: Record Promise> = {}; + for (const key of createdUserKeys) { + steps[`user ${key}`] = () => permit.api.users.delete(key); + } + for (const key of createdTenantKeys) { + steps[`tenant ${key}`] = () => permit.api.tenants.delete(key); } + steps[`resource ${REPO}`] = () => permit.api.resources.delete(REPO); + steps[`role ${ADMIN}`] = () => permit.api.roles.delete(ADMIN); + await cleanUp(steps); +}); - t.context.permit = new Permit({ - token, - pdp: pdpAddress, - apiUrl, - log: { - level: 'debug', - }, - proxyFactsViaPdp: true, +const setupSchema = async (client: IPermitClient) => { + await client.api.roles.create({ key: ADMIN, name: 'admin' }); + await client.api.resources.create({ + key: REPO, + name: 'Repository', + actions: { create: {}, read: {}, update: {}, delete: {} }, }); + await client.api.roles.assignPermissions(ADMIN, [ + `${REPO}:create`, + `${REPO}:read`, + `${REPO}:update`, + `${REPO}:delete`, + ]); + await client.api.resourceRoles.create(REPO, { key: EDITOR, name: 'editor' }); + await client.api.resourceRoles.assignPermissions(REPO, EDITOR, ['update']); +}; - t.context.logger = LoggerFactory.createLogger(t.context.permit.config); +/** Creates a user through the PDP, returning once the PDP has applied it. */ +async function createUser(client: IPermitClient, key: string): Promise { + createdUserKeys.push(key); + await client.api.users.waitForSync(FACT_SYNC_TIMEOUT_S, 'fail').create({ key }); +} - await setupSchema(t.context.permit); -}); +/** Creates a tenant and a repo instance in it through the PDP, returning once both apply. */ +async function createRepoInstance(client: IPermitClient, name: string): Promise { + const tenant = unique(`${name}_tenant`); + const key = unique(`${name}_repo`); + createdTenantKeys.push(tenant); + await client.api.tenants + .waitForSync(FACT_SYNC_TIMEOUT_S, 'fail') + .create({ key: tenant, name: 'My Tenant' }); + await client.api.resourceInstances + .waitForSync(FACT_SYNC_TIMEOUT_S, 'fail') + .create({ key, resource: REPO, tenant }); + return { type: REPO, key, tenant }; +} -const setupSchema = async (permit: Permit) => { - await permit.api.roles.create({ key: 'admin', name: 'admin' }).catch(() => null); - - await permit.api.resources - .create({ - key: 'repo', - name: 'Repository', - actions: { create: {}, read: {}, update: {}, delete: {} }, - }) - .catch(() => null); - - await permit.api.roles - .assignPermissions('admin', ['repo:create', 'repo:read', 'repo:update', 'repo:delete']) - .catch(() => null); - await permit.api.resourceRoles - .create('repo', { - key: 'editor', - name: 'editor', - }) - .catch(() => null); - await permit.api.resourceRoles.assignPermissions('repo', 'editor', ['update']).catch(() => null); - - await sleep(10); // wait for schema to sync -}; +/** + * The schema reaches the PDP on its own schedule, unlike the facts the tests write. Wait for it + * once, through one user per role, so each test can check right after its own writes. + */ +async function waitForSchema(client: IPermitClient): Promise { + const admin = unique('schema_admin'); + await createUser(client, admin); + await client.api.users + .waitForSync(FACT_SYNC_TIMEOUT_S, 'fail') + .assignRole({ user: admin, role: ADMIN, tenant: TENANT }); + await waitForCheck(() => client.check(admin, 'create', REPO), true, { + message: `the ${ADMIN} role did not reach the PDP`, + }); -const sleep = async (seconds: number) => await new Promise((r) => setTimeout(r, seconds * 1000)); + const editor = unique('schema_editor'); + await createUser(client, editor); + const repo = await createRepoInstance(client, 'schema'); + await client.api.users + .waitForSync(FACT_SYNC_TIMEOUT_S, 'fail') + .assignRole({ user: editor, role: EDITOR, resource_instance: `${REPO}:${repo.key}` }); + await waitForCheck(() => client.check(editor, 'update', repo), true, { + message: `the ${REPO} ${EDITOR} role did not reach the PDP`, + }); +} -const makeRandomId = (prefix: string) => { - const num = Math.floor(Math.random() * 1_000_000); - return `${prefix}-${num}`; -}; +it('Check assign role', async () => { + const adminUserId = unique('user'); + await createUser(permit, adminUserId); -test('Check assign role', async (t) => { - const permit = t.context.permit; - const adminUserId = makeRandomId('user'); - await permit.api.users.create({ key: adminUserId }); - await permit.api.users.assignRole({ user: adminUserId, role: 'admin', tenant: 'default' }); - t.true(await permit.check(adminUserId, 'create', 'repo')); -}); + await permit.api.users + .waitForSync(FACT_SYNC_TIMEOUT_S, 'fail') + .assignRole({ user: adminUserId, role: ADMIN, tenant: TENANT }); -test('Check assign resource instance role', async (t) => { - const permit = t.context.permit; - const editorUserId = makeRandomId('user'); - await permit.api.users.create({ key: editorUserId }); + expect(await permit.check(adminUserId, 'create', REPO)).toBe(true); +}); - const tenantId = makeRandomId('tenant'); - await permit.api.tenants.create({ key: tenantId, name: 'My Tenant' }); +it('Check assign resource instance role', async () => { + const editorUserId = unique('editor_user'); + await createUser(permit, editorUserId); + const repo = await createRepoInstance(permit, 'test'); - const resourceInstanceId = makeRandomId('repo'); - await permit.api.resourceInstances.create({ - key: resourceInstanceId, - resource: 'repo', - tenant: tenantId, - }); - await permit.api.users.assignRole({ + await permit.api.users.waitForSync(FACT_SYNC_TIMEOUT_S, 'fail').assignRole({ user: editorUserId, - role: 'editor', - resource_instance: `repo:${resourceInstanceId}`, + role: EDITOR, + resource_instance: `${REPO}:${repo.key}`, }); - t.true( - await permit.check(editorUserId, 'update', { - key: resourceInstanceId, - type: 'repo', - tenant: tenantId, - }), - ); -}); -test('Check skip wait', async (t) => { - const permit = t.context.permit; - const userId = makeRandomId('user'); - await permit.api.users.create({ key: userId }); - // explicitly skip wait for role assignment to sync - await permit.api.users.waitForSync(0).assignRole({ - user: userId, - role: 'admin', - tenant: 'default', - }); - t.false(await permit.check(userId, 'create', 'repo')); + expect(await permit.check(editorUserId, 'update', repo)).toBe(true); }); diff --git a/src/tests/e2e/rbac.e2e.spec.ts b/src/tests/e2e/rbac.e2e.spec.ts index 1fc264b5..d13524f3 100644 --- a/src/tests/e2e/rbac.e2e.spec.ts +++ b/src/tests/e2e/rbac.e2e.spec.ts @@ -1,335 +1,318 @@ -import anyTest, { TestInterface } from 'ava'; - -import { UserCreate, UserRead } from '../../openapi'; -import { printBreak, provideTestExecutionContext, TestContext } from '../fixtures'; - -const sleepTimeMs = 10000; - -const test = anyTest as TestInterface; -test.before(provideTestExecutionContext); - -test('Permission check e2e test', async (t) => { - const permit = t.context.permit; - const logger = t.context.logger; - - try { - logger.info('initial setup of objects'); - const document = await permit.api.resources.create({ - key: 'document', - name: 'Document', - urn: 'prn:gdrive:document', - description: 'google drive document', - actions: { - create: {}, - read: {}, - update: {}, - delete: {}, - }, - attributes: { - private: { - type: 'bool', - description: 'whether the document is private', - }, - }, - }); - - // verify create output - t.not(document, null); - t.not(document.id, null); - t.is(document.key, 'document'); - t.is(document.name, 'Document'); - t.is(document.description, 'google drive document'); - t.is(document.urn, 'prn:gdrive:document'); - t.is(Object.keys(document.actions ?? {}).length, 4); - t.not((document.actions ?? {})['create'], undefined); - t.not((document.actions ?? {})['read'], undefined); - t.not((document.actions ?? {})['update'], undefined); - t.not((document.actions ?? {})['delete'], undefined); - - // verify list output - const resources = await permit.api.resources.list(); - t.true(Array.isArray(resources)); - t.is(resources.length, 1); - t.is(resources[0].id, document.id); - t.is(resources[0].key, document.key); - t.is(resources[0].name, document.name); - t.is(resources[0].description, document.description); - t.is(resources[0].urn, document.urn); - - const resourcesWithTotalCount = await permit.api.resources.list({ includeTotalCount: true }); - t.not(resourcesWithTotalCount, null); - t.not(resourcesWithTotalCount.data, null); - t.is(resourcesWithTotalCount.data.length, 1); - t.is(resourcesWithTotalCount.total_count, 1); - t.is(resourcesWithTotalCount.page_count, 1); - - // create admin role - const admin = await permit.api.roles.create({ - key: 'admin', - name: 'Admin', - description: 'an admin role', - permissions: ['document:create', 'document:read'], - }); - - t.not(admin, null); - t.is(admin.key, 'admin'); - t.is(admin.name, 'Admin'); - t.is(admin.description, 'an admin role'); - t.not(admin.permissions, undefined); - t.true(admin.permissions?.includes('document:create')); - t.true(admin.permissions?.includes('document:read')); - - // create viewer role - const viewer = await permit.api.roles.create({ - key: 'viewer', - name: 'Viewer', - description: 'an viewer role', - }); - - t.not(viewer, null); - t.is(viewer.key, 'viewer'); - t.is(viewer.name, 'Viewer'); - t.is(viewer.description, 'an viewer role'); - t.not(viewer.permissions, undefined); - t.is(viewer.permissions?.length, 0); - - const roles = await permit.api.roles.list(); - t.true(Array.isArray(roles)); - t.is(roles.length, 2); - - // assign permissions to roles - const assignedViewer = await permit.api.roles.assignPermissions('viewer', ['document:read']); - - t.is(assignedViewer.key, 'viewer'); - t.is(assignedViewer.permissions?.length, 1); - t.true(assignedViewer.permissions?.includes('document:read')); - t.false(assignedViewer.permissions?.includes('document:create')); - - // create a tenant - const tenant = await permit.api.tenants.create({ - key: 'tesla', - name: 'Tesla Inc', - description: 'The car company', - }); - - t.is(tenant.key, 'tesla'); - t.is(tenant.name, 'Tesla Inc'); - t.is(tenant.description, 'The car company'); - t.is(tenant.attributes, null); - - // create a user - const { user } = await permit.api.users.sync({ - key: 'auth0|elon', - email: 'elonmusk@tesla.com', - first_name: 'Elon', - last_name: 'Musk', - attributes: { - age: 50, - favoriteColor: 'red', +import pino from 'pino'; + +import { type IPermitClient } from '#src/index'; +import { type UserRead } from '#src/openapi/index'; +import { cleanUp, createTestClient, expectNotFound } from '#src/tests/fixtures'; +import { waitFor, waitForCheck } from '#src/tests/helpers/wait-for'; + +// Direct-OPA (`useOpa`) checks need the PDP's OPA port (8181) reachable on the PDP_URL host. +// They run in their own test, which is reported as skipped unless PERMIT_RUN_OPA_E2E=true. +const RUN_OPA_E2E = process.env['PERMIT_RUN_OPA_E2E'] === 'true'; + +// Keys unique to this run, so entities left by another spec or an earlier run can't change the +// results, and the assertions below look only at what this spec created. +const RUN_ID = `${process.pid}_${Date.now()}`; +const DOCUMENT = `rbac_document_${RUN_ID}`; +const ADMIN = `rbac_admin_${RUN_ID}`; +const VIEWER = `rbac_viewer_${RUN_ID}`; +const TENANT = `rbac_tesla_${RUN_ID}`; +const ELON = `auth0|elon_${RUN_ID}`; +const JAMES = `auth0|james_${RUN_ID}`; + +// The main test's propagation waits all draw on this budget, so together they end inside the +// project's 300s test timeout, leaving time for the API calls around them. +const WAIT_BUDGET_MS = 240_000; + +const documentInTenant = { type: DOCUMENT, tenant: TENANT }; + +let permit: IPermitClient; +let logger: pino.Logger; +// The user object users.sync() returned for elon, email and attributes included. The main test +// sets it and the useOpa test checks with it. +let syncedElon: UserRead | undefined; + +beforeAll(() => { + ({ permit, logger } = createTestClient()); +}); + +afterAll(async () => { + if (!permit) return; // beforeAll never initialized the client (e.g. missing key) + // Deleting the users and the tenant removes their role assignments; deleting the resource + // removes its permissions from the roles. + await cleanUp({ + [`user ${ELON}`]: () => permit.api.users.delete(ELON), + [`user ${JAMES}`]: () => permit.api.users.delete(JAMES), + [`tenant ${TENANT}`]: () => permit.api.tenants.delete(TENANT), + [`role ${ADMIN}`]: () => permit.api.roles.delete(ADMIN), + [`role ${VIEWER}`]: () => permit.api.roles.delete(VIEWER), + [`resource ${DOCUMENT}`]: () => permit.api.resources.delete(DOCUMENT), + }); + await expectNotFound(permit.api.users.get(ELON), `user ${ELON}`); + await expectNotFound(permit.api.users.get(JAMES), `user ${JAMES}`); + await expectNotFound(permit.api.tenants.get(TENANT), `tenant ${TENANT}`); + await expectNotFound(permit.api.roles.get(ADMIN), `role ${ADMIN}`); + await expectNotFound(permit.api.roles.get(VIEWER), `role ${VIEWER}`); + await expectNotFound(permit.api.resources.get(DOCUMENT), `resource ${DOCUMENT}`); +}); + +it('Permission check e2e test', async () => { + const deadline = Date.now() + WAIT_BUDGET_MS; + const remainingBudget = () => ({ timeoutMs: Math.max(0, deadline - Date.now()) }); + + logger.info('initial setup of objects'); + const document = await permit.api.resources.create({ + key: DOCUMENT, + name: 'Document', + urn: `prn:gdrive:${DOCUMENT}`, + description: 'google drive document', + actions: { + create: {}, + read: {}, + update: {}, + delete: {}, + }, + attributes: { + private: { + type: 'bool', + description: 'whether the document is private', }, - }); - - t.is(user.key, 'auth0|elon'); - t.is(user.email, 'elonmusk@tesla.com'); - t.is(user.first_name, 'Elon'); - t.is(user.last_name, 'Musk'); - t.is(Object.keys(user.attributes ?? {}).length, 2); - t.is((user.attributes as any)['age'], 50); - t.is((user.attributes as any)['favoriteColor'], 'red'); - - // assign role to user in tenant - const ra = await permit.api.users.assignRole({ - user: user.key, - role: viewer.key, - tenant: tenant.key, - }); - - t.is(ra.user_id, user.id); - t.is(ra.role_id, viewer.id); - t.is(ra.tenant_id, tenant.id); - t.is(ra.user, user.key); - t.is(ra.role, viewer.key); - t.is(ra.tenant, tenant.key); - - // create a user - const newUser: UserRead = await permit.api.users.create({ - key: 'auth0|james', - email: 'james@undos.com', - first_name: 'James', - last_name: 'Undos', - attributes: { - age: 50, - favoriteColor: 'red', + }, + }); + + // verify create output + expect(document.id).toBeTruthy(); + expect(document.key).toBe(DOCUMENT); + expect(document.name).toBe('Document'); + expect(document.description).toBe('google drive document'); + expect(document.urn).toBe(`prn:gdrive:${DOCUMENT}`); + expect(Object.keys(document.actions ?? {}).sort()).toEqual([ + 'create', + 'delete', + 'read', + 'update', + ]); + + // verify list output + const resources = await permit.api.resources.list(); + expect(resources.filter((resource) => resource.key === DOCUMENT)).toEqual([ + expect.objectContaining({ + id: document.id, + key: document.key, + name: document.name, + description: document.description, + urn: document.urn, + }), + ]); + + const resourcesWithTotalCount = await permit.api.resources.list({ includeTotalCount: true }); + expect(resourcesWithTotalCount.data.map((resource) => resource.key)).toContain(DOCUMENT); + expect(resourcesWithTotalCount.total_count).toBeGreaterThanOrEqual( + resourcesWithTotalCount.data.length, + ); + // resources.list() asks for 100 resources per page by default + expect(resourcesWithTotalCount.page_count).toBe( + Math.ceil(resourcesWithTotalCount.total_count / 100), + ); + + // create admin role + const admin = await permit.api.roles.create({ + key: ADMIN, + name: 'Admin', + description: 'an admin role', + permissions: [`${DOCUMENT}:create`, `${DOCUMENT}:read`], + }); + + expect(admin.key).toBe(ADMIN); + expect(admin.name).toBe('Admin'); + expect(admin.description).toBe('an admin role'); + expect(admin.permissions).toEqual( + expect.arrayContaining([`${DOCUMENT}:create`, `${DOCUMENT}:read`]), + ); + + // create viewer role + const viewer = await permit.api.roles.create({ + key: VIEWER, + name: 'Viewer', + description: 'an viewer role', + }); + + expect(viewer.key).toBe(VIEWER); + expect(viewer.name).toBe('Viewer'); + expect(viewer.description).toBe('an viewer role'); + expect(viewer.permissions).toEqual([]); + + const roles = await permit.api.roles.list(); + expect(roles.map((role) => role.key)).toEqual(expect.arrayContaining([ADMIN, VIEWER])); + + // assign permissions to roles + const assignedViewer = await permit.api.roles.assignPermissions(VIEWER, [`${DOCUMENT}:read`]); + + expect(assignedViewer.key).toBe(VIEWER); + expect(assignedViewer.permissions).toEqual([`${DOCUMENT}:read`]); + + // create a tenant + const tenant = await permit.api.tenants.create({ + key: TENANT, + name: 'Tesla Inc', + description: 'The car company', + }); + + expect(tenant.key).toBe(TENANT); + expect(tenant.name).toBe('Tesla Inc'); + expect(tenant.description).toBe('The car company'); + expect(tenant.attributes).toBe(null); + + // create a user + const { user } = await permit.api.users.sync({ + key: ELON, + email: 'elonmusk@tesla.com', + first_name: 'Elon', + last_name: 'Musk', + attributes: { + age: 50, + favoriteColor: 'red', + }, + }); + + expect(user.key).toBe(ELON); + expect(user.email).toBe('elonmusk@tesla.com'); + expect(user.first_name).toBe('Elon'); + expect(user.last_name).toBe('Musk'); + expect(user.attributes).toEqual({ age: 50, favoriteColor: 'red' }); + syncedElon = user; + + // assign role to user in tenant + const ra = await permit.api.users.assignRole({ + user: user.key, + role: viewer.key, + tenant: tenant.key, + }); + + expect(ra.user_id).toBe(user.id); + expect(ra.role_id).toBe(viewer.id); + expect(ra.tenant_id).toBe(tenant.id); + expect(ra.user).toBe(user.key); + expect(ra.role).toBe(viewer.key); + expect(ra.tenant).toBe(tenant.key); + + // create a user + const newUser: UserRead = await permit.api.users.create({ + key: JAMES, + email: 'james@undos.com', + first_name: 'James', + last_name: 'Undos', + attributes: { + age: 50, + favoriteColor: 'red', + }, + role_assignments: [ + { + role: viewer.key, + tenant: tenant.key, }, - role_assignments: [ - { - role: viewer.key, - tenant: tenant.key, - }, - ], - }); - - t.is(newUser.roles![0].role, viewer.key); - - logger.info( - `sleeping ${sleepTimeMs} ms before permit.check() to make sure all writes propagated from cloud to PDP`, - ); - await new Promise((resolve) => setTimeout(resolve, sleepTimeMs)); - - // positive permission check (will be true because elon is a viewer, and a viewer can read a document) - logger.info('testing positive permission check'); - const resourceAttributes = { secret: true }; - - t.true( - await permit.check( - 'auth0|elon', - 'read', - // a 'document' belonging to 'tesla' (ownership based on tenant) - { type: 'document', tenant: 'tesla', attributes: resourceAttributes }, - ), - ); - - printBreak(); - - // use opa directly - t.true( - await permit.check( - 'auth0|elon', - 'read', - // a 'document' belonging to 'tesla' (ownership based on tenant) - { type: 'document', tenant: 'tesla', attributes: resourceAttributes }, - {}, - { useOpa: true }, - ), - ); - - printBreak(); - - t.false( - await permit.check( - 'auth0|elon', - 'control the usa', - // a 'document' belonging to 'tesla' (ownership based on tenant) - { type: 'document', tenant: 'tesla', attributes: resourceAttributes }, - {}, - { useOpa: true }, + ], + }); + + expect(newUser.roles?.[0]?.role).toBe(viewer.key); + + // Positive permission check (elon is a viewer, and a viewer can read a document). It is polled + // until the writes above have propagated from the cloud to the PDP. + logger.info('testing positive permission check'); + await waitForCheck( + () => + permit.check(ELON, 'read', { + ...documentInTenant, + attributes: { secret: true }, + }), + true, + remainingBudget(), + ); + + logger.info('testing positive permission check with complete user object'); + // Gate on the complete-user object's read propagating before the multi-result + // reads below (bulkCheck / getUserPermissions), which query separate PDP + // endpoints that can lag behind a single check. + await waitForCheck(() => permit.check(user, 'read', documentInTenant), true, remainingBudget()); + + // negative permission check (will be false because a viewer cannot create a document) + logger.info('testing negative permission check'); + expect(await permit.check(user, 'create', documentInTenant)).toBe(false); + + logger.info('testing bulk check permissions'); + const bulkQueries = [ + { user, action: 'read', resource: documentInTenant }, + { user, action: 'create', resource: documentInTenant }, + ]; + await waitFor( + () => permit.bulkCheck(bulkQueries), + (decisions) => decisions.length === 2 && decisions[0] === true && decisions[1] === false, + { ...remainingBudget(), message: 'bulkCheck did not return [true, false] for read and create' }, + ); + + logger.info('testing get user permissions matches assigned roles permissions'); + const tenantPermissionsKey = `__tenant:${tenant.key}`; + const viewerPermissions = assignedViewer.permissions ?? []; + await waitFor( + () => permit.getUserPermissions(user.key), + (permissions) => + viewerPermissions.every((permission) => + permissions[tenantPermissionsKey]?.permissions.includes(permission), ), - ); - - printBreak(); - - logger.info('testing positive permission check with complete user object'); - t.true(await permit.check(user, 'read', { type: document.key, tenant: tenant.key })); - - printBreak(); + { + ...remainingBudget(), + message: `getUserPermissions did not list ${viewerPermissions} under ${tenantPermissionsKey}`, + describe: (permissions) => JSON.stringify(permissions[tenantPermissionsKey] ?? permissions), + }, + ); + + logger.info('changing the user roles'); + + // change the user role - assign admin role + await permit.api.users.assignRole({ + user: user.key, + role: admin.key, + tenant: tenant.key, + }); + // change the user role - remove viewer role + await permit.api.users.unassignRole({ + user: user.key, + role: viewer.key, + tenant: tenant.key, + }); + + // list user roles in all tenants + const assignedRoles = await permit.api.users.getAssignedRoles({ user: user.key }); + + expect(assignedRoles).toHaveLength(1); + expect(assignedRoles[0]?.user_id).toBe(user.id); + expect(assignedRoles[0]?.role_id).toBe(admin.id); + expect(assignedRoles[0]?.tenant_id).toBe(tenant.id); + + // The previously negative check becomes positive once the role swap has propagated. + logger.info('testing previously negative permission check, should now be positive'); + await waitForCheck(() => permit.check(user, 'create', documentInTenant), true, remainingBudget()); +}); - // use opa directly - logger.info('testing positive permission check with complete user object'); - t.true( - await permit.check( - user, - 'read', - { type: document.key, tenant: tenant.key }, - {}, - { useOpa: true }, - ), - ); - - printBreak(); - - // negative permission check (will be false because a viewer cannot create a document) - logger.info('testing negative permission check'); - t.false(await permit.check(user, 'create', { type: document.key, tenant: tenant.key })); - - printBreak(); - - logger.info('testing bulk check permissions'); - const decisions = await permit.bulkCheck([ - { user: user, action: 'read', resource: { type: document.key, tenant: tenant.key } }, - { user: user, action: 'create', resource: { type: document.key, tenant: tenant.key } }, - ]); - t.true(decisions.length === 2); - t.true(decisions[0]); - t.false(decisions[1]); - - logger.info('testing get user permissions matches assigned roles permissions'); - const userPermissions = await permit.getUserPermissions(user.key); - t.true( - `__tenant:${tenant.key}` in userPermissions, - `tenant key not found in - user permissions:\n${JSON.stringify(userPermissions, null, 2)}`, - ); - viewer.permissions?.forEach((permission) => { - t.true(userPermissions[tenant.key].permissions.includes(permission)); - }); - - logger.info('changing the user roles'); - - // change the user role - assign admin role - await permit.api.users.assignRole({ - user: user.key, - role: admin.key, - tenant: tenant.key, - }); - // change the user role - remove viewer role - await permit.api.users.unassignRole({ - user: user.key, - role: viewer.key, - tenant: tenant.key, - }); - - // list user roles in all tenants - const assignedRoles = await permit.api.users.getAssignedRoles({ user: user.key }); - - t.is(assignedRoles.length, 1); - t.is(assignedRoles[0].user_id, user.id); - t.is(assignedRoles[0].role_id, admin.id); - t.is(assignedRoles[0].tenant_id, tenant.id); - - logger.info( - `sleeping ${sleepTimeMs} ms before permit.check() to make sure all writes propagated from cloud to PDP`, - ); - await new Promise((resolve) => setTimeout(resolve, sleepTimeMs)); - - // run the same negative permission check again, this time it's true - logger.info('testing previously negative permission check, should now be positive'); - t.true(await permit.check(user, 'create', { type: document.key, tenant: tenant.key })); - //use opa directly - t.true( - await permit.check( - user, - 'create', - { type: document.key, tenant: tenant.key }, - {}, - { useOpa: true }, - ), - ); - - printBreak(); - } catch (error) { - logger.error(`GOT ERROR: ${error}`); - t.fail(`got error: ${error}`); - } finally { - // cleanup - try { - await permit.api.users.delete('auth0|elon'); - await permit.api.users.delete('auth0|james'); - await permit.api.tenants.delete('tesla'); - await permit.api.roles.delete('admin'); - await permit.api.roles.delete('viewer'); - await permit.api.resources.delete('document'); - t.is((await permit.api.resources.list()).length, 0); - - const roles = await permit.api.roles.list(); - - t.true(Array.isArray(roles)); - t.is(roles.length, 0); - - t.is((await permit.api.tenants.list()).length, 1); // the default tenant - t.is((await permit.api.users.list()).data.length, 0); - } catch (error) { - logger.error(`GOT ERROR: ${error}`); - t.fail(`got error: ${error}`); +// Uses the state the test above leaves behind: elon holds the admin role and james the viewer +// role in the tenant, and syncedElon holds elon's synced user object. +it.skipIf(!RUN_OPA_E2E)( + 'useOpa checks go to OPA directly (PERMIT_RUN_OPA_E2E=true)', + { + meta: { + coverageUnavailable: 'PERMIT_RUN_OPA_E2E is not true; direct OPA coverage unavailable', + }, + }, + async () => { + if (!syncedElon) { + throw new Error('the permission check test did not sync elon, so this test cannot run'); } - } -}); + const useOpa = { useOpa: true }; + const secretDocument = { ...documentInTenant, attributes: { secret: true } }; + await waitForCheck(() => permit.check(JAMES, 'read', secretDocument), true); + + expect(await permit.check(JAMES, 'read', secretDocument, {}, useOpa)).toBe(true); + expect(await permit.check(JAMES, 'create', secretDocument, {}, useOpa)).toBe(false); + expect(await permit.check(syncedElon, 'create', documentInTenant, {}, useOpa)).toBe(true); + expect(await permit.check(ELON, 'control the usa', secretDocument, {}, useOpa)).toBe(false); + }, +); diff --git a/src/tests/e2e/rebac.e2e.spec.ts b/src/tests/e2e/rebac.e2e.spec.ts index 5bc2e3be..d761886d 100644 --- a/src/tests/e2e/rebac.e2e.spec.ts +++ b/src/tests/e2e/rebac.e2e.spec.ts @@ -1,22 +1,32 @@ -import anyTest, { TestInterface } from 'ava'; +import pino from 'pino'; -import { IPermitClient } from '../..'; -import { printBreak, provideTestExecutionContext, TestContext } from '../fixtures'; +import { type IPermitClient, type IResource } from '#src/index'; +import { type RoleAssignmentCreate } from '#src/openapi/index'; +import { cleanUp, createTestClient, expectNotFound } from '#src/tests/fixtures'; +import { waitFor } from '#src/tests/helpers/wait-for'; -const test = anyTest as TestInterface; -test.before(provideTestExecutionContext); +let permit: IPermitClient; +let logger: pino.Logger; + +// Keys unique to this run, so entities left by another spec or an earlier run can't change the +// results. +const RUN_ID = `${process.pid}_${Date.now()}`; +const unique = (key: string) => `rebac_${key}_${RUN_ID}`; + +// The heavy ReBAC graph can take minutes to propagate to the PDP on a cold environment. Each step +// is its own test, so this budget plus one attempt stays inside the 300s test timeout. +const STEP_TIMEOUT_MS = 150_000; const viewerRoleKey = 'viewer'; const commenterRoleKey = 'commenter'; const editorRoleKey = 'editor'; const adminRoleKey = 'admin'; const memberRoleKey = 'member'; -const watcherRoleKey = 'watcher'; const account = { - key: 'account', + key: unique('account'), name: 'Account', - urn: 'prn:gdrive:account', + urn: `prn:gdrive:${unique('account')}`, description: 'google drive account', actions: { create: {}, @@ -38,9 +48,9 @@ const account = { }, }; const folder = { - key: 'folder', + key: unique('folder'), name: 'Folder', - urn: 'prn:gdrive:folder', + urn: `prn:gdrive:${unique('folder')}`, description: 'google drive folder', actions: { read: {}, @@ -53,9 +63,9 @@ const folder = { }, }; const document = { - key: 'document', + key: unique('document'), name: 'Document', - urn: 'prn:gdrive:document', + urn: `prn:gdrive:${unique('document')}`, description: 'google drive document', actions: { read: {}, @@ -68,7 +78,7 @@ const document = { const resourcesToCreate = [account, folder, document]; const permitUser = { - key: 'user_permit', + key: unique('user_permit'), email: 'user@permit.io', first_name: 'Permit', last_name: 'User', @@ -77,7 +87,7 @@ const permitUser = { }, }; const authzUser = { - key: 'user_authz', + key: unique('user_authz'), email: 'member@auth0.com', first_name: 'Member', last_name: 'User', @@ -178,432 +188,425 @@ const allResourceRolesToCreate = [ ]; const permitTenant = { - key: 'permit', + key: unique('permit'), name: 'Permit', }; const cocacolaTenant = { - key: 'cocacola', + key: unique('cocacola'), name: 'Coca Cola', }; const tenantsToCreate = [permitTenant, cocacolaTenant]; -test('Permission check e2e test', async (t) => { - const permit = t.context.permit; - const logger = t.context.logger; - - try { - logger.info('initial setup of objects'); - - // create resources - for (const resource of resourcesToCreate) { - const createdResource = await permit.api.resources.create(resource); - t.not(createdResource, undefined); - t.not(createdResource, null); - t.is(createdResource.key, resource.key); - t.is(createdResource.name, resource.name); - t.is(createdResource.urn, resource.urn); - t.is(createdResource.description, resource.description); - } - - // create admin and member users - for (const user of usersToCreate) { - const createdUser = await permit.api.users.create(user); - t.not(createdUser, undefined); - t.not(createdUser, null); - t.is(createdUser.key, user.key); - t.is(createdUser.email, user.email); - t.is(createdUser.first_name, user.first_name); - t.is(createdUser.last_name, user.last_name); - } - - // create folder roles - - for (const resourceRole of allResourceRolesToCreate) { - const createdResourceRole = await permit.api.resourceRoles.create( - resourceRole.resourceKey, - resourceRole.roleData, - ); - t.not(createdResourceRole, undefined); - t.not(createdResourceRole, null); - t.is(createdResourceRole.key, resourceRole.roleData.key); - t.is(createdResourceRole.name, resourceRole.roleData.name); - } - - // create relation between document and folder (parent) - const documentFolderRelation = await permit.api.resourceRelations.create(document.key, { - key: 'parent', - name: 'Document Folder Relation', - subject_resource: folder.key, - }); - t.not(documentFolderRelation, undefined); - t.not(documentFolderRelation, null); - t.is(documentFolderRelation.key, 'parent'); - - // create role derivation folder -> document - const folderDocumentRoleDerivation = [viewerRoleKey, commenterRoleKey, editorRoleKey].map( - (role) => - permit.api.resourceRoles.createRoleDerivation(document.key, role, { - role: role, - on_resource: folder.key, - linked_by_relation: 'parent', - }), - ); - await Promise.all(folderDocumentRoleDerivation); - - // create permit and cocacola tenants - for (const tenant of tenantsToCreate) { - const createdTenant = await permit.api.tenants.create(tenant); - t.not(createdTenant, undefined); - t.not(createdTenant, null); - t.is(createdTenant.key, tenant.key); - t.is(createdTenant.name, tenant.name); - } - - const relationships = [ - // finance folder contains 2 documents - [`${folder.key}:finance`, 'parent', `${document.key}:budget23`, permitTenant.key], - // TODO: add missing relationships commented out below because of 409 conflict - [`${folder.key}:finance`, 'parent', `${document.key}:june-expenses`, permitTenant.key], - // rnd folder contains 2 documents - [`${folder.key}:rnd`, 'parent', `${document.key}:architecture`, permitTenant.key], - [`${folder.key}:rnd`, 'parent', `${document.key}:opal`, permitTenant.key], - // folders belongs in permit g-drive account - [`${account.key}:permitio`, 'account', `${folder.key}:finance`, permitTenant.key], - [`${account.key}:permitio`, 'account', `${folder.key}:rnd`, permitTenant.key], - // another account->folder->doc belongs to another tenant - [`${folder.key}:recipes`, 'parent', `${document.key}:secret-recipe`, cocacolaTenant.key], - [`${account.key}:cocacola`, 'account', `${folder.key}:recipes`, cocacolaTenant.key], - ]; - - for (const relationship of relationships) { - const relTuple = await permit.api.relationshipTuples.create({ - subject: relationship[0], - relation: relationship[1], - object: relationship[2], - tenant: relationship[3], - }); - - t.not(relTuple, undefined); - t.not(relTuple, null); - t.is(relTuple.subject, relationship[0]); - t.is(relTuple.relation, relationship[1]); - t.is(relTuple.object, relationship[2]); - // t.is(relTuple.tenant_id, relationship[3]); returns id instead of key - } +const relationships: [string, string, string, string][] = [ + // finance folder contains 2 documents + [`${folder.key}:finance`, 'parent', `${document.key}:budget23`, permitTenant.key], + [`${folder.key}:finance`, 'parent', `${document.key}:june-expenses`, permitTenant.key], + // rnd folder contains 2 documents + [`${folder.key}:rnd`, 'parent', `${document.key}:architecture`, permitTenant.key], + [`${folder.key}:rnd`, 'parent', `${document.key}:opal`, permitTenant.key], + // folders belongs in permit g-drive account + [`${account.key}:permitio`, 'account', `${folder.key}:finance`, permitTenant.key], + [`${account.key}:permitio`, 'account', `${folder.key}:rnd`, permitTenant.key], + // another account->folder->doc belongs to another tenant + [`${folder.key}:recipes`, 'parent', `${document.key}:secret-recipe`, cocacolaTenant.key], + [`${account.key}:cocacola`, 'account', `${folder.key}:recipes`, cocacolaTenant.key], +]; - const assignmentsAndAssertions = [ +interface CheckAssertion { + user: string; + action: string; + resource_instance: IResource; + result: boolean; +} + +interface TestStep { + name: string; + assignments: Array; + assertions: CheckAssertion[]; +} + +const assignmentsAndAssertions: TestStep[] = [ + { + name: 'direct access: a document viewer can read it but not comment', + assignments: [ { - // direct access - assignments: [ - { - user: permitUser.key, - role: viewerRoleKey, - resource_instance: `${document.key}:architecture`, - tenant: permitTenant.key, - }, - ], - assertions: [ - { - user: permitUser.key, - action: 'read', - resource_instance: { - type: document.key, - key: 'architecture', - tenant: permitTenant.key, - }, - result: true, - }, - { - user: permitUser.key, - action: 'comment', - resource_instance: { - type: document.key, - key: 'architecture', - tenant: permitTenant.key, - }, - result: false, - }, - { - user: permitUser.key, - action: 'comment', - resource_instance: { - type: document.key, - key: 'opal', - tenant: permitTenant.key, - }, - result: false, - }, - ], + user: permitUser.key, + role: viewerRoleKey, + resource_instance: `${document.key}:architecture`, + tenant: permitTenant.key, }, - // access from higher level + ], + assertions: [ { - assignments: [ - { - user: permitUser.key, - role: commenterRoleKey, - resource_instance: `${folder.key}:rnd`, - tenant: permitTenant.key, - }, - ], - assertions: [ - // direct access allowed - { - user: permitUser.key, - action: 'read', - resource_instance: { - type: folder.key, - key: 'rnd', - tenant: permitTenant.key, - }, - result: true, - }, - // access to child resources allowed - ...[ - { action: 'read', resource: 'architecture' }, - { action: 'comment', resource: 'architecture' }, - { action: 'read', resource: 'opal' }, - { action: 'comment', resource: 'opal' }, - ].map((settings) => ({ - user: permitUser.key, - action: settings.action, - resource_instance: { - type: document.key, - key: settings.resource, - tenant: permitTenant.key, - }, - result: true, - })), - // higher permissions not allowed - { - user: permitUser.key, - action: 'update', - resource_instance: { - type: document.key, - key: 'architecture', - tenant: permitTenant.key, - }, - result: false, - }, - // access to other resources not allowed - { - user: permitUser.key, - action: 'read', - resource_instance: { - type: folder.key, - key: 'budget23', - tenant: permitTenant.key, - }, - result: false, - }, - ], + user: permitUser.key, + action: 'read', + resource_instance: { + type: document.key, + key: 'architecture', + tenant: permitTenant.key, + }, + result: true, }, - // access from highest level (account) { - assignments: [ - { - user: permitUser.key, - role: adminRoleKey, - resource_instance: `${account.key}:permitio`, - tenant: permitTenant.key, - }, - { - user: authzUser.key, - role: memberRoleKey, - resource_instance: `${account.key}:cocacola`, - tenant: cocacolaTenant.key, - }, - ], - assertions: [ - // direct access allowed - { - user: permitUser.key, - action: 'invite_user', - resource_instance: { - type: account.key, - key: 'permitio', - tenant: permitTenant.key, - }, - result: true, - }, - // access to child resources allowed - ...['read', 'comment', 'update', 'delete'].map((action) => ({ - user: permitUser.key, - action, - resource_instance: { - type: document.key, - key: 'architecture', - tenant: permitTenant.key, - }, - result: true, - })), - // access to other tenants not allowed - { - user: permitUser.key, - action: 'read', - resource_instance: { - type: document.key, - key: 'secret-recipe', - tenant: cocacolaTenant.key, - }, - result: false, - }, - // but access is allowed to user with lower permissions in the right tenant - { - user: authzUser.key, - action: 'read', - resource_instance: { - type: document.key, - key: 'secret-recipe', - tenant: cocacolaTenant.key, - }, - result: true, - }, - ], + user: permitUser.key, + action: 'comment', + resource_instance: { + type: document.key, + key: 'architecture', + tenant: permitTenant.key, + }, + result: false, }, - // permissions from higher level blocked by condition on role derivation - { - assignments: [ - { - user: permitUser.key, - role: adminRoleKey, - resource_instance: `${account.key}:permitio`, - tenant: permitTenant.key, - }, - { - user: permitUser.key, - role: viewerRoleKey, - resource_instance: `${folder.key}:rnd`, - tenant: permitTenant.key, - }, - ], - assertions: [ - // direct access allowed - { - user: permitUser.key, - action: 'read', - resource_instance: { - type: folder.key, - key: 'rnd', - tenant: permitTenant.key, - }, - result: true, - }, - // access given by derived role is not allowed - ...['rename', 'delete', 'create-document'].map((action) => ({ - user: permitUser.key, - action, - resource_instance: { - type: folder.key, - key: 'rnd', - tenant: permitTenant.key, - }, - result: false, - })), - ], + user: permitUser.key, + action: 'comment', + resource_instance: { + type: document.key, + key: 'opal', + tenant: permitTenant.key, + }, + result: false, }, - // permissions from higher level blocked by condition on role derivation rule + ], + }, + { + name: 'access from a higher level: a folder commenter reaches the folder documents', + assignments: [ { - assignments: [ - { - user: permitUser.key, - role: memberRoleKey, - resource_instance: `${account.key}:permitio`, - tenant: permitTenant.key, - }, - { - user: permitUser.key, - role: viewerRoleKey, - resource_instance: `${folder.key}:rnd`, - tenant: permitTenant.key, - }, - ], - assertions: [ - // direct access allowed - { - user: permitUser.key, - action: 'read', - resource_instance: { - type: folder.key, - key: 'rnd', - tenant: permitTenant.key, - }, - result: true, - }, - // access given by derived role is not allowed - { - user: permitUser.key, - action: 'rename', - resource_instance: { - type: folder.key, - key: 'rnd', - tenant: permitTenant.key, - }, - result: false, - }, - ], + user: permitUser.key, + role: commenterRoleKey, + resource_instance: `${folder.key}:rnd`, + tenant: permitTenant.key, }, - ]; - - const assertPermitCheck = async (permit: IPermitClient, assertion: any, assignment: any) => { - const result = await permit.check( - assertion.user, - assertion.action, - assertion.resource_instance, - ); - if (result !== assertion.result) { - console.log('assertion failed'); - console.log('assertion', assertion); - console.log('assignment', assignment); - console.log('result', result); - } - t.is(result, assertion.result); - }; - - for (const testStep of assignmentsAndAssertions) { - // role assignments - for (const assignment of testStep.assignments) { - const ra = await permit.api.roleAssignments.assign(assignment); - t.is(ra.user, assignment.user); - t.is(ra.role, assignment.role); - t.is(ra.resource_instance, assignment.resource_instance); - t.is(ra.tenant, assignment.tenant); - } - // sleep 10 second to allow for role assignments to propagate - console.log('sleeping 10 seconds'); - await new Promise((resolve) => setTimeout(resolve, 10000)); - for (const assertion of testStep.assertions) { - await assertPermitCheck(permit, assertion, testStep.assignments); - } - for (const assignment of testStep.assignments) { - try { - await permit.api.roleAssignments.unassign(assignment); - } catch (error) { - logger.error( - `failed to unassign ${assignment.user} ${assignment.role} ${assignment.resource_instance} ${assignment.tenant}`, - ); - } - } - } + ], + assertions: [ + // direct access allowed + { + user: permitUser.key, + action: 'read', + resource_instance: { + type: folder.key, + key: 'rnd', + tenant: permitTenant.key, + }, + result: true, + }, + // access to child resources allowed + ...[ + { action: 'read', resource: 'architecture' }, + { action: 'comment', resource: 'architecture' }, + { action: 'read', resource: 'opal' }, + { action: 'comment', resource: 'opal' }, + ].map((settings) => ({ + user: permitUser.key, + action: settings.action, + resource_instance: { + type: document.key, + key: settings.resource, + tenant: permitTenant.key, + }, + result: true, + })), + // higher permissions not allowed + { + user: permitUser.key, + action: 'update', + resource_instance: { + type: document.key, + key: 'architecture', + tenant: permitTenant.key, + }, + result: false, + }, + // access to other resources not allowed: budget23 is a document in the finance folder + { + user: permitUser.key, + action: 'read', + resource_instance: { + type: document.key, + key: 'budget23', + tenant: permitTenant.key, + }, + result: false, + }, + ], + }, + { + name: 'access from the highest level: an account admin reaches documents in its tenant only', + assignments: [ + { + user: permitUser.key, + role: adminRoleKey, + resource_instance: `${account.key}:permitio`, + tenant: permitTenant.key, + }, + { + user: authzUser.key, + role: memberRoleKey, + resource_instance: `${account.key}:cocacola`, + tenant: cocacolaTenant.key, + }, + ], + assertions: [ + // direct access allowed + { + user: permitUser.key, + action: 'invite_user', + resource_instance: { + type: account.key, + key: 'permitio', + tenant: permitTenant.key, + }, + result: true, + }, + // access to child resources allowed + ...['read', 'comment', 'update', 'delete'].map((action) => ({ + user: permitUser.key, + action, + resource_instance: { + type: document.key, + key: 'architecture', + tenant: permitTenant.key, + }, + result: true, + })), + // access to other tenants not allowed + { + user: permitUser.key, + action: 'read', + resource_instance: { + type: document.key, + key: 'secret-recipe', + tenant: cocacolaTenant.key, + }, + result: false, + }, + // but access is allowed to user with lower permissions in the right tenant + { + user: authzUser.key, + action: 'read', + resource_instance: { + type: document.key, + key: 'secret-recipe', + tenant: cocacolaTenant.key, + }, + result: true, + }, + ], + }, + { + name: 'a direct folder role blocks the editor role derived from account admin', + assignments: [ + { + user: permitUser.key, + role: adminRoleKey, + resource_instance: `${account.key}:permitio`, + tenant: permitTenant.key, + }, + { + user: permitUser.key, + role: viewerRoleKey, + resource_instance: `${folder.key}:rnd`, + tenant: permitTenant.key, + }, + ], + assertions: [ + // direct access allowed + { + user: permitUser.key, + action: 'read', + resource_instance: { + type: folder.key, + key: 'rnd', + tenant: permitTenant.key, + }, + result: true, + }, + // access given by derived role is not allowed + ...['rename', 'delete', 'create_document'].map((action) => ({ + user: permitUser.key, + action, + resource_instance: { + type: folder.key, + key: 'rnd', + tenant: permitTenant.key, + }, + result: false, + })), + ], + }, + { + name: 'a direct folder role blocks the commenter role derived from account member', + assignments: [ + { + user: permitUser.key, + role: memberRoleKey, + resource_instance: `${account.key}:permitio`, + tenant: permitTenant.key, + }, + { + user: permitUser.key, + role: viewerRoleKey, + resource_instance: `${folder.key}:rnd`, + tenant: permitTenant.key, + }, + ], + assertions: [ + // direct access allowed + { + user: permitUser.key, + action: 'read', + resource_instance: { + type: folder.key, + key: 'rnd', + tenant: permitTenant.key, + }, + result: true, + }, + // access given by derived role is not allowed + { + user: permitUser.key, + action: 'rename', + resource_instance: { + type: folder.key, + key: 'rnd', + tenant: permitTenant.key, + }, + result: false, + }, + ], + }, +]; - printBreak(); - } catch (error) { - logger.error(`GOT ERROR: ${error}`); - t.fail(`got error: ${error}`); - } finally { - // cleanup - try { - console.log('cleaning up'); - await permit.api.tenants.delete('cocacola'); - await permit.api.tenants.delete('permit'); - await permit.api.resources.delete('account'); - await permit.api.resources.delete('folder'); - await permit.api.resources.delete('document'); - await permit.api.users.delete('user_authz'); - await permit.api.users.delete('user_permit'); - } catch (error) { - logger.error(`GOT ERROR: ${error}`); - t.fail(`got error: ${error}`); - } +/** Lists the assertions whose check returned the other result. */ +function describeMismatches(assertions: CheckAssertion[], results: boolean[]): string { + return assertions + .filter((assertion, index) => results[index] !== assertion.result) + .map(({ user, action, resource_instance: { type, key, tenant }, result }) => { + return `${user} ${action} ${type}:${key} in ${tenant} returned ${!result}`; + }) + .join('; '); +} + +beforeAll(async () => { + ({ permit, logger } = createTestClient()); + logger.info('initial setup of objects'); + + // create resources + for (const resource of resourcesToCreate) { + const createdResource = await permit.api.resources.create(resource); + expect(createdResource.key).toBe(resource.key); + expect(createdResource.name).toBe(resource.name); + expect(createdResource.urn).toBe(resource.urn); + expect(createdResource.description).toBe(resource.description); + } + + // create admin and member users + for (const user of usersToCreate) { + const createdUser = await permit.api.users.create(user); + expect(createdUser.key).toBe(user.key); + expect(createdUser.email).toBe(user.email); + expect(createdUser.first_name).toBe(user.first_name); + expect(createdUser.last_name).toBe(user.last_name); + } + + // create folder and document roles + for (const resourceRole of allResourceRolesToCreate) { + const createdResourceRole = await permit.api.resourceRoles.create( + resourceRole.resourceKey, + resourceRole.roleData, + ); + expect(createdResourceRole.key).toBe(resourceRole.roleData.key); + expect(createdResourceRole.name).toBe(resourceRole.roleData.name); + } + + // create relation between document and folder (parent) + const documentFolderRelation = await permit.api.resourceRelations.create(document.key, { + key: 'parent', + name: 'Document Folder Relation', + subject_resource: folder.key, + }); + expect(documentFolderRelation.key).toBe('parent'); + + // create role derivation folder -> document + await Promise.all( + [viewerRoleKey, commenterRoleKey, editorRoleKey].map((role) => + permit.api.resourceRoles.createRoleDerivation(document.key, role, { + role: role, + on_resource: folder.key, + linked_by_relation: 'parent', + }), + ), + ); + + // create permit and cocacola tenants + for (const tenant of tenantsToCreate) { + const createdTenant = await permit.api.tenants.create(tenant); + expect(createdTenant.key).toBe(tenant.key); + expect(createdTenant.name).toBe(tenant.name); + } + + for (const [subject, relation, object, tenant] of relationships) { + const relTuple = await permit.api.relationshipTuples.create({ + subject, + relation, + object, + tenant, + }); + expect(relTuple.subject).toBe(subject); + expect(relTuple.relation).toBe(relation); + expect(relTuple.object).toBe(object); + } +}); + +afterAll(async () => { + if (!permit) return; // beforeAll never initialized the client (e.g. missing key) + // Deleting users and tenants removes their role assignments, and deleting a resource removes + // its roles, relations, instances and relationship tuples. Resources go in reverse order of + // their references: document points at folder, folder at account. + await cleanUp({ + [`user ${permitUser.key}`]: () => permit.api.users.delete(permitUser.key), + [`user ${authzUser.key}`]: () => permit.api.users.delete(authzUser.key), + [`tenant ${permitTenant.key}`]: () => permit.api.tenants.delete(permitTenant.key), + [`tenant ${cocacolaTenant.key}`]: () => permit.api.tenants.delete(cocacolaTenant.key), + [`resource ${document.key}`]: () => permit.api.resources.delete(document.key), + [`resource ${folder.key}`]: () => permit.api.resources.delete(folder.key), + [`resource ${account.key}`]: () => permit.api.resources.delete(account.key), + }); + for (const user of usersToCreate) { + await expectNotFound(permit.api.users.get(user.key), `user ${user.key}`); + } + for (const tenant of tenantsToCreate) { + await expectNotFound(permit.api.tenants.get(tenant.key), `tenant ${tenant.key}`); + } + for (const resource of resourcesToCreate) { + await expectNotFound(permit.api.resources.get(resource.key), `resource ${resource.key}`); } }); + +// The steps run in order: each one removes its role assignments before the next begins. +for (const { name, assignments, assertions } of assignmentsAndAssertions) { + it(name, async () => { + for (const assignment of assignments) { + const ra = await permit.api.roleAssignments.assign(assignment); + expect(ra.user).toBe(assignment.user); + expect(ra.role).toBe(assignment.role); + expect(ra.resource_instance).toBe(assignment.resource_instance); + expect(ra.tenant).toBe(assignment.tenant); + } + // Poll until every check returns its expected result, the negatives included, so the step + // also waits for the previous step's unassignments to reach the PDP. + await waitFor( + () => Promise.all(assertions.map((a) => permit.check(a.user, a.action, a.resource_instance))), + (results) => results.every((allowed, index) => allowed === assertions[index]?.result), + { + timeoutMs: STEP_TIMEOUT_MS, + message: 'some checks kept returning the wrong result', + describe: (results) => describeMismatches(assertions, results), + }, + ); + for (const assignment of assignments) { + await permit.api.roleAssignments.unassign(assignment); + } + }); +} diff --git a/src/tests/endpoints/api-scope.spec.ts b/src/tests/endpoints/api-scope.spec.ts new file mode 100644 index 00000000..a36f760d --- /dev/null +++ b/src/tests/endpoints/api-scope.spec.ts @@ -0,0 +1,25 @@ +import { randomUUID } from 'node:crypto'; + +import { ApiContextLevel, ApiKeyLevel } from '#src/api/context'; +import { createTestClient } from '#src/tests/fixtures'; + +it('environment key discovers its selected scope and returns a real users envelope', async () => { + const { permit } = createTestClient(); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.WAIT_FOR_INIT); + await permit.api.ensureAccessLevel(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + expect(permit.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); + expect(permit.config.apiContext.contextLevel).toBe(ApiContextLevel.ENVIRONMENT); + const selected = permit.config.apiContext.environmentContext; + expect(selected.projId).toEqual(expect.any(String)); + expect(selected.envId).toEqual(expect.any(String)); + expect(selected.projId.length).toBeGreaterThan(0); + expect(selected.envId.length).toBeGreaterThan(0); + const users = await permit.api.users.list({ + search: `absent-${randomUUID()}`, + page: 1, + perPage: 2, + }); + expect(users).toMatchObject({ data: [], total_count: 0 }); + expect(Array.isArray(users.data)).toBe(true); + expect(permit.config.apiContext.environmentContext).toStrictEqual(selected); +}); diff --git a/src/tests/endpoints/test-environments.spec.ts b/src/tests/endpoints/test-environments.spec.ts index 77eb07c3..79a570e2 100644 --- a/src/tests/endpoints/test-environments.spec.ts +++ b/src/tests/endpoints/test-environments.spec.ts @@ -1,198 +1,173 @@ -import anyTest, { ExecutionContext, TestInterface } from 'ava'; +import { randomUUID } from 'crypto'; + +import pino from 'pino'; +import { type TestContext } from 'vitest'; import { ApiKeyLevel, - EnvironmentCreate, - EnvironmentRead, + type EnvironmentCreate, + type EnvironmentRead, Permit, PermitApiError, - PermitConnectionError, - ProjectCreate, - ProjectRead, -} from '../../index'; -import { handleApiError, printBreak, provideTestExecutionContext, TestContext } from '../fixtures'; - -const test = anyTest as TestInterface; -test.before(provideTestExecutionContext); + type ProjectCreate, + type ProjectRead, +} from '#src/index'; +import { cleanUp, createTestClient, expectNotFound, handleApiError } from '#src/tests/fixtures'; + +let logger: pino.Logger; + +// The two suites below exercise org- and project-scoped clients (constructed at +// module scope). createTestClient() is still invoked in beforeAll so the suite +// honors the same PDP_API_KEY gate as the rest of the integration tests. +beforeAll(() => { + ({ logger } = createTestClient()); +}); -const TEST_PROJECT_KEY = 'test-node-proj'; -const CREATED_PROJECTS: ProjectCreate[] = [{ key: TEST_PROJECT_KEY, name: 'New Node Project' }]; +// CI's Node legs start together on separate runners, where pid and start time can match. +const RUN_ID = `${process.pid}-${Date.now()}-${randomUUID().slice(0, 8)}`; +const TEST_PROJECT: ProjectCreate = { + key: `node-proj-${RUN_ID}`, + name: `Node Project ${RUN_ID}`, +}; const CREATED_ENVIRONMENTS: EnvironmentCreate[] = [ - { key: 'my-node-env', name: 'My Node Env' }, - { key: 'my-node-env-2', name: 'My Node Env 2' }, + { key: `node-env-${RUN_ID}`, name: `Node Env ${RUN_ID}` }, + { key: `node-env-2-${RUN_ID}`, name: `Node Env 2 ${RUN_ID}` }, ]; +const CREATED_KEYS = CREATED_ENVIRONMENTS.map((env) => env.key); +const orgKey = process.env['ORG_PDP_API_KEY']; +const projectKey = process.env['PROJECT_PDP_API_KEY']; const permitWithOrgLevelApiKey = new Permit({ - token: process.env.ORG_PDP_API_KEY || process.env.PDP_API_KEY || '', - pdp: process.env.PDP_URL || 'http://localhost:7766', - apiUrl: process.env.PDP_CONTROL_PLANE || 'https://api.permit.io', + token: orgKey?.trim() ? orgKey : process.env['PDP_API_KEY'] || '', + pdp: process.env['PDP_URL'] || 'http://localhost:7766', + apiUrl: process.env['PDP_CONTROL_PLANE'] || 'https://api.permit.io', log: { level: 'debug', }, }); const permitWithProjectLevelApiKey = new Permit({ - token: process.env.PROJECT_PDP_API_KEY || process.env.PDP_API_KEY || '', - pdp: process.env.PDP_URL || 'http://localhost:7766', - apiUrl: process.env.PDP_CONTROL_PLANE || 'https://api.permit.io', + token: projectKey?.trim() ? projectKey : process.env['PDP_API_KEY'] || '', + pdp: process.env['PDP_URL'] || 'http://localhost:7766', + apiUrl: process.env['PDP_CONTROL_PLANE'] || 'https://api.permit.io', log: { level: 'debug', }, }); -async function cleanup(permit: Permit, projectKey: string, t: ExecutionContext) { - t.context.logger.info('Running cleanup...'); - for (const env of CREATED_ENVIRONMENTS) { - try { - await permit.api.environments.delete(projectKey, env.key); - } catch (error) { - if (error instanceof PermitApiError && error.response?.status === 404) { - t.context.logger.info( - `SKIPPING delete, env does not exist: ${env.key}, project_key=${projectKey}`, - ); - } - } +/** Deletes this run's environments from the project, tolerating ones that were never created. */ +function deleteCreatedEnvironments(client: Permit, projectKey: string): Promise { + const steps: Record Promise> = {}; + for (const key of CREATED_KEYS) { + steps[`environment ${key} in project ${projectKey}`] = () => + client.api.environments.delete(projectKey, key); + steps[`verify environment ${key} absent`] = () => + expectNotFound(client.api.environments.get(projectKey, key), `environment ${key}`); } - printBreak(); + return cleanUp(steps); } -test.serial('environment creation with org level api key', async (t) => { - const permit = permitWithOrgLevelApiKey; - t.context.logger.info(`token: ${permit.config.token}`); - +/** Rethrows a REST API error with the failed request in its message; other errors unchanged. */ +async function describeApiErrors(run: () => Promise): Promise { try { - await permit.api.ensureAccessLevel(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); + await run(); } catch (error) { - t.context.logger.warn('this test must run with an org level api key'); - return; - } - t.is(permit.config.apiContext.permittedAccessLevel, ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); - - try { - await cleanup(permit, TEST_PROJECT_KEY, t); - const projects: ProjectRead[] = []; - for (const projectData of CREATED_PROJECTS) { - t.context.logger.info(`trying to creating project: ${projectData.key}`); - try { - let project: ProjectRead; - try { - project = await permit.api.projects.create(projectData); - } catch (error) { - if (error instanceof PermitApiError && error.response?.status === 409) { - t.context.logger.info(`SKIPPING create, project already exists: ${projectData.key}`); - } - project = await permit.api.projects.get(projectData.key); - } - projects.push(project); - t.truthy(project); - t.is(project.key, projectData.key); - t.is(project.name, projectData.name); - t.true(project.description == projectData.description); // will compare null and undefined as well - } catch (error) { - if (error instanceof PermitApiError) { - handleApiError(error, 'Got API Error', t); - } else if (error instanceof PermitConnectionError) { - throw error; - } else { - t.context.logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } - } + if (error instanceof PermitApiError) { + handleApiError(error, 'Got API Error', logger); } + throw error; + } +} - printBreak(); - - const environmentsOriginal = await permit.api.environments.list({ - projectKey: projects[0]?.key, - }); - const originalNumOfEnvs = environmentsOriginal.length; - - for (const environmentData of CREATED_ENVIRONMENTS) { - t.context.logger.info(`creating environment: ${environmentData.key}`); - const environment: EnvironmentRead = await permit.api.environments.create( - projects[0].key, - environmentData, - ); - t.truthy(environment); - t.is(environment.key, environmentData.key); - t.is(environment.name, environmentData.name); - t.true(environment.description == environmentData.description); // will compare null and undefined as well - t.is(environment.project_id, projects[0].id); - } +async function createEnvironments(client: Permit, project: ProjectRead): Promise { + for (const environmentData of CREATED_ENVIRONMENTS) { + logger.info(`creating environment: ${environmentData.key}`); + const environment: EnvironmentRead = await client.api.environments.create( + project.key, + environmentData, + ); + expect(environment.key).toBe(environmentData.key); + expect(environment.name).toBe(environmentData.name); + // The API returns null for a description that was never set. + expect(environment.description ?? undefined).toBe(environmentData.description); + expect(environment.project_id).toBe(project.id); + } +} - printBreak(); +async function expectCreatedEnvironmentsListed(client: Permit, projectKey: string): Promise { + const environments = await client.api.environments.list({ projectKey }); + const listedKeys = environments.map((env) => env.key); + expect(listedKeys).toEqual(expect.arrayContaining(CREATED_KEYS)); +} - const environments = await permit.api.environments.list({ projectKey: projects[0]?.key }); - t.context.logger.info(`environments: ${environments.map((e) => e.key)}`); - t.is(environments.length, CREATED_ENVIRONMENTS.length + originalNumOfEnvs); // each project has 2 default `dev` and `prod` environments +/** + * Reports unavailable coverage when an optional key is absent. A supplied key must have the + * requested scope; authentication, network and incorrect-scope errors fail the test. + */ +async function skipUnlessKeyLevel( + ctx: TestContext, + client: Permit, + level: ApiKeyLevel, + keyVariable: string, +): Promise { + if (!process.env[keyVariable]?.trim()) { + const reason = `${keyVariable} is not set; ${level} coverage unavailable`; + ctx.task.meta.coverageUnavailable = reason; + ctx.skip(reason); + } + await client.api.ensureAccessLevel(level); +} - const testEnvironment = await permit.api.environments.get( - TEST_PROJECT_KEY, - CREATED_ENVIRONMENTS[0].key, +it('environment creation with org level api key', async (ctx) => { + const client = permitWithOrgLevelApiKey; + + await skipUnlessKeyLevel(ctx, client, ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY, 'ORG_PDP_API_KEY'); + expect(client.config.apiContext.permittedAccessLevel).toBe( + ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY, + ); + + await describeApiErrors(async () => { + ctx.onTestFinished(() => + cleanUp({ + [`project ${TEST_PROJECT.key}`]: () => client.api.projects.delete(TEST_PROJECT.key), + [`verify project ${TEST_PROJECT.key} absent`]: () => + expectNotFound(client.api.projects.get(TEST_PROJECT.key), `project ${TEST_PROJECT.key}`), + }), ); - - t.truthy(testEnvironment); - t.is(testEnvironment.key, CREATED_ENVIRONMENTS[0].key); - t.is(testEnvironment.name, CREATED_ENVIRONMENTS[0].name); - t.true(testEnvironment.description == CREATED_ENVIRONMENTS[0].description); // will compare null and undefined as well - } catch (error) { - t.context.logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } finally { - printBreak(); - await cleanup(permit, TEST_PROJECT_KEY, t); - } + logger.info(`creating project: ${TEST_PROJECT.key}`); + const project = await client.api.projects.create(TEST_PROJECT); + expect(project.key).toBe(TEST_PROJECT.key); + expect(project.name).toBe(TEST_PROJECT.name); + expect(project.description ?? undefined).toBe(TEST_PROJECT.description); + + ctx.onTestFinished(() => deleteCreatedEnvironments(client, project.key)); + await createEnvironments(client, project); + await expectCreatedEnvironmentsListed(client, project.key); + + const [firstEnvironment] = CREATED_ENVIRONMENTS; + assert(firstEnvironment !== undefined); + const testEnvironment = await client.api.environments.get(project.key, firstEnvironment.key); + expect(testEnvironment.key).toBe(firstEnvironment.key); + expect(testEnvironment.name).toBe(firstEnvironment.name); + expect(testEnvironment.description ?? undefined).toBe(firstEnvironment.description); + }); }); -test.serial('environment creation with project level api key', async (t) => { - const permit = permitWithProjectLevelApiKey; +it('environment creation with project level api key', async (ctx) => { + const client = permitWithProjectLevelApiKey; - try { - await permit.api.ensureAccessLevel(ApiKeyLevel.PROJECT_LEVEL_API_KEY); - } catch (error) { - t.context.logger.warn('this test must run with a project level api key'); - return; - } - t.is(permit.config.apiContext.permittedAccessLevel, ApiKeyLevel.PROJECT_LEVEL_API_KEY); + await skipUnlessKeyLevel(ctx, client, ApiKeyLevel.PROJECT_LEVEL_API_KEY, 'PROJECT_PDP_API_KEY'); + expect(client.config.apiContext.permittedAccessLevel).toBe(ApiKeyLevel.PROJECT_LEVEL_API_KEY); - try { - const project = permit.config.apiContext.project; - t.truthy(project); - const projectId = String(project); - - const projectRead = await permit.api.projects.get(projectId); - t.is(String(projectRead.id), projectId); - - await cleanup(permit, projectRead.key, t); - - for (const environmentData of CREATED_ENVIRONMENTS) { - t.context.logger.info(`creating environment: ${environmentData.key}`); - const environment: EnvironmentRead = await permit.api.environments.create( - projectRead.key, - environmentData, - ); - t.truthy(environment); - t.is(environment.key, environmentData.key); - t.is(environment.name, environmentData.name); - t.true(environment.description == environmentData.description); // will compare null and undefined as well - t.is(environment.project_id, projectRead.id); - } + await describeApiErrors(async () => { + const projectId = client.config.apiContext.project; + expect(projectId).toBeTruthy(); - const environments = await permit.api.environments.list({ projectKey: projectRead?.key }); - const actualEnvSet = environments.map((env) => env.key); - const createdEnvSet = new Set(CREATED_ENVIRONMENTS.map((env) => env.key)); - const intersection = new Set(actualEnvSet.filter((x) => createdEnvSet.has(x))); - t.is(intersection.size, 2); - } catch (error) { - if (error instanceof PermitApiError) { - handleApiError(error, 'Got API Error', t); - } else if (error instanceof PermitConnectionError) { - throw error; - } else { - t.context.logger.error(`Got error: ${error}`); - t.fail(`Got error: ${error}`); - } - } finally { - await cleanup(permit, TEST_PROJECT_KEY, t); - } + const project = await client.api.projects.get(String(projectId)); + expect(String(project.id)).toBe(String(projectId)); + + ctx.onTestFinished(() => deleteCreatedEnvironments(client, project.key)); + await createEnvironments(client, project); + await expectCreatedEnvironmentsListed(client, project.key); + }); }); diff --git a/src/tests/fixtures.ts b/src/tests/fixtures.ts index f030cb2a..c563f4c5 100644 --- a/src/tests/fixtures.ts +++ b/src/tests/fixtures.ts @@ -1,48 +1,116 @@ -import { ExecutionContext } from 'ava'; import pino from 'pino'; -import { IPermitClient, Permit, PermitApiError } from '../index'; -import { LoggerFactory } from '../logger'; +import { type IPermitClient, Permit, PermitApiError } from '#src/index'; +import { LoggerFactory } from '#src/logger'; -export type TestContext = { permit: IPermitClient; logger: pino.Logger }; +export interface TestClient { + permit: IPermitClient; + logger: pino.Logger; +} -export const printBreak = () => { - console.log('\n\n ----------- \n\n'); -}; +export const printBreak = () => console.log('\n\n ----------- \n\n'); -export function handleApiError( - error: PermitApiError, - message: string, - t: ExecutionContext, -): void { - const err = `${message}: status=${error.response?.status}, url=${error.request.url}, method=${error.request.method}, details=${error.response?.data}`; - t.context.logger.error(err); - t.fail(err); +export interface CreateTestClientOptions { + proxyFactsViaPdp?: boolean; } -export const provideTestExecutionContext = (t: ExecutionContext) => { - // config - const defaultPDPAddress: string = - process.env.CLOUD_PDP === 'true' ? 'https://cloudpdp.api.permit.io' : 'http://localhost:7766'; - const defaultApiAddress: string = - process.env.API_TIER === 'prod' ? 'https://api.permit.io' : 'http://localhost:8000'; +export function createTestClient(opts: CreateTestClientOptions = {}): TestClient { + const defaultPDPAddress = + process.env['CLOUD_PDP'] === 'true' + ? 'https://cloudpdp.api.permit.io' + : 'http://localhost:7766'; + const defaultApiAddress = + process.env['API_TIER'] === 'prod' ? 'https://api.permit.io' : 'http://localhost:8000'; + const token = process.env['PDP_API_KEY'] || ''; + if (!token) throw new Error('PDP_API_KEY is not configured, test cannot run!'); + const permit = new Permit({ + token, + pdp: process.env['PDP_URL'] || defaultPDPAddress, + apiUrl: process.env['PDP_CONTROL_PLANE'] || defaultApiAddress, + log: { level: 'debug' }, + ...(opts.proxyFactsViaPdp ? { proxyFactsViaPdp: true } : {}), + }); + return { permit, logger: LoggerFactory.createLogger(permit.config) }; +} - const token: string = process.env.PDP_API_KEY || ''; - const pdpAddress: string = process.env.PDP_URL || defaultPDPAddress; - const apiUrl = process.env.PDP_CONTROL_PLANE || defaultApiAddress; +/** + * Logs and throws an error that names the failed request and the API's reply, with the + * original error as its `cause`. + */ +export function handleApiError(error: PermitApiError, message: string, logger: pino.Logger): never { + const request = error.originalError.config; + const target = `${request?.method?.toUpperCase() ?? 'request'} ${request?.url ?? '(no URL)'}`; + const outcome = error.response + ? `returned ${error.response.status}: ${JSON.stringify(error.response.data)}` + : `got no response: ${error.originalError.message}`; + const description = `${message}: ${target} ${outcome}`; + logger.error(description); + throw Object.assign(new Error(description), { cause: error }); +} - if (!token) { - t.fail('PDP_API_KEY is not configured, test cannot run!'); +/** Whether `error` is a REST API error with the given HTTP status. */ +export function isApiStatus(error: unknown, status: number): boolean { + return error instanceof PermitApiError && error.response?.status === status; +} + +/** For `.catch()` on a delete: a 404 means the entity is already gone; anything else rethrows. */ +export function ignoreNotFound(error: unknown): undefined { + if (isApiStatus(error, 404)) { + return undefined; } + throw error; +} - t.context.permit = new Permit({ - token, - pdp: pdpAddress, - apiUrl, - log: { - level: 'debug', - }, - }); +function describeError(error: unknown): string { + if (error instanceof PermitApiError) { + return `HTTP ${error.response?.status ?? 'without a response'}: ${error.message}`; + } + return String(error); +} - t.context.logger = LoggerFactory.createLogger(t.context.permit.config); -}; +/** + * Runs every cleanup step in order, including the ones after a failure, so one failure doesn't + * leave the remaining entities behind. A 404 means the entity is already gone. Any other error + * is reported once all steps have run, in one error that names each failed step. + * + * @param steps - Cleanup steps keyed by a description of what each one removes. + */ +export async function cleanUp(steps: Record Promise>): Promise { + const failures: string[] = []; + let firstError: unknown; + for (const [description, step] of Object.entries(steps)) { + try { + await step(); + } catch (error) { + if (isApiStatus(error, 404)) { + continue; + } + failures.push(`${description} (${describeError(error)})`); + firstError ??= error; + } + } + if (failures.length > 0) { + throw Object.assign(new Error(`cleanup failed: ${failures.join('; ')}`), { + cause: firstError, + }); + } +} + +/** + * Resolves when `read` fails with a 404. Rejects when it succeeds, because the entity still + * exists, or when it fails with any other error. + * + * @param read - A request for one entity, such as `permit.api.users.get(key)`. + * @param description - Names the entity in the failure message. + */ +export async function expectNotFound(read: Promise, description: string): Promise { + try { + await read; + } catch (error) { + if (isApiStatus(error, 404)) { + return; + } + throw error; + } + throw new Error(`${description} still exists`); +} diff --git a/src/tests/helpers/api-test-server.ts b/src/tests/helpers/api-test-server.ts new file mode 100644 index 00000000..f7b9127e --- /dev/null +++ b/src/tests/helpers/api-test-server.ts @@ -0,0 +1,108 @@ +import { createServer, type IncomingHttpHeaders } from 'node:http'; +import { type Socket } from 'node:net'; + +import { expect, onTestFinished } from 'vitest'; + +export interface ApiRequest { + method: string | undefined; + path: string; + query: [string, string][]; + headers: IncomingHttpHeaders; + body: unknown; +} + +export interface ApiReply { + body: unknown; + status?: number; +} + +export interface ExpectedApiRequest { + method: string; + path: string; + query?: [string, string][]; + body?: unknown; +} + +interface QueuedReply { + request: ExpectedApiRequest; + response: ApiReply | Promise; +} + +/** + * Starts a real loopback API boundary that requires an explicit reply for every request. + * Scope discovery runs normally; no SDK clients, adapters or context state are patched. + * Unexpected traffic, mismatched contracts and unused replies fail the owning test. + */ +export async function startApi(): Promise<{ + url: string; + requests: ApiRequest[]; + enqueue: (request: ExpectedApiRequest, response: ApiReply | Promise) => void; +}> { + const requests: ApiRequest[] = []; + const replies: QueuedReply[] = []; + const failures: unknown[] = []; + const sockets = new Set(); + const server = createServer((request, response) => { + let body = ''; + request.setEncoding('utf8'); + request.on('data', (chunk: string) => { + body += chunk; + }); + request.on('error', (error) => failures.push(error)); + request.on('end', () => { + void (async () => { + try { + const url = new URL(request.url ?? '/', 'http://127.0.0.1'); + const captured: ApiRequest = { + method: request.method, + path: url.pathname, + query: [...url.searchParams.entries()], + headers: request.headers, + body: body === '' ? undefined : JSON.parse(body), + }; + requests.push(captured); + const queued = replies.shift(); + if (!queued) throw new Error(`Unqueued API request: ${captured.method} ${captured.path}`); + expect(captured.method).toBe(queued.request.method); + expect(captured.path).toBe(queued.request.path); + expect(captured.query).toStrictEqual(queued.request.query ?? []); + expect(captured.body).toStrictEqual(queued.request.body); + const reply = await queued.response; + response.writeHead(reply.status ?? 200, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify(reply.body)); + } catch (error) { + failures.push(error); + response.writeHead(500).end('{"message":"API fixture contract failed"}'); + } + })(); + }); + }); + server.on('connection', (socket) => { + sockets.add(socket); + socket.on('close', () => sockets.delete(socket)); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve(); + }); + }); + onTestFinished(async () => { + await new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + for (const socket of sockets) socket.destroy(); + }); + expect(replies, 'The API fixture has unused replies').toHaveLength(0); + if (failures.length > 0) throw new AggregateError(failures, 'API fixture contract failed'); + }); + const address = server.address(); + if (address === null || typeof address === 'string') { + throw new Error('Expected the API fixture to listen on a TCP port'); + } + return { + url: `http://127.0.0.1:${address.port}`, + requests, + enqueue: (request, response) => replies.push({ request, response }), + }; +} diff --git a/src/tests/helpers/logger-child.ts b/src/tests/helpers/logger-child.ts new file mode 100644 index 00000000..86fd4a9d --- /dev/null +++ b/src/tests/helpers/logger-child.ts @@ -0,0 +1,112 @@ +import { deepStrictEqual, strictEqual } from 'assert'; + +import axios from 'axios'; +import pino from 'pino'; + +import { Permit, PermitConnectionError, PermitPDPStatusError } from '#src/index'; + +import { TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; + +async function main(): Promise { + const mode = process.argv[2]; + if (mode === undefined || !['default', 'json', 'env', 'pretty', 'env-pretty'].includes(mode)) { + throw new Error('Expected a supported logger mode'); + } + const pdp = process.argv[3]; + const operation = process.argv[4] ?? 'check'; + const throwOnError = process.argv[5] !== 'false'; + const instances = Number(process.argv[6] ?? '1'); + const expected = process.argv[7] ?? 'allow'; + if (!Number.isInteger(instances) || instances < 1) { + throw new Error('Expected a positive instance count'); + } + if (!['allow', 'status', 'transport'].includes(expected)) { + throw new Error('Expected allow, status or transport as the expected outcome'); + } + + const warnings: Error[] = []; + const onWarning = (warning: Error) => warnings.push(warning); + process.on('warning', onWarning); + // Pino installs one shared JSON flush listener; measure SDK growth after its initialization. + const jsonLogger = + mode === 'pretty' || mode === 'env-pretty' ? undefined : pino({ level: 'silent' }); + const exitListeners = process.listenerCount('exit'); + let permit: Permit | undefined; + for (let index = 0; index < instances; index++) { + permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp || 'http://127.0.0.1:1', + timeout: 5000, + retry: false, + throwOnError, + axiosInstance: axios.create({ headers: { 'X-Test-Secret': 'rest-secret-do-not-log' } }), + log: + mode === 'json' || mode === 'pretty' + ? { level: 'debug', json: mode === 'json' } + : { level: 'debug' }, + }); + } + await new Promise((resolve) => setImmediate(resolve)); + jsonLogger?.flush(); + process.removeListener('warning', onWarning); + strictEqual(process.listenerCount('exit'), exitListeners, 'Permit added process exit listeners'); + deepStrictEqual(warnings, [], 'Permit emitted process warnings'); + if (!permit) { + throw new Error('Expected a Permit instance'); + } + if (!pdp) { + return; + } + + let result: unknown; + try { + switch (operation) { + case 'check': + result = await permit.check('user-1', 'read', 'document:one'); + break; + case 'bulkCheck': + result = await permit.bulkCheck([ + { user: 'user-1', action: 'read', resource: 'document:one' }, + { user: 'user-1', action: 'write', resource: 'document:two' }, + ]); + break; + case 'getUserPermissions': + result = await permit.getUserPermissions('user-1'); + break; + case 'checkAllTenants': + result = await permit.checkAllTenants('user-1', 'read', 'document:one'); + break; + default: + throw new Error(`Unknown test operation: ${operation}`); + } + } catch (error: unknown) { + if (expected === 'allow' || !throwOnError || !(error instanceof PermitConnectionError)) { + throw error; + } + strictEqual( + error instanceof PermitPDPStatusError, + expected === 'status', + `Expected a ${expected} error, got ${error.name}`, + ); + console.error(error); + return; + } + + if (expected !== 'allow') { + strictEqual(throwOnError, false, 'Expected the PDP error to be thrown'); + const denied: Record = { + check: false, + bulkCheck: [false, false], + getUserPermissions: {}, + checkAllTenants: [], + }; + deepStrictEqual(result, denied[operation]); + } else { + strictEqual(result, true, 'Expected the local PDP to allow the logger test request'); + } +} + +main().catch((error: unknown) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/src/tests/helpers/logger-test-process.ts b/src/tests/helpers/logger-test-process.ts new file mode 100644 index 00000000..364889d1 --- /dev/null +++ b/src/tests/helpers/logger-test-process.ts @@ -0,0 +1,118 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm } from 'node:fs/promises'; +import { join, resolve } from 'node:path'; +import { promisify } from 'node:util'; + +import { build } from 'esbuild'; + +import { TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; + +export type LogMode = 'default' | 'json' | 'env' | 'pretty' | 'env-pretty'; + +export type PdpOperation = 'check' | 'bulkCheck' | 'getUserPermissions' | 'checkAllTenants'; + +export interface LoggerChild { + script: string; + remove: () => Promise; +} + +/** + * Bundles logger-child.ts and the SDK source it imports into one CommonJS script. Vitest runs the + * specs from source, so there is no compiled child to execute. The script goes into a new + * directory under node_modules/.cache, where Node resolves the SDK's runtime dependencies. + * + * @returns The script path and a function that deletes its directory. + */ +export async function buildLoggerChild(): Promise { + const cacheDir = resolve(__dirname, '../../../node_modules/.cache'); + await mkdir(cacheDir, { recursive: true }); + const outDir = await mkdtemp(join(cacheDir, 'permit-logger-child-')); + const remove = () => rm(outDir, { recursive: true, force: true }); + try { + await build({ + entryPoints: [join(__dirname, 'logger-child.ts')], + outfile: join(outDir, 'logger-child.js'), + bundle: true, + tsconfig: resolve('tsconfig.build.json'), + format: 'cjs', + platform: 'node', + target: 'node22', + packages: 'external', + }); + } catch (error: unknown) { + await remove(); + throw error; + } + return { script: join(outDir, 'logger-child.js'), remove }; +} + +/** Captures real SDK output in an isolated process without replacing logger methods. */ +export async function captureLogs( + child: LoggerChild, + mode: LogMode, + pdp?: string, + options: { + operation?: PdpOperation; + throwOnError?: boolean; + instances?: number; + failure?: 'status' | 'transport'; + } = {}, +) { + const args = [ + child.script, + mode, + pdp ?? '', + options.operation ?? 'check', + String(options.throwOnError ?? true), + String(options.instances ?? 1), + options.failure ?? 'allow', + ]; + const env: NodeJS.ProcessEnv = { ...process.env, NO_COLOR: '1', FORCE_COLOR: '0' }; + delete env['PERMIT_LOG_JSON']; + if (mode === 'env' || mode === 'env-pretty') { + env['PERMIT_LOG_JSON'] = String(mode === 'env'); + } + return promisify(execFile)(process.execPath, args, { + encoding: 'utf8', + timeout: 10000, + env, + }); +} + +/** Checks log formatting and ensures configured secrets never enter the captured output. */ +export function assertLogs( + output: { stdout: string; stderr: string }, + mode: LogMode, + expectErrorOutput = false, +): void { + if (expectErrorOutput) { + expect(output.stderr).toMatch(/Permit(?:PDPStatus|Connection)Error/); + } else { + expect(output.stderr).toBe(''); + } + for (const stream of [output.stdout, output.stderr]) { + expect(stream).not.toContain(TEST_TOKEN); + expect(stream).not.toContain('rest-secret-do-not-log'); + expect(stream).not.toContain('MaxListenersExceededWarning'); + } + expect(output.stdout).toContain('Permit.io SDK initialized'); + if (mode === 'pretty' || mode === 'env-pretty') { + expect(output.stdout).toContain('DEBUG'); + expect(output.stdout.trimStart().startsWith('{')).toBe(false); + return; + } + + const lines = output.stdout.trim().split('\n'); + expect(lines.length).toBeGreaterThan(0); + for (const line of lines) { + const record: unknown = JSON.parse(line); + assert( + typeof record === 'object' && record !== null, + 'Expected each log line to be a JSON object', + ); + const fields = record as Record; + expect(typeof fields['level']).toBe('number'); + expect(typeof fields['time']).toBe('string'); + expect(typeof fields['msg']).toBe('string'); + } +} diff --git a/src/tests/helpers/mock-api.test.ts b/src/tests/helpers/mock-api.test.ts new file mode 100644 index 00000000..f5e14c45 --- /dev/null +++ b/src/tests/helpers/mock-api.test.ts @@ -0,0 +1,22 @@ +import { expect, test } from 'vitest'; + +import { PermitApiError } from '#src/index'; +import { createMockPermit } from '#src/tests/helpers/mock-api'; + +test('unqueued mock traffic rejects instead of fabricating a successful response', async () => { + const { permit, rest } = createMockPermit(); + await expect(permit.api.users.get('unexpected')).rejects.toBeInstanceOf(PermitApiError); + expect(rest.requests).toHaveLength(1); + expect(rest.last?.path).toBe('/v2/facts/proj/env/users/unexpected'); +}); + +test('explicit null and default undefined replies retain their distinct wire semantics', async () => { + const { permit, rest } = createMockPermit(); + rest.resolveWith(null); + expect(await permit.api.users.get('null')).toBeNull(); + rest.resolveWith(undefined); + expect(await permit.api.users.get('undefined')).toStrictEqual({}); + rest.resolveWith(); + expect(await permit.api.users.get('default')).toStrictEqual({}); + expect(rest.requests).toHaveLength(3); +}); diff --git a/src/tests/helpers/mock-api.ts b/src/tests/helpers/mock-api.ts new file mode 100644 index 00000000..7a9b90bc --- /dev/null +++ b/src/tests/helpers/mock-api.ts @@ -0,0 +1,316 @@ +import { + AxiosError, + type AxiosInstance, + type AxiosResponse, + type InternalAxiosRequestConfig, +} from 'axios'; + +import { Permit } from '#src/index'; + +/** + * A single HTTP request captured by a {@link MockTransport} adapter. + * + * The generated openapi client bakes query parameters into the URL string and + * pre-serializes the request body to a JSON string. To keep assertions + * ergonomic, the capturing adapter normalizes both: + * - `origin` and `path` come from the URL axios dispatches to (`baseURL` joined + * with `url`), so a spec can compare the exact pathname. + * - `params` is parsed from that URL's query string (so the values are strings, + * e.g. `page: '1'`, never the numbers the caller passed). + * - `data` is parsed back from the JSON string into an object. + */ +export interface CapturedRequest { + /** Upper-cased HTTP method, e.g. `'GET'` / `'POST'` (axios lower-cases it internally). */ + method: string | undefined; + /** The request URL. For REST this is absolute; for PDP/OPA it is relative to `baseURL`. */ + url: string | undefined; + /** The axios `baseURL` (set for the PDP/OPA instances, undefined for REST). */ + baseURL: string | undefined; + /** Scheme, host and port of the dispatched URL, e.g. `http://localhost:8000`. */ + origin: string; + /** Percent-encoded pathname of the dispatched URL, without the query string. */ + path: string; + /** Query parameters parsed from the dispatched URL (values are strings). */ + params: Record; + /** Request body, parsed from JSON back into an object when possible. */ + data: unknown; + /** The finalized request headers. */ + headers: InternalAxiosRequestConfig['headers']; +} + +/** + * Captures the requests dispatched on one axios instance and lets a test queue + * the responses those requests resolve/reject with. + * + * Queued responses are consumed FIFO: each request shifts the next queued entry. + * An unqueued request rejects, so unexpected traffic cannot look like success. + */ +export interface MockTransport { + /** Every request captured so far, in dispatch order. */ + readonly requests: CapturedRequest[]; + /** The most recently captured request, or `undefined` if none yet. */ + readonly last: CapturedRequest | undefined; + /** Queue the next response. Defaults to status `200` with `{}` data. */ + resolveWith(data?: unknown, status?: number): void; + /** Queue a synthetic {@link AxiosError} so `handleApiError` maps it to `PermitApiError`. */ + rejectWith(status: number, data?: unknown): void; + /** Clear both captured requests and the queued responses. */ + reset(): void; +} + +/** Options for {@link createMockPermit}. All fields are optional. */ +export interface MockPermitOptions { + /** + * Route facts modules (users, tenants, role-assignments, ...) through the PDP + * base URL instead of the REST API. The facts modules still dispatch on the + * REST axios instance, so the `rest` transport captures them either way; only + * the captured `url`/`origin` changes. + */ + proxyFactsViaPdp?: boolean; + /** Organization key seeded into the SDK context. Defaults to `'org'`. */ + org?: string; + /** Project key seeded into the SDK context. Defaults to `'proj'`. */ + project?: string; + /** Environment key seeded into the SDK context. Defaults to `'env'`. */ + environment?: string; + /** Which context level to pre-seed (gates which modules can run). Defaults to `'environment'`. */ + contextLevel?: 'environment' | 'project' | 'organization'; + /** The API token passed to the SDK. Defaults to `'test-token'`. */ + token?: string; + /** Whether to add the default tenant to resources without one. Defaults to true. */ + useDefaultTenantIfEmpty?: boolean; +} + +/** The result of {@link createMockPermit}. */ +export interface MockPermit { + /** A fully constructed {@link Permit} whose three axios instances are mocked. */ + permit: Permit; + /** Captures REST / control-plane calls (`permit.api.*`). */ + rest: MockTransport; + /** Captures PDP calls (`permit.check`, `permit.bulkCheck`, `permit.getUserPermissions`). */ + pdp: MockTransport; + /** Captures OPA calls (`permit.check(..., { useOpa: true })`). */ + opa: MockTransport; +} + +/** The REST API origin the mocked SDK is configured with. */ +export const MOCK_API_ORIGIN = 'http://localhost:8000'; + +/** The PDP origin the mocked SDK is configured with. */ +export const MOCK_PDP_ORIGIN = 'http://localhost:7766'; + +interface QueuedResponse { + kind: 'resolve' | 'reject'; + status: number; + data: unknown; +} + +/** + * Builds a synthetic {@link AxiosError} that mirrors a real HTTP error response. + * + * `handleApiError` checks `axios.isAxiosError(err)` and reads `err.response`, so + * the error must carry `isAxiosError`, a `response` (with `status`/`data`), the + * live request `config` and a `toJSON` method. The `data` defaults to `{}` so + * `handleApiError`'s `err.response?.data.message` access never throws. + * + * @param status - The HTTP status code to report. + * @param data - The response body (defaults to `{}`). + * @param config - The request config to attach (defaults to an empty config). + * @returns An `AxiosError` ready to be thrown from an adapter. + */ +export function synthAxiosError( + status: number, + data: unknown = {}, + config: InternalAxiosRequestConfig = {} as InternalAxiosRequestConfig, +): AxiosError { + const error = new Error(`Request failed with status code ${status}`) as AxiosError; + error.isAxiosError = true; + error.config = config; + error.toJSON = () => ({}); + error.response = { + status, + statusText: 'Error', + headers: {}, + config, + data, + }; + return error; +} + +class MockTransportImpl implements MockTransport { + public readonly requests: CapturedRequest[] = []; + private readonly queue: QueuedResponse[] = []; + + public get last(): CapturedRequest | undefined { + return this.requests[this.requests.length - 1]; + } + + public resolveWith(data: unknown = {}, status = 200): void { + this.queue.push({ kind: 'resolve', status, data }); + } + + public rejectWith(status: number, data: unknown = {}): void { + this.queue.push({ kind: 'reject', status, data }); + } + + public reset(): void { + this.requests.length = 0; + this.queue.length = 0; + } + + public capture(request: CapturedRequest): void { + this.requests.push(request); + } + + public next(): QueuedResponse | undefined { + return this.queue.shift(); + } +} + +function parseBody(data: unknown): unknown { + if (typeof data !== 'string') { + return data; + } + try { + return JSON.parse(data); + } catch { + // Not JSON (e.g. a form/string body); return it verbatim. + return data; + } +} + +function toCaptured(instance: AxiosInstance, config: InternalAxiosRequestConfig): CapturedRequest { + // getUri joins baseURL and url the same way the real adapter does. + const dispatched = new URL(instance.getUri(config)); + const params: Record = {}; + dispatched.searchParams.forEach((value, key) => { + params[key] = value; + }); + return { + method: config.method?.toUpperCase(), + url: config.url, + baseURL: config.baseURL, + origin: dispatched.origin, + path: dispatched.pathname, + params, + data: parseBody(config.data), + headers: config.headers, + }; +} + +/** + * Installs a network-free capturing adapter on one axios instance and returns + * the {@link MockTransport} that controls it. + */ +function installAdapter(instance: AxiosInstance): MockTransport { + const transport = new MockTransportImpl(); + instance.defaults.adapter = async ( + config: InternalAxiosRequestConfig, + ): Promise => { + transport.capture(toCaptured(instance, config)); + const queued = transport.next(); + if (!queued) { + throw new Error( + `Unqueued mock request: ${config.method?.toUpperCase()} ${transport.last?.path}`, + ); + } + if (queued.kind === 'reject') { + throw synthAxiosError(queued.status, queued.data, config); + } + return { + data: queued.data, + status: queued.status, + statusText: 'OK', + headers: {}, + config, + }; + }; + return transport; +} + +function seedContext( + permit: Permit, + level: 'environment' | 'project' | 'organization', + org: string, + project: string, + environment: string, +): void { + const ctx = permit.config.apiContext; + if (level === 'organization') { + ctx._saveApiKeyAccessibleScope(org); + ctx.setOrganizationLevelContext(org); + return; + } + if (level === 'project') { + ctx._saveApiKeyAccessibleScope(org, project); + ctx.setProjectLevelContext(org, project); + return; + } + ctx._saveApiKeyAccessibleScope(org, project, environment); + ctx.setEnvironmentLevelContext(org, project, environment); +} + +/** + * Constructs a {@link Permit} SDK whose REST, PDP and OPA axios instances are all + * replaced with network-free capturing adapters, and pre-seeds the SDK context + * so API methods skip the `getApiKeyScope` HTTP call. + * + * Usage: + * ```ts + * const { permit, rest } = createMockPermit(); + * rest.resolveWith([{ key: 'doc' }]); // queue the next response + * await permit.api.resources.list(); + * expect(rest.last?.method).toBe('GET'); // assert the dispatched request + * expect(rest.last?.path).toBe('/v2/schema/proj/env/resources'); + * ``` + * + * Notes for spec authors: + * - Responses are FIFO. Queue one `resolveWith`/`rejectWith` per request the SDK + * will make; an unqueued request rejects. Explicit null bodies stay null, while + * omitted/undefined resolveWith bodies deliberately use the default `{}`. + * - `path` is the exact pathname, so assert it with `toBe`. `origin` shows + * whether a facts request went to the REST API or to the PDP. + * - `params` values are strings (parsed from the URL query), e.g. `page: '1'`. + * - `data` is the parsed request body, so assert with `toEqual(payload)`. + * - `rejectWith(status)` produces a `PermitApiError` whose `.response.status` + * equals `status` (the SDK maps AxiosErrors via `handleApiError`). + * - The SDK is constructed with retries left disabled (the default), so every + * request hits the adapter exactly once. + * + * @param opts - See {@link MockPermitOptions}. + * @returns The constructed permit plus the three transports. + */ +export function createMockPermit(opts: MockPermitOptions = {}): MockPermit { + const { + proxyFactsViaPdp = false, + org = 'org', + project = 'proj', + environment = 'env', + contextLevel = 'environment', + token = 'test-token', + useDefaultTenantIfEmpty = true, + } = opts; + + const permit = new Permit({ + token, + pdp: MOCK_PDP_ORIGIN, + apiUrl: MOCK_API_ORIGIN, + proxyFactsViaPdp, + multiTenancy: { useDefaultTenantIfEmpty }, + log: { level: 'silent' }, + }); + + const enforcer = ( + permit as unknown as { + enforcer: { client: AxiosInstance; opaClient: AxiosInstance }; + } + ).enforcer; + + const rest = installAdapter(permit.config.axiosInstance); + const pdp = installAdapter(enforcer.client); + const opa = installAdapter(enforcer.opaClient); + + seedContext(permit, contextLevel, org, project, environment); + + return { permit, rest, pdp, opa }; +} diff --git a/src/tests/helpers/pdp-test-server.ts b/src/tests/helpers/pdp-test-server.ts new file mode 100644 index 00000000..b1a9e75c --- /dev/null +++ b/src/tests/helpers/pdp-test-server.ts @@ -0,0 +1,127 @@ +import { createServer, type IncomingHttpHeaders } from 'node:http'; +import { Socket } from 'node:net'; + +export const TEST_TOKEN = 'permit-test-token-do-not-log'; + +interface CapturedRequest { + method: string | undefined; + path: string | undefined; + headers: IncomingHttpHeaders; + body: unknown; +} + +interface PdpReply { + status: number; + body: unknown; + delayMs?: number; +} + +interface TestPdp { + url: string; + requests: CapturedRequest[]; +} + +/** + * Starts an HTTP PDP fixture on a free loopback port for the current test and closes it when the + * test finishes. Omitting the reply leaves requests pending, for timeout tests. + */ +export async function startPdp(reply?: PdpReply | ((index: number) => PdpReply)): Promise { + // Vitest runs each test file in its own worker; keep loopback traffic off inherited proxies. + const proxyExclusions = [ + process.env['npm_config_no_proxy'], + process.env['no_proxy'], + process.env['NO_PROXY'], + '127.0.0.1', + ] + .filter(Boolean) + .join(',') + .split(','); + const noProxy = [...new Set(proxyExclusions)].join(','); + process.env['npm_config_no_proxy'] = noProxy; + process.env['no_proxy'] = noProxy; + process.env['NO_PROXY'] = noProxy; + + const requests: CapturedRequest[] = []; + const sockets = new Set(); + const requestErrors: Error[] = []; + const server = createServer((request, response) => { + let body = ''; + request.setEncoding('utf8'); + request.on('data', (chunk: string) => { + body += chunk; + }); + request.on('error', (error: Error) => requestErrors.push(error)); + request.on('end', () => { + try { + const parsedBody: unknown = JSON.parse(body); + requests.push({ + method: request.method, + path: request.url, + headers: request.headers, + body: parsedBody, + }); + } catch (error: unknown) { + requestErrors.push(error instanceof Error ? error : new Error(String(error))); + response.writeHead(400).end(); + return; + } + + if (reply) { + const selected = typeof reply === 'function' ? reply(requests.length - 1) : reply; + const respond = () => { + response.writeHead(selected.status, { 'Content-Type': 'application/json' }); + response.end(JSON.stringify(selected.body)); + }; + if (selected.delayMs === undefined) respond(); + else setTimeout(respond, selected.delayMs).unref(); + } + }); + }); + server.on('connection', (socket: Socket) => { + sockets.add(socket); + socket.on('close', () => sockets.delete(socket)); + }); + + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve(); + }); + }); + + onTestFinished(async () => { + await new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + for (const socket of sockets) { + socket.destroy(); + } + }); + if (requestErrors.length > 0) { + throw new Error(`Failed to read PDP test requests: ${requestErrors.map(String).join('; ')}`); + } + }); + + const address = server.address(); + if (address === null || typeof address === 'string') { + throw new Error('Expected the test PDP to listen on a TCP port'); + } + return { url: `http://127.0.0.1:${address.port}`, requests }; +} + +/** Asserts the exact SDK HTTP contract and JSON payload received by the PDP. */ +export function assertPdpRequest( + request: CapturedRequest | undefined, + expected: { path: string; body: unknown; sdk?: string | undefined }, +): void { + assert(request, 'The PDP did not receive the expected HTTP request'); + expect(request.body).toStrictEqual(expected.body); + expect(request.method).toBe('POST'); + expect(request.path).toBe(expected.path); + expect(request.headers.authorization).toBe(`Bearer ${TEST_TOKEN}`); + expect(request.headers['x-permit-sdk-version']).toBe( + `node:${process.env['npm_package_version'] ?? 'unknown'}`, + ); + expect(request.headers['x-permit-sdk-language']).toBe(expected.sdk); + expect(request.headers['content-type']).toBe('application/json'); +} diff --git a/src/tests/helpers/rejection.ts b/src/tests/helpers/rejection.ts new file mode 100644 index 00000000..19300c2e --- /dev/null +++ b/src/tests/helpers/rejection.ts @@ -0,0 +1,11 @@ +/** Awaits a promise that must reject with an Error, and returns that error. */ +export async function rejectionOf(promise: Promise): Promise { + try { + await promise; + } catch (error: unknown) { + expect(error).toBeInstanceOf(Error); + assert(error instanceof Error); + return error; + } + throw new Error('Expected the promise to reject'); +} diff --git a/src/tests/helpers/wait-for.ts b/src/tests/helpers/wait-for.ts new file mode 100644 index 00000000..6b7a25db --- /dev/null +++ b/src/tests/helpers/wait-for.ts @@ -0,0 +1,149 @@ +import { + PermitApiError, + PermitConnectionError, + PermitPDPStatusError, + RETRYABLE_STATUS_CODES, +} from '#src/index'; + +export interface WaitForOptions { + /** How long to keep starting attempts, in milliseconds. Defaults to 30 seconds. */ + timeoutMs?: number | undefined; + /** Pause between attempts, in milliseconds, cut short at the deadline. Defaults to 1 second. */ + intervalMs?: number; + /** How long one attempt may run before it fails, in milliseconds. Defaults to 10 seconds. */ + attemptTimeoutMs?: number; + /** What the wait is for, quoted in the timeout error. */ + message?: string; + /** Renders the last rejected value for the timeout error. Defaults to its JSON. */ + describe?: (value: T) => string; +} + +const DEFAULT_TIMEOUT_MS = 30_000; +const DEFAULT_INTERVAL_MS = 1_000; +const DEFAULT_ATTEMPT_TIMEOUT_MS = 10_000; +const CHECK_TIMEOUT_MS = 60_000; + +type Outcome = { value: T } | { error: unknown }; + +class AttemptTimeoutError extends Error { + constructor(timeoutMs: number) { + super(`the attempt did not settle within ${timeoutMs}ms`); + this.name = 'AttemptTimeoutError'; + } +} + +/** No status means the request got no response, such as a refused or reset connection. */ +function isRetryableStatus(status: number | undefined): boolean { + return status === undefined || RETRYABLE_STATUS_CODES.includes(status); +} + +/** + * Whether repeating the attempt can succeed: it timed out, got no response, or got a status the + * SDK's own retries treat as temporary (408, 429 or a 5xx). Anything else, such as a 4xx, a + * malformed PDP response or a bug in the probe, cannot change by waiting. + */ +function isTransient(error: unknown): boolean { + if (error instanceof AttemptTimeoutError) { + return true; + } + if (error instanceof PermitPDPStatusError) { + return isRetryableStatus(error.statusCode); + } + if (error instanceof PermitConnectionError) { + return true; + } + if (error instanceof PermitApiError) { + return isRetryableStatus(error.response?.status); + } + return false; +} + +async function attempt(probe: () => T | Promise, timeoutMs: number): Promise> { + let timer: ReturnType | undefined; + const timedOut = new Promise((_, reject) => { + timer = setTimeout(() => reject(new AttemptTimeoutError(timeoutMs)), timeoutMs); + }); + try { + return { value: await Promise.race([Promise.resolve().then(probe), timedOut]) }; + } catch (error) { + return { error }; + } finally { + clearTimeout(timer); + } +} + +function describeJson(value: unknown): string { + return JSON.stringify(value) ?? String(value); +} + +function timeoutError( + timeoutMs: number, + attempts: number, + last: Outcome, + options: WaitForOptions, +): Error { + const what = options.message ? `: ${options.message}` : ''; + const summary = `waitFor timed out after ${timeoutMs}ms and ${attempts} attempts${what}`; + if ('error' in last) { + return Object.assign(new Error(`${summary}; last error: ${String(last.error)}`), { + cause: last.error, + }); + } + const describe = options.describe ?? describeJson; + return new Error(`${summary}; last value: ${describe(last.value)}`); +} + +/** + * Calls `probe` until `accept` returns true for its result, and resolves with that result. + * + * A new attempt starts every `intervalMs` until `timeoutMs` has passed, and one more starts at the + * deadline. An attempt that has not settled after `attemptTimeoutMs` counts as failed, so the + * wait always settles within `timeoutMs + attemptTimeoutMs`. An attempt that throws a transient + * error (see {@link isTransient}) is retried; any other error rejects the wait at once. The + * timeout error reports the last result, or the last error, which it keeps as its `cause`. + * + * @param probe - Reads the state being waited for. + * @param accept - Returns true once the state read by `probe` is the expected one. + * @param options - Budgets and failure reporting, see {@link WaitForOptions}. + * @returns The first result that `accept` accepted. + */ +export async function waitFor( + probe: () => T | Promise, + accept: (value: T) => boolean, + options: WaitForOptions = {}, +): Promise { + const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS; + const intervalMs = options.intervalMs ?? DEFAULT_INTERVAL_MS; + const attemptTimeoutMs = options.attemptTimeoutMs ?? DEFAULT_ATTEMPT_TIMEOUT_MS; + const deadline = Date.now() + timeoutMs; + for (let attempts = 1; ; attempts += 1) { + const outcome = await attempt(probe, attemptTimeoutMs); + if ('value' in outcome && accept(outcome.value)) { + return outcome.value; + } + if ('error' in outcome && !isTransient(outcome.error)) { + throw outcome.error; + } + const remainingMs = deadline - Date.now(); + if (remainingMs <= 0) { + throw timeoutError(timeoutMs, attempts, outcome, options); + } + await new Promise((resolve) => setTimeout(resolve, Math.min(intervalMs, remainingMs))); + } +} + +/** + * Waits until `check` resolves to `expected`. The budget is 60 seconds unless `options.timeoutMs` + * sets one. + */ +export function waitForCheck( + check: () => Promise, + expected: boolean, + options: WaitForOptions = {}, +): Promise { + return waitFor(check, (allowed) => allowed === expected, { + ...options, + timeoutMs: options.timeoutMs ?? CHECK_TIMEOUT_MS, + message: options.message ?? `permit.check did not become ${expected}`, + }); +} diff --git a/src/tests/module-imports/api-keys.spec.ts b/src/tests/module-imports/api-keys.spec.ts new file mode 100644 index 00000000..752bb02a --- /dev/null +++ b/src/tests/module-imports/api-keys.spec.ts @@ -0,0 +1,285 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both public entries expose the API-key management facade', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.ok(permit.api.apiKeys instanceof sdk.ApiKeysApi); + for (const method of ['list', 'get', 'create', 'delete', 'rotate', 'getScope']) { + assert.equal(typeof permit.api.apiKeys[method], 'function'); + } +} +console.log('API_KEYS_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('API_KEYS_EXPORTS_OK'); +}); + +const consumer = ` +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +declare const permit: sdk.Permit; +declare const concrete: sdk.ApiKeysApi; +declare const client: sdk.IPermitClient; +const api: sdk.IApiKeysApi = permit.api.apiKeys; +const clientApi: sdk.IApiKeysApi = client.api.apiKeys; +const minimal: sdk.APIKeyCreate = { organization_id: 'organization-uuid' }; +const scoped: sdk.APIKeyCreate = { + organization_id: 'organization-uuid', project_id: 'project-uuid', + environment_id: 'environment-uuid', object_type: sdk.MemberAccessObj.Env, + access_level: sdk.MemberAccessLevel.Read, owner_type: sdk.APIKeyOwnerType.Member, + name: 'Disposable integration key', +}; +const options: sdk.IListApiKeys = { + objectType: sdk.MemberAccessObj.Project, projId: 'project-key-or-uuid', page: 2, perPage: 3, +}; +const listed = api.list(options); +const defaults = concrete.list(); +const created = api.create(minimal); +const scopedCreated = concrete.create(scoped); +const got = api.get('api-key-id'); +const rotated = concrete.rotate('api-key-uuid'); +const deleted = api.delete('api-key-id'); +const scope = api.getScope(); +type Results = [ + Assert, sdk.PaginatedResultAPIKeyRead>>, + Assert, sdk.PaginatedResultAPIKeyRead>>, + Assert, sdk.APIKeyRead>>, + Assert, sdk.APIKeyRead>>, + Assert, sdk.APIKeyRead>>, + Assert, sdk.APIKeyRead>>, + Assert, void>>, + Assert, sdk.APIKeyScopeRead>>, +]; +declare const row: sdk.APIKeyRead; +const metadata: [string, string, sdk.APIKeyOwnerType, string] = [ + row.id, row.organization_id, row.owner_type, row.created_at, +]; +const secret: string | null | undefined = row.secret; +const project: sdk.ProjectRead | null | undefined = row.project; +const environment: sdk.EnvironmentRead | null | undefined = row.env; +const member: sdk.OrgMemberRead | null | undefined = row.created_by_member; +declare const page: sdk.PaginatedResultAPIKeyRead; +const counts: [number, number | null | undefined] = [page.total_count, page.page_count]; +declare const discovered: sdk.APIKeyScopeRead; +const scopeIds: [string, string | null | undefined, string | null | undefined] = [ + discovered.organization_id, discovered.project_id, discovered.environment_id, +]; +const organizationScope: sdk.APIKeyScopeRead = { + organization_id: 'org', project_id: null, environment_id: null, +}; +const projectScope: sdk.APIKeyScopeRead = { + organization_id: 'org', project_id: 'project', environment_id: null, +}; +const omittedScope: sdk.APIKeyScopeRead = { organization_id: 'org' }; +if (discovered.project_id !== undefined) { + // @ts-expect-error An undefined guard does not exclude a null project ID. + discovered.project_id.toUpperCase(); +} +if (discovered.environment_id !== undefined) { + // @ts-expect-error An undefined guard does not exclude a null environment ID. + discovered.environment_id.toUpperCase(); +} +if (discovered.project_id != null) discovered.project_id.toUpperCase(); +if (discovered.environment_id != null) discovered.environment_id.toUpperCase(); +// @ts-expect-error The organization ID remains required and nonnullable. +const nullOrganization: sdk.APIKeyScopeRead = { organization_id: null }; +// @ts-expect-error Optional scope fields do not accept explicit undefined. +const undefinedScope: sdk.APIKeyScopeRead = { organization_id: 'org', project_id: undefined }; +// @ts-expect-error Creation input is not widened by read-scope nullability. +api.create({ organization_id: 'org', project_id: null }); +const nullRecord: sdk.APIKeyRead = { + organization_id: 'org', owner_type: sdk.APIKeyOwnerType.Member, id: 'id', created_at: 'created', + project_id: null, environment_id: null, object_type: null, access_level: null, + name: null, secret: null, created_by_member: null, last_used_at: null, env: null, project: null, +}; +const nullPage: sdk.PaginatedResultAPIKeyRead = { data: [nullRecord], total_count: 1, page_count: null }; +// @ts-expect-error Required owner_type stays nonnullable. +const nullOwner: sdk.APIKeyRead = { ...nullRecord, owner_type: null }; +// @ts-expect-error Required organization_id stays nonnullable. +const nullOrg: sdk.APIKeyRead = { ...nullRecord, organization_id: null }; +// @ts-expect-error Required id stays nonnullable. +const nullId: sdk.APIKeyRead = { ...nullRecord, id: null }; +// @ts-expect-error Required created_at stays nonnullable. +const nullCreated: sdk.APIKeyRead = { ...nullRecord, created_at: null }; +// @ts-expect-error Required total_count stays nonnullable. +const nullTotal: sdk.PaginatedResultAPIKeyRead = { data: [], total_count: null }; +// @ts-expect-error Required data stays nonnullable. +const nullData: sdk.PaginatedResultAPIKeyRead = { data: null, total_count: 0 }; +void [nullPage, nullOwner, nullOrg, nullId, nullCreated, nullTotal, nullData]; +void [organizationScope, projectScope, omittedScope, nullOrganization, undefinedScope, nullRecord]; +if (row.project_id !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null project_id. + row.project_id.toUpperCase(); +} +if (row.project_id != null) row.project_id.toUpperCase(); +if (row.environment_id !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null environment_id. + row.environment_id.toUpperCase(); +} +if (row.environment_id != null) row.environment_id.toUpperCase(); +if (row.object_type !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null object_type. + row.object_type.toUpperCase(); +} +if (row.object_type != null) row.object_type.toUpperCase(); +if (row.access_level !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null access_level. + row.access_level.toUpperCase(); +} +if (row.access_level != null) row.access_level.toUpperCase(); +if (row.name !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null name. + row.name.toUpperCase(); +} +if (row.name != null) row.name.toUpperCase(); +if (row.secret !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null secret. + row.secret.toUpperCase(); +} +if (row.secret != null) row.secret.toUpperCase(); +if (row.last_used_at !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null last_used_at. + row.last_used_at.toUpperCase(); +} +if (row.last_used_at != null) row.last_used_at.toUpperCase(); +if (row.created_by_member !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null created_by_member. + void row.created_by_member.id; +} +if (row.created_by_member != null) void row.created_by_member.id; +if (row.env !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null env. + void row.env.id; +} +if (row.env != null) void row.env.id; +if (row.project !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null project. + void row.project.id; +} +if (row.project != null) void row.project.id; +if (page.page_count !== undefined) { + // @ts-expect-error An undefined-only guard still permits a null page count. + page.page_count.toFixed(); +} +if (page.page_count != null) page.page_count.toFixed(); +// @ts-expect-error A nullable response credential must be narrowed before configuring a client. +new sdk.Permit({ token: row.secret }); +// @ts-expect-error Creation requires the public organization ID. +api.create({ name: 'missing-org' }); +// @ts-expect-error Explicit optional scope must not be undefined. +api.create({ organization_id: 'org', project_id: undefined }); +// @ts-expect-error Scope is the published enum, not an invented resource type. +api.create({ ...minimal, object_type: 'resource' }); +// @ts-expect-error Access levels are the committed enum. +api.create({ ...minimal, access_level: 'owner' }); +// @ts-expect-error Creation does not accept a caller-supplied secret. +api.create({ ...minimal, secret: 'invented' }); +// @ts-expect-error Create does not accept a separate context override. +api.create(minimal, { environmentId: 'env' }); +// @ts-expect-error The filter spelling is projId. +api.list({ projectId: 'project' }); +// @ts-expect-error There is no environment filter. +api.list({ environmentId: 'environment' }); +// @ts-expect-error Counts are always part of the published page, not a toggle. +api.list({ includeTotalCount: true }); +// @ts-expect-error Get requires an ID string. +api.get({ id: 'key-id' }); +// @ts-expect-error Rotation sends no request body. +api.rotate('key-id', minimal); +// @ts-expect-error Scope discovery takes no selected-context argument. +api.getScope({ projectId: 'project' }); +// @ts-expect-error A secret is optional on reads and cannot be promised. +const alwaysSecret: string = row.secret; +// @ts-expect-error Scope discovery is not an API-key record. +const scopeAsRecord: sdk.APIKeyRead = discovered; +// @ts-expect-error API-key lists preserve an envelope rather than a row array. +const projected: Promise = api.list(); +// @ts-expect-error Total count is required on the published page. +const emptyPage: sdk.PaginatedResultAPIKeyRead = { data: [] }; +// @ts-expect-error There is no unsupported key update operation. +api.update('key-id', {}); +// @ts-expect-error API management does not synchronize facts through the PDP. +api.waitForSync(3); +void [clientApi, metadata, secret, project, environment, member, counts, scopeIds]; +declare const results: Results; +void results; +`; + +test('strict TS6 and TS7 root consumers preserve API-key management contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-api-key-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esm = join(directory, 'consumer.mts'); + const cjs = join(directory, 'consumer.cts'); + await writeFile(esm, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjs, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [esm, cjs], + }), + ); + for (const compiler of [ + join(root, 'node_modules/typescript/bin/tsc'), + join(root, 'tools/compiler/node_modules/typescript/bin/tsc'), + ]) { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [compiler, '-p', config], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error(`API-key consumer compilation failed:\n${error.stdout}\n${error.stderr}`, { + cause: error, + }); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + } +}, 65_000); diff --git a/src/tests/module-imports/attribute-generics.spec.ts b/src/tests/module-imports/attribute-generics.spec.ts new file mode 100644 index 00000000..bc2c74ee --- /dev/null +++ b/src/tests/module-imports/attribute-generics.spec.ts @@ -0,0 +1,209 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +const consumer = ` +interface UserAttributes { + readonly access: 'reader' | 'owner'; + note: string | null; + score?: number; +} +interface TenantAttributes { region: 'east' | 'west'; } +interface InstanceAttributes { public: boolean; tags: readonly string[]; } +type Choice = { kind: 'staff'; department: string } | { kind: 'guest'; expires: number | null }; +declare const permit: sdk.Permit; +declare const users: sdk.IUsersApi; +declare const tenants: sdk.ITenantsApi; +declare const instances: sdk.IResourceInstancesApi; +declare const userClass: sdk.UsersApi; +declare const tenantClass: sdk.TenantsApi; +declare const instanceClass: sdk.ResourceInstancesApi; +declare const user: sdk.UserRead; +declare const tenant: sdk.TenantRead; +declare const instance: sdk.ResourceInstanceRead; +declare const detailed: sdk.ResourceInstanceDetailedRead; +declare const dynamic: boolean; + +// All 22 direct result paths retain the selected shape and their original envelope. +const userReads: Promise>[] = [ + users.get('alice'), + users.getByKey('alice'), + users.getById('user-id'), + users.create({ key: 'alice' }), + users.update('alice', { attributes: { note: null } }), +]; +const userPage: Promise> = + users.list({ searchOperator: 'startswith', includeResourceInstanceRoles: true }); +const synchronized: Promise> = + users.sync({ key: 'alice' }); +const tenantReads: Promise>[] = [ + tenants.get('east'), + tenants.getByKey('east'), + tenants.getById('tenant-id'), + tenants.create({ key: 'east', name: 'East' }), + tenants.update('east', { attributes: { region: 'east' } }), +]; +const tenantList: Promise[]> = tenants.list(); +const member: Promise> = + tenants.addUser('east', { key: 'alice' }); +const members: Promise> = + tenants.listTenantUsers({ tenantKey: 'east' }); +const instanceReads: Promise>[] = [ + instances.get('document:report'), + instances.getByKey('document:report'), + instances.getById('instance-id'), + instances.create({ key: 'report', resource: 'document', tenant: 'east' }), + instances.update('document:report', { attributes: { public: false } }), +]; +const instanceList: Promise[]> = + instances.list({ tenant: 'east' }); +const detailedPage: Promise> = + instances.listDetailed({ tenant: 'east' }); + +// The public client, concrete classes and synchronization clones expose the same methods. +const publicReads: Promise>[] = [ + permit.api.users.get('alice'), + userClass.get('alice'), + users.waitForSync(5).get('alice'), +]; +const concreteTenant: Promise> = + tenantClass.get('east'); +const clonedTenant: Promise> = + tenants.waitForSync(5).addUser('east', { key: 'alice' }); +const concreteInstance: Promise> = + instanceClass.get('document:report'); +const clonedDetailed: Promise> = + instances.waitForSync(5).listDetailed(); + +const defaultUser: Promise = users.get('alice'); +const defaultPage: Promise = users.list(); +const defaultSync: Promise = users.sync({ key: 'alice' }); +const defaultTenant: Promise = tenants.list(); +const defaultInstance: Promise = instances.list(); +const defaultDetailed: Promise = + instances.listDetailed(); +declare const defaultRead: sdk.UserRead; +const defaultAttributes: object | undefined = defaultRead.attributes; +const access: 'reader' | 'owner' | undefined = user.attributes?.access; +const note: string | null | undefined = user.attributes?.note; +const score: number | undefined = user.attributes?.score; +const region: 'east' | 'west' | undefined = tenant.attributes?.region; +const tags: readonly string[] | undefined = instance.attributes?.tags; +const requiredRelationships = detailed.relationships; +const optionalRelationships = instance.relationships; +declare const synced: sdk.ICreateOrUpdateUserResult; +const created: boolean = synced.created; +const syncedAttributes: UserAttributes | undefined = synced.user.attributes; +declare const page: sdk.PaginatedResultUserRead; +const total: number = page.total_count; +const pageCount: number | undefined = page.page_count; +const nestedUser: UserAttributes | undefined = page.data[0]?.attributes; +declare const memberPage: Awaited; +const nestedMember: UserAttributes | undefined = memberPage.data[0]?.attributes; +declare const detailedResult: Awaited; +const nestedInstance: InstanceAttributes | undefined = detailedResult.data[0]?.attributes; +declare const withoutUserAttributes: Omit, 'attributes'>; +const optionalUser: sdk.UserRead = withoutUserAttributes; +declare const withoutTenantAttributes: Omit, 'attributes'>; +const optionalTenant: sdk.TenantRead = withoutTenantAttributes; +declare const withoutInstanceAttributes: + Omit, 'attributes'>; +const optionalInstance: sdk.ResourceInstanceDetailedRead = + withoutInstanceAttributes; +const union: Promise> = users.get('alice'); + +// Existing role-list flags remain independent from attribute selection. +const roles: Promise = + users.getAssignedRoles({ user: 'alice', detailed: true, includeTotalCount: true }); +const roleUnion: Promise = + permit.api.roleAssignments.list({ detailed: dynamic }); +// @ts-expect-error Primitive attribute shapes are not server objects. +users.get('alice'); +// @ts-expect-error Null cannot be the entire attribute object. +users.get('alice'); +// @ts-expect-error Undefined cannot be the entire attribute object. +users.get('alice'); +// @ts-expect-error Optional attributes cannot be explicitly undefined in exact optional mode. +const undefinedAttributes: sdk.UserRead = { ...user, attributes: undefined }; +// @ts-expect-error Attributes remain non-null at the top level. +const nullAttributes: sdk.UserRead = { ...user, attributes: null }; +const badLiteral: sdk.UserRead = { + ...user, + // @ts-expect-error Selected shapes preserve literal fields. + attributes: { access: 'admin', note: null }, +}; +// @ts-expect-error Selected shapes preserve required fields inside attributes. +const missingMember: sdk.UserRead = { ...user, attributes: { access: 'owner' } }; +// @ts-expect-error Generic read selection does not add an optional write-model parameter. +const genericWrite: sdk.UserCreate = { key: 'alice' }; +// @ts-expect-error Resource schema definitions are not resource-instance data. +const schemaRead: sdk.ResourceRead = {}; +// @ts-expect-error Read attributes preserve caller readonly members. +user.attributes!.access = 'owner'; +// @ts-expect-error Attribute names are not added to unrelated role assignment models. +roles.then(result => result.data[0]!.user.attributes!.access); +// @ts-expect-error Detailed resource-instance relationships remain required. +const noRelationships: sdk.ResourceInstanceDetailedRead = + { ...instance, attributes: { public: true, tags: [] } }; +void [userReads, userPage, synchronized, tenantReads, tenantList, member, members, + instanceReads, instanceList, detailedPage, publicReads, concreteTenant, clonedTenant, + concreteInstance, clonedDetailed, defaultUser, defaultPage, defaultSync, defaultTenant, + defaultInstance, defaultDetailed, defaultAttributes, access, note, score, region, tags, + requiredRelationships, optionalRelationships, created, syncedAttributes, total, + pageCount, nestedUser, nestedMember, nestedInstance, optionalUser, optionalTenant, + optionalInstance, union, roles, roleUnion, undefinedAttributes, + nullAttributes, badLiteral, missingMember, genericWrite, schemaRead, noRelationships]; +`; +test('strict consumers preserve attribute shapes on all 22 result paths', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-attribute-generics-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files: [esmFile, cjsFile], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error(`Attribute consumer compilation failed:\n${error.stdout}\n${error.stderr}`, { + cause: error, + }); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/audit-logs.spec.ts b/src/tests/module-imports/audit-logs.spec.ts new file mode 100644 index 00000000..3cfb7eae --- /dev/null +++ b/src/tests/module-imports/audit-logs.spec.ts @@ -0,0 +1,247 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both public entries expose the dedicated audit log facade', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.ok(permit.api.auditLogs instanceof sdk.AuditLogsApi); + for (const method of ['list', 'get']) { + assert.equal(typeof permit.api.auditLogs[method], 'function'); + } +} +console.log('AUDIT_LOG_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('AUDIT_LOG_EXPORTS_OK'); +}); + +const consumer = ` + +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +declare const permit: sdk.Permit; +declare const client: sdk.IPermitClient; +declare const concrete: sdk.AuditLogsApi; +const api:sdk.IAuditLogsApi=permit.api.auditLogs; +const clientApi:sdk.IAuditLogsApi=client.api.auditLogs; +const filters:sdk.IListAuditLogs={page:1,perPage:100,pdpId:'uuid',users:['alice'] as const, + decision:false,resources:['document'] as const,tenant:'east',action:'read',timestampFrom:0, + timestampTo:1,sortBy:sdk.AuditLogSortKey.None,query:sdk.AuditLogQueryType.None}; +const listed=api.list(filters),defaults=concrete.list(),got=api.get('log-uuid'); +type Results=[Assert,sdk.LimitedPaginatedResultAuditLogModel>>, + Assert,sdk.LimitedPaginatedResultAuditLogModel>>, + Assert,sdk.DetailedAuditLogModel>>]; +declare const page:sdk.LimitedPaginatedResultAuditLogModel; +const rows:sdk.AuditLogModel[]=page.data; +const counts:number[]=[page.total_count,page.pagination_count]; +const pages:number|null|undefined=page.page_count; +declare const detail:sdk.DetailedAuditLogModel; +const raw:sdk.RawData1=detail.raw_data; +const listRaw:sdk.RawData|null|undefined=rows[0]?.raw_data; +const objects:sdk.AuditLogObjectsModel|null|undefined=detail.objects; +const opa:sdk.OPAEngineDecisionLog={decision_id:'id',labels:{id:'opa',version:'1'}, + timestamp:'date',path:'permit/allow',metrics:{}}; +const avp:sdk.AVPEngineDecisionLog={timestamp:'date',tenant:'east',input:{},result:{}}; +const generic:sdk.GenericEngineDecisionLog={timestamp:'date',decision:false}; +const dummy:sdk.DummyEngineModel={}; +const branches:sdk.RawData[]=[opa,avp,generic,dummy]; +if ('metrics' in raw) { const metrics=raw.metrics; void metrics; } +// @ts-expect-error The engine tag is optional and dummy branches overlap it. +if (raw.engine==='OPA') { const metrics=raw.metrics; void metrics; } +// @ts-expect-error Optional rows cannot be indexed without checking presence. +const first:sdk.AuditLogModel=page.data[0]; +// @ts-expect-error Optional detail objects are not guaranteed. +const guaranteed:sdk.AuditLogObjectsModel=detail.objects; +// @ts-expect-error List returns a full envelope, not a bare array. +const array:Promise=api.list(); +// @ts-expect-error Detail requires received raw_data. +const incomplete:sdk.DetailedAuditLogModel={id:'id',timestamp:'date',org_id:'org', + project_id:'project',env_id:'environment'}; +// @ts-expect-error User filters are repeated arrays, not CSV strings. +api.list({users:'alice,bob'}); +// @ts-expect-error Resource filters are arrays. +api.list({resources:'document'}); +// @ts-expect-error Decision is boolean, not number. +api.list({decision:0}); +// @ts-expect-error Timestamp filters use published numbers, not Date instances. +api.list({timestampFrom:new Date()}); +// @ts-expect-error Sort None is capitalized in the published enum. +api.list({sortBy:'none'}); +// @ts-expect-error Query none is lower-case in the published enum. +api.list({query:'None'}); +// @ts-expect-error Exact optional filter values cannot explicitly be undefined. +api.list({decision:undefined}); +// @ts-expect-error Context comes from the selected client scope. +api.list({projId:'other'}); +// @ts-expect-error The published finite query has no includeTotalCount. +api.list({includeTotalCount:true}); +// @ts-expect-error There is no sort direction filter. +api.list({sortDirection:'desc'}); +// @ts-expect-error Text query and cursors are not published filters. +api.list({text:'alice',cursor:'next'}); +// @ts-expect-error Authorization audit reads have no replay helper. +api.replay('id'); +// @ts-expect-error Audit records have no SDK delete helper. +api.delete('id'); +// @ts-expect-error Control-plane reads have no synchronization helper. +api.waitForSync(5); +// @ts-expect-error This surface has no Elements endpoint. +api.elements.list(); + +const nullRow: sdk.AuditLogModel = {id:'id',timestamp:'date',org_id:'org', + project_id:'project',env_id:'environment',raw_data:null,created_at:null,query:null, + user_key:null,user_email:null,user_name:null,resource_type:null,tenant:null,action:null, + decision:null,reason:null,pdp_config_id:null}; +const nullObjects: sdk.AuditLogObjectsModel = {id:null,organization_object:null, + project_object:null,environment_object:null,pdp_config_object:null,user_object:null, + action_object:null,resource_type_object:null,tenant_object:null,created_at:null}; +const nestedObjects: sdk.AuditLogObjectsModel = { + organization_object:{id:'id',key:'key',name:null}, + project_object:{id:'id',key:'key',name:null}, + environment_object:{id:'id',key:'key',name:null}, + user_object:{id:'id',key:'key',created_at:'date',updated_at:'date',email:null, + first_name:null,last_name:null,attributes:null,roles:null,assigned_roles:null}, + action_object:{id:'id',key:'key',name:null,created_at:'date',updated_at:'date'}, + resource_type_object:{id:'id',key:'key',name:null,attributes:null, + created_at:'date',updated_at:'date'}, + tenant_object:{id:'id',key:'key',name:null,attributes:null,created_at:'date',updated_at:'date'}, +}; +const nullDetail: sdk.DetailedAuditLogModel = {...nullRow,raw_data:{engine:null},objects:null}; +const nestedNullDetail: sdk.DetailedAuditLogModel = {...nullDetail,objects:nestedObjects, + raw_data:{...opa,engine:null,metrics:{timer_rego_input_parse_ns:null, + timer_rego_query_parse_ns:null,timer_rego_query_compile_ns:null,timer_rego_query_eval_ns:null, + timer_rego_module_parse_ns:null,timer_rego_module_compile_ns:null,timer_server_handler_ns:null}}}; +const nullAvp: sdk.AVPEngineDecisionLog = {...avp,engine:null,process_time_ms:null}; +const nullGeneric: sdk.GenericEngineDecisionLog = {...generic,engine:null,decision_id:null, + process_time_ms:null,query:null,user_key:null,user_email:null,user_name:null,action:null, + resource_type:null,tenant:null}; +const nullDummy: sdk.DummyEngineModel = {engine:null,timestamp:null}; +const nullPage: sdk.LimitedPaginatedResultAuditLogModel = { + data:[nullRow],total_count:0,pagination_count:0,page_count:null}; +// @ts-expect-error Required detail raw_data remains non-nullable. +const nullRaw: sdk.DetailedAuditLogModel = {...nullDetail,raw_data:null}; +// @ts-expect-error Required audit identifiers remain non-nullable. +const nullId: sdk.AuditLogModel = {...nullRow,id:null}; +// @ts-expect-error Required audit timestamp remains non-nullable. +const nullTimestamp: sdk.AuditLogModel = {...nullRow,timestamp:null}; +// @ts-expect-error Required total count remains non-nullable. +const nullCount: sdk.LimitedPaginatedResultAuditLogModel = {...nullPage,total_count:null}; +// @ts-expect-error The page rows remain required, non-null objects. +const nullData: sdk.LimitedPaginatedResultAuditLogModel = {...nullPage,data:[null]}; +// @ts-expect-error Required OPA metrics object remains non-nullable. +const nullMetrics: sdk.OPAEngineDecisionLog = {...opa,metrics:null}; +// @ts-expect-error Required OPA decision identifier remains non-nullable. +const nullDecisionId: sdk.OPAEngineDecisionLog = {...opa,decision_id:null}; +// @ts-expect-error Required AVP input remains non-nullable. +const nullAvpInput: sdk.AVPEngineDecisionLog = {...avp,input:null}; +// @ts-expect-error Required AVP tenant remains non-nullable. +const nullAvpTenant: sdk.AVPEngineDecisionLog = {...avp,tenant:null}; +// @ts-expect-error Required generic decision remains non-nullable. +const nullGenericDecision: sdk.GenericEngineDecisionLog = {...generic,decision:null}; +const nullUser: NonNullable = { + // @ts-expect-error Nested required user identity remains non-nullable. + id:null,key:'key',created_at:'date',updated_at:'date'}; +// @ts-expect-error Request decisions remain non-nullable. +api.list({decision:null}); +// @ts-expect-error Request arrays remain non-nullable. +api.list({users:null}); +// @ts-expect-error Request array items remain non-nullable. +api.list({resources:[null]}); +// @ts-expect-error Request timestamp bounds remain non-nullable. +api.list({timestampFrom:null}); +// @ts-expect-error Request sort remains non-nullable. +api.list({sortBy:null}); +// @ts-expect-error Optional list raw data requires a null guard. +const guaranteedListRaw: sdk.RawData = nullRow.raw_data; +// @ts-expect-error Optional metric values require a null guard. +const guaranteedMetric: number = opa.metrics.timer_rego_query_eval_ns; +void [nullRow,nullObjects,nestedObjects,nullDetail,nestedNullDetail,nullAvp,nullGeneric,nullDummy, + nullPage,nullRaw,nullId,nullTimestamp,nullCount,nullData,nullMetrics,nullDecisionId, + nullAvpInput,nullAvpTenant,nullGenericDecision,nullUser,guaranteedListRaw,guaranteedMetric]; + +void [clientApi,rows,counts,pages,raw,listRaw,objects,branches,first,guaranteed,array,incomplete]; +declare const results:Results; +void results; + +`; + +test('strict TS6 and TS7 root consumers preserve audit-log schema contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-audit-log-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esm = join(directory, 'consumer.mts'); + const cjs = join(directory, 'consumer.cts'); + await writeFile(esm, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjs, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [esm, cjs], + }), + ); + for (const compiler of [ + join(root, 'node_modules/typescript/bin/tsc'), + join(root, 'tools/compiler/node_modules/typescript/bin/tsc'), + ]) { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [compiler, '-p', config], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `Audit-log consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { + cause: error, + }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + } +}, 65_000); diff --git a/src/tests/module-imports/bulk-roles.spec.ts b/src/tests/module-imports/bulk-roles.spec.ts new file mode 100644 index 00000000..baa89d10 --- /dev/null +++ b/src/tests/module-imports/bulk-roles.spec.ts @@ -0,0 +1,147 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); +test('both built entries expose the typed bulk role method', async () => { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({token:'fixture',log:{level:'silent'}}); + assert.ok(permit.api.roles instanceof sdk.RolesApi); + assert.equal(typeof permit.api.roles.bulkCreateOrReplace,'function'); + assert.equal('waitForSync' in permit.api.roles,false); +} +console.log('BULK_ROLES_EXPORTS_OK'); +`, + ], + { cwd: root, timeout: 30_000, encoding: 'utf8' }, + ); + expect(stdout.trim()).toBe('BULK_ROLES_EXPORTS_OK'); + expect(stderr).toBe(''); +}); + +const consumer = ` +type Equal = (()=>T extends A ? 1 : 2) extends + (()=>T extends B ? 1 : 2) ? true : false; +type Assert = T; +declare const permit: sdk.IPermitClient; +declare const concrete: sdk.RolesApi; +const api: sdk.IRolesApi = permit.api.roles; +const tenantRole: sdk.RoleCreateBulk = { + key:'reader',name:'Reader',permissions:['document:read'],attributes:{enabled:false,count:0}, +}; +const resourceRole: sdk.RoleCreateBulk = { + key:'editor',name:'Editor',resource:'document',permissions:['read','write'],extends:['reader'], + description:'',granted_to:{users_with_role:[{ + role:'owner',on_resource:'folder',linked_by_relation:'parent', + when:{no_direct_roles_on_object:false}, + }]}, +}; +const result = api.bulkCreateOrReplace([tenantRole,resourceRole]); +const classResult = concrete.bulkCreateOrReplace([]); +type ReturnTypes = [ + Assert,sdk.RoleCreateBulkOperationResult>>, + Assert,sdk.RoleCreateBulkOperationResult>>, + Assert,[roles:sdk.RoleCreateBulk[]]>>, +]; +declare const report: sdk.RoleCreateBulkOperationResult; +const created: string[] = report.created; +const updated: string[] = report.updated; +const first: string | undefined = report.created[0]; +const empty: sdk.RoleCreateBulkOperationResult = {created:[],updated:[]}; +// @ts-expect-error Both published arrays are required. +const incomplete: sdk.RoleCreateBulkOperationResult = {created:[]}; +// @ts-expect-error Result arrays contain strings, not counts or rows. +const wrongResult: sdk.RoleCreateBulkOperationResult = {created:[1],updated:[]}; +// @ts-expect-error No backend count fields are invented. +void report.created_count; +// @ts-expect-error Key and name are both required. +void api.bulkCreateOrReplace([{key:'reader'}]); +// @ts-expect-error A request wrapper is not the public method's array input. +void api.bulkCreateOrReplace({operations:[tenantRole]}); +// @ts-expect-error Resource keys remain strings, not nullable selectors. +void api.bulkCreateOrReplace([{...resourceRole,resource:null}]); +// @ts-expect-error Exact optional resource rejects explicit undefined. +void api.bulkCreateOrReplace([{...resourceRole,resource:undefined}]); +// @ts-expect-error Permissions remain string arrays. +void api.bulkCreateOrReplace([{...tenantRole,permissions:[1]}]); +// @ts-expect-error Inheritance remains a string array. +void api.bulkCreateOrReplace([{...tenantRole,extends:'reader'}]); +// @ts-expect-error Descriptions remain non-null strings. +void api.bulkCreateOrReplace([{...tenantRole,description:null}]); +// @ts-expect-error Arbitrary metadata must be an object. +void api.bulkCreateOrReplace([{...tenantRole,attributes:'text'}]); +// @ts-expect-error Derived rules retain the required linking relation. +void api.bulkCreateOrReplace([{...resourceRole,granted_to:{users_with_role:[{ + role:'owner',on_resource:'folder', +}]}}]); +// @ts-expect-error Bulk schema roles have no facts synchronization method. +void api.waitForSync(5); +// @ts-expect-error There is no arbitrary resource argument. +void api.bulkCreateOrReplace('document',[resourceRole]); +// @ts-expect-error The bulk operation does not introduce caller attribute generics. +void api.bulkCreateOrReplace<{enabled:boolean}>([tenantRole]); +void [result,classResult,created,updated,first,empty,incomplete,wrongResult]; +declare const verified: ReturnTypes; +void verified; +`; + +test('strict root consumers preserve existing bulk role input and result contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-bulk-role-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esm = join(directory, 'consumer.mts'); + const cjs = join(directory, 'consumer.cts'); + await writeFile(esm, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjs, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [esm, cjs], + }), + ); + for (const compiler of [ + join(root, 'node_modules/typescript/bin/tsc'), + join(root, 'tools/compiler/node_modules/typescript/bin/tsc'), + ]) { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [compiler, '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + } +}, 65_000); diff --git a/src/tests/module-imports/commonjs-import.spec.ts b/src/tests/module-imports/commonjs-import.spec.ts index 26530b50..0930ad2f 100644 --- a/src/tests/module-imports/commonjs-import.spec.ts +++ b/src/tests/module-imports/commonjs-import.spec.ts @@ -1,42 +1,32 @@ -import test from 'ava'; - -test('CommonJS require() import works correctly', async (t) => { - // This test will be compiled to JS and can use require() at runtime - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { Permit } = require('../../index'); - - t.is(typeof Permit, 'function'); - t.is(Permit.name, 'Permit'); - - // Test creating a Permit instance - const permit = new Permit({ - token: 'test-token', - pdp: 'http://localhost:7766', +import { builtFile, probePackage } from '#src/tests/module-imports/package-probe'; + +// Validates the BUILT package the way a CommonJS consumer loads it: +// `require('permitio')` in a separate Node process, resolved through the +// package.json `exports` map. This is a packaging-regression guard. +describe('CommonJS require of the built package', () => { + it('resolves through the exports map to build/index.js', async () => { + expect(await probePackage('cjs')).toHaveProperty('resolved', builtFile('index.js')); }); - t.truthy(permit); - t.is(typeof permit.check, 'function'); - t.is(typeof permit.api, 'object'); - t.is(typeof permit.elements, 'object'); - t.is(typeof permit.config, 'object'); -}); - -test('CommonJS require() imports individual modules', async (t) => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { Enforcer } = require('../../enforcement/enforcer'); - - t.is(typeof Enforcer, 'function'); - t.is(Enforcer.name, '_Enforcer'); -}); - -test('CommonJS require() imports API modules', async (t) => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { ApiClient } = require('../../api/api-client'); - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { ElementsClient } = require('../../api/elements'); + it('exposes Permit and the public API classes', async () => { + expect(await probePackage('cjs')).toHaveProperty('names', { + Permit: 'Permit', + ApiClient: 'ApiClient', + ElementsClient: 'ElementsClient', + }); + }); - t.is(typeof ApiClient, 'function'); - t.is(ApiClient.name, 'ApiClient'); - t.is(typeof ElementsClient, 'function'); - t.is(ElementsClient.name, 'ElementsClient'); + it('constructs a Permit with the given config and its API modules', async () => { + const probe = await probePackage('cjs'); + + expect(probe).toHaveProperty('members', { + check: 'function', + api: 'object', + elements: 'object', + users: 'object', + resources: 'object', + roles: 'object', + }); + expect(probe).toHaveProperty('config', { token: 'test-token', pdp: 'http://localhost:7766' }); + }); }); diff --git a/src/tests/module-imports/detailed-api.spec.ts b/src/tests/module-imports/detailed-api.spec.ts new file mode 100644 index 00000000..1e288d6b --- /dev/null +++ b/src/tests/module-imports/detailed-api.spec.ts @@ -0,0 +1,263 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both published entries expose the five approved operations', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.equal(typeof permit.api.tenants.addUser, 'function'); + for (const name of ['relationshipTuples', 'resourceInstances', 'roleAssignments']) { + assert.equal(typeof permit.api[name].listDetailed, 'function'); + } + assert.ok(permit.api.pdps instanceof sdk.PdpsApi); + assert.deepEqual(Object.getOwnPropertyNames(sdk.PdpsApi.prototype).sort(), ['constructor', 'refresh']); + assert.equal(permit.api.pdps.refreshPdp, undefined); +} +console.log('DETAILED_API_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('DETAILED_API_EXPORTS_OK'); +}); + +const consumer = ` + +declare const permit: sdk.Permit; +const tenantUser: Promise = permit.api.tenants.addUser('east', { key: 'alice' }); +const tupleDefault: Promise = + permit.api.relationshipTuples.listDetailed(); +const tupleFiltered: Promise = + permit.api.relationshipTuples.listDetailed({ + tenant: 'east', + subject: 'user:alice', + relation: 'owner', + object: 'doc:report', + subjectType: 'user', + objectType: 'doc', + page: 1, + perPage: 10, + }); +const instanceDefault: Promise = + permit.api.resourceInstances.listDetailed(); +const instanceFiltered: Promise = + permit.api.resourceInstances.listDetailed({ + tenant: 'east', + resource: 'doc', + search: ['report', 'budget'], + page: 1, + perPage: 10, + }); +const roleDefault: Promise = + permit.api.roleAssignments.listDetailed(); +const roleFiltered: Promise = + permit.api.roleAssignments.listDetailed({ + tenant: 'east', + resource: 'doc', + resourceInstance: 'doc:report', + user: 'alice', + role: 'reader', + }); +const request: sdk.IEnvironmentPdpDataRefreshRequest = { reason: 'fixture' }; +const refreshed: Promise = permit.api.pdps.refresh(request); +const refreshDefault: Promise = permit.api.pdps.refresh(); +// @ts-expect-error Tenant membership requires new UserCreate data, not an existing user key. +permit.api.tenants.addUser('east', 'alice'); +// @ts-expect-error UserCreate requires a key but no role. +permit.api.tenants.addUser('east', { email: 'alice@example.invalid' }); +// @ts-expect-error Dedicated tuple detail listing returns its full envelope. +const tupleArray: Promise = + permit.api.relationshipTuples.listDetailed(); +// @ts-expect-error Dedicated instance detail listing returns its full envelope. +const instanceArray: Promise = + permit.api.resourceInstances.listDetailed(); +// @ts-expect-error Dedicated role detail listing returns its full envelope. +const roleArray: Promise = + permit.api.roleAssignments.listDetailed(); +// @ts-expect-error Dedicated detailed listing has no count switch. +permit.api.roleAssignments.listDetailed({ includeTotalCount: false }); +// @ts-expect-error Dedicated detailed listing has no deprecated flag. +permit.api.roleAssignments.listDetailed({ detailed: false }); +// @ts-expect-error Resource search is an array of terms. +permit.api.resourceInstances.listDetailed({ search: 'report' }); +// @ts-expect-error Pagination is numeric. +permit.api.relationshipTuples.listDetailed({ page: '2' }); +// @ts-expect-error Exact optional properties reject explicit undefined filters. +permit.api.resourceInstances.listDetailed({ tenant: undefined }); +// @ts-expect-error An environment-wide refresh cannot select a PDP shard. +permit.api.pdps.refresh({ shard_id: 2 }); +// @ts-expect-error Individual-PDP refresh is deferred to P2. +permit.api.pdps.refreshPdp('pdp-id'); +// @ts-expect-error Acknowledgement is neither a boolean completion nor a void response. +const completed: Promise = permit.api.pdps.refresh(); + +declare const dynamic: boolean; +declare const dynamicCount: boolean; +const roles = permit.api.roleAssignments; +const defaults: Promise = roles.list({}); +const bothFalse: Promise = roles.list({ + detailed: false, + includeTotalCount: false, +}); +const details: Promise = roles.list({ detailed: true }); +const counted: Promise = roles.list({ + includeTotalCount: true, +}); +const bothTrue: Promise = roles.list({ + detailed: true, + includeTotalCount: true, +}); +const falseCount: Promise = roles.list({ + detailed: true, + includeTotalCount: false, +}); +const falseDetail: Promise = roles.list({ + detailed: false, + includeTotalCount: true, +}); +const dynamicDetail: Promise = + roles.list({ detailed: dynamic }); +const dynamicCounts: Promise = + roles.list({ includeTotalCount: dynamicCount }); +const dynamicDetailCounted: Promise< + sdk.PaginatedResultRoleAssignmentRead | sdk.PaginatedResultRoleAssignmentDetailedRead +> = roles.list({ detailed: dynamic, includeTotalCount: true }); +const dynamicCountDetailed: Promise< + sdk.RoleAssignmentDetailedRead[] | sdk.PaginatedResultRoleAssignmentDetailedRead +> = roles.list({ detailed: true, includeTotalCount: dynamicCount }); +const dynamicBoth: Promise< + | sdk.RoleAssignmentRead[] + | sdk.RoleAssignmentDetailedRead[] + | sdk.PaginatedResultRoleAssignmentRead + | sdk.PaginatedResultRoleAssignmentDetailedRead +> = roles.list({ detailed: dynamic, includeTotalCount: dynamicCount }); +declare const conditionalOptions: { detailed: true } | { includeTotalCount: true }; +const conditionalResults: Promise< + sdk.RoleAssignmentDetailedRead[] | sdk.PaginatedResultRoleAssignmentRead +> = roles.list(conditionalOptions); +// @ts-expect-error A union of parameter objects cannot collapse to the no-flag array result. +const narrowedConditional: Promise = roles.list(conditionalOptions); +declare const optionalFlags: { detailed?: true; includeTotalCount?: true }; +const optionalBoth: Promise< + | sdk.RoleAssignmentRead[] + | sdk.RoleAssignmentDetailedRead[] + | sdk.PaginatedResultRoleAssignmentRead + | sdk.PaginatedResultRoleAssignmentDetailedRead +> = roles.list(optionalFlags); +declare const widened: sdk.IListRoleAssignments; +const widenedBoth: Promise< + | sdk.RoleAssignmentRead[] + | sdk.RoleAssignmentDetailedRead[] + | sdk.PaginatedResultRoleAssignmentRead + | sdk.PaginatedResultRoleAssignmentDetailedRead +> = roles.list(widened); +// @ts-expect-error Optional true flags can be omitted and cannot promise a detailed envelope. +const narrowedOptional: Promise = + roles.list(optionalFlags); +// @ts-expect-error Fully widened public parameters cannot promise base arrays. +const narrowedWidened: Promise = roles.list(widened); +// @ts-expect-error Dynamic detail flags cannot be narrowed to base arrays. +const narrowedDetail: Promise = roles.list({ detailed: dynamic }); +// @ts-expect-error Dynamic count flags cannot be narrowed to arrays. +const narrowedCounts: Promise = roles.list({ + includeTotalCount: dynamicCount, +}); +// @ts-expect-error Dynamic detail/count flags cannot promise an envelope. +const narrowedBoth: Promise = roles.list({ + detailed: dynamic, + includeTotalCount: dynamicCount, +}); +void [ + tenantUser, + tupleDefault, + tupleFiltered, + instanceDefault, + instanceFiltered, + roleDefault, + roleFiltered, + refreshed, + refreshDefault, + defaults, + bothFalse, + details, + counted, + bothTrue, + falseCount, + falseDetail, + dynamicDetail, + dynamicCounts, + dynamicDetailCounted, + dynamicCountDetailed, + dynamicBoth, + optionalBoth, + widenedBoth, + conditionalResults, +]; +`; + +test('strict ESM and CJS consumers retain precise membership, detailed-list, refresh and pagination contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-detailed-api-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files: [esmFile, cjsFile], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `Detailed API consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { + cause: error, + }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/esm-import.spec.ts b/src/tests/module-imports/esm-import.spec.ts index f8e35089..ccdb25a5 100644 --- a/src/tests/module-imports/esm-import.spec.ts +++ b/src/tests/module-imports/esm-import.spec.ts @@ -1,38 +1,32 @@ -import test from 'ava'; +import { builtFile, probePackage } from '#src/tests/module-imports/package-probe'; -import { ApiClient } from '../../api/api-client'; -import { ElementsClient } from '../../api/elements'; -import { Enforcer } from '../../enforcement/enforcer'; -import type { IResource, IUser } from '../../enforcement/interfaces'; -import { Permit } from '../../index'; - -test('ES Module import works correctly', async (t) => { - t.is(typeof Permit, 'function'); - t.is(Permit.name, 'Permit'); - - // Test creating a Permit instance - const permit = new Permit({ - token: 'test-token', - pdp: 'http://localhost:7766', +// Validates the BUILT package the way an ES module consumer loads it: a static +// `import ... from 'permitio'` in a separate Node process, resolved through the +// package.json `exports` map. This is a packaging-regression guard. +describe('ES module import of the built package', () => { + it("resolves through the exports map to build/index.mjs in Node's ESM loader", async () => { + expect(await probePackage('esm')).toHaveProperty('resolved', builtFile('index.mjs')); }); - t.truthy(permit); - t.is(typeof permit.check, 'function'); - t.is(typeof permit.api, 'object'); - t.is(typeof permit.elements, 'object'); - t.is(typeof permit.config, 'object'); -}); + it('exposes Permit and the public API classes as named exports', async () => { + expect(await probePackage('esm')).toHaveProperty('names', { + Permit: 'Permit', + ApiClient: 'ApiClient', + ElementsClient: 'ElementsClient', + }); + }); -test('ES Module imports individual modules', async (t) => { - t.is(typeof Enforcer, 'function'); - t.is(Enforcer.name, '_Enforcer'); - // IUser and IResource are types, so we can't test them at runtime - t.pass('Type imports work correctly'); -}); + it('constructs a Permit with the given config and its API modules', async () => { + const probe = await probePackage('esm'); -test('ES Module imports API modules', async (t) => { - t.is(typeof ApiClient, 'function'); - t.is(ApiClient.name, 'ApiClient'); - t.is(typeof ElementsClient, 'function'); - t.is(ElementsClient.name, 'ElementsClient'); + expect(probe).toHaveProperty('members', { + check: 'function', + api: 'object', + elements: 'object', + users: 'object', + resources: 'object', + roles: 'object', + }); + expect(probe).toHaveProperty('config', { token: 'test-token', pdp: 'http://localhost:7766' }); + }); }); diff --git a/src/tests/module-imports/functionality.spec.ts b/src/tests/module-imports/functionality.spec.ts deleted file mode 100644 index ec361236..00000000 --- a/src/tests/module-imports/functionality.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -import test from 'ava'; - -test('ES Module functionality test', async (t) => { - const { Permit } = await import('../../index'); - - // Test creating a Permit instance with ES module import - const permit = new Permit({ - token: 'test-token', - pdp: 'http://localhost:7766', - }); - - t.truthy(permit); - t.is(typeof permit.check, 'function'); - t.is(typeof permit.api, 'object'); - t.is(typeof permit.elements, 'object'); - t.is(typeof permit.config, 'object'); - - // Test that the config was set correctly - t.is(permit.config.token, 'test-token'); - t.is(permit.config.pdp, 'http://localhost:7766'); -}); - -test('CommonJS functionality test', async (t) => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { Permit } = require('../../index'); - - // Test creating a Permit instance with CommonJS require - const permit = new Permit({ - token: 'test-token', - pdp: 'http://localhost:7766', - }); - - t.truthy(permit); - t.is(typeof permit.check, 'function'); - t.is(typeof permit.api, 'object'); - t.is(typeof permit.elements, 'object'); - t.is(typeof permit.config, 'object'); - - // Test that the config was set correctly - t.is(permit.config.token, 'test-token'); - t.is(permit.config.pdp, 'http://localhost:7766'); -}); - -test('Dynamic import functionality test', async (t) => { - // Test dynamic import (ES modules) - const { Permit } = await import('../../index'); - - const permit = new Permit({ - token: 'test-token', - pdp: 'http://localhost:7766', - }); - - t.truthy(permit); - t.is(typeof permit.check, 'function'); - - // Test that we can access nested modules - t.is(typeof permit.api.users, 'object'); - t.is(typeof permit.api.resources, 'object'); - t.is(typeof permit.api.roles, 'object'); -}); diff --git a/src/tests/module-imports/groups.spec.ts b/src/tests/module-imports/groups.spec.ts new file mode 100644 index 00000000..908e7211 --- /dev/null +++ b/src/tests/module-imports/groups.spec.ts @@ -0,0 +1,141 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both published package entry points register exactly the eight core Groups methods', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.ok(permit.api.groups instanceof sdk.GroupsApi); + assert.deepEqual(Object.getOwnPropertyNames(sdk.GroupsApi.prototype).sort(), [ + 'assignRole', 'assignUser', 'constructor', 'create', 'delete', 'get', 'list', + 'removeRole', 'removeUser', + ]); +} +console.log('GROUPS_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('GROUPS_EXPORTS_OK'); +}); + +const consumer = ` +declare const permit: sdk.Permit; +const groups: sdk.IGroupsApi = permit.api.groups; +const create: sdk.GroupCreate = { + group_instance_key: 'support', group_tenant: 'east', group_resource_type_key: 'team', +}; +const member: sdk.GroupAssignUser = { tenant: 'east' }; +const role: sdk.GroupAddRole = { + role: 'reader', resource: 'document', resource_instance: 'report', tenant: 'east', +}; +const filters: sdk.IListGroups = { + tenant: 'east', resource: 'team', search: 'support', page: 2, perPage: 10, +}; +const created: Promise = groups.create(create); +const got: Promise = groups.get('team:support'); +const listed: Promise = groups.list(filters); +const defaultList: Promise = groups.list(); +const assigned: Promise = groups.assignUser('team:support', 'alice', member); +const granted: Promise = groups.assignRole('team:support', role); +const removed: Promise = groups.removeUser('team:support', 'alice', member); +const revoked: Promise = groups.removeRole('team:support', role); +const deleted: Promise = groups.delete('team:support'); +// @ts-expect-error Create responses do not promise the internal ID returned by direct reads. +const createdWithId: Promise = groups.create(create); +// @ts-expect-error Direct pagination returns the full envelope rather than an array. +const array: Promise = groups.list(); +// @ts-expect-error Group tenant is required for creation. +groups.create({ group_instance_key: 'team:support' }); +// @ts-expect-error Membership assignment requires its tenant JSON body. +groups.assignUser('team:support', 'alice'); +// @ts-expect-error DELETE membership also requires its tenant JSON body. +groups.removeUser('team:support', 'alice', {}); +// @ts-expect-error Role grants require all four identifiers. +groups.assignRole('team:support', { role: 'reader', tenant: 'east' }); +// @ts-expect-error Role revocation requires a complete assignment body. +groups.removeRole('team:support', { resource: 'document', resource_instance: 'report' }); +// @ts-expect-error Group identifiers must be strings. +groups.get(42); +// @ts-expect-error Pagination is numeric. +groups.list({ page: '2' }); +// @ts-expect-error Direct listing always includes counts; it has no includeTotalCount switch. +groups.list({ includeTotalCount: true }); +// @ts-expect-error Exact optional properties reject explicitly undefined filters. +groups.list({ tenant: undefined }); +// @ts-expect-error Group-to-group membership remains deferred. +groups.assignGroup('team:support', 'team:sales'); +// @ts-expect-error EAP user listing remains deferred. +groups.listUsers('team:support'); +// @ts-expect-error EAP role listing remains deferred. +groups.listRoles('team:support'); +// @ts-expect-error EAP parent listing remains deferred. +groups.listParents('team:support'); +// @ts-expect-error EAP child listing remains deferred. +groups.listChildren('team:support'); +void [created, got, listed, defaultList, assigned, granted, removed, revoked, deleted]; +`; + +test('strict ESM and CJS consumers retain precise Groups requests and results', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-groups-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files: [esmFile, cjsFile], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error(`Groups consumer compilation failed:\n${error.stdout}\n${error.stderr}`, { + cause: error, + }); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/local-role-assignments.spec.ts b/src/tests/module-imports/local-role-assignments.spec.ts new file mode 100644 index 00000000..89d1edee --- /dev/null +++ b/src/tests/module-imports/local-role-assignments.spec.ts @@ -0,0 +1,126 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); +const consumer = ` +declare const permit: sdk.IPermitClient; +const query: sdk.ILocalRoleAssignmentsQuery = { + user: 'alice', role: 'reader', tenant: 'east', resource: 'document', + resourceInstance: 'document:one', page: 1, perPage: 30, +}; +const config: sdk.CheckConfig = { timeout: 0, throwOnError: false, useOpa: false }; +const result: Promise = permit.getLocalRoleAssignments(query, config); +const unfiltered: Promise = permit.getLocalRoleAssignments(); +const tenant: sdk.ILocalRoleAssignment = { user: 'alice', role: 'reader', tenant: 'east' }; +const resource: sdk.ILocalRoleAssignment = { ...tenant, resource_instance: 'document:one' }; +const nullable: sdk.ILocalRoleAssignment = { ...tenant, resource_instance: null, future: false }; +async function read() { + const rows = await result; + const first = rows[0]; + if (first) { + const user: string = first.user; + const role: string = first.role; + const tenantKey: string = first.tenant; + const instance: string | null | undefined = first.resource_instance; + const extra: unknown = first['future']; + // @ts-expect-error Local rows do not establish control-plane physical IDs. + const id: string = first['id']; + // @ts-expect-error Local rows are not complete control-plane records. + const controlPlane: sdk.RoleAssignmentRead = first; + void [user, role, tenantKey, instance, extra, id, controlPlane]; + } + // @ts-expect-error One local page is a bare array, without a total-count envelope. + void rows.total_count; + // @ts-expect-error Local rows have keys and optional instances, not the authorized-user shape. + const authorized: sdk.IAuthorizedUserAssignment[] = rows; + void authorized; +} +// @ts-expect-error Local query filters must be strings. +permit.getLocalRoleAssignments({ user: 7 }); +// @ts-expect-error Local pagination uses a numeric page size. +permit.getLocalRoleAssignments({ perPage: '30' }); +// @ts-expect-error The public query maps camelCase to wire names internally. +permit.getLocalRoleAssignments({ resource_instance: 'document:one' }); +// @ts-expect-error Total-count control-plane options are not local PDP filters. +permit.getLocalRoleAssignments({ includeTotalCount: true }); +// @ts-expect-error Local reads have no context input. +permit.getLocalRoleAssignments({ context: { enabled: true } }); +// @ts-expect-error CheckConfig cannot add query-specific tenancy or context. +permit.getLocalRoleAssignments({}, { tenant: 'east' }); +// @ts-expect-error Exact optional fields cannot be explicitly undefined. +permit.getLocalRoleAssignments({ resourceInstance: undefined }); +// @ts-expect-error Query null is not an omitted filter. +permit.getLocalRoleAssignments({ tenant: null }); +// @ts-expect-error Required assignment fields retain string types. +const invalid: sdk.ILocalRoleAssignment = { user: 7, role: 'reader', tenant: 'east' }; +// @ts-expect-error Optional response instances cannot be explicitly undefined. +const undefinedInstance: sdk.ILocalRoleAssignment = { ...tenant, resource_instance: undefined }; +const controlPlane = permit.api.roleAssignments.list({ includeTotalCount: true }); +void [result, unfiltered, resource, nullable, read, invalid, undefinedInstance, controlPlane]; +`; + +it.each([ + 'node_modules/typescript/lib/tsc.js', + 'tools/compiler/node_modules/typescript/lib/tsc.js', +])( + 'strict ESM/CJS consumers distinguish local and control-plane assignments with %s', + async (compiler) => { + const directory = await mkdtemp(join(tmpdir(), 'permit-local-assignments-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + await writeFile( + join(directory, 'consumer.mts'), + `import * as sdk from 'permitio';\n${consumer}`, + ); + await writeFile( + join(directory, 'consumer.cts'), + `import sdk = require('permitio');\n${consumer}`, + ); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + noEmit: true, + skipLibCheck: false, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [join(directory, 'consumer.mts'), join(directory, 'consumer.cts')], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, compiler), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `Local role-assignment consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { cause: error }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + }, + 35_000, +); diff --git a/src/tests/module-imports/mixed-axios.spec.ts b/src/tests/module-imports/mixed-axios.spec.ts new file mode 100644 index 00000000..aeec79e4 --- /dev/null +++ b/src/tests/module-imports/mixed-axios.spec.ts @@ -0,0 +1,99 @@ +import { execFile } from 'node:child_process'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +for (const sdkFormat of ['cjs', 'esm']) { + for (const callerFormat of ['cjs', 'esm']) { + for (const transport of ['rest', 'opa']) { + test(`${sdkFormat} SDK / ${callerFormat} Axios: live ${transport} headers`, async () => { + const probe = ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +const require = createRequire(import.meta.url); +const sdk = ${sdkFormat === 'esm' ? "await import('permitio')" : "require('permitio')"}; +const axios = ${callerFormat === 'esm' ? "(await import('axios')).default" : "require('axios')"}; +const transport = ${JSON.stringify(transport)}; +const attempts = []; +let hooks = 0; +let transforms = 0; +const caller = axios.create({ + headers: { common: { 'X-Live': 'before', 'X-Disabled': false, 'X-Empty': null } }, + auth: { username: 'caller-user', password: 'caller-password' }, + adapter: async config => { + const direct = config.url === '/direct'; + attempts.push({ + live: config.headers.get('X-Live'), disabled: config.headers.get('X-Disabled'), + empty: config.headers.get('X-Empty'), hook: config.headers.get('X-Hook'), + authorization: config.headers.get('Authorization'), + auth: config.auth, url: axios.getUri(config), + }); + if (!direct && attempts.length === 1) { + caller.defaults.headers.common['X-Live'] = 'during-retry'; + throw new axios.AxiosError('Temporary failure', 'ERR_BAD_RESPONSE', config, undefined, { + config, status: 503, statusText: 'Unavailable', headers: {}, data: {}, + }); + } + return { + config, status: 200, statusText: 'OK', headers: {}, + data: transport === 'opa' && !direct ? { result: { allow: true } } : { key: 'alice' }, + }; + }, +}); +const originalAdapter = caller.defaults.adapter; +caller.defaults.transformRequest = [function(data) { transforms += 1; return data; }]; +caller.interceptors.request.use(config => { + hooks += 1; + config.headers.set('X-Hook', String(hooks)); + return config; +}); +const context = new sdk.ApiContext(); +context._saveApiKeyAccessibleScope('org', 'project', 'environment'); +context.setEnvironmentLevelContext('org', 'project', 'environment'); +const permit = new sdk.Permit({ + token: 'sdk-token', apiContext: context, pdp: 'http://127.0.0.1:7766', + apiUrl: 'http://127.0.0.1:8080', + ...(transport === 'opa' ? { opaAxiosInstance: caller } : { axiosInstance: caller }), + retry: { maxRetries: 1, retryDelay: 0 }, log: { level: 'silent' }, +}); +caller.defaults.headers.common['X-Live'] = 'after-construction'; +const result = transport === 'opa' + ? await permit.check('alice', 'read', 'document', {}, { useOpa: true }) + : await permit.api.users.get('alice'); +assert.deepEqual(result, transport === 'opa' ? true : { key: 'alice' }); +assert.equal(attempts.length, 2); +assert.deepEqual(attempts.map(value => value.live), ['after-construction', 'during-retry']); +assert.deepEqual(attempts.map(value => value.hook), ['1', '2']); +for (const attempt of attempts) { + assert.equal(attempt.disabled, false); + assert.equal(attempt.empty, null); + assert.equal(attempt.authorization, 'Bearer sdk-token'); + assert.equal(attempt.auth, undefined); + assert.ok(attempt.url.startsWith('http://127.0.0.1:')); +} +assert.equal(hooks, 2); +assert.equal(transforms, 2); +assert.equal(caller.defaults.adapter, originalAdapter); +assert.deepEqual(caller.defaults.auth, { username: 'caller-user', password: 'caller-password' }); +caller.defaults.headers.common['X-Live'] = 'direct-after-sdk'; +await caller.get('/direct'); +assert.equal(attempts.length, 3); +assert.equal(attempts[2].live, 'direct-after-sdk'); +assert.deepEqual(attempts[2].auth, caller.defaults.auth); +assert.equal(attempts[2].authorization, undefined); +assert.equal(hooks, 3); +assert.equal(transforms, 3); +console.log('MIXED_AXIOS_OK'); +`; + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + ['--input-type=module', '-e', probe], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('MIXED_AXIOS_OK'); + expect(stderr).toBe(''); + }); + } + } +} diff --git a/src/tests/module-imports/mixed-context.spec.ts b/src/tests/module-imports/mixed-context.spec.ts new file mode 100644 index 00000000..e2608413 --- /dev/null +++ b/src/tests/module-imports/mixed-context.spec.ts @@ -0,0 +1,117 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +const runtimeProbe = ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const [source, target] of [[cjs, esm], [esm, cjs]]) { + const context = new source.ApiContext(); + context._saveApiKeyAccessibleScope('org', 'project'); + context.setEnvironmentLevelContext('org', 'project', 'environment'); + const options = { token: 'fixture', apiContext: context, log: { level: 'silent' } }; + const first = new target.Permit(options); + const second = new target.Permit(options); + assert.notEqual(first.config.apiContext, context); + assert.notEqual(first.config.apiContext, second.config.apiContext); + assert.equal(first.config.apiContext.permittedAccessLevel, source.ApiKeyLevel.PROJECT_LEVEL_API_KEY); + assert.deepEqual(first.config.apiContext.environmentContext, { + projId: 'project', envId: 'environment', + }); + assert.throws(() => first.config.apiContext.setProjectLevelContext('org', 'forbidden-project')); + context.setEnvironmentLevelContext('org', 'project', 'caller-environment'); + first.config.apiContext.setEnvironmentLevelContext('org', 'project', 'first-environment'); + assert.equal(context.environment, 'caller-environment'); + assert.equal(first.config.apiContext.environment, 'first-environment'); + assert.equal(second.config.apiContext.environment, 'environment'); + const restricted = new source.ApiContext(); + restricted._saveApiKeyAccessibleScope('org', 'project', 'only-environment'); + restricted.setEnvironmentLevelContext('org', 'project', 'only-environment'); + const restrictedClient = new target.Permit({ ...options, apiContext: restricted }); + assert.throws(() => restrictedClient.config.apiContext.setProjectLevelContext('org', 'forbidden-project')); + assert.throws(() => restrictedClient.config.apiContext.setEnvironmentLevelContext('org', 'project', 'forbidden-environment')); + const uninitialized = new source.ApiContext(); + const emptyClient = new target.Permit({ ...options, apiContext: uninitialized }); + assert.equal(emptyClient.config.apiContext.contextLevel, 0); + assert.equal(emptyClient.config.apiContext.permittedAccessLevel, source.ApiKeyLevel.WAIT_FOR_INIT); +} +console.log('MIXED_CONTEXT_OK'); +`; + +test('package-name CJS and ESM contexts preserve permissions and independent mutable selections', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + ['--input-type=module', '-e', runtimeProbe], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ); + expect(stdout.trim()).toBe('MIXED_CONTEXT_OK'); +}); + +test('strict consumers can pass complete contexts in both module directions', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-mixed-context-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const consumer = join(directory, 'consumer.mts'); + await writeFile( + consumer, + ` +import { ApiContext, Permit } from 'permitio'; +import commonjs = require('permitio'); +const fromCommonjs: ApiContext = new commonjs.ApiContext(); +new Permit({ token: 'typecheck-only', apiContext: fromCommonjs }); +const fromEsm: commonjs.ApiContext = new ApiContext(); +new commonjs.Permit({ token: 'typecheck-only', apiContext: fromEsm }); +// @ts-expect-error Both directions require the complete ApiContext type. +new Permit({ token: 'typecheck-only', apiContext: { setEnvironmentLevelContext() {} } }); +// @ts-expect-error A CJS consumer also rejects an incomplete context. +new commonjs.Permit({ token: 'typecheck-only', apiContext: {} }); +`, + ); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files: [consumer], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/mixed-diagnostics.spec.ts b/src/tests/module-imports/mixed-diagnostics.spec.ts new file mode 100644 index 00000000..76ccc648 --- /dev/null +++ b/src/tests/module-imports/mixed-diagnostics.spec.ts @@ -0,0 +1,146 @@ +import { execFile } from 'node:child_process'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); +const PRIVATE_VALUES = [ + 'FIRST_OPAQUE_TOKEN', + 'SECOND_OPAQUE_TOKEN', + 'first_private', + 'second_private', + 'FIRST_RESPONSE_ONLY_CREDENTIAL', + 'SECOND_RESPONSE_ONLY_CREDENTIAL', +]; + +const runtimeProbe = ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import { inspect } from 'node:util'; +import * as esm from 'permitio'; +const require = createRequire(import.meta.url); +const cjs = require('permitio'); +const axios = require('axios'); +const pino = require('pino'); +const privateValues = ${JSON.stringify(PRIVATE_VALUES)}; +function context(sdk) { + const result = new sdk.ApiContext(); + result._saveApiKeyAccessibleScope('org', 'project', 'environment'); + result.setEnvironmentLevelContext('org', 'project', 'environment'); + return result; +} +function client(sdk, token, caller) { + return new sdk.Permit({ + token, apiContext: context(sdk), axiosInstance: caller, retry: false, + log: { level: 'debug', json: true }, + }); +} +function safe(error) { + const lines = []; + const logger = pino({ level: 'error' }, { write: line => lines.push(line) }); + logger.error({ err: error }, 'Application error'); + for (const value of [String(error), inspect(error, { depth: Infinity }), JSON.stringify(error), ...lines]) { + for (const secret of privateValues) assert.ok(!value.includes(secret), 'Public failure leaked private data'); + } +} +async function rejection(promise) { + try { await promise; } catch (error) { return error; } + assert.fail('Expected the caller adapter to reject'); +} +for (const [firstModule, secondModule] of [[cjs, esm], [esm, cjs]]) { + const raw = Object.assign(new Error('Caller failed for FIRST_OPAQUE_TOKEN first_private'), { + code: 'FIRST_OPAQUE_TOKEN', + }); + const originalKeys = Reflect.ownKeys(raw); + const caller = axios.create({ adapter: async () => { throw raw; } }); + const first = client(firstModule, privateValues[0], caller); + const firstError = await rejection(first.api.users.create({ + key: 'first', attributes: { note: privateValues[2] }, + })); + assert.ok(firstError instanceof firstModule.PermitApiError); + safe(firstError); + raw.message = 'Caller failed for FIRST_OPAQUE_TOKEN first_private SECOND_OPAQUE_TOKEN second_private'; + const second = client(secondModule, privateValues[1], caller); + const secondError = await rejection(second.api.users.create({ + key: 'second', attributes: { note: privateValues[3] }, + })); + assert.ok(secondError instanceof secondModule.PermitApiError); + assert.equal(secondError.code, undefined); + safe(secondError); + safe(new secondModule.PermitContextError(raw.message, { cause: raw })); + assert.deepEqual(Reflect.ownKeys(raw), originalKeys); + assert.equal(raw.code, privateValues[0]); + assert.ok(raw.message.includes(privateValues[2])); + const unrelated = client(secondModule, privateValues[1], axios.create({ + adapter: async () => { throw Object.assign(new Error('Service unavailable'), { code: 'ECONNRESET' }); }, + })); + const otherError = await rejection(unrelated.api.users.get('unrelated')); + assert.equal(otherError.message, 'Service unavailable'); + assert.equal(otherError.code, 'ECONNRESET'); +} +for (const [firstModule, secondModule] of [[cjs, esm], [esm, cjs]]) { + const firstSecret = 'FIRST_RESPONSE_ONLY_CREDENTIAL'; + const secondSecret = 'SECOND_RESPONSE_ONLY_CREDENTIAL'; + const config = { headers: new axios.AxiosHeaders(), url: 'https://control.example/proxy_configs' }; + const raw = new axios.AxiosError('Proxy denied', firstSecret, config, undefined, { + config, status: 422, statusText: 'Denied', headers: {}, + data: { detail: 'Proxy configuration denied', secret: firstSecret }, + }); + const caller = axios.create({ adapter: async () => { throw raw; } }); + const first = client(firstModule, 'ordinary-token', caller); + const firstFailure = await rejection(first.api.proxyConfigs.get('payments')); + assert.ok(firstFailure instanceof firstModule.PermitApiError); + assert.equal(firstFailure.status, 422); + assert.equal(firstFailure.code, undefined); + safe(firstFailure); + raw.response.data = { detail: 'Proxy configuration denied', secret: secondSecret }; + raw.message = 'Proxy denied ' + firstSecret + ' ' + secondSecret; + const second = client(secondModule, 'ordinary-token', caller); + const secondFailure = await rejection(second.api.proxyConfigs.get('payments')); + assert.ok(secondFailure instanceof secondModule.PermitApiError); + assert.equal(secondFailure.code, undefined); + assert.equal(secondFailure.status, 422); + safe(secondFailure); + safe(new secondModule.PermitContextError(raw.message, { cause: raw })); + assert.equal(raw.code, firstSecret); + assert.equal(raw.response.data.secret, secondSecret); + assert.ok(raw.message.includes(firstSecret)); +} +console.log('MIXED_DIAGNOSTICS_OK'); +`; + +test('CJS and ESM preserve prior caller and response privacy in both directions', async () => { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + ['--input-type=module', '-e', runtimeProbe], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout).toContain('MIXED_DIAGNOSTICS_OK'); + expect(stderr).toBe(''); + for (const secret of PRIVATE_VALUES) expect(stdout).not.toContain(secret); +}); + +for (const [name, value, enumerable] of [ + ['wrong value', '{ private: "collision-private-canary" }', 'false'], + ['enumerable map', 'new WeakMap()', 'true'], +] as const) { + test(`incompatible shared diagnostics state fails clearly for a ${name}`, async () => { + const probe = ` +import assert from 'node:assert/strict'; +Object.defineProperty(globalThis, Symbol.for('permitio.diagnostics.failurePrivacy.v1'), { + value: ${value}, enumerable: ${enumerable}, writable: false, configurable: false, +}); +const failure = await import('permitio').then(() => undefined, error => error); +assert.ok(failure instanceof TypeError); +assert.match(failure.message, /Permit diagnostic privacy state is incompatible/); +assert.ok(!failure.message.includes('collision-private-canary')); +console.log('INCOMPATIBLE_PRIVACY_STATE_OK'); +`; + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + ['--input-type=module', '-e', probe], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('INCOMPATIBLE_PRIVACY_STATE_OK'); + expect(stderr).toBe(''); + }); +} diff --git a/src/tests/module-imports/package-probe.ts b/src/tests/module-imports/package-probe.ts new file mode 100644 index 00000000..12f72542 --- /dev/null +++ b/src/tests/module-imports/package-probe.ts @@ -0,0 +1,84 @@ +import { execFile } from 'node:child_process'; +import { realpathSync } from 'node:fs'; +import * as path from 'node:path'; +import { promisify } from 'node:util'; + +/** The repository root, whose package.json names the package `permitio`. */ +const PACKAGE_ROOT = path.resolve(__dirname, '../../..'); + +const MARKER = 'PERMITIO_PROBE '; + +// Shared by both formats: construct a Permit and print what a consumer would see. +const REPORT = ` +const permit = new Permit({ token: 'test-token', pdp: 'http://localhost:7766' }); +console.log(${JSON.stringify(MARKER)} + JSON.stringify({ + resolved: realpathSync(resolved), + names: { Permit: Permit.name, ApiClient: ApiClient.name, ElementsClient: ElementsClient.name }, + members: { + check: typeof permit.check, + api: typeof permit.api, + elements: typeof permit.elements, + users: typeof permit.api.users, + resources: typeof permit.api.resources, + roles: typeof permit.api.roles, + }, + config: { token: permit.config.token, pdp: permit.config.pdp }, +})); +`; + +const ESM_PROBE = ` +import { realpathSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import { ApiClient, ElementsClient, Permit } from 'permitio'; +const resolved = fileURLToPath(import.meta.resolve('permitio')); +${REPORT}`; + +const CJS_PROBE = ` +const { realpathSync } = require('node:fs'); +const { ApiClient, ElementsClient, Permit } = require('permitio'); +const resolved = require.resolve('permitio'); +${REPORT}`; + +async function runProbe(format: 'esm' | 'cjs'): Promise { + const args = format === 'esm' ? ['--input-type=module', '-e', ESM_PROBE] : ['-e', CJS_PROBE]; + const { stdout } = await promisify(execFile)(process.execPath, args, { + cwd: PACKAGE_ROOT, + encoding: 'utf8', + timeout: 30_000, + }); + const report = stdout.split('\n').find((line) => line.startsWith(MARKER)); + if (report === undefined) { + throw new Error(`The ${format} probe printed no report. Output:\n${stdout}`); + } + return JSON.parse(report.slice(MARKER.length)); +} + +const probes = new Map<'esm' | 'cjs', Promise>(); + +/** + * Loads the built package in a separate Node process the way a consumer does: by package name, + * so Node resolves it through the `exports` map. Vitest transforms the `.mjs` files it imports + * itself, so only a child process exercises Node's own ESM loader. The child runs from the + * repository root, where Node lets a package import itself by name. + * + * Each format is loaded once per test file; every test that awaits a failed load fails with the + * child's error. + * + * @param format - `esm` uses a static `import` in Node's ESM loader, `cjs` uses `require`. + * @returns The parsed report: the real path Node resolved `permitio` to (`resolved`), the + * exported class names (`names`), the `typeof` of Permit members (`members`) and the + * constructed Permit's `config` token and pdp. + */ +export function probePackage(format: 'esm' | 'cjs'): Promise { + let probe = probes.get(format); + if (probe === undefined) { + probe = runProbe(format); + probes.set(format, probe); + } + return probe; +} + +/** The real path of a file in the package build output. */ +export function builtFile(name: string): string { + return realpathSync(path.join(PACKAGE_ROOT, 'build', name)); +} diff --git a/src/tests/module-imports/pdp-capabilities.spec.ts b/src/tests/module-imports/pdp-capabilities.spec.ts new file mode 100644 index 00000000..517df2f6 --- /dev/null +++ b/src/tests/module-imports/pdp-capabilities.spec.ts @@ -0,0 +1,152 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); +const consumer = ` +declare const permit: sdk.Permit; +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +const options: sdk.GetUserPermissionsConfig = { context: { enabled: false }, timeout: 0 }; +const permissions = permit.getUserPermissions('alice', ['east'], [], [], options); +const users = permit.getAuthorizedUsers('read', { + type: 'document', key: 'one', tenant: 'east', attributes: { enabled: false }, +}, { request: true }, { timeout: 0, throwOnError: false }); +const tenants = permit.getUserTenants({ key: 'alice', attributes: { eligible: true } }); +type Users = Assert, sdk.IAuthorizedUsersResult>>; +type Tenants = Assert, sdk.TenantDetails[]>>; +const objects = [{ + type: 'document', key: 'one', title: 'UI title', context: { enabled: false }, +}] as const; +const filtered = permit.filterObjects('alice', 'read', objects, { request: true }); +type Objects = Assert, Array<(typeof objects)[number]>>>; +const item: sdk.IFilterObject = { type: 'document', context: { request: true } }; +const assignment: sdk.IAuthorizedUserAssignment = { + user: 'alice', tenant: 'east', resource: 'document:one', role: 'reader', future: null, +}; +function inspectResults(result: Awaited, memberships: Awaited, + kept: Awaited) { + const resource: string = result.resource; + const tenant: string = result.tenant; + const role: string | undefined = result.users['alice']?.[0]?.role; + const title: 'UI title' | undefined = kept[0]?.title; + void [resource, tenant, role, title, memberships[0]?.attributes]; +} +void [permissions, item, assignment, inspectResults]; +void (null as unknown as [Users, Tenants, Objects]); +// @ts-expect-error Permission queries accept context in the fifth options argument only. +permit.getUserPermissions('alice', [], [], [], {}, { enabled: true }); +// @ts-expect-error A general check configuration cannot silently ignore query context. +permit.check('alice', 'read', 'document', {}, { context: { enabled: true } }); +// @ts-expect-error The query context must be a dictionary. +permit.getUserPermissions('alice', [], [], [], { context: 'request' }); +// @ts-expect-error User-tenants needs a user key or a typed user. +permit.getUserTenants({ attributes: { eligible: true } }); +// @ts-expect-error Authorized users retains its full response envelope. +const ids: Promise = permit.getAuthorizedUsers('read', 'document'); +// @ts-expect-error A filtering resource must declare its type. +permit.filterObjects('alice', 'read', [{ key: 'one' }]); +// @ts-expect-error Filtering retains object types, rather than returning decisions. +const decisions: Promise = permit.filterObjects('alice', 'read', objects); +// @ts-expect-error Exact optional resource/context fields cannot be explicit undefined. +permit.filterObjects('alice', 'read', [{ type: 'document', context: undefined }]); +const urlOptions: sdk.CheckUrlConfig = { tenant: 'east', context: { enabled: false }, timeout: 0 }; +const urlDecision = permit.checkUrl({ key: 'alice' }, 'CUSTOM', 'https://example.test/document', urlOptions); +type UrlDecision = Assert, boolean>>; +void (null as unknown as UrlDecision); +// @ts-expect-error URL checks require a method string. +permit.checkUrl('alice', 7, 'https://example.test/document'); +// @ts-expect-error URL checks take per-call options in the fourth argument. +permit.checkUrl('alice', 'GET', 'https://example.test/document', 'east'); +// @ts-expect-error URL check context must be a dictionary. +permit.checkUrl('alice', 'GET', 'https://example.test/document', { context: 'request' }); +// @ts-expect-error URL check tenant must be a string. +permit.checkUrl('alice', 'GET', 'https://example.test/document', { tenant: 7 }); +// @ts-expect-error Exact optional URL config fields cannot be explicitly undefined. +permit.checkUrl('alice', 'GET', 'https://example.test/document', { context: undefined }); +// @ts-expect-error ContextStore remains an internal helper, not an activated runtime API. +new sdk.ContextStore(); +void [ids, decisions]; +`; + +test('both published entries expose the approved PDP discovery and filter methods', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + for (const method of ['getUserPermissions', 'getAuthorizedUsers', 'getUserTenants', 'filterObjects']) + assert.equal(typeof permit[method], 'function'); + assert.equal(typeof permit.checkAllTenants, 'function'); + assert.equal(sdk.ContextStore, undefined); + assert.equal(sdk.Enforcer, undefined); + assert.equal(typeof permit.checkUrl, 'function'); +} +console.log('PDP_CAPABILITIES_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('PDP_CAPABILITIES_EXPORTS_OK'); +}); + +test('strict ESM and CJS consumers retain exact discovery results and generic readonly objects', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-pdp-capabilities-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + const files = [esmFile, cjsFile]; + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files, + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error(`PDP consumer compilation failed:\n${error.stdout}\n${error.stderr}`, { + cause: error, + }); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/proxy-configs.spec.ts b/src/tests/module-imports/proxy-configs.spec.ts new file mode 100644 index 00000000..f03f9b2d --- /dev/null +++ b/src/tests/module-imports/proxy-configs.spec.ts @@ -0,0 +1,172 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both public entries expose the dedicated proxy configuration facade', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.ok(permit.api.proxyConfigs instanceof sdk.ProxyConfigsApi); + for (const method of ['list', 'get', 'create', 'update', 'delete']) { + assert.equal(typeof permit.api.proxyConfigs[method], 'function'); + } +} +console.log('PROXY_CONFIGS_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('PROXY_CONFIGS_EXPORTS_OK'); +}); + +const consumer = ` +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +declare const permit: sdk.Permit; +declare const concrete: sdk.ProxyConfigsApi; +declare const client: sdk.IPermitClient; +const api: sdk.IProxyConfigsApi = permit.api.proxyConfigs; +const clientApi: sdk.IProxyConfigsApi = client.api.proxyConfigs; +const rule: sdk.MappingRule = { + url:'^https://service.example.test/items/[0-9]+$',url_type:sdk.MappingRuleUrlTypeEnum.Regex, + http_method:sdk.Methods.Get,resource:'document',action:'read',priority:0,headers:{'X-Tenant':'east'}, +}; +const removal: sdk.MappingRuleUpdate = {...rule,should_delete:false, + url_type:sdk.MappingRuleUpdateUrlTypeEnum.Regex}; +const create: sdk.ProxyConfigCreate = {key:'payments',name:'Payments',secret:'dummy', + auth_mechanism:sdk.AuthMechanism.Bearer,mapping_rules:[rule]}; +const headerSecret: sdk.Secret = {'X-Authorization':'dummy-header'}; +const patch: sdk.ProxyConfigUpdate = {secret:headerSecret,auth_mechanism:sdk.AuthMechanism.Headers, + mapping_rules:[removal]}; +const options: sdk.IPagination = {page:2,perPage:3}; +const listed=api.list(options),defaults=api.list(),created=api.create(create),got=api.get('key-or-id'); +const updated=api.update('key-or-id',patch),deleted=api.delete('key-or-id'); +const concreteList=concrete.list(),emptyPatch=concrete.update('key-or-id',{}); +type Results=[ + Assert,sdk.ProxyConfigRead[]>>, + Assert,sdk.ProxyConfigRead[]>>, + Assert,sdk.ProxyConfigRead>>, + Assert,sdk.ProxyConfigRead>>, + Assert,sdk.ProxyConfigRead>>, + Assert,void>>, + Assert,sdk.ProxyConfigRead[]>>, + Assert,sdk.ProxyConfigRead>>, +]; +declare const row:sdk.ProxyConfigRead; +const metadata:string[]=[row.id,row.key,row.name,row.organization_id,row.project_id, + row.environment_id,row.created_at,row.updated_at]; +const received:sdk.Secret=row.secret; +// @ts-expect-error Creation requires a key. +api.create({name:'Payments',secret:'dummy'}); +// @ts-expect-error Creation requires a name. +api.create({key:'payments',secret:'dummy'}); +// @ts-expect-error Creation requires its secret union. +api.create({key:'payments',name:'Payments'}); +// @ts-expect-error Secret header values are strings. +api.create({...create,secret:{'X-Secret':7}}); +// @ts-expect-error The published secret has no null alternative. +api.create({...create,secret:null}); +// @ts-expect-error Authentication uses the complete published enum. +api.create({...create,auth_mechanism:'Other'}); +// @ts-expect-error PATCH cannot change the configuration key. +api.update('payments',{key:'renamed'}); +// @ts-expect-error Exact optional values cannot explicitly be undefined. +api.update('payments',{secret:undefined}); +// @ts-expect-error HTTP methods use the published lowercase enum. +const wrongMethod:sdk.MappingRule={...rule,http_method:'GET'}; +// @ts-expect-error Plain URL matching omits url_type rather than inventing none. +const wrongType:sdk.MappingRule={...rule,url_type:'none'}; +// @ts-expect-error Mapping headers require string values. +const wrongHeader:sdk.MappingRule={...rule,headers:{'X-Tenant':0}}; +// @ts-expect-error Rule deletion is a boolean. +const wrongDelete:sdk.MappingRuleUpdate={...rule,should_delete:'true'}; +// @ts-expect-error Stored results retain the complete context/identity metadata. +const incomplete:sdk.ProxyConfigRead=create; +// @ts-expect-error Listing does not have total-count query parameters. +api.list({includeTotalCount:true}); +// @ts-expect-error Listing returns a bare array without a page envelope. +const page:Promise<{data:sdk.ProxyConfigRead[];total_count:number}>=api.list(); +// @ts-expect-error Proxy configurations have no PDP synchronization helper. +api.waitForSync(5); +void [clientApi,metadata,received,wrongMethod,wrongType,wrongHeader,wrongDelete,incomplete,page]; +declare const results:Results; +void results; + +`; + +test('strict TS6 and TS7 root consumers preserve proxy configuration schema contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-proxy-config-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esm = join(directory, 'consumer.mts'); + const cjs = join(directory, 'consumer.cts'); + await writeFile(esm, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjs, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [esm, cjs], + }), + ); + for (const compiler of [ + join(root, 'node_modules/typescript/bin/tsc'), + join(root, 'tools/compiler/node_modules/typescript/bin/tsc'), + ]) { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [compiler, '-p', config], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `Proxy configuration consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { + cause: error, + }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + } +}, 65_000); diff --git a/src/tests/module-imports/removed-api.spec.ts b/src/tests/module-imports/removed-api.spec.ts new file mode 100644 index 00000000..97c440de --- /dev/null +++ b/src/tests/module-imports/removed-api.spec.ts @@ -0,0 +1,192 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); +const replacements = [ + ['listUsers', 'users', 'list'], + ['listRoles', 'roles', 'list'], + ['listConditionSets', 'conditionSets', 'list'], + ['listConditionSetsRules', 'conditionSetRules', 'list'], + ['getUser', 'users', 'get'], + ['getTenant', 'tenants', 'get'], + ['listTenants', 'tenants', 'list'], + ['getRole', 'roles', 'get'], + ['getAssignedRoles', 'users', 'getAssignedRoles'], + ['createResource', 'resources', 'create'], + ['updateResource', 'resources', 'update'], + ['deleteResource', 'resources', 'delete'], + ['createUser', 'users', 'create'], + ['syncUser', 'users', 'sync'], + ['updateUser', 'users', 'update'], + ['deleteUser', 'users', 'delete'], + ['createTenant', 'tenants', 'create'], + ['updateTenant', 'tenants', 'update'], + ['deleteTenant', 'tenants', 'delete'], + ['createRole', 'roles', 'create'], + ['updateRole', 'roles', 'update'], + ['deleteRole', 'roles', 'delete'], + ['assignRole', 'users', 'assignRole'], + ['unassignRole', 'users', 'unassignRole'], + ['createConditionSet', 'conditionSets', 'create'], + ['updateConditionSet', 'conditionSets', 'update'], + ['deleteConditionSet', 'conditionSets', 'delete'], + ['assignConditionSetRule', 'conditionSetRules', 'create'], + ['unassignConditionSetRule', 'conditionSetRules', 'delete'], +] as const; +const removedMethods = [...replacements.map(([name]) => name), 'getMethods']; + +test('published entries expose grouped APIs without the removed flat facade', async () => { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [cjs, esm]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + for (const name of ${JSON.stringify(removedMethods)}) { + assert.equal(name in permit.api, false, name); + } + for (const [, group, method] of ${JSON.stringify(replacements)}) { + assert.equal(typeof permit.api[group][method], 'function', group + '.' + method); + } + assert.equal('DeprecatedApiClient' in sdk, false); + assert.equal('level' in permit.config.apiContext, false); + assert.equal(permit.config.apiContext.permittedAccessLevel, sdk.ApiKeyLevel.WAIT_FOR_INIT); + assert.ok(permit.api instanceof sdk.ApiClient); +} +console.log('GROUPED_API_ONLY_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('GROUPED_API_ONLY_OK'); + expect(stderr).toBe(''); +}); + +const consumer = ` +declare const permit: sdk.Permit; +declare const user: sdk.UserCreate; +declare const userUpdate: sdk.UserUpdate; +declare const resource: sdk.ResourceCreate; +declare const resourceUpdate: sdk.ResourceUpdate; +declare const tenant: sdk.TenantCreate; +declare const tenantUpdate: sdk.TenantUpdate; +declare const role: sdk.RoleCreate; +declare const roleUpdate: sdk.RoleUpdate; +declare const assignment: sdk.RoleAssignmentCreate; +declare const unassignment: sdk.RoleAssignmentRemove; +declare const set: sdk.ConditionSetCreate; +declare const setUpdate: sdk.ConditionSetUpdate; +declare const rule: sdk.ConditionSetRuleCreate; +declare const removedRule: sdk.ConditionSetRuleRemove; +type Legacy = ${removedMethods.map((name) => JSON.stringify(name)).join(' | ')}; +const groupedInterface: Extract extends never ? true : false = true; +const groupedClass: Extract extends never ? true : false = true; +// @ts-expect-error Removed runtime facade export. +type RemovedClient = typeof sdk.DeprecatedApiClient; +// @ts-expect-error Removed flat interface export. +type RemovedApi = sdk.IDeprecatedPermitApi; +// @ts-expect-error Removed flat read interface export. +type RemovedRead = sdk.IDeprecatedReadApis; +// @ts-expect-error Removed flat write interface export. +type RemovedWrite = sdk.IDeprecatedWriteApis; +// @ts-expect-error Removed unused transform type; no runtime registration API existed. +type RemovedTransform = sdk.ContextTransform; +// @ts-expect-error Removed access-level alias. +permit.config.apiContext.level; +const access: sdk.ApiKeyLevel = permit.config.apiContext.permittedAccessLevel; +const api = permit.api; +const listedUsers: Promise = api.users.list().then(page => page.data); +const syncedUser: Promise = api.users.sync(user).then(result => result.user); +const createdRule: Promise = api.conditionSetRules.create(rule); +const deleted: Promise[] = [ + api.users.delete('alice'), api.tenants.delete('east'), api.roles.delete('reader'), + api.resources.delete('document'), api.conditionSets.delete('team'), + api.users.unassignRole(unassignment), api.conditionSetRules.delete(removedRule), +]; +const conditionSets: Promise = api.conditionSets.list({ + type: sdk.ConditionSetType.Userset, page: 2, perPage: 10, +}); +const filter: sdk.IListConditionSets = { type: sdk.ConditionSetType.Resourceset }; +const ruleFilter: sdk.IListConditionSetRules = { page: 2, perPage: 10 }; +const rules: Promise[] = [ + api.conditionSetRules.list(), api.conditionSetRules.list(ruleFilter), + api.conditionSetRules.list({ userSetKey: 'team' }), +]; +const assigned: Promise = api.users.getAssignedRoles({ + user: 'alice', tenant: 'east', +}); +void [ + groupedInterface, groupedClass, access, listedUsers, syncedUser, createdRule, + deleted, conditionSets, + filter, rules, assigned, api.roles.list(), api.users.get('alice'), api.tenants.get('east'), + api.roles.get('reader'), api.tenants.list({ page: 2 }), api.users.create(user), + api.users.update('alice', userUpdate), api.resources.create(resource), + api.resources.update('document', resourceUpdate), api.tenants.create(tenant), + api.tenants.update('east', tenantUpdate), api.roles.create(role), + api.roles.update('reader', roleUpdate), api.users.assignRole(assignment), + api.conditionSets.create(set), api.conditionSets.update('team', setUpdate), +]; +`; + +test('strict CJS/ESM consumers accept replacements and reject removed APIs', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-grouped-api-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + const files = [esmFile, cjsFile]; + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files, + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `Grouped API consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { + cause: error, + }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/tenant-totals.spec.ts b/src/tests/module-imports/tenant-totals.spec.ts new file mode 100644 index 00000000..a2689319 --- /dev/null +++ b/src/tests/module-imports/tenant-totals.spec.ts @@ -0,0 +1,161 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +const consumer = ` +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +interface Attributes { readonly region: 'east' | 'west'; note?: string | null; } +declare const permit: sdk.Permit; +const api = permit.api.tenants; +declare const implementation: sdk.TenantsApi; +declare const publicApi: sdk.ITenantsApi; +declare const dynamic: boolean; +declare const params: sdk.IListTenantsParams; +declare const maybe: sdk.IListTenantsParams | undefined; +declare const optionalTrue: { includeTotalCount?: true }; +declare const optionalFalse: { includeTotalCount?: false }; +declare const union: { includeTotalCount: true } | { search: string }; +const plain = api.list(); +const omitted = api.list({ search: 'east' }); +const undefinedOptions = api.list(undefined); +const counted = api.list({ includeTotalCount: true }); +const uncounted = api.list({ includeTotalCount: false }); +const runtime = api.list({ includeTotalCount: dynamic }); +const wide = api.list(params); +const absent = api.list(maybe); +const conditional = api.list(union); +const maybeTrue = api.list(optionalTrue); +const maybeFalse = api.list(optionalFalse); +const typedPlain = api.list(); +const typedCounted = api.list({ includeTotalCount: true }); +const typedFalse = api.list({ includeTotalCount: false }); +const typedDynamic = api.list({ includeTotalCount: dynamic }); +const typedMaybe = api.list(maybe); +const typedUnion = api.list(union); +type Results = [ + Assert, sdk.TenantRead[]>>, + Assert, sdk.TenantRead[]>>, + Assert, sdk.TenantRead[]>>, + Assert, sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[]>>, + Assert, sdk.TenantRead[] | sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[] | sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[] | sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[] | sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[] | sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[]>>, + Assert, sdk.TenantRead[]>>, + Assert, sdk.PaginatedResultTenantRead>>, + Assert, sdk.TenantRead[]>>, + Assert, + sdk.TenantRead[] | sdk.PaginatedResultTenantRead + >>, + Assert, + sdk.TenantRead[] | sdk.PaginatedResultTenantRead + >>, + Assert, + sdk.TenantRead[] | sdk.PaginatedResultTenantRead + >>, +]; +// @ts-expect-error An explicit undefined flag is outside the established exact-optional contract. +api.list({ includeTotalCount: undefined }); +// @ts-expect-error The flag is a boolean. +api.list({ includeTotalCount: 'true' }); +// @ts-expect-error Attribute selection accepts object shapes. +api.list(); + +const concrete: Promise> = + implementation.list({ includeTotalCount: true }); +const interfaceResult: Promise> = + publicApi.list({ includeTotalCount: true }); +const cloned: Promise> = + api.waitForSync(10).list({ includeTotalCount: true }); +declare const page: sdk.PaginatedResultTenantRead; +const attrs: Attributes | undefined = page.data[0]?.attributes; +const nullable: string | null | undefined = page.data[0]?.attributes?.note; +const total: number = page.total_count; +const rows: sdk.TenantRead[] = page.data; +const optionalPageCount: number | undefined = page.page_count; +declare const absentAttributes: Omit, 'attributes'>; +const optionalAttributes: sdk.TenantRead = absentAttributes; +// @ts-expect-error A counted page remains an envelope rather than an array. +const wrongArray: Promise = api.list({ includeTotalCount: true }); +// @ts-expect-error The default array cannot be used as a counted page. +const wrongPage: Promise = api.list(); +// @ts-expect-error Optional flags can be absent, so they cannot promise a page. +const uncertainPage: Promise = api.list(optionalTrue); +// @ts-expect-error Dynamic flags require narrowing before reading metadata. +runtime.then(result => result.total_count); +// @ts-expect-error Full page metadata remains required. +const missingTotal: sdk.PaginatedResultTenantRead = { data: [] }; +// @ts-expect-error Attributes remain non-null at the top level. +const nullAttributes: sdk.TenantRead = { ...absentAttributes, attributes: null }; +// @ts-expect-error Primitive attribute shapes are not supported. +api.list({ includeTotalCount: true }); +void [concrete, interfaceResult, cloned, attrs, nullable, total, rows, optionalPageCount, + optionalAttributes, wrongArray, wrongPage, uncertainPage, missingTotal, nullAttributes]; +// Compiling the tuple evaluates every exact result assertion. +declare const results: Results; +void results; +`; +test('strict consumers preserve literal and dynamic tenant-list shapes', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-tenant-totals-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files: [esmFile, cjsFile], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `Tenant totals consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { + cause: error, + }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/module-imports/url-validation.spec.ts b/src/tests/module-imports/url-validation.spec.ts new file mode 100644 index 00000000..0f21be32 --- /dev/null +++ b/src/tests/module-imports/url-validation.spec.ts @@ -0,0 +1,80 @@ +import { execFile } from 'node:child_process'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); +const probe = ` +const assert = require('node:assert/strict'); +const axios = require('axios'); +for (const variable of ['PERMIT_PDP_URL', 'PERMIT_API_URL']) delete process.env[variable]; +let dispatches = 0; +const client = axios.create({ adapter: async config => { + dispatches++; + return { data: { key: 'tenant', id: 'tenant-id' }, status: 200, + statusText: 'OK', headers: {}, config }; +} }); +const privateValue = 'private-url-value'; +const token = 'test-token'; +for (const name of ['apiUrl', 'pdp']) { + for (const suffix of ['?'+privateValue, '#'+privateValue, '?', '#', '/?', '/#']) { + assert.throws(() => new Permit({ token, [name]: 'http://api.invalid'+suffix, + axiosInstance: client }), error => { + assert.equal(error instanceof TypeError, true); + assert.equal(error.message.includes('Invalid '+name+':'), true); + assert.equal(error.message.includes(privateValue), false); + assert.equal(Object.hasOwn(error, 'cause'), false); + return true; + }); + } +} +assert.equal(dispatches, 0); +for (const proxyFactsViaPdp of [false, true]) { + for (const origin of ['https://api.invalid:8443', 'http://[::1]:7766']) { + const prefix = '/prefix/%3Fsegment/%23segment'; + const context = new ApiContext(); + context._saveApiKeyAccessibleScope('org', 'project', 'environment'); + const seen = []; + client.defaults.adapter = async config => { + const url = new URL(client.getUri(config)); + seen.push({ origin: url.origin, path: url.pathname, search: url.search, hash: url.hash }); + return { data: { key: 'tenant', id: 'tenant-id' }, status: 200, + statusText: 'OK', headers: {}, config }; + }; + const permit = new Permit({ token, apiUrl: origin+prefix, pdp: origin+prefix, + axiosInstance: client, apiContext: context, proxyFactsViaPdp, log: {level:'silent'} }); + assert.equal(permit.config.apiUrl, origin+prefix); + assert.equal(permit.config.pdp, origin+prefix); + assert.equal((await permit.api.tenants.get('tenant')).key, 'tenant'); + assert.deepEqual(seen, [{ origin, path: prefix+'/v2/facts/project/environment/tenants/tenant', + search: '', hash: '' }]); + } +} +console.log('URL validation and routing passed'); +`; + +test.each(['esm', 'commonjs'] as const)( + 'built %s entry rejects bad base URLs and preserves encoded prefix routing', + async (entry) => { + const prelude = + entry === 'esm' + ? `import { createRequire } from 'node:module'; +import { Permit, ApiContext } from 'permitio'; +const require = createRequire(import.meta.url);` + : `const { Permit, ApiContext } = require('permitio');`; + const args = + entry === 'esm' + ? ['--input-type=module', '-e', prelude + probe] + : [ + '-e', + `(async () => { ${prelude + probe} })().catch(error => { +console.error(error); process.exitCode = 1; });`, + ]; + const { stdout, stderr } = await promisify(execFile)(process.execPath, args, { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }); + expect(stdout.trim()).toBe('URL validation and routing passed'); + expect(stderr).toBe(''); + }, +); diff --git a/src/tests/module-imports/user-attributes.spec.ts b/src/tests/module-imports/user-attributes.spec.ts new file mode 100644 index 00000000..670cad6e --- /dev/null +++ b/src/tests/module-imports/user-attributes.spec.ts @@ -0,0 +1,171 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both public entries expose the dedicated user attribute facade', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.ok(permit.api.userAttributes instanceof sdk.UserAttributesApi); + for (const method of ['list', 'get', 'create', 'update', 'delete']) { + assert.equal(typeof permit.api.userAttributes[method], 'function'); + } +} +console.log('USER_ATTRIBUTES_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('USER_ATTRIBUTES_EXPORTS_OK'); +}); + +const consumer = ` +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +declare const permit: sdk.Permit; +declare const concrete: sdk.UserAttributesApi; +declare const client: sdk.IPermitClient; +const api: sdk.IUserAttributesApi = permit.api.userAttributes; +const clientApi: sdk.IUserAttributesApi = client.api.userAttributes; +const create: sdk.ResourceAttributeCreate = { + key: 'department', type: sdk.AttributeType.String, description: 'Policy schema', +}; +const patch: sdk.ResourceAttributeUpdate = { description: 'Updated schema' }; +const options: sdk.IPagination = { page: 2, perPage: 3 }; +const listed = api.list(options); +const defaults = api.list(); +const created = api.create(create); +const got = api.get('attribute-key-or-uuid'); +const updated = api.update('attribute-key-or-uuid', patch); +const deleted = api.delete('attribute-key-or-uuid'); +const concreteList = concrete.list(); +const emptyPatch = concrete.update('attribute-key-or-uuid', {}); +type Results = [ + Assert, sdk.ResourceAttributeRead[]>>, + Assert, sdk.ResourceAttributeRead[]>>, + Assert, sdk.ResourceAttributeRead>>, + Assert, sdk.ResourceAttributeRead>>, + Assert, sdk.ResourceAttributeRead>>, + Assert, void>>, + Assert, sdk.ResourceAttributeRead[]>>, + Assert, sdk.ResourceAttributeRead>>, +]; +declare const row: sdk.ResourceAttributeRead; +const metadata: [string, string, string, string, string, string, string, string, boolean] = [ + row.id, row.key, row.resource_id, row.resource_key, row.organization_id, + row.project_id, row.environment_id, row.created_at, row.built_in, +]; +const updatedAt: string = row.updated_at; +// @ts-expect-error Attribute creation requires its schema key. +api.create({ type: sdk.AttributeType.String }); +// @ts-expect-error Attribute creation requires a supported schema type. +api.create({ key: 'department' }); +// @ts-expect-error Attribute types are the committed enum. +api.create({ ...create, type: 'unsupported-kind' }); +// @ts-expect-error Schema definitions do not accept individual user values. +api.create({ ...create, attributes: { department: 'engineering' } }); +// @ts-expect-error The committed description does not accept null. +api.create({ ...create, description: null }); +// @ts-expect-error Exact optional metadata rejects explicit undefined. +api.update('attribute', { description: undefined }); +// @ts-expect-error An attribute PATCH does not rename its key. +api.update('attribute', { key: 'renamed' }); +// @ts-expect-error Pagination cannot select another resource. +api.list({ resourceKey: '__user' }); +// @ts-expect-error There is no resource ID switch on this dedicated facade. +api.list({ resourceId: 'resource-id' }); +// @ts-expect-error Get accepts only an attribute key or UUID. +api.get('resource', 'attribute'); +// @ts-expect-error Create has no resource selector argument. +api.create('resource', create); +// @ts-expect-error Schema reads preserve all required identity and context metadata. +const missingMetadata: sdk.ResourceAttributeRead = create; +// @ts-expect-error Lists return the committed array, not a facts page envelope. +const page: Promise = api.list(); +// @ts-expect-error Schema operations have no facts synchronization helper. +api.waitForSync(3); +// @ts-expect-error The dedicated facade exposes only the five requested operations. +api.getByKey('attribute'); +// @ts-expect-error Schema reads do not use caller-declared user value shapes. +api.get<{ department: string }>('attribute'); +void [clientApi, metadata, updatedAt]; +declare const results: Results; +void results; +`; + +test('strict TS6 and TS7 root consumers preserve user attribute schema contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-user-attribute-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esm = join(directory, 'consumer.mts'); + const cjs = join(directory, 'consumer.cts'); + await writeFile(esm, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjs, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [esm, cjs], + }), + ); + for (const compiler of [ + join(root, 'node_modules/typescript/bin/tsc'), + join(root, 'tools/compiler/node_modules/typescript/bin/tsc'), + ]) { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [compiler, '-p', config], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error( + `User attribute consumer compilation failed:\n${error.stdout}\n${error.stderr}`, + { + cause: error, + }, + ); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + } +}, 65_000); diff --git a/src/tests/module-imports/user-invites.spec.ts b/src/tests/module-imports/user-invites.spec.ts new file mode 100644 index 00000000..29707567 --- /dev/null +++ b/src/tests/module-imports/user-invites.spec.ts @@ -0,0 +1,181 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +test('both public entries expose the six invite methods and status values', async () => { + const { stdout } = await promisify(execFile)( + process.execPath, + [ + '--input-type=module', + '-e', + ` +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import * as esm from 'permitio'; +const cjs = createRequire(import.meta.url)('permitio'); +for (const sdk of [esm, cjs]) { + const permit = new sdk.Permit({ token: 'fixture', log: { level: 'silent' } }); + assert.ok(permit.api.userInvites instanceof sdk.UserInvitesApi); + assert.deepEqual(Object.getOwnPropertyNames(sdk.UserInvitesApi.prototype).sort(), [ + 'approve', 'constructor', 'create', 'delete', 'get', 'list', 'update', + ]); + assert.deepEqual(sdk.UserInviteStatus, { Pending: 'pending', Approved: 'approved' }); +} +console.log('INVITE_EXPORTS_OK'); +`, + ], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ); + expect(stdout.trim()).toBe('INVITE_EXPORTS_OK'); +}); + +const consumer = ` +type Equal = (() => T extends A ? 1 : 2) extends + (() => T extends B ? 1 : 2) ? true : false; +type Assert = T; +interface Attributes { readonly access: 'reader'; note: string | null; } +type ApprovalAttributes = sdk.UserInviteApprovalRead['attributes']; +declare const permit: sdk.Permit; +declare const concrete: sdk.UserInvitesApi; +const api: sdk.IUserInvitesApi = permit.api.userInvites; +const invite: sdk.ElementsUserInviteCreate = { + key: null, first_name: null, last_name: null, resource_instance_id: null, + status: sdk.UserInviteStatus.Pending, email: 'fixture@example.com', + role_id: 'role-id', tenant_id: 'tenant-id', +}; +const update: sdk.ElementsUserInviteUpdate = { ...invite, status: 'approved' }; +const approval: sdk.ElementsUserInviteApprove = { + email: 'fixture@example.com', key: 'approved-user', attributes: null, +}; +const filters: sdk.IListUserInvites = { + role: 'reader', tenant: 'east', search: 'fixture', page: 2, perPage: 3, +}; +const listed = api.list(filters); +const defaultList = api.list(); +const created = api.create(invite); +const got = api.get('invite-id'); +const updated = api.update('invite-id', update); +const deleted = api.delete('invite-id'); +const approved = api.approve('invite-id', approval); +const typed = api.approve('invite-id', approval); +const concreteTyped = concrete.approve('invite-id', approval); +type Results = [ + Assert, sdk.PaginatedResultElementsUserInviteRead>>, + Assert, sdk.PaginatedResultElementsUserInviteRead>>, + Assert, sdk.ElementsUserInviteRead>>, + Assert, sdk.ElementsUserInviteRead>>, + Assert, sdk.ElementsUserInviteRead>>, + Assert, void>>, + Assert, sdk.UserInviteApprovalRead>>, + Assert, sdk.UserInviteApprovalRead>>, + Assert, sdk.UserInviteApprovalRead>>, + Assert>, + Assert>, + Assert>, +]; +declare const read: sdk.ElementsUserInviteRead; +const page: sdk.PaginatedResultElementsUserInviteRead = { data: [read], total_count: 1 }; +const status: sdk.UserInviteStatus = 'approved'; +// @ts-expect-error Nullability does not make these creation fields optional. +api.create({ status: 'pending', email: 'fixture@example.com', role_id: 'r', tenant_id: 't' }); +// @ts-expect-error PATCH still requires the complete editable body. +api.update('invite-id', { key: 'user' }); +// @ts-expect-error Approval attributes are required even when null. +api.approve('invite-id', { email: 'fixture@example.com', key: 'user' }); +// @ts-expect-error Approval attributes are nullable, not undefined. +api.approve('invite-id', { ...approval, attributes: undefined }); +// @ts-expect-error Approval email is required and non-null. +api.approve('invite-id', { ...approval, email: null }); +// @ts-expect-error The final approval key is non-null. +api.approve('invite-id', { ...approval, key: null }); +// @ts-expect-error Invite statuses are the actual backend enum. +api.create({ ...invite, status: 'rejected' }); +// @ts-expect-error Required nullable properties reject undefined. +api.create({ ...invite, resource_instance_id: undefined }); +// @ts-expect-error Role IDs are non-null strings. +api.create({ ...invite, role_id: null }); +// @ts-expect-error Exact optional filters reject explicit undefined. +api.list({ search: undefined }); +// @ts-expect-error The list always returns a complete page. +const array: Promise = api.list(); +// @ts-expect-error A stored invite retains its required identity/context/timestamp metadata. +const missingMetadata: sdk.ElementsUserInviteRead = invite; +// @ts-expect-error The full page retains its required total_count. +const missingCount: sdk.PaginatedResultElementsUserInviteRead = { data: [] }; +// @ts-expect-error There is no synchronization promise on this direct control-plane group. +api.waitForSync(5); +// @ts-expect-error No key-lookup alias is exposed. +api.getByKey('user'); +// @ts-expect-error Caller-declared attributes must be objects. +api.approve('invite-id', approval); +// @ts-expect-error Existing UserRead's captured non-null contract is unchanged. +const existingAttributes: sdk.UserRead['attributes'] = null; +void [page, status]; +declare const results: Results; +void results; +`; + +// Allow both sequential 30-second compiler limits plus fixture setup and cleanup. +test('strict TS6 and TS7 consumers preserve required-nullable invite contracts', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-invite-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esm = join(directory, 'consumer.mts'); + const cjs = join(directory, 'consumer.cts'); + await writeFile(esm, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjs, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + skipLibCheck: false, + noEmit: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + }, + files: [esm, cjs], + }), + ); + for (const compiler of [ + join(root, 'node_modules/typescript/bin/tsc'), + join(root, 'tools/compiler/node_modules/typescript/bin/tsc'), + ]) { + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [compiler, '-p', config], + { + cwd: root, + encoding: 'utf8', + timeout: 30_000, + }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error(`Invite consumer compilation failed:\n${error.stdout}\n${error.stderr}`, { + cause: error, + }); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); + } +}, 65_000); diff --git a/src/tests/module-imports/users-options.spec.ts b/src/tests/module-imports/users-options.spec.ts new file mode 100644 index 00000000..95c3b8d2 --- /dev/null +++ b/src/tests/module-imports/users-options.spec.ts @@ -0,0 +1,97 @@ +import { execFile } from 'node:child_process'; +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { promisify } from 'node:util'; + +import { onTestFinished } from 'vitest'; + +const root = fileURLToPath(new URL('../../../', import.meta.url)); + +const consumer = ` + +declare const permit: sdk.Permit; +declare const dynamic: boolean; +const params: sdk.IUsersListParams = { + search: 'bob', searchOperator: 'endswith', role: '', + includeResourceInstanceRoles: dynamic, page: 2, perPage: 5, +}; +const queries = [ + permit.api.users.list(), + permit.api.users.list({}), + permit.api.users.list(params), + permit.api.users.list({ searchOperator: 'startswith', includeResourceInstanceRoles: true }), + permit.api.users.list({ searchOperator: 'contains', includeResourceInstanceRoles: false }), +]; +const exact: Promise[] = queries; +declare const page: Awaited>; +const nested: {resource: string; resource_instance: string; role: string}[] | undefined = + page.data[0]?.associated_tenants?.[0]?.resource_instance_roles; +const count: number = page.total_count; +const rows: sdk.UserRead[] = page.data; +// @ts-expect-error Only schema-supported search operators are accepted. +permit.api.users.list({ searchOperator: 'prefix' }); +// @ts-expect-error The inclusion flag is a boolean. +permit.api.users.list({ includeResourceInstanceRoles: 'true' }); +// @ts-expect-error Exact optional options reject explicit undefined. +permit.api.users.list({ includeResourceInstanceRoles: undefined }); +// @ts-expect-error Null is not an inclusion flag. +permit.api.users.list({ includeResourceInstanceRoles: null }); +// @ts-expect-error Public option names use camel case. +permit.api.users.list({ search_operator: 'contains' }); +// @ts-expect-error The historical ticket title is not a public option. +permit.api.users.list({ include_resource_roles: true }); +// @ts-expect-error User lists retain their paginated envelope. +const array: Promise = permit.api.users.list(params); +// @ts-expect-error Resource roles belong to associated tenant details. +page.data[0]?.resource_roles; +void [exact, nested, count, rows, array]; +`; + +test('strict ESM and CJS consumers preserve user-list options and results', async () => { + const directory = await mkdtemp(join(tmpdir(), 'permit-users-options-types-')); + onTestFinished(() => rm(directory, { recursive: true, force: true })); + await mkdir(join(directory, 'node_modules')); + await symlink(root, join(directory, 'node_modules/permitio'), 'dir'); + const esmFile = join(directory, 'consumer.mts'); + const cjsFile = join(directory, 'consumer.cts'); + await writeFile(esmFile, `import * as sdk from 'permitio';\n${consumer}`); + await writeFile(cjsFile, `import sdk = require('permitio');\n${consumer}`); + const config = join(directory, 'tsconfig.json'); + await writeFile( + config, + JSON.stringify({ + compilerOptions: { + target: 'ES2023', + module: 'NodeNext', + moduleResolution: 'NodeNext', + strict: true, + noUncheckedIndexedAccess: true, + exactOptionalPropertyTypes: true, + noImplicitOverride: true, + noPropertyAccessFromIndexSignature: true, + verbatimModuleSyntax: true, + isolatedModules: true, + types: ['node'], + typeRoots: [join(root, 'node_modules/@types')], + noEmit: true, + }, + files: [esmFile, cjsFile], + }), + ); + const { stdout, stderr } = await promisify(execFile)( + process.execPath, + [join(root, 'node_modules/typescript/lib/tsc.js'), '-p', config], + { cwd: root, encoding: 'utf8', timeout: 30_000 }, + ).catch((error: unknown) => { + if (error instanceof Error && 'stdout' in error && 'stderr' in error) { + throw new Error(`User-list consumer compilation failed:\n${error.stdout}\n${error.stderr}`, { + cause: error, + }); + } + throw error; + }); + expect(stdout).toBe(''); + expect(stderr).toBe(''); +}); diff --git a/src/tests/unit/api/api-errors.spec.ts b/src/tests/unit/api/api-errors.spec.ts new file mode 100644 index 00000000..6600b622 --- /dev/null +++ b/src/tests/unit/api/api-errors.spec.ts @@ -0,0 +1,160 @@ +import { createServer, IncomingMessage, ServerResponse } from 'node:http'; +import { inspect } from 'node:util'; + +import axios from 'axios'; +import pino from 'pino'; + +import { Permit, PermitApiError } from '#src/index'; +import { rejectionOf } from '#src/tests/helpers/rejection'; + +const TOKEN = 'permit_key_rest-token-do-not-log'; +const CUSTOM_SECRET = 'custom-header-secret-do-not-log'; +const COOKIE_REDACTION_CANARY = 'session-cookie-do-not-log'; +const SECRETS = [TOKEN, CUSTOM_SECRET, COOKIE_REDACTION_CANARY]; +const USER_PATH = '/v2/facts/proj-1/env-1/users/user-1'; + +type Reply = { status: number; body: unknown } | 'reset'; + +/** The parts of a PermitApiError that pino and JSON.stringify keep. */ +interface SerializedApiError { + message: string; + originalError: { status: number; config: { method: string; url: string } }; +} + +/** + * Starts a REST API fixture on a free loopback port for the current test. It grants an + * environment scope and fails the user request. + */ +async function startApi(reply: Reply): Promise { + const server = createServer((request: IncomingMessage, response: ServerResponse) => { + request.resume(); + if (request.url === '/v2/api-key/scope') { + response.writeHead(200, { 'Content-Type': 'application/json' }); + response.end( + JSON.stringify({ + organization_id: 'org-1', + project_id: 'proj-1', + environment_id: 'env-1', + }), + ); + } else if (reply === 'reset') { + request.socket.destroy(); + } else { + response.writeHead(reply.status, { + 'Content-Type': 'application/json', + 'Set-Cookie': `session=${COOKIE_REDACTION_CANARY}`, + }); + response.end(JSON.stringify(reply.body)); + } + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve(); + }); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + }), + ); + const address = server.address(); + if (address === null || typeof address === 'string') { + throw new Error('Expected the REST API fixture to listen on a TCP port'); + } + return `http://127.0.0.1:${address.port}`; +} + +function createPermit(apiUrl: string): Permit { + return new Permit({ + token: TOKEN, + apiUrl, + retry: false, + log: { level: 'silent' }, + axiosInstance: axios.create({ headers: { 'X-Custom-Secret': CUSTOM_SECRET } }), + }); +} + +/** Logs the error the way applications commonly do: through pino's standard err serializer. */ +function pinoLine(error: unknown): string { + const lines: string[] = []; + const logger = pino({ level: 'error' }, { write: (line: string) => lines.push(line) }); + logger.error({ err: error }, 'REST call failed'); + return lines.join(''); +} + +/** The pathname of an absolute request URL kept on an error. */ +function pathOf(url: string | undefined): string { + assert(url, 'Expected the error to keep the request URL'); + return new URL(url).pathname; +} + +function assertNoSecrets(error: unknown): void { + const renderings = { + inspect: inspect(error), + inspectDeep: inspect(error, { depth: Infinity, showHidden: true }), + json: JSON.stringify(error), + pino: pinoLine(error), + }; + for (const [name, text] of Object.entries(renderings)) { + for (const secret of SECRETS) { + expect(text, `${name} contains ${secret}`).not.toContain(secret); + } + } +} + +describe('REST API errors (unit)', () => { + for (const status of [401, 500]) { + const body = { message: `test API failure ${status}`, error_code: 'TEST_FAILURE' }; + + it(`PER-16544: a ${status} REST error does not expose the API key`, async () => { + const permit = createPermit(await startApi({ status, body })); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + assert(error instanceof PermitApiError); + assertNoSecrets(error); + + expect(error.message).toBe(body.message); + expect(error.response?.status).toBe(status); + expect(error.response?.data).toStrictEqual(body); + expect(error.formattedAxiosError).toStrictEqual({ + code: error.originalError.code, + message: body.message, + error: body, + status, + }); + const config = error.originalError.config; + expect(config?.method).toBe('get'); + expect(pathOf(config?.url)).toBe(USER_PATH); + expect(config?.headers.Authorization).toBe('[REDACTED]'); + expect(config?.headers['X-Custom-Secret']).toBe('[REDACTED]'); + expect(String(config?.headers['X-Permit-SDK-Version'])).toMatch(/^node:/); + + expect(String(error.response?.headers['set-cookie'])).toBe('[REDACTED]'); + + // Pino and JSON.stringify render the nested Axios error through its toJSON(), which has the + // status and request config but not the response body. + const logged = (JSON.parse(pinoLine(error)) as { err: SerializedApiError }).err; + expect(logged.message).toContain(body.message); + expect(logged.originalError.status).toBe(status); + expect(logged.originalError.config.method).toBe('get'); + expect(pathOf(logged.originalError.config.url)).toBe(USER_PATH); + const serialized = JSON.parse(JSON.stringify(error)) as SerializedApiError; + expect(serialized.originalError.status).toBe(status); + expect(serialized.originalError.config.method).toBe('get'); + }); + } + + it('PER-16544: a REST transport error does not expose the API key', async () => { + const permit = createPermit(await startApi('reset')); + const error = await rejectionOf(permit.api.users.get('user-1')); + expect(error).toBeInstanceOf(PermitApiError); + assert(error instanceof PermitApiError); + assertNoSecrets(error); + expect(error.response).toBeUndefined(); + expect(error.originalError.config?.method).toBe('get'); + expect(pathOf(error.originalError.config?.url)).toBe(USER_PATH); + }); +}); diff --git a/src/tests/unit/api/condition-set-rules.spec.ts b/src/tests/unit/api/condition-set-rules.spec.ts new file mode 100644 index 00000000..44233e1c --- /dev/null +++ b/src/tests/unit/api/condition-set-rules.spec.ts @@ -0,0 +1,147 @@ +import { PermitApiError } from '#src/api/base'; +import { + type ConditionSetRuleCreate, + type ConditionSetRuleRemove, +} from '#src/api/condition-set-rules'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// set-rules URL is scoped under `/v2/facts/{proj}/{env}/set_rules`. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/facts/${PROJ}/${ENV}/set_rules`; + +describe('ConditionSetRulesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection mapping filters to wire params', async () => { + const rules = [ + { + id: 'rule-1', + user_set: 'us-employees', + permission: 'document:read', + resource_set: 'confidential-docs', + }, + ]; + rest.resolveWith(rules); + + const result = await permit.api.conditionSetRules.list({ + userSetKey: 'us-employees', + permissionKey: 'document:read', + resourceSetKey: 'confidential-docs', + }); + + expect(result).toEqual(rules); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // userSetKey/permissionKey/resourceSetKey map to snake_case wire params. + expect(rest.last?.params).toMatchObject({ + user_set: 'us-employees', + permission: 'document:read', + resource_set: 'confidential-docs', + page: '1', + per_page: '100', + }); + }); + + it('forwards page and perPage alongside the filters', async () => { + rest.resolveWith([]); + + await permit.api.conditionSetRules.list({ + userSetKey: 'us-employees', + permissionKey: 'document:read', + resourceSetKey: 'confidential-docs', + page: 2, + perPage: 10, + }); + + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '2', per_page: '10' }); + }); + }); + + describe('create', () => { + const rule: ConditionSetRuleCreate = { + user_set: 'us-employees', + permission: 'document:read', + resource_set: 'confidential-docs', + }; + + it('rejects an empty success response instead of returning an absent rule', async () => { + rest.resolveWith([]); + await expect(permit.api.conditionSetRules.create(rule)).rejects.toThrow( + 'Creating a condition set rule returned no rule', + ); + }); + + it('POSTs the rule body to the collection and returns the created rule', async () => { + // assignSetPermissions returns an array; the SDK unwraps `.data[0]`. + const created = { ...rule, id: 'rule-1' }; + rest.resolveWith([created]); + + const result = await permit.api.conditionSetRules.create(rule); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(rule); + }); + }); + + describe('delete', () => { + const rule: ConditionSetRuleRemove = { + user_set: 'us-employees', + permission: 'document:read', + resource_set: 'confidential-docs', + }; + + it('DELETEs the collection with the rule as the request body', async () => { + rest.resolveWith({}); + + await permit.api.conditionSetRules.delete(rule); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(rule); + }); + }); + + describe('error mapping', () => { + it('maps a 404 on list to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.conditionSetRules + .list({ + userSetKey: 'us-employees', + permissionKey: 'document:read', + resourceSetKey: 'confidential-docs', + }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.conditionSetRules + .create({ + user_set: 'us-employees', + permission: 'document:read', + resource_set: 'confidential-docs', + }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/condition-sets.spec.ts b/src/tests/unit/api/condition-sets.spec.ts new file mode 100644 index 00000000..a3bfece6 --- /dev/null +++ b/src/tests/unit/api/condition-sets.spec.ts @@ -0,0 +1,168 @@ +import { PermitApiError } from '#src/api/base'; +import { type ConditionSetCreate, type ConditionSetUpdate } from '#src/api/condition-sets'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// condition-sets URL is scoped under `/v2/schema/{proj}/{env}/condition_sets`. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/condition_sets`; + +describe('ConditionSetsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection with default pagination', async () => { + const sets = [{ key: 'us-employees', id: 'set-1' }]; + rest.resolveWith(sets); + + const result = await permit.api.conditionSets.list(); + + expect(result).toEqual(sets); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // page/per_page are serialized into the URL query string (values are strings). + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.conditionSets.list({ page: 3, perPage: 25 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '3', per_page: '25' }); + }); + }); + + describe('get / getByKey / getById', () => { + const set = { key: 'us-employees', id: 'set-1' }; + + it('GETs a single condition set with the key in the path', async () => { + rest.resolveWith(set); + + const result = await permit.api.conditionSets.get('us-employees'); + + expect(result).toEqual(set); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/us-employees`); + }); + + it('getByKey is an alias for get', async () => { + rest.resolveWith(set); + + const result = await permit.api.conditionSets.getByKey('us-employees'); + + expect(result).toEqual(set); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/us-employees`); + }); + + it('getById is an alias for get', async () => { + rest.resolveWith(set); + + const result = await permit.api.conditionSets.getById('set-1'); + + expect(result).toEqual(set); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/set-1`); + }); + }); + + describe('create', () => { + it('POSTs a userset body to the collection', async () => { + const payload: ConditionSetCreate = { + key: 'us-employees', + name: 'US based employees', + type: 'userset', + conditions: { allOf: [{ 'user.location': { equals: 'US' } }] }, + }; + const created = { ...payload, id: 'set-1' }; + rest.resolveWith(created); + + const result = await permit.api.conditionSets.create(payload); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + + it('POSTs a resourceset body to the collection', async () => { + const payload: ConditionSetCreate = { + key: 'confidential-docs', + name: 'Confidential documents', + type: 'resourceset', + resource_id: 'document', + conditions: { allOf: [{ 'resource.classification': { equals: 'secret' } }] }, + }; + const created = { ...payload, id: 'set-2' }; + rest.resolveWith(created); + + const result = await permit.api.conditionSets.create(payload); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the condition set body to the keyed path', async () => { + const body: ConditionSetUpdate = { + name: 'Renamed set', + conditions: { allOf: [{ 'user.location': { equals: 'EU' } }] }, + }; + const updated = { key: 'us-employees', name: 'Renamed set' }; + rest.resolveWith(updated); + + const result = await permit.api.conditionSets.update('us-employees', body); + + expect(result).toEqual(updated); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/us-employees`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.conditionSets.delete('us-employees'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/us-employees`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.conditionSets.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.conditionSets + .create({ key: 'us-employees', name: 'US based employees', type: 'userset' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/elements.spec.ts b/src/tests/unit/api/elements.spec.ts new file mode 100644 index 00000000..09aebadc --- /dev/null +++ b/src/tests/unit/api/elements.spec.ts @@ -0,0 +1,67 @@ +import { PermitApiError } from '#src/api/base'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// elementsLoginAs has no scope segment: it posts to a fixed auth endpoint and +// (unlike the schema/facts modules) is not gated on the SDK api context. +const LOGIN_PATH = '/v2/auth/elements_login_as'; + +describe('ElementsClient (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('loginAs', () => { + it('POSTs the snake_cased login body to the elements auth endpoint', async () => { + rest.resolveWith({ redirect_url: 'https://app.permit.io/embed' }); + + await permit.elements.loginAs({ userId: 'user-1', tenantId: 'tenant-1' }); + + expect(rest.requests).toHaveLength(1); + expect(rest.last?.method).toBe('POST'); + // The exact path has no environment scope segment. + expect(rest.last?.path).toBe(LOGIN_PATH); + // { userId, tenantId } is mapped onto the wire shape { user_id, tenant_id }. + expect(rest.last?.data).toEqual({ user_id: 'user-1', tenant_id: 'tenant-1' }); + }); + + it('wraps the response data with a content.url derived from redirect_url', async () => { + rest.resolveWith({ redirect_url: 'https://app.permit.io/embed', token: 'tok-123' }); + + const result = await permit.elements.loginAs({ userId: 'user-1', tenantId: 'tenant-1' }); + + // The raw response fields are spread through unchanged, and `content.url` + // mirrors the redirect_url so callers can embed it. + expect(result).toEqual({ + redirect_url: 'https://app.permit.io/embed', + token: 'tok-123', + content: { url: 'https://app.permit.io/embed' }, + }); + }); + + it('maps a 403 forbidden response to PermitApiError', async () => { + rest.rejectWith(403, { message: 'Forbidden access' }); + + const error = await permit.elements + .loginAs({ userId: 'user-1', tenantId: 'tenant-1' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(403); + }); + + it('maps a 404 (user/tenant not found) to PermitApiError', async () => { + rest.rejectWith(404, { message: 'User not found' }); + + const error = await permit.elements + .loginAs({ userId: 'missing', tenantId: 'tenant-1' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + }); +}); diff --git a/src/tests/unit/api/environments.spec.ts b/src/tests/unit/api/environments.spec.ts new file mode 100644 index 00000000..814b4605 --- /dev/null +++ b/src/tests/unit/api/environments.spec.ts @@ -0,0 +1,196 @@ +import { PermitApiError } from '#src/api/base'; +import { + type EnvironmentCopy, + type EnvironmentCreate, + type EnvironmentUpdate, +} from '#src/api/environments'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// Environments live under a project: their paths are +// `/v2/projects/{projectKey}/envs[/{environmentKey}]`. Every method requires an +// organization context, and the project/environment keys are passed as explicit +// arguments (not read from the seeded scope), so the mock is seeded at the +// organization level. +const PROJECT = 'proj-a'; +const ENV = 'env-a'; +const COLLECTION = `/v2/projects/${PROJECT}/envs`; +const RESOURCE = `${COLLECTION}/${ENV}`; + +describe('EnvironmentsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit({ contextLevel: 'organization' })); + }); + + describe('list', () => { + it('GETs the project-scoped collection with default pagination', async () => { + const environments = [{ key: ENV, id: 'env-id-1' }]; + rest.resolveWith(environments); + + const result = await permit.api.environments.list({ projectKey: PROJECT }); + + expect(result).toEqual(environments); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.environments.list({ projectKey: PROJECT, page: 2, perPage: 10 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '2', per_page: '10' }); + }); + }); + + describe('get / getByKey / getById', () => { + const environment = { key: ENV, id: 'env-id-1' }; + + it('GETs a single environment with both keys in the path', async () => { + rest.resolveWith(environment); + + const result = await permit.api.environments.get(PROJECT, ENV); + + expect(result).toEqual(environment); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(RESOURCE); + }); + + it('getByKey is an alias for get', async () => { + rest.resolveWith(environment); + + const result = await permit.api.environments.getByKey(PROJECT, ENV); + + expect(result).toEqual(environment); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(RESOURCE); + }); + + it('getById is an alias for get', async () => { + rest.resolveWith(environment); + + const result = await permit.api.environments.getById(PROJECT, ENV); + + expect(result).toEqual(environment); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(RESOURCE); + }); + }); + + describe('getStats', () => { + it('GETs the stats sub-path', async () => { + const stats = { key: ENV, stats: { roles: 2, users: 3 } }; + rest.resolveWith(stats); + + const result = await permit.api.environments.getStats(PROJECT, ENV); + + expect(result).toEqual(stats); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${RESOURCE}/stats`); + }); + }); + + describe('getApiKey', () => { + it('GETs the api-key path keyed by project and environment', async () => { + const apiKey = { id: 'key-1', secret: 'permit_key' }; + rest.resolveWith(apiKey); + + const result = await permit.api.environments.getApiKey(PROJECT, ENV); + + expect(result).toEqual(apiKey); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`/v2/api-key/${PROJECT}/${ENV}`); + }); + }); + + describe('create', () => { + const payload: EnvironmentCreate = { + key: ENV, + name: 'Environment A', + }; + + it('POSTs the environment body to the project collection', async () => { + const created = { ...payload, id: 'env-id-1' }; + rest.resolveWith(created); + + const result = await permit.api.environments.create(PROJECT, payload); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the environment body to the keyed path', async () => { + const body: EnvironmentUpdate = { name: 'Renamed' }; + const updated = { key: ENV, name: 'Renamed' }; + rest.resolveWith(updated); + + const result = await permit.api.environments.update(PROJECT, ENV, body); + + expect(result).toEqual(updated); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(RESOURCE); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('copy', () => { + it('POSTs the copy params to the copy sub-path', async () => { + const copyParams: EnvironmentCopy = { + target_env: { existing: 'env-b' }, + conflict_strategy: 'overwrite', + }; + const target = { key: 'env-b', id: 'env-id-2' }; + rest.resolveWith(target); + + const result = await permit.api.environments.copy(PROJECT, ENV, copyParams); + + expect(result).toEqual(target); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(`${RESOURCE}/copy`); + expect(rest.last?.data).toEqual(copyParams); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.environments.delete(PROJECT, ENV); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(RESOURCE); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.environments.get(PROJECT, 'missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.environments + .create(PROJECT, { key: ENV, name: 'Environment A' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/projects.spec.ts b/src/tests/unit/api/projects.spec.ts new file mode 100644 index 00000000..0e44413c --- /dev/null +++ b/src/tests/unit/api/projects.spec.ts @@ -0,0 +1,144 @@ +import { PermitApiError } from '#src/api/base'; +import { type ProjectCreate, type ProjectUpdate } from '#src/api/projects'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// Projects are an organization-scoped resource: their paths carry no +// `{proj}/{env}` schema segment, just `/v2/projects[/{key}]`. The mock must be +// seeded with an organization-level context or every method rejects before it +// can dispatch. +const COLLECTION = '/v2/projects'; + +describe('ProjectsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit({ contextLevel: 'organization' })); + }); + + describe('list', () => { + it('GETs the projects collection with default pagination', async () => { + const projects = [{ key: 'proj-a', id: 'proj-id-1' }]; + rest.resolveWith(projects); + + const result = await permit.api.projects.list(); + + expect(result).toEqual(projects); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.projects.list({ page: 3, perPage: 25 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '3', per_page: '25' }); + }); + }); + + describe('get / getByKey / getById', () => { + const project = { key: 'proj-a', id: 'proj-id-1' }; + + it('GETs a single project with the key in the path', async () => { + rest.resolveWith(project); + + const result = await permit.api.projects.get('proj-a'); + + expect(result).toEqual(project); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/proj-a`); + }); + + it('getByKey is an alias for get', async () => { + rest.resolveWith(project); + + const result = await permit.api.projects.getByKey('proj-a'); + + expect(result).toEqual(project); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/proj-a`); + }); + + it('getById is an alias for get', async () => { + rest.resolveWith(project); + + const result = await permit.api.projects.getById('proj-1'); + + expect(result).toEqual(project); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/proj-1`); + }); + }); + + describe('create', () => { + const payload: ProjectCreate = { + key: 'proj-a', + name: 'Project A', + }; + + it('POSTs the project body to the collection', async () => { + const created = { ...payload, id: 'proj-id-1' }; + rest.resolveWith(created); + + const result = await permit.api.projects.create(payload); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the project body to the keyed path', async () => { + const body: ProjectUpdate = { name: 'Renamed' }; + const updated = { key: 'proj-a', name: 'Renamed' }; + rest.resolveWith(updated); + + const result = await permit.api.projects.update('proj-a', body); + + expect(result).toEqual(updated); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/proj-a`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.projects.delete('proj-a'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/proj-a`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.projects.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.projects + .create({ key: 'proj-a', name: 'Project A' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/relationship-tuples.spec.ts b/src/tests/unit/api/relationship-tuples.spec.ts new file mode 100644 index 00000000..e0910132 --- /dev/null +++ b/src/tests/unit/api/relationship-tuples.spec.ts @@ -0,0 +1,189 @@ +import { PermitApiError } from '#src/api/base'; +import { + type RelationshipTupleCreate, + type RelationshipTupleDelete, +} from '#src/api/relationship-tuples'; +import { Permit } from '#src/index'; +import { createMockPermit, MOCK_PDP_ORIGIN, type MockTransport } from '#src/tests/helpers/mock-api'; + +// Facts modules dispatch on the REST transport; the env-scoped default context +// places every tuple URL under `/v2/facts/{proj}/{env}/relationship_tuples`. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/facts/${PROJ}/${ENV}/relationship_tuples`; +const BULK = `${COLLECTION}/bulk`; + +describe('RelationshipTuplesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection with no params when none are given', async () => { + const tuples = [{ subject: 'user:alice', relation: 'parent', object: 'folder:root' }]; + rest.resolveWith(tuples); + + const result = await permit.api.relationshipTuples.list({}); + + expect(result).toEqual(tuples); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // The SDK does not default pagination here, so omitted filters are absent. + expect(rest.last?.params).not.toHaveProperty('page'); + expect(rest.last?.params).not.toHaveProperty('tenant'); + }); + + it('forwards filters and pagination as snake_case wire params', async () => { + rest.resolveWith([]); + + await permit.api.relationshipTuples.list({ + tenant: 'default', + subject: 'user:alice', + relation: 'parent', + object: 'folder:root', + objectType: 'folder', + subjectType: 'user', + page: 2, + perPage: 5, + }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + tenant: 'default', + subject: 'user:alice', + relation: 'parent', + object: 'folder:root', + object_type: 'folder', + subject_type: 'user', + page: '2', + per_page: '5', + }); + }); + }); + + describe('create', () => { + const tuple: RelationshipTupleCreate = { + subject: 'user:alice', + relation: 'parent', + object: 'folder:root', + tenant: 'default', + }; + + it('POSTs the tuple body to the facts collection', async () => { + const created = { ...tuple, id: 'tuple-1' }; + rest.resolveWith(created); + + const result = await permit.api.relationshipTuples.create(tuple); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(tuple); + }); + }); + + describe('delete', () => { + const tuple: RelationshipTupleDelete = { + subject: 'user:alice', + relation: 'parent', + object: 'folder:root', + }; + + it('DELETEs with the tuple as the request body', async () => { + rest.resolveWith({}); + + await permit.api.relationshipTuples.delete(tuple); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(tuple); + }); + }); + + describe('bulkRelationshipTuples', () => { + it('POSTs the tuples wrapped under operations to the bulk path', async () => { + const tuples: RelationshipTupleCreate[] = [ + { subject: 'user:alice', relation: 'parent', object: 'folder:root', tenant: 'default' }, + { subject: 'user:bob', relation: 'member', object: 'folder:root', tenant: 'default' }, + ]; + const operation = { operations: tuples, status: 'completed' }; + rest.resolveWith(operation); + + const result = await permit.api.relationshipTuples.bulkRelationshipTuples(tuples); + + expect(result).toEqual(operation); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(BULK); + expect(rest.last?.data).toEqual({ operations: tuples }); + }); + }); + + describe('bulkUnRelationshipTuples', () => { + it('DELETEs the tuples wrapped under idents to the bulk path', async () => { + const tuples: RelationshipTupleDelete[] = [ + { subject: 'user:alice', relation: 'parent', object: 'folder:root' }, + { subject: 'user:bob', relation: 'member', object: 'folder:root' }, + ]; + const operation = { idents: tuples, status: 'completed' }; + rest.resolveWith(operation); + + const result = await permit.api.relationshipTuples.bulkUnRelationshipTuples(tuples); + + expect(result).toEqual(operation); + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(BULK); + expect(rest.last?.data).toEqual({ idents: tuples }); + }); + }); + + describe('waitForSync', () => { + it('returns the same instance and ignores the call when proxyFactsViaPdp is off', () => { + const api = permit.api.relationshipTuples; + + expect(api.waitForSync(10)).toBe(api); + }); + + it('returns a clone that sends X-Wait-Timeout when proxyFactsViaPdp is on', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const api = proxied.permit.api.relationshipTuples; + + const synced = api.waitForSync(30); + expect(synced).not.toBe(api); + + proxied.rest.resolveWith({}); + await synced.create({ subject: 'user:alice', relation: 'parent', object: 'folder:root' }); + + expect(proxied.rest.last?.method).toBe('POST'); + // proxyFactsViaPdp routes facts requests at the PDP host. + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + expect(proxied.rest.last?.headers?.['X-Wait-Timeout']).toBe('30'); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.relationshipTuples.list({}).catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.relationshipTuples + .create({ subject: 'user:alice', relation: 'parent', object: 'folder:root' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resource-action-groups.spec.ts b/src/tests/unit/api/resource-action-groups.spec.ts new file mode 100644 index 00000000..8b2b10b0 --- /dev/null +++ b/src/tests/unit/api/resource-action-groups.spec.ts @@ -0,0 +1,149 @@ +import { PermitApiError } from '#src/api/base'; +import { type ResourceActionGroupCreate } from '#src/api/resource-action-groups'; +import { Permit } from '#src/index'; +import { type ResourceActionGroupUpdate } from '#src/openapi/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// action-group URL is nested under +// `/v2/schema/{proj}/{env}/resources/{resourceKey}/action_groups`. +const PROJ = 'proj'; +const ENV = 'env'; +const RESOURCE = 'document'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/resources/${RESOURCE}/action_groups`; + +describe('ResourceActionGroupsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the resource-scoped action_groups collection with default pagination', async () => { + const response = [{ key: 'item-1', id: 'item-id-1' }]; + rest.resolveWith(response); + + const result = await permit.api.actionGroups.list({ resourceKey: RESOURCE }); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.actionGroups.list({ resourceKey: RESOURCE, page: 2, perPage: 10 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '2', per_page: '10' }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single group with the resource key and group key in the path', async () => { + const response = { key: 'editing' }; + rest.resolveWith(response); + + const result = await permit.api.actionGroups.get(RESOURCE, 'editing'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/editing`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'editing' }; + rest.resolveWith(response); + + const result = await permit.api.actionGroups.getByKey(RESOURCE, 'editing'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/editing`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'group-1' }; + rest.resolveWith(response); + + const result = await permit.api.actionGroups.getById(RESOURCE, 'group-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/group-1`); + }); + }); + + describe('create', () => { + const payload: ResourceActionGroupCreate = { + key: 'editing', + name: 'Editing', + actions: ['read', 'write'], + }; + + it('POSTs the group body to the resource-scoped collection', async () => { + const response = { ...payload, id: 'group-1' }; + rest.resolveWith(response); + + const result = await permit.api.actionGroups.create(RESOURCE, payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the group body to the keyed path', async () => { + const body: ResourceActionGroupUpdate = { name: 'Editing renamed' }; + const response = { key: 'editing', name: 'Editing renamed' }; + rest.resolveWith(response); + + const result = await permit.api.actionGroups.update(RESOURCE, 'editing', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/editing`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.actionGroups.delete(RESOURCE, 'editing'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/editing`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.actionGroups.get(RESOURCE, 'missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.actionGroups + .create(RESOURCE, { key: 'editing', name: 'Editing' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resource-actions.spec.ts b/src/tests/unit/api/resource-actions.spec.ts new file mode 100644 index 00000000..e86e4c8f --- /dev/null +++ b/src/tests/unit/api/resource-actions.spec.ts @@ -0,0 +1,143 @@ +import { PermitApiError } from '#src/api/base'; +import { type ResourceActionCreate, type ResourceActionUpdate } from '#src/api/resource-actions'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// actions URL is nested under `/v2/schema/{proj}/{env}/resources/{resourceKey}/actions`. +const PROJ = 'proj'; +const ENV = 'env'; +const RESOURCE = 'document'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/resources/${RESOURCE}/actions`; + +describe('ResourceActionsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the resource-scoped actions collection with default pagination', async () => { + const response = [{ key: 'item-1', id: 'item-id-1' }]; + rest.resolveWith(response); + + const result = await permit.api.resourceActions.list({ resourceKey: RESOURCE }); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.resourceActions.list({ resourceKey: RESOURCE, page: 3, perPage: 7 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '3', per_page: '7' }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single action with the resource key and action key in the path', async () => { + const response = { key: 'read' }; + rest.resolveWith(response); + + const result = await permit.api.resourceActions.get(RESOURCE, 'read'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/read`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'read' }; + rest.resolveWith(response); + + const result = await permit.api.resourceActions.getByKey(RESOURCE, 'read'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/read`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'action-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceActions.getById(RESOURCE, 'action-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/action-1`); + }); + }); + + describe('create', () => { + const payload: ResourceActionCreate = { key: 'read', name: 'Read' }; + + it('POSTs the action body to the resource-scoped collection', async () => { + const response = { ...payload, id: 'action-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceActions.create(RESOURCE, payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the action body to the keyed path', async () => { + const body: ResourceActionUpdate = { name: 'Read renamed' }; + const response = { key: 'read', name: 'Read renamed' }; + rest.resolveWith(response); + + const result = await permit.api.resourceActions.update(RESOURCE, 'read', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/read`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.resourceActions.delete(RESOURCE, 'read'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/read`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceActions.get(RESOURCE, 'missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resourceActions + .create(RESOURCE, { key: 'read', name: 'Read' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resource-attributes.spec.ts b/src/tests/unit/api/resource-attributes.spec.ts new file mode 100644 index 00000000..dfb6ae5a --- /dev/null +++ b/src/tests/unit/api/resource-attributes.spec.ts @@ -0,0 +1,149 @@ +import { PermitApiError } from '#src/api/base'; +import { + type ResourceAttributeCreate, + type ResourceAttributeUpdate, +} from '#src/api/resource-attributes'; +import { Permit } from '#src/index'; +import { AttributeType } from '#src/openapi/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// attributes URL is nested under `/v2/schema/{proj}/{env}/resources/{resourceKey}/attributes`. +const PROJ = 'proj'; +const ENV = 'env'; +const RESOURCE = 'document'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/resources/${RESOURCE}/attributes`; + +describe('ResourceAttributesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the resource-scoped attributes collection with default pagination', async () => { + const response = [{ key: 'item-1', id: 'item-id-1' }]; + rest.resolveWith(response); + + const result = await permit.api.resourceAttributes.list({ resourceKey: RESOURCE }); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.resourceAttributes.list({ resourceKey: RESOURCE, page: 4, perPage: 25 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '4', per_page: '25' }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single attribute with the resource key and attribute key in the path', async () => { + const response = { key: 'owner' }; + rest.resolveWith(response); + + const result = await permit.api.resourceAttributes.get(RESOURCE, 'owner'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/owner`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'owner' }; + rest.resolveWith(response); + + const result = await permit.api.resourceAttributes.getByKey(RESOURCE, 'owner'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/owner`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'attr-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceAttributes.getById(RESOURCE, 'attr-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/attr-1`); + }); + }); + + describe('create', () => { + const payload: ResourceAttributeCreate = { key: 'owner', type: AttributeType.String }; + + it('POSTs the attribute body to the resource-scoped collection', async () => { + const response = { ...payload, id: 'attr-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceAttributes.create(RESOURCE, payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the attribute body to the keyed path', async () => { + const body: ResourceAttributeUpdate = { type: AttributeType.Number }; + const response = { key: 'owner', type: 'number' }; + rest.resolveWith(response); + + const result = await permit.api.resourceAttributes.update(RESOURCE, 'owner', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/owner`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.resourceAttributes.delete(RESOURCE, 'owner'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/owner`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceAttributes + .get(RESOURCE, 'missing') + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resourceAttributes + .create(RESOURCE, { key: 'owner', type: AttributeType.String }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resource-instances.spec.ts b/src/tests/unit/api/resource-instances.spec.ts new file mode 100644 index 00000000..f2420645 --- /dev/null +++ b/src/tests/unit/api/resource-instances.spec.ts @@ -0,0 +1,211 @@ +import { PermitApiError } from '#src/api/base'; +import { + type ResourceInstanceCreate, + type ResourceInstanceUpdate, +} from '#src/api/resource-instances'; +import { Permit } from '#src/index'; +import { + createMockPermit, + MOCK_API_ORIGIN, + MOCK_PDP_ORIGIN, + type MockTransport, +} from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// resource-instance URL is scoped under `/v2/facts/{proj}/{env}/resource_instances`. +// Resource instances is a facts module, hence the `/v2/facts` prefix. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/facts/${PROJ}/${ENV}/resource_instances`; + +describe('ResourceInstancesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection without injecting pagination defaults', async () => { + const response = [{ key: 'inst-1', resource: 'document' }]; + rest.resolveWith(response); + + const result = await permit.api.resourceInstances.list(); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // list() forwards only the params it is given, so page/per_page and the + // tenant/resource filters are absent when the caller omits them. + expect(rest.last?.params).not.toHaveProperty('page'); + expect(rest.last?.params).not.toHaveProperty('tenant'); + expect(rest.last?.params).not.toHaveProperty('resource'); + }); + + it('forwards the tenant and resource filters plus pagination as wire params', async () => { + rest.resolveWith([]); + + await permit.api.resourceInstances.list({ + tenant: 't1', + resource: 'document', + page: 2, + perPage: 5, + }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + tenant: 't1', + resource: 'document', + page: '2', + per_page: '5', + }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single resource instance with the key in the path', async () => { + const response = { key: 'inst-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceInstances.get('inst-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/inst-1`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'inst-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceInstances.getByKey('inst-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/inst-1`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'instance-id' }; + rest.resolveWith(response); + + const result = await permit.api.resourceInstances.getById('instance-id'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/instance-id`); + }); + }); + + describe('create', () => { + const payload: ResourceInstanceCreate = { + key: 'inst-1', + resource: 'document', + tenant: 't1', + attributes: { private: true }, + }; + + it('POSTs the resource-instance body to the collection', async () => { + const response = { ...payload, id: 'inst-id-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceInstances.create(payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the resource-instance body to the keyed path', async () => { + const body: ResourceInstanceUpdate = { attributes: { private: false } }; + const response = { key: 'inst-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceInstances.update('inst-1', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/inst-1`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.resourceInstances.delete('inst-1'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/inst-1`); + }); + }); + + describe('waitForSync', () => { + it('returns the same instance and dispatches to the REST host when proxy is off', async () => { + const instances = permit.api.resourceInstances; + + expect(instances.waitForSync(10)).toBe(instances); + + rest.resolveWith([]); + await instances.list(); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.path).toBe(COLLECTION); + }); + + it('returns a distinct clone that dispatches to the PDP host when proxy is on', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const instances = proxied.permit.api.resourceInstances; + + const synced = instances.waitForSync(10); + expect(synced).not.toBe(instances); + + proxied.rest.resolveWith([]); + await synced.list(); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + }); + }); + + describe('proxyFactsViaPdp', () => { + it('routes the request through the PDP host while still using the rest transport', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const response = [{ key: 'inst-1', resource: 'document' }]; + proxied.rest.resolveWith(response); + + const result = await proxied.permit.api.resourceInstances.list(); + + expect(result).toEqual(response); + expect(proxied.rest.last?.method).toBe('GET'); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceInstances.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resourceInstances + .create({ key: 'inst-1', resource: 'document', tenant: 'default' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resource-relations.spec.ts b/src/tests/unit/api/resource-relations.spec.ts new file mode 100644 index 00000000..fade71b9 --- /dev/null +++ b/src/tests/unit/api/resource-relations.spec.ts @@ -0,0 +1,139 @@ +import { PermitApiError } from '#src/api/base'; +import { type RelationCreate } from '#src/api/resource-relations'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// relations URL is scoped under the resource passed to each call. +const PROJ = 'proj'; +const ENV = 'env'; +const RESOURCE = 'folder'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/resources/${RESOURCE}/relations`; + +describe('ResourceRelationsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the resource-scoped relations collection with default pagination', async () => { + const response = [{ key: 'item-1', id: 'item-id-1' }]; + rest.resolveWith({ data: response, total_count: 1, page_count: 1 }); + + const result = await permit.api.resourceRelations.list({ resourceKey: RESOURCE }); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // The SDK defaults page/perPage, so they are always serialized as strings. + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith({ data: [], total_count: 0, page_count: 0 }); + + const result = await permit.api.resourceRelations.list({ + resourceKey: RESOURCE, + page: 3, + perPage: 25, + }); + + expect(result).toEqual([]); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '3', per_page: '25' }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single relation with resource and relation keys in the path', async () => { + const response = { key: 'parent' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRelations.get(RESOURCE, 'parent'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/parent`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'parent' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRelations.getByKey(RESOURCE, 'parent'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/parent`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'rel-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRelations.getById(RESOURCE, 'rel-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/rel-1`); + }); + }); + + describe('create', () => { + const payload: RelationCreate = { + key: 'parent', + name: 'Parent', + subject_resource: 'account', + }; + + it('POSTs the relation body with the resource key in the path', async () => { + const response = { ...payload, id: 'rel-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRelations.create(RESOURCE, payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed relation path', async () => { + rest.resolveWith({}); + + await permit.api.resourceRelations.delete(RESOURCE, 'parent'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/parent`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceRelations.get(RESOURCE, 'missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resourceRelations + .create(RESOURCE, { key: 'parent', name: 'Parent', subject_resource: 'account' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resource-roles.spec.ts b/src/tests/unit/api/resource-roles.spec.ts new file mode 100644 index 00000000..1600b414 --- /dev/null +++ b/src/tests/unit/api/resource-roles.spec.ts @@ -0,0 +1,306 @@ +import { PermitApiError } from '#src/api/base'; +import { type ResourceRoleCreate, type ResourceRoleUpdate } from '#src/api/resource-roles'; +import { Permit } from '#src/index'; +import { + type DerivedRoleRuleCreate, + type DerivedRoleRuleDelete, + type PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings, +} from '#src/openapi/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// resource-role URL is scoped under +// `/v2/schema/{proj}/{env}/resources/{resourceKey}/roles`. +const PROJ = 'proj'; +const ENV = 'env'; +const RESOURCE = 'doc'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/resources/${RESOURCE}/roles`; + +describe('ResourceRolesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the resource-scoped collection with default pagination', async () => { + const response = [{ key: 'editor', id: 'role-1' }]; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.list({ resourceKey: RESOURCE }); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + }); + + it('forwards page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.resourceRoles.list({ resourceKey: RESOURCE, page: 2, perPage: 10 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '2', per_page: '10' }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single resource role with both keys in the path', async () => { + const response = { key: 'editor' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.get(RESOURCE, 'editor'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/editor`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'editor' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.getByKey(RESOURCE, 'editor'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/editor`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'role-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.getById(RESOURCE, 'role-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/role-1`); + }); + }); + + describe('create', () => { + const payload: ResourceRoleCreate = { + key: 'editor', + name: 'Editor', + permissions: ['read', 'write'], + }; + + it('POSTs the role body to the resource-scoped collection', async () => { + const response = { ...payload, id: 'role-1' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.create(RESOURCE, payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the role body to the keyed path', async () => { + const body: ResourceRoleUpdate = { name: 'Renamed' }; + const response = { key: 'editor', name: 'Renamed' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.update(RESOURCE, 'editor', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/editor`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.resourceRoles.delete(RESOURCE, 'editor'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/editor`); + }); + }); + + describe('assignPermissions', () => { + it('POSTs the permissions body to the role permissions path', async () => { + const permissions = ['doc:read', 'doc:write']; + const response = { key: 'editor' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.assignPermissions( + RESOURCE, + 'editor', + permissions, + ); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(`${COLLECTION}/editor/permissions`); + expect(rest.last?.data).toEqual({ permissions }); + }); + }); + + describe('removePermissions', () => { + it('DELETEs the permissions body from the role permissions path', async () => { + const permissions = ['doc:write']; + const response = { key: 'editor' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.removePermissions( + RESOURCE, + 'editor', + permissions, + ); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/editor/permissions`); + expect(rest.last?.data).toEqual({ permissions }); + }); + }); + + // The role-derivation methods delegate to a different generated client + // (`ImplicitGrantsApi`), which builds an `.../roles/{roleKey}/implicit_grants` + // path under the same project/environment scope. + describe('role derivation (implicit grants)', () => { + const DERIVATION = `${COLLECTION}/editor/implicit_grants`; + + describe('createRoleDerivation', () => { + const rule: DerivedRoleRuleCreate = { + role: 'viewer', + on_resource: 'folder', + linked_by_relation: 'parent', + }; + + it('POSTs the derivation rule to the role implicit-grants path', async () => { + const response = { ...rule, role_id: 'role-2', resource_id: 'res-2' }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.createRoleDerivation( + RESOURCE, + 'editor', + rule, + ); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(DERIVATION); + expect(rest.last?.data).toEqual(rule); + }); + + it('maps a 404 to PermitApiError', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceRoles + .createRoleDerivation(RESOURCE, 'editor', rule) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resourceRoles + .createRoleDerivation(RESOURCE, 'editor', rule) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); + + describe('deleteRoleDerivation', () => { + const rule: DerivedRoleRuleDelete = { + role: 'viewer', + on_resource: 'folder', + linked_by_relation: 'parent', + }; + + it('DELETEs the derivation rule from the role implicit-grants path', async () => { + rest.resolveWith({}); + + await permit.api.resourceRoles.deleteRoleDerivation(RESOURCE, 'editor', rule); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(DERIVATION); + expect(rest.last?.data).toEqual(rule); + }); + + it('maps a 404 to PermitApiError', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceRoles + .deleteRoleDerivation(RESOURCE, 'editor', rule) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + }); + + describe('updateRoleDerivationConditions', () => { + const conditions: PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings = { + no_direct_roles_on_object: true, + }; + + it('PUTs the conditions to the implicit-grants conditions path', async () => { + const response = { no_direct_roles_on_object: false }; + rest.resolveWith(response); + + const result = await permit.api.resourceRoles.updateRoleDerivationConditions( + RESOURCE, + 'editor', + conditions, + ); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PUT'); + expect(rest.last?.path).toBe(`${DERIVATION}/conditions`); + expect(rest.last?.data).toEqual(conditions); + }); + + it('maps a 404 to PermitApiError', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceRoles + .updateRoleDerivationConditions(RESOURCE, 'editor', conditions) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resourceRoles.get(RESOURCE, 'missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resourceRoles + .create(RESOURCE, { key: 'editor', name: 'Editor' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/resources.spec.ts b/src/tests/unit/api/resources.spec.ts new file mode 100644 index 00000000..a34574cc --- /dev/null +++ b/src/tests/unit/api/resources.spec.ts @@ -0,0 +1,183 @@ +import { PermitApiError } from '#src/api/base'; +import { type ResourceCreate, type ResourceReplace, type ResourceUpdate } from '#src/api/resources'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// resources URL is scoped under `/v2/schema/{proj}/{env}/resources`. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/resources`; + +describe('ResourcesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection with default pagination', async () => { + const resources = [{ key: 'doc', id: 'res-1' }]; + rest.resolveWith(resources); + + const result = await permit.api.resources.list(); + + expect(result).toEqual(resources); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // page/per_page are serialized into the URL query string (values are strings). + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + // includeTotalCount is omitted when not requested. + expect(rest.last?.params).not.toHaveProperty('include_total_count'); + }); + + it('forwards page, perPage and includeTotalCount as wire params', async () => { + const page = { data: [{ key: 'doc', id: 'res-1' }], total_count: 1, page_count: 1 }; + rest.resolveWith(page); + + const result = await permit.api.resources.list({ + page: 2, + perPage: 5, + includeTotalCount: true, + }); + + // With includeTotalCount the paginated envelope is returned as is. + expect(result).toEqual(page); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + page: '2', + per_page: '5', + include_total_count: 'true', + }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single resource with the key in the path', async () => { + const resource = { key: 'doc', id: 'res-1' }; + rest.resolveWith(resource); + + const result = await permit.api.resources.get('doc'); + + expect(result).toEqual(resource); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/doc`); + }); + + it('getByKey is an alias for get', async () => { + const resource = { key: 'doc', id: 'res-1' }; + rest.resolveWith(resource); + + const result = await permit.api.resources.getByKey('doc'); + + expect(result).toEqual(resource); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/doc`); + }); + + it('getById is an alias for get', async () => { + const resource = { key: 'doc', id: 'res-1' }; + rest.resolveWith(resource); + + const result = await permit.api.resources.getById('res-1'); + + expect(result).toEqual(resource); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/res-1`); + }); + + it('percent-encodes a key that is not URL-safe', async () => { + rest.resolveWith({ key: 'folder/doc #1' }); + + await permit.api.resources.get('folder/doc #1'); + + expect(rest.last?.path).toBe(`${COLLECTION}/folder%2Fdoc%20%231`); + }); + }); + + describe('create', () => { + const payload: ResourceCreate = { + key: 'doc', + name: 'Document', + actions: { read: {}, write: {} }, + }; + + it('POSTs the resource body to the collection', async () => { + const created = { ...payload, id: 'res-1' }; + rest.resolveWith(created); + + const result = await permit.api.resources.create(payload); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the resource body to the keyed path', async () => { + const body: ResourceUpdate = { name: 'Renamed' }; + const updated = { key: 'doc', name: 'Renamed' }; + rest.resolveWith(updated); + + const result = await permit.api.resources.update('doc', body); + + expect(result).toEqual(updated); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/doc`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('replace', () => { + it('PUTs the resource body to the keyed path', async () => { + const body: ResourceReplace = { name: 'Replaced', actions: { read: {} } }; + const replaced = { key: 'doc', name: 'Replaced' }; + rest.resolveWith(replaced); + + const result = await permit.api.resources.replace('doc', body); + + expect(result).toEqual(replaced); + expect(rest.last?.method).toBe('PUT'); + expect(rest.last?.path).toBe(`${COLLECTION}/doc`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.resources.delete('doc'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/doc`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.resources.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.resources + .create({ key: 'doc', name: 'Document', actions: { read: {} } }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/role-assignments.spec.ts b/src/tests/unit/api/role-assignments.spec.ts new file mode 100644 index 00000000..ede6d9d9 --- /dev/null +++ b/src/tests/unit/api/role-assignments.spec.ts @@ -0,0 +1,252 @@ +import { PermitApiError } from '#src/api/base'; +import { type RoleAssignmentCreate, type RoleAssignmentRemove } from '#src/api/role-assignments'; +import { Permit } from '#src/index'; +import { + createMockPermit, + MOCK_API_ORIGIN, + MOCK_PDP_ORIGIN, + type MockTransport, +} from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// role-assignments URL is scoped under `/v2/facts/{proj}/{env}/role_assignments`. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/facts/${PROJ}/${ENV}/role_assignments`; +const BULK = `${COLLECTION}/bulk`; + +describe('RoleAssignmentsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection with default pagination', async () => { + const response = [{ user: 'user-1', role: 'admin', tenant: 'acme', id: 'ra-1' }]; + rest.resolveWith(response); + + const result = await permit.api.roleAssignments.list({}); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // page/per_page are always sent (SDK defaults 1/100) and serialized as strings. + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + // Optional flags are omitted unless requested. + expect(rest.last?.params).not.toHaveProperty('include_total_count'); + expect(rest.last?.params).not.toHaveProperty('detailed'); + }); + + it('forwards user/role/tenant/resourceInstance filters as snake_case wire params', async () => { + rest.resolveWith([]); + + await permit.api.roleAssignments.list({ + user: 'user-1', + role: 'admin', + tenant: 'acme', + resourceInstance: 'document:readme', + }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + user: 'user-1', + role: 'admin', + tenant: 'acme', + resource_instance: 'document:readme', + }); + }); + + it('forwards page, perPage and includeTotalCount as wire params', async () => { + const response = { + data: [{ user: 'user-1', role: 'admin', tenant: 'acme', id: 'ra-1' }], + total_count: 1, + page_count: 1, + }; + rest.resolveWith(response); + + const result = await permit.api.roleAssignments.list({ + page: 2, + perPage: 5, + includeTotalCount: true, + }); + + // With includeTotalCount the paginated envelope is returned as is. + expect(result).toEqual(response); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + page: '2', + per_page: '5', + include_total_count: 'true', + }); + }); + + it('forwards the detailed flag as a wire param', async () => { + rest.resolveWith([]); + + await permit.api.roleAssignments.list({ detailed: true }); + + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ detailed: 'true' }); + }); + }); + + describe('assign', () => { + const payload: RoleAssignmentCreate = { + user: 'user-1', + role: 'admin', + tenant: 'acme', + }; + + it('POSTs the assignment body to the collection', async () => { + const response = { ...payload, id: 'ra-1' }; + rest.resolveWith(response); + + const result = await permit.api.roleAssignments.assign(payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('unassign', () => { + const payload: RoleAssignmentRemove = { + user: 'user-1', + role: 'admin', + tenant: 'acme', + }; + + it('DELETEs the collection with the unassignment body', async () => { + rest.resolveWith({}); + + await permit.api.roleAssignments.unassign(payload); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('bulkAssign', () => { + const payload: RoleAssignmentCreate[] = [ + { user: 'user-1', role: 'admin', tenant: 'acme' }, + { user: 'user-2', role: 'viewer', tenant: 'acme' }, + ]; + + it('POSTs the array of assignments to the bulk path', async () => { + const response = { assignments_created: 2 }; + rest.resolveWith(response); + + const result = await permit.api.roleAssignments.bulkAssign(payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(BULK); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('bulkUnassign', () => { + const payload: RoleAssignmentRemove[] = [ + { user: 'user-1', role: 'admin', tenant: 'acme' }, + { user: 'user-2', role: 'viewer', tenant: 'acme' }, + ]; + + it('DELETEs the array of unassignments at the bulk path', async () => { + const response = { assignments_removed: 2 }; + rest.resolveWith(response); + + const result = await permit.api.roleAssignments.bulkUnassign(payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(BULK); + expect(rest.last?.data).toEqual(payload); + }); + }); + + // wait-for-sync.spec.ts covers the header values through the users API; these check that + // the role-assignments API sends them too. + describe('waitForSync', () => { + const assignment = { user: 'user-1', role: 'admin', tenant: 'acme' }; + + it('sends X-Wait-Timeout to the PDP host from the returned client only', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + + proxied.rest.resolveWith(assignment); + await proxied.permit.api.roleAssignments.waitForSync(10).assign(assignment); + + // The proxied facts client still dispatches on the REST transport, but the + // absolute URL now targets the PDP host rather than the control-plane API. + expect(proxied.rest.last?.method).toBe('POST'); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + expect(proxied.rest.last?.headers.get('X-Wait-Timeout')).toBe('10'); + + proxied.rest.resolveWith(assignment); + await proxied.permit.api.roleAssignments.assign(assignment); + + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.headers.has('X-Wait-Timeout')).toBe(false); + }); + + it('is a no-op without proxyFactsViaPdp (returns self, no wait header)', async () => { + const synced = permit.api.roleAssignments.waitForSync(0); + rest.resolveWith(assignment); + await synced.assign(assignment); + + expect(synced).toBe(permit.api.roleAssignments); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.headers.has('X-Wait-Timeout')).toBe(false); + }); + }); + + describe('error mapping', () => { + it('maps a 404 on list to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.roleAssignments.list({}).catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 404 on unassign to PermitApiError', async () => { + rest.rejectWith(404, { message: 'assignment not found' }); + + const error = await permit.api.roleAssignments + .unassign({ user: 'user-1', role: 'admin', tenant: 'acme' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on assign to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already assigned' }); + + const error = await permit.api.roleAssignments + .assign({ user: 'user-1', role: 'admin', tenant: 'acme' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + + it('maps a 422 on bulkAssign to PermitApiError', async () => { + rest.rejectWith(422, { message: 'validation error' }); + + const error = await permit.api.roleAssignments + .bulkAssign([{ user: 'user-1', role: 'admin', tenant: 'acme' }]) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(422); + }); + }); +}); diff --git a/src/tests/unit/api/roles.spec.ts b/src/tests/unit/api/roles.spec.ts new file mode 100644 index 00000000..7137422e --- /dev/null +++ b/src/tests/unit/api/roles.spec.ts @@ -0,0 +1,184 @@ +import { PermitApiError } from '#src/api/base'; +import { type RoleCreate, type RoleUpdate } from '#src/api/roles'; +import { Permit } from '#src/index'; +import { createMockPermit, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// roles URL is scoped under `/v2/schema/{proj}/{env}/roles`. +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/schema/${PROJ}/${ENV}/roles`; + +describe('RolesApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection with default pagination', async () => { + const response = [{ key: 'admin', id: 'role-1' }]; + rest.resolveWith(response); + + const result = await permit.api.roles.list(); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ page: '1', per_page: '100' }); + expect(rest.last?.params).not.toHaveProperty('include_total_count'); + }); + + it('forwards page, perPage and includeTotalCount as wire params', async () => { + const response = { data: [{ key: 'admin', id: 'role-1' }], total_count: 1, page_count: 1 }; + rest.resolveWith(response); + + const result = await permit.api.roles.list({ page: 3, perPage: 25, includeTotalCount: true }); + + // With includeTotalCount the paginated envelope is returned as is. + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + page: '3', + per_page: '25', + include_total_count: 'true', + }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single role with the key in the path', async () => { + const response = { key: 'admin' }; + rest.resolveWith(response); + + const result = await permit.api.roles.get('admin'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/admin`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 'admin' }; + rest.resolveWith(response); + + const result = await permit.api.roles.getByKey('admin'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/admin`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'role-1' }; + rest.resolveWith(response); + + const result = await permit.api.roles.getById('role-1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/role-1`); + }); + }); + + describe('create', () => { + const payload: RoleCreate = { + key: 'admin', + name: 'Administrator', + permissions: ['doc:read', 'doc:write'], + }; + + it('POSTs the role body to the collection', async () => { + const response = { ...payload, id: 'role-1' }; + rest.resolveWith(response); + + const result = await permit.api.roles.create(payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the role body to the keyed path', async () => { + const body: RoleUpdate = { name: 'Renamed' }; + const response = { key: 'admin', name: 'Renamed' }; + rest.resolveWith(response); + + const result = await permit.api.roles.update('admin', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/admin`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.roles.delete('admin'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/admin`); + }); + }); + + describe('assignPermissions', () => { + it('POSTs the permissions body to the role permissions path', async () => { + const permissions = ['doc:read', 'doc:write']; + const response = { key: 'admin' }; + rest.resolveWith(response); + + const result = await permit.api.roles.assignPermissions('admin', permissions); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(`${COLLECTION}/admin/permissions`); + expect(rest.last?.data).toEqual({ permissions }); + }); + }); + + describe('removePermissions', () => { + it('DELETEs the permissions body from the role permissions path', async () => { + const permissions = ['doc:write']; + const response = { key: 'admin' }; + rest.resolveWith(response); + + const result = await permit.api.roles.removePermissions('admin', permissions); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/admin/permissions`); + expect(rest.last?.data).toEqual({ permissions }); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.roles.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.roles + .create({ key: 'admin', name: 'Administrator' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/tenants.spec.ts b/src/tests/unit/api/tenants.spec.ts new file mode 100644 index 00000000..287a34a6 --- /dev/null +++ b/src/tests/unit/api/tenants.spec.ts @@ -0,0 +1,346 @@ +import { PermitApiError } from '#src/api/base'; +import { type TenantCreate, type TenantUpdate } from '#src/api/tenants'; +import { Permit } from '#src/index'; +import { + createMockPermit, + MOCK_API_ORIGIN, + MOCK_PDP_ORIGIN, + type MockTransport, +} from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// tenants URL is scoped under `/v2/facts/{proj}/{env}/tenants`. Tenants is a +// facts module, hence the `/v2/facts` prefix (not `/v2/schema`). +const PROJ = 'proj'; +const ENV = 'env'; +const COLLECTION = `/v2/facts/${PROJ}/${ENV}/tenants`; + +describe('TenantsApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection without injecting pagination defaults', async () => { + const response = [{ key: 't1', id: 'tenant-1' }]; + rest.resolveWith(response); + + const result = await permit.api.tenants.list(); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + // Unlike resources, tenants.list() forwards only the params it is given, + // so page/per_page are absent when the caller omits them. + expect(rest.last?.params).not.toHaveProperty('page'); + expect(rest.last?.params).not.toHaveProperty('per_page'); + expect(rest.last?.params).not.toHaveProperty('include_total_count'); + }); + + it.each([true, false])('forwards explicit count=%s with immutable filters', async (count) => { + interface Attributes { + region: string | null; + } + const rows = [{ key: 'east', attributes: { region: null }, additive: { kept: true } }]; + const page = { data: rows, total_count: 17, page_count: 1, cursor: 'next-page' }; + const options = Object.freeze({ + includeTotalCount: count, + search: 'east &/é', + page: 2, + perPage: 5, + }); + const before = { ...options }; + rest.resolveWith(count ? page : rows); + + expect(await permit.api.tenants.list(options)).toEqual(count ? page : rows); + expect(options).toEqual(before); + expect(rest.requests).toHaveLength(1); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toEqual({ + search: 'east &/é', + include_total_count: String(count), + page: '2', + per_page: '5', + }); + }); + + it('preserves empty counted pages and optional metadata without invented values', async () => { + for (const page of [ + { data: [], total_count: 11, page_count: 0, additive: { kept: true } }, + { data: [], total_count: 0 }, + ]) { + rest.resolveWith(page); + expect(await permit.api.tenants.list({ includeTotalCount: true })).toEqual(page); + expect(rest.last?.params).toEqual({ include_total_count: 'true' }); + } + expect(rest.requests).toHaveLength(2); + }); + + it('keeps legacy flattening for omitted and false flags', async () => { + const rows = [{ key: 'east' }]; + for (const options of [undefined, { includeTotalCount: false }] as const) { + rest.resolveWith({ data: rows, total_count: 19, page_count: 1 }); + expect(await permit.api.tenants.list(options)).toEqual(rows); + expect(rest.last?.params).toEqual(options ? { include_total_count: 'false' } : {}); + } + expect(rest.requests).toHaveLength(2); + }); + + it('does not wrap unexpected counted responses or synthesize missing counts', async () => { + for (const body of [[{ key: 'east' }], { data: [], additive: 'retained' }]) { + rest.resolveWith(body); + expect(await permit.api.tenants.list({ includeTotalCount: true })).toEqual(body); + } + expect(rest.requests).toHaveLength(2); + }); + + it('captures one option snapshot for dispatch and result selection', async () => { + const options = { includeTotalCount: true, search: 'east', page: 2, perPage: 5 }; + const page = { data: [{ key: 'east' }], total_count: 11, page_count: 1 }; + rest.resolveWith(page); + const pending = permit.api.tenants.list(options); + options.includeTotalCount = false; + options.search = 'changed'; + options.page = 9; + expect(await pending).toEqual(page); + expect(rest.last?.params).toEqual({ + include_total_count: 'true', + search: 'east', + page: '2', + per_page: '5', + }); + expect(options).toEqual({ includeTotalCount: false, search: 'changed', page: 9, perPage: 5 }); + }); + + it('retains counted results on synchronization clones using facts proxy', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const page = { data: [{ key: 'east' }], total_count: 3, page_count: 1 }; + const original = proxied.permit.api.tenants; + const synced = original.waitForSync(10); + proxied.rest.resolveWith(page); + expect(await synced.list({ includeTotalCount: true })).toEqual(page); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + expect(proxied.rest.last?.params).toEqual({ include_total_count: 'true' }); + expect(synced).not.toBe(original); + expect(proxied.rest.requests).toHaveLength(1); + }); + + it('propagates counted-list errors without a partial page or retry', async () => { + rest.rejectWith(422, { detail: 'invalid pagination' }); + await expect( + permit.api.tenants.list({ includeTotalCount: true, page: 0 }), + ).rejects.toMatchObject({ name: 'PermitApiError', status: 422 }); + expect(rest.requests).toHaveLength(1); + expect(rest.last?.params).toEqual({ include_total_count: 'true', page: '0' }); + }); + + it('forwards search, page and perPage as wire params', async () => { + rest.resolveWith([]); + + await permit.api.tenants.list({ page: 2, perPage: 5, search: 'acme' }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.params).toMatchObject({ + page: '2', + per_page: '5', + search: 'acme', + }); + }); + }); + + describe('listTenantUsers', () => { + it('GETs the tenant users sub-collection with the tenant key in the path', async () => { + const response = { data: [{ key: 'u1', id: 'user-1' }], total_count: 1, page_count: 1 }; + rest.resolveWith(response); + + const result = await permit.api.tenants.listTenantUsers({ tenantKey: 't1' }); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1/users`); + expect(rest.last?.params).not.toHaveProperty('page'); + }); + + it('forwards pagination and the search/role filters as wire params', async () => { + rest.resolveWith({ data: [], total_count: 0, page_count: 0 }); + + await permit.api.tenants.listTenantUsers({ + tenantKey: 't1', + page: 3, + perPage: 10, + search: 'alice', + role: 'admin', + }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1/users`); + expect(rest.last?.params).toMatchObject({ + page: '3', + per_page: '10', + search: 'alice', + role: 'admin', + }); + }); + }); + + describe('get / getByKey / getById', () => { + it('GETs a single tenant with the key in the path', async () => { + const response = { key: 't1' }; + rest.resolveWith(response); + + const result = await permit.api.tenants.get('t1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1`); + }); + + it('getByKey is an alias for get', async () => { + const response = { key: 't1' }; + rest.resolveWith(response); + + const result = await permit.api.tenants.getByKey('t1'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1`); + }); + + it('getById is an alias for get', async () => { + const response = { key: 'tenant-id' }; + rest.resolveWith(response); + + const result = await permit.api.tenants.getById('tenant-id'); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${COLLECTION}/tenant-id`); + }); + }); + + describe('create', () => { + const payload: TenantCreate = { + key: 't1', + name: 'Acme', + attributes: { tier: 'gold' }, + }; + + it('POSTs the tenant body to the collection', async () => { + const response = { ...payload, id: 'tenant-1' }; + rest.resolveWith(response); + + const result = await permit.api.tenants.create(payload); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(COLLECTION); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the tenant body to the keyed path', async () => { + const body: TenantUpdate = { name: 'Renamed' }; + const response = { key: 't1', name: 'Renamed' }; + rest.resolveWith(response); + + const result = await permit.api.tenants.update('t1', body); + + expect(result).toEqual(response); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.tenants.delete('t1'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1`); + }); + }); + + describe('deleteTenantUser', () => { + it('DELETEs the user under the tenant with both keys in the path', async () => { + rest.resolveWith({}); + + await permit.api.tenants.deleteTenantUser('t1', 'u1'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${COLLECTION}/t1/users/u1`); + }); + }); + + describe('waitForSync', () => { + it('returns the same instance and dispatches to the REST host when proxy is off', async () => { + const tenants = permit.api.tenants; + + expect(tenants.waitForSync(10)).toBe(tenants); + + rest.resolveWith([]); + await tenants.list(); + expect(rest.last?.origin).toBe(MOCK_API_ORIGIN); + expect(rest.last?.path).toBe(COLLECTION); + }); + + it('returns a distinct clone that dispatches to the PDP host when proxy is on', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const tenants = proxied.permit.api.tenants; + + const synced = tenants.waitForSync(10); + expect(synced).not.toBe(tenants); + + proxied.rest.resolveWith([]); + await synced.list(); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + }); + }); + + describe('proxyFactsViaPdp', () => { + it('routes the request through the PDP host while still using the rest transport', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const response = [{ key: 't1', id: 'tenant-1' }]; + proxied.rest.resolveWith(response); + + const result = await proxied.permit.api.tenants.list(); + + expect(result).toEqual(response); + expect(proxied.rest.last?.method).toBe('GET'); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(COLLECTION); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.tenants.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.tenants + .create({ key: 't1', name: 'Acme' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/api/users.spec.ts b/src/tests/unit/api/users.spec.ts new file mode 100644 index 00000000..1fea2e97 --- /dev/null +++ b/src/tests/unit/api/users.spec.ts @@ -0,0 +1,438 @@ +import { PermitApiError } from '#src/api/base'; +import { + type RoleAssignmentCreate, + type RoleAssignmentRemove, + type UserCreate, + type UserUpdate, +} from '#src/api/users'; +import { Permit } from '#src/index'; +import { createMockPermit, MOCK_PDP_ORIGIN, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The mock seeds an environment-level context with these defaults, so every +// users URL is scoped under `/v2/facts/{proj}/{env}/users`. +const PROJ = 'proj'; +const ENV = 'env'; +const USERS = `/v2/facts/${PROJ}/${ENV}/users`; +const ROLE_ASSIGNMENTS = `/v2/facts/${PROJ}/${ENV}/role_assignments`; +const BULK_USERS = `/v2/facts/${PROJ}/${ENV}/bulk/users`; + +describe('UsersApi (unit)', () => { + let permit: Permit; + let rest: MockTransport; + + beforeEach(() => { + ({ permit, rest } = createMockPermit()); + }); + + describe('list', () => { + it('GETs the env-scoped collection without pagination params by default', async () => { + const response = { data: [{ key: 'bob', id: 'user-1' }], total_count: 1, page_count: 1 }; + rest.resolveWith(response); + + const result = await permit.api.users.list(); + + // users.list always returns the paginated envelope. + expect(result).toEqual(response); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(USERS); + // Unlike resources.list, users.list does not inject default page/per_page. + expect(rest.last?.params).not.toHaveProperty('page'); + expect(rest.last?.params).not.toHaveProperty('per_page'); + expect(rest.last?.params).not.toHaveProperty('search_operator'); + expect(rest.last?.params).not.toHaveProperty('include_resource_instance_roles'); + }); + + it('forwards search, role and pagination as wire params', async () => { + rest.resolveWith({ data: [], total_count: 0, page_count: 0 }); + + await permit.api.users.list({ search: 'bob', role: 'admin', page: 2, perPage: 5 }); + + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(USERS); + expect(rest.last?.params).toMatchObject({ + search: 'bob', + role: 'admin', + page: '2', + per_page: '5', + }); + }); + + it.each(['startswith', 'endswith', 'contains'] as const)( + 'preserves %s search and both resource-role flag values', + async (searchOperator) => { + for (const includeResourceInstanceRoles of [true, false]) { + rest.reset(); + const response = { + data: [ + { + key: 'bob &/é', + associated_tenants: [ + { + tenant: 'east', + roles: [], + status: 'active', + resource_instance_roles: includeResourceInstanceRoles + ? [{ resource: 'document', resource_instance: 'report', role: 'owner' }] + : [], + }, + ], + }, + ], + total_count: 9, + page_count: 1, + }; + rest.resolveWith(response); + const params = Object.freeze({ + search: 'bob &/é', + searchOperator, + role: '', + includeResourceInstanceRoles, + page: 2, + perPage: 5, + }); + const before = { ...params }; + + expect(await permit.api.users.list(params)).toEqual(response); + expect(params).toEqual(before); + expect(rest.requests).toHaveLength(1); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(USERS); + expect(rest.last?.params).toEqual({ + search: 'bob &/é', + search_operator: searchOperator, + role: '', + include_resource_instance_roles: String(includeResourceInstanceRoles), + page: '2', + per_page: '5', + }); + } + }, + ); + + it('propagates list filter validation errors through the public error', async () => { + rest.rejectWith(422, { detail: 'invalid filter' }); + await expect( + permit.api.users.list({ + searchOperator: 'contains', + includeResourceInstanceRoles: false, + }), + ).rejects.toMatchObject({ name: 'PermitApiError', status: 422 }); + expect(rest.requests).toHaveLength(1); + expect(rest.last?.params).toEqual({ + search_operator: 'contains', + include_resource_instance_roles: 'false', + }); + }); + }); + + describe('get / getByKey / getById', () => { + const user = { key: 'bob', id: 'user-1' }; + + it('GETs a single user with the key in the path', async () => { + rest.resolveWith(user); + + const result = await permit.api.users.get('bob'); + + expect(result).toEqual(user); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${USERS}/bob`); + }); + + it('getByKey is an alias for get', async () => { + rest.resolveWith(user); + + const result = await permit.api.users.getByKey('bob'); + + expect(result).toEqual(user); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${USERS}/bob`); + }); + + it('getById is an alias for get', async () => { + rest.resolveWith(user); + + const result = await permit.api.users.getById('user-1'); + + expect(result).toEqual(user); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(`${USERS}/user-1`); + }); + + it('percent-encodes an identity-provider user key in the path', async () => { + rest.resolveWith({ key: 'auth0|bob' }); + + await permit.api.users.get('auth0|bob'); + + expect(rest.last?.path).toBe(`${USERS}/auth0%7Cbob`); + }); + }); + + describe('create', () => { + const payload: UserCreate = { + key: 'bob', + email: 'bob@example.com', + first_name: 'Bob', + }; + + it('POSTs the user body to the collection', async () => { + const created = { ...payload, id: 'user-1' }; + rest.resolveWith(created, 201); + + const result = await permit.api.users.create(payload); + + expect(result).toEqual(created); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(USERS); + expect(rest.last?.data).toEqual(payload); + }); + }); + + describe('update', () => { + it('PATCHes the user body to the keyed path', async () => { + const body: UserUpdate = { first_name: 'Robert' }; + const updated = { key: 'bob', first_name: 'Robert' }; + rest.resolveWith(updated); + + const result = await permit.api.users.update('bob', body); + + expect(result).toEqual(updated); + expect(rest.last?.method).toBe('PATCH'); + expect(rest.last?.path).toBe(`${USERS}/bob`); + expect(rest.last?.data).toEqual(body); + }); + }); + + describe('sync', () => { + const payload: UserCreate = { key: 'bob', email: 'bob@example.com' }; + const synced = { ...payload, id: 'user-1' }; + + it('PUTs the user body to the keyed path', async () => { + rest.resolveWith(synced, 200); + + await permit.api.users.sync(payload); + + expect(rest.last?.method).toBe('PUT'); + expect(rest.last?.path).toBe(`${USERS}/bob`); + expect(rest.last?.data).toEqual(payload); + }); + + it('reports created=true when the API responds 201', async () => { + rest.resolveWith(synced, 201); + + const result = await permit.api.users.sync(payload); + + expect(result).toEqual({ user: synced, created: true }); + }); + + it('reports created=false when the API responds 200', async () => { + rest.resolveWith(synced, 200); + + const result = await permit.api.users.sync(payload); + + expect(result).toEqual({ user: synced, created: false }); + }); + }); + + describe('delete', () => { + it('DELETEs the keyed path', async () => { + rest.resolveWith({}); + + await permit.api.users.delete('bob'); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(`${USERS}/bob`); + }); + }); + + describe('assignRole / unassignRole', () => { + it('POSTs the assignment to the role_assignments path', async () => { + const assignment: RoleAssignmentCreate = { user: 'bob', role: 'admin', tenant: 'acme' }; + const assigned = { ...assignment, id: 'ra-1' }; + rest.resolveWith(assigned); + + const result = await permit.api.users.assignRole(assignment); + + expect(result).toEqual(assigned); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(ROLE_ASSIGNMENTS); + expect(rest.last?.data).toEqual(assignment); + }); + + it('DELETEs the removal from the role_assignments path', async () => { + const removal: RoleAssignmentRemove = { user: 'bob', role: 'admin', tenant: 'acme' }; + rest.resolveWith({}); + + await permit.api.users.unassignRole(removal); + + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(ROLE_ASSIGNMENTS); + expect(rest.last?.data).toEqual(removal); + }); + }); + + describe('getAssignedRoles', () => { + it('GETs role_assignments with default detailed/total-count/pagination flags', async () => { + const assignments = [{ user: 'bob', role: 'admin', tenant: 'acme', id: 'ra-1' }]; + rest.resolveWith(assignments); + + const result = await permit.api.users.getAssignedRoles({ user: 'bob' }); + + expect(result).toEqual(assignments); + expect(rest.last?.method).toBe('GET'); + expect(rest.last?.path).toBe(ROLE_ASSIGNMENTS); + expect(rest.last?.params).toMatchObject({ + user: 'bob', + detailed: 'false', + include_total_count: 'false', + page: '1', + per_page: '100', + }); + expect(rest.last?.params).not.toHaveProperty('tenant'); + }); + + it('forwards the tenant filter', async () => { + rest.resolveWith([]); + + await permit.api.users.getAssignedRoles({ user: 'bob', tenant: 'acme' }); + + expect(rest.last?.path).toBe(ROLE_ASSIGNMENTS); + expect(rest.last?.params).toMatchObject({ user: 'bob', tenant: 'acme' }); + }); + + it('forwards detailed=true', async () => { + rest.resolveWith([]); + + await permit.api.users.getAssignedRoles({ user: 'bob', detailed: true }); + + expect(rest.last?.path).toBe(ROLE_ASSIGNMENTS); + expect(rest.last?.params).toMatchObject({ user: 'bob', detailed: 'true' }); + }); + + it('forwards includeTotalCount and explicit pagination', async () => { + const page = { + data: [{ user: 'bob', role: 'admin', tenant: 'acme', id: 'ra-1' }], + total_count: 1, + page_count: 1, + }; + rest.resolveWith(page); + + const result = await permit.api.users.getAssignedRoles({ + user: 'bob', + includeTotalCount: true, + page: 3, + perPage: 20, + }); + + // With includeTotalCount the paginated envelope is returned as is. + expect(result).toEqual(page); + expect(rest.last?.path).toBe(ROLE_ASSIGNMENTS); + expect(rest.last?.params).toMatchObject({ + user: 'bob', + include_total_count: 'true', + page: '3', + per_page: '20', + }); + }); + }); + + describe('bulk operations', () => { + const users: UserCreate[] = [ + { key: 'bob', email: 'bob@example.com' }, + { key: 'alice', email: 'alice@example.com' }, + ]; + + it('POSTs bulkUserCreate with an operations envelope', async () => { + const operation = { operations: users, status: 'completed' }; + rest.resolveWith(operation); + + const result = await permit.api.users.bulkUserCreate(users); + + expect(result).toEqual(operation); + expect(rest.last?.method).toBe('POST'); + expect(rest.last?.path).toBe(BULK_USERS); + expect(rest.last?.data).toEqual({ operations: users }); + }); + + it('PUTs bulkUserReplace with an operations envelope', async () => { + const operation = { operations: users, status: 'completed' }; + rest.resolveWith(operation); + + const result = await permit.api.users.bulkUserReplace(users); + + expect(result).toEqual(operation); + expect(rest.last?.method).toBe('PUT'); + expect(rest.last?.path).toBe(BULK_USERS); + expect(rest.last?.data).toEqual({ operations: users }); + }); + + it('DELETEs bulkUserDelete with an idents envelope', async () => { + const operation = { idents: ['bob', 'alice'], status: 'completed' }; + rest.resolveWith(operation); + + const result = await permit.api.users.bulkUserDelete(['bob', 'alice']); + + expect(result).toEqual(operation); + expect(rest.last?.method).toBe('DELETE'); + expect(rest.last?.path).toBe(BULK_USERS); + expect(rest.last?.data).toEqual({ idents: ['bob', 'alice'] }); + }); + }); + + describe('waitForSync', () => { + it('returns the same instance and ignores the call when proxyFactsViaPdp is off', () => { + const synced = permit.api.users.waitForSync(10); + + expect(synced).toBe(permit.api.users); + }); + + it('returns a clone that dispatches to the PDP host when proxyFactsViaPdp is on', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + + const synced = proxied.permit.api.users.waitForSync(10); + expect(synced).not.toBe(proxied.permit.api.users); + + proxied.rest.resolveWith({ data: [], total_count: 0, page_count: 0 }); + await synced.list(); + + expect(proxied.rest.last?.method).toBe('GET'); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(USERS); + }); + }); + + describe('proxyFactsViaPdp', () => { + it('routes facts requests to the PDP base path, still on the rest transport', async () => { + const proxied = createMockPermit({ proxyFactsViaPdp: true }); + const user = { key: 'bob', id: 'user-1' }; + proxied.rest.resolveWith(user); + + const result = await proxied.permit.api.users.get('bob'); + + expect(result).toEqual(user); + expect(proxied.rest.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(proxied.rest.last?.path).toBe(`${USERS}/bob`); + }); + }); + + describe('error mapping', () => { + it('maps a 404 to PermitApiError carrying the upstream response', async () => { + rest.rejectWith(404, { message: 'not found' }); + + const error = await permit.api.users.get('missing').catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(404); + }); + + it('maps a 409 conflict on create to PermitApiError', async () => { + rest.rejectWith(409, { message: 'already exists' }); + + const error = await permit.api.users + .create({ key: 'bob', email: 'bob@example.com' }) + .catch((err) => err); + + expect(error).toBeInstanceOf(PermitApiError); + expect(error.response?.status).toBe(409); + }); + }); +}); diff --git a/src/tests/unit/ci-environment-keys.spec.ts b/src/tests/unit/ci-environment-keys.spec.ts new file mode 100644 index 00000000..680fcb7a --- /dev/null +++ b/src/tests/unit/ci-environment-keys.spec.ts @@ -0,0 +1,122 @@ +import { spawnSync } from 'child_process'; +import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'fs'; +import { tmpdir } from 'os'; +import { delimiter, join } from 'path'; + +import { expect, onTestFinished, test } from 'vitest'; + +const root = process.cwd(); +const workflow = readFileSync(join(root, '.github/workflows/ci.yaml'), 'utf8'); +const schema = JSON.parse( + readFileSync(join(root, 'src/tests/codegen/fixtures/openapi-3.1.0.json'), 'utf8'), +); +const keyPattern = new RegExp(schema.components.schemas.EnvironmentCreate.properties.key.pattern); + +function stepScript(name: string): string { + const step = workflow.split(` - name: ${name}\n`)[1]?.split('\n - name: ')[0]; + const script = step?.split(' run: |\n')[1]?.split(/\n [a-z][a-z0-9-]*:\n/)[0]; + if (!script) { + throw new Error(`Cannot find the run block for CI workflow step: ${name}`); + } + return script.replace(/^ {10}/gm, ''); +} + +function setting(name: string): string { + const value = workflow.match(new RegExp(`^ +${name}: (.+)$`, 'm'))?.[1]; + if (!value) { + throw new Error(`Cannot find CI workflow setting: ${name}`); + } + return value; +} + +function interpolate(value: string, context: Record): string { + return value.replace(/\$\{\{\s*([^}]+?)\s*\}\}/g, (_, expression: string) => { + const replacement = context[expression]; + if (replacement === undefined) { + throw new Error(`Missing workflow context value: ${expression}`); + } + return replacement; + }); +} + +test('CI provisions schema-valid environment keys and cleans up every matrix lane', () => { + const cwd = mkdtempSync(join(tmpdir(), 'permit-ci-env-')); + onTestFinished(() => rmSync(cwd, { recursive: true, force: true })); + const requests = join(cwd, 'requests.jsonl'); + writeFileSync( + join(cwd, 'curl'), + `#!/usr/bin/env node +const fs = require('fs'); +const args = process.argv.slice(2); +const method = args[args.indexOf('-X') + 1]; +const url = args.find(arg => arg.startsWith('https://')); +const body = method === 'POST' ? JSON.parse(args[args.indexOf('-d') + 1]) : undefined; +if (method !== 'POST' && method !== 'DELETE') throw new Error('Unexpected method: ' + method); +fs.appendFileSync(process.env.REQUESTS_FILE, JSON.stringify({ method, url, body }) + '\\n'); +process.stdout.write(method === 'POST' ? '{"id":"local-env-id"}\\n201' : '204'); +`, + { mode: 0o755 }, + ); + const env = { + ...process.env, + PATH: cwd + delimiter + process.env['PATH'], + PROJECT_ID: 'local-project', + PROJECT_API_KEY: 'local-token', + GITHUB_OUTPUT: join(cwd, 'outputs'), + REQUESTS_FILE: requests, + }; + const context = { 'github.run_id': '12345', 'github.run_attempt': '2' }; + const lanes = [...workflow.matchAll(/- node: '([^']+)'\n +node-version: '([^']+)'/g)]; + expect(lanes.length).toBeGreaterThan(0); + for (const [, label, version] of lanes) { + assert(label !== undefined && version !== undefined); + const result = spawnSync( + 'bash', + ['-euo', 'pipefail', '-c', stepScript('Provision temp Permit env')], + { + cwd, + env: { + ...env, + ENV_KEY: interpolate(setting('ENV_KEY'), { + ...context, + 'matrix.node': label, + 'matrix.node-version': version, + }), + }, + encoding: 'utf8', + }, + ); + expect(result.status, result.stderr).toBe(0); + } + const cleanup = spawnSync( + 'bash', + ['-euo', 'pipefail', '-c', stepScript('Delete temp Permit envs')], + { + cwd, + env: { + ...env, + NODE_LABELS: setting('NODE_LABELS'), + ENV_KEY_PREFIX: interpolate(setting('ENV_KEY_PREFIX'), context), + }, + encoding: 'utf8', + }, + ); + expect(cleanup.status, cleanup.stderr).toBe(0); + const calls: Array<{ method: string; url: string; body?: { key: string } }> = readFileSync( + requests, + 'utf8', + ) + .trim() + .split('\n') + .map((line) => JSON.parse(line)); + const created = calls.filter((call) => call.method === 'POST').map((call) => call.body?.key); + expect(created).toHaveLength(lanes.length); + expect(new Set(created).size).toBe(lanes.length); + for (const key of created) { + expect(key).toMatch(keyPattern); + } + const deleted = calls + .filter((call) => call.method === 'DELETE') + .map((call) => call.url.split('/').pop()); + expect(deleted.sort()).toStrictEqual(created.sort()); +}); diff --git a/src/tests/unit/config.spec.ts b/src/tests/unit/config.spec.ts new file mode 100644 index 00000000..d3edee7a --- /dev/null +++ b/src/tests/unit/config.spec.ts @@ -0,0 +1,173 @@ +import { ApiContext } from '#src/api/context'; +import { ConfigFactory } from '#src/config'; +import { Permit } from '#src/index'; + +const ENV_KEYS = [ + 'PERMIT_API_KEY', + 'PERMIT_PDP_URL', + 'PERMIT_API_URL', + 'PERMIT_LOG_LEVEL', + 'PERMIT_LOG_LABEL', + 'PERMIT_LOG_JSON', +] as const; + +describe('ConfigFactory (unit)', () => { + let saved: Record; + + beforeEach(() => { + // Snapshot then clear the env so each test starts from the bare defaults. + saved = {}; + for (const key of ENV_KEYS) { + saved[key] = process.env[key]; + delete process.env[key]; + } + process.env['PERMIT_API_KEY'] = 'unit-env-key'; + }); + + afterEach(() => { + for (const key of ENV_KEYS) { + const value = saved[key]; + if (value === undefined) { + delete process.env[key]; + } else { + process.env[key] = value; + } + } + }); + + describe('defaults', () => { + it('returns the documented defaults when no env vars are set', () => { + delete process.env['PERMIT_API_KEY']; + const config = ConfigFactory.defaults(); + + expect(config.token).toBe(''); + expect(config.pdp).toBe('http://localhost:7766'); + expect(config.apiUrl).toBe('https://api.permit.io'); + expect(config.log).toEqual({ level: 'warn', label: 'Permit.io', json: true }); + expect(config.multiTenancy).toEqual({ + defaultTenant: 'default', + useDefaultTenantIfEmpty: true, + }); + expect(config.timeout).toBeUndefined(); + expect(config.throwOnError).toBe(true); + expect(config.proxyFactsViaPdp).toBe(false); + expect(config.factsSyncTimeout).toBeNull(); + expect(config.factsSyncTimeoutPolicy).toBeNull(); + expect(config.apiContext).toBeInstanceOf(ApiContext); + expect(config.axiosInstance).toBeDefined(); + }); + + it('reads scalar overrides from the environment', () => { + process.env['PERMIT_API_KEY'] = 'env-key'; + process.env['PERMIT_PDP_URL'] = 'http://pdp.local:7000'; + process.env['PERMIT_API_URL'] = 'http://api.local:8000'; + process.env['PERMIT_LOG_LEVEL'] = 'debug'; + process.env['PERMIT_LOG_LABEL'] = 'MyLabel'; + + const config = ConfigFactory.defaults(); + + expect(config.token).toBe('env-key'); + expect(config.pdp).toBe('http://pdp.local:7000'); + expect(config.apiUrl).toBe('http://api.local:8000'); + expect(config.log.level).toBe('debug'); + expect(config.log.label).toBe('MyLabel'); + }); + }); + + describe('build', () => { + it('returns the defaults when given an empty partial', () => { + const config = ConfigFactory.build({}); + + expect(config.token).toBe('unit-env-key'); + expect(config.pdp).toBe('http://localhost:7766'); + expect(config.log).toEqual({ level: 'warn', label: 'Permit.io', json: true }); + }); + + it('overrides top-level fields while leaving the rest at their defaults', () => { + const config = ConfigFactory.build({ pdp: 'http://pdp:1234', proxyFactsViaPdp: true }); + + expect(config.pdp).toBe('http://pdp:1234'); + expect(config.proxyFactsViaPdp).toBe(true); + expect(config.apiUrl).toBe('https://api.permit.io'); + }); + + it('deep-merges a nested log partial without dropping sibling defaults', () => { + const config = ConfigFactory.build({ log: { level: 'debug' } }); + + expect(config.log.level).toBe('debug'); + // Siblings survive the merge (proves a deep merge, not a shallow replace). + expect(config.log.label).toBe('Permit.io'); + expect(config.log.json).toBe(true); + }); + + it('deep-merges a nested multiTenancy partial without dropping sibling defaults', () => { + const config = ConfigFactory.build({ multiTenancy: { defaultTenant: 'tenant-x' } }); + + expect(config.multiTenancy.defaultTenant).toBe('tenant-x'); + expect(config.multiTenancy.useDefaultTenantIfEmpty).toBe(true); + }); + + it('layers an explicit token over the env-derived default', () => { + process.env['PERMIT_API_KEY'] = 'env-key'; + + expect(ConfigFactory.build({}).token).toBe('env-key'); + expect(ConfigFactory.build({ token: 'explicit' }).token).toBe('explicit'); + }); + }); + + describe('PERMIT_LOG_JSON', () => { + function setLogJsonEnv(value: string | undefined): void { + if (value === undefined) { + delete process.env['PERMIT_LOG_JSON']; + } else { + process.env['PERMIT_LOG_JSON'] = value; + } + } + + function envLabel(value: string | undefined): string { + return value === undefined ? 'unset' : JSON.stringify(value); + } + + const envCases: [string | undefined, boolean][] = [ + [undefined, true], + ['true', true], + ['TRUE', true], + [' True ', true], + ['false', false], + ['False', false], + [' FALSE\n', false], + ['yes', true], + ['no', true], + ['', true], + ['0', true], + ['{', true], + ]; + for (const [value, expected] of envCases) { + it(`PER-16493: PERMIT_LOG_JSON=${envLabel(value)} gives log.json ${expected}`, () => { + setLogJsonEnv(value); + expect(ConfigFactory.build({}).log.json).toBe(expected); + }); + } + + const overrideCases: [string | undefined, boolean][] = [ + [undefined, false], + ['true', false], + ['false', true], + ['FALSE', true], + ['yes', false], + ['', true], + ]; + for (const [value, json] of overrideCases) { + it(`PER-16493: log.json ${json} overrides PERMIT_LOG_JSON=${envLabel(value)}`, () => { + setLogJsonEnv(value); + expect(ConfigFactory.build({ log: { json } }).log.json).toBe(json); + }); + } + + it('PER-16493: an unrecognized PERMIT_LOG_JSON does not break new Permit()', () => { + setLogJsonEnv('yes'); + const permit = new Permit({ token: 'test-token', log: { level: 'silent', json: false } }); + expect(permit.config.log.json).toBe(false); + }); + }); +}); diff --git a/src/tests/unit/enforcement/bulk-check-context.spec.ts b/src/tests/unit/enforcement/bulk-check-context.spec.ts new file mode 100644 index 00000000..848b5bfc --- /dev/null +++ b/src/tests/unit/enforcement/bulk-check-context.spec.ts @@ -0,0 +1,119 @@ +import pino from 'pino'; + +import { ConfigFactory } from '#src/config'; +import { Enforcer } from '#src/enforcement/enforcer'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; + +describe('bulkCheck context (unit)', () => { + it('PER-16492: bulk context uses check over method over global', async () => { + const pdp = await startPdp({ + status: 200, + body: { allow: [{ allow: true }, { allow: false }, { allow: true }] }, + }); + const enforcer = new Enforcer( + ConfigFactory.build({ token: TEST_TOKEN, pdp: pdp.url, retry: false }), + pino({ level: 'silent' }), + ); + const globalContext = Object.freeze({ + globalOnly: true, + shared: 'global', + methodWins: 'global', + }); + const methodContext = Object.freeze({ + methodOnly: true, + shared: 'method', + methodWins: 'method', + }); + const firstContext = Object.freeze({ shared: 'first', firstOnly: true }); + const secondContext = Object.freeze({ shared: 'second', secondOnly: true }); + enforcer.contextStore.add(globalContext); + + const first = { + user: 'user-1', + action: 'read', + resource: 'document:one', + context: firstContext, + }; + const second = { + user: 'user-1', + action: 'write', + resource: 'document:two', + context: secondContext, + }; + const third = { user: 'user-1', action: 'read', resource: 'document:three' }; + const checks = [first, second, third]; + const inputSnapshot = JSON.stringify({ checks, globalContext, methodContext }); + + expect(await enforcer.bulkCheck(checks, methodContext)).toStrictEqual([true, false, true]); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/bulk', + body: [ + { + user: { key: 'user-1' }, + action: 'read', + resource: { type: 'document', key: 'one', tenant: 'default' }, + context: { + globalOnly: true, + shared: 'first', + methodWins: 'method', + methodOnly: true, + firstOnly: true, + }, + }, + { + user: { key: 'user-1' }, + action: 'write', + resource: { type: 'document', key: 'two', tenant: 'default' }, + context: { + globalOnly: true, + shared: 'second', + methodWins: 'method', + methodOnly: true, + secondOnly: true, + }, + }, + { + user: { key: 'user-1' }, + action: 'read', + resource: { type: 'document', key: 'three', tenant: 'default' }, + context: { globalOnly: true, shared: 'method', methodWins: 'method', methodOnly: true }, + }, + ], + }); + expect(JSON.stringify({ checks, globalContext, methodContext })).toBe(inputSnapshot); + expect(enforcer.contextStore.getDerivedContext({})).toStrictEqual(globalContext); + }); + + it('PER-16492: bulk context overrides globals without method context', async () => { + const pdp = await startPdp({ status: 200, body: { allow: [{ allow: true }] } }); + const enforcer = new Enforcer( + ConfigFactory.build({ token: TEST_TOKEN, pdp: pdp.url, retry: false }), + pino({ level: 'silent' }), + ); + enforcer.contextStore.add({ shared: 'global', globalOnly: true, nested: { global: true } }); + + expect( + await enforcer.bulkCheck([ + { + user: 'user-1', + action: 'read', + resource: 'document:one', + context: { shared: 'check', nested: { check: true } }, + }, + ]), + ).toStrictEqual([true]); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/bulk', + body: [ + { + user: { key: 'user-1' }, + action: 'read', + resource: { type: 'document', key: 'one', tenant: 'default' }, + context: { shared: 'check', globalOnly: true, nested: { check: true } }, + }, + ], + }); + }); +}); diff --git a/src/tests/unit/enforcement/check-all-tenants.spec.ts b/src/tests/unit/enforcement/check-all-tenants.spec.ts new file mode 100644 index 00000000..f86108a8 --- /dev/null +++ b/src/tests/unit/enforcement/check-all-tenants.spec.ts @@ -0,0 +1,92 @@ +import pino from 'pino'; + +import { ConfigFactory } from '#src/config'; +import { Enforcer } from '#src/enforcement/enforcer'; +import { Permit } from '#src/index'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; + +describe('checkAllTenants (unit)', () => { + it('PER-15318: checkAllTenants sends string inputs and maps allowed_tenants', async () => { + const tenants = [ + { key: 'tenant-1', attributes: { region: 'west' } }, + { key: 'tenant-2', attributes: {} }, + ]; + const pdp = await startPdp({ + status: 200, + body: { allowed_tenants: tenants.map((tenant) => ({ allow: true, tenant })) }, + }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + retry: false, + log: { level: 'silent' }, + multiTenancy: { defaultTenant: 'must-not-be-added' }, + }); + + expect(await permit.checkAllTenants('user-1', 'read', 'document:one')).toStrictEqual(tenants); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/all-tenants', + sdk: 'node', + body: { + user: { key: 'user-1' }, + action: 'read', + resource: { type: 'document', key: 'one' }, + context: {}, + }, + }); + }); + + it('PER-15318: checkAllTenants preserves object inputs and maps an empty result', async () => { + const pdp = await startPdp({ status: 200, body: { allowed_tenants: [] } }); + const permit = new Permit({ + token: TEST_TOKEN, + pdp: pdp.url, + retry: false, + log: { level: 'silent' }, + }); + const user = { key: 'user-1', attributes: { department: 'engineering' } }; + const resource = { type: 'document', key: 'one', attributes: { classification: 'public' } }; + const context = { source: 'unit-test' }; + const snapshot = JSON.stringify({ user, resource, context }); + + expect( + await permit.checkAllTenants(user, 'read', resource, context, 'custom-sdk'), + ).toStrictEqual([]); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/all-tenants', + sdk: 'custom-sdk', + body: { user, action: 'read', resource, context }, + }); + expect(JSON.stringify({ user, resource, context })).toBe(snapshot); + }); + + it('PER-15318: checkAllTenants merges global context without adding a tenant', async () => { + const pdp = await startPdp({ status: 200, body: { allowed_tenants: [] } }); + const enforcer = new Enforcer( + ConfigFactory.build({ token: TEST_TOKEN, pdp: pdp.url }), + pino({ level: 'silent' }), + ); + const globalContext = { globalOnly: true, shared: 'global' }; + const context = { localOnly: true, shared: 'local' }; + enforcer.contextStore.add(globalContext); + + expect(await enforcer.checkAllTenants('user-1', 'read', 'document:one', context)).toStrictEqual( + [], + ); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed/all-tenants', + sdk: 'node', + body: { + user: { key: 'user-1' }, + action: 'read', + resource: { type: 'document', key: 'one' }, + context: { globalOnly: true, shared: 'local', localOnly: true }, + }, + }); + expect(context).toStrictEqual({ localOnly: true, shared: 'local' }); + expect(enforcer.contextStore.getDerivedContext({})).toStrictEqual(globalContext); + }); +}); diff --git a/src/tests/unit/enforcement/enforcer.spec.ts b/src/tests/unit/enforcement/enforcer.spec.ts new file mode 100644 index 00000000..02175fb5 --- /dev/null +++ b/src/tests/unit/enforcement/enforcer.spec.ts @@ -0,0 +1,302 @@ +import { type AxiosInstance, type AxiosResponse, type InternalAxiosRequestConfig } from 'axios'; + +import { type ICheckQuery } from '#src/enforcement/interfaces'; +import { Permit } from '#src/index'; +import { createMockPermit, MOCK_PDP_ORIGIN, type MockTransport } from '#src/tests/helpers/mock-api'; + +// The enforcer talks to two dedicated axios instances: the PDP client (captured +// by `pdp`) and the OPA client (captured by `opa`, used only when a check is +// made with `{ useOpa: true }`). Both default to the seeded pdp host +// (http://localhost:7766/, OPA rewritten to port 8181 + /v1/data/permit/). +// +// PDP error mapping, the throwOnError fallbacks, per-check bulk context and +// checkAllTenants are tested against a local HTTP PDP in pdp-errors.spec.ts, +// bulk-check-context.spec.ts and check-all-tenants.spec.ts. +describe('Enforcer (unit)', () => { + let permit: Permit; + let pdp: MockTransport; + let opa: MockTransport; + + beforeEach(() => { + ({ permit, pdp, opa } = createMockPermit()); + }); + + describe('check - request shaping', () => { + it('POSTs to `allowed` with the full {user,action,resource,context} input', async () => { + pdp.resolveWith({ allow: true }); + + const allowed = await permit.check( + { key: 'alice', email: 'alice@x.com' }, + 'read', + { type: 'doc', key: 'd1', tenant: 't1' }, + { region: 'eu' }, + ); + + expect(allowed).toBe(true); + expect(pdp.last?.method).toBe('POST'); + expect(pdp.last?.origin).toBe(MOCK_PDP_ORIGIN); + expect(pdp.last?.path).toBe('/allowed'); + expect(pdp.last?.data).toEqual({ + user: { key: 'alice', email: 'alice@x.com' }, + action: 'read', + resource: { type: 'doc', key: 'd1', tenant: 't1' }, + context: { region: 'eu' }, + }); + }); + + it('wraps a string user into { key }', async () => { + pdp.resolveWith({ allow: true }); + + await permit.check('alice', 'read', { type: 'doc', tenant: 't1' }); + + expect(pdp.last?.data).toHaveProperty('user', { key: 'alice' }); + }); + + it('parses a `type:key` resource string into { type, key }', async () => { + pdp.resolveWith({ allow: true }); + + await permit.check('alice', 'read', 'doc:123'); + + expect(pdp.last?.data).toHaveProperty('resource', { + type: 'doc', + key: '123', + tenant: 'default', + }); + }); + + it('parses a bare `type` resource string into { type } with no key', async () => { + pdp.resolveWith({ allow: true }); + + await permit.check('alice', 'read', 'doc'); + + // `key` is `undefined`, so JSON serialization drops it from the body. + expect(pdp.last?.data).toHaveProperty('resource', { type: 'doc', tenant: 'default' }); + expect(pdp.last?.data).not.toHaveProperty('resource.key'); + }); + + it('rejects resource strings with >2 colon parts without echoing input or dispatching', async () => { + pdp.resolveWith({ allow: true }); + + const error = await permit.check('alice', 'read', 'a:b:c').catch((err) => err); + + expect(error).toBeInstanceOf(Error); + expect(error.message).toBe('Invalid resource string: expected a resource type or type:key.'); + expect(error.message).not.toContain('a:b:c'); + expect(pdp.requests.length).toBe(0); + }); + }); + + describe('check - default tenant injection', () => { + it('injects the default tenant if none is set and useDefaultTenantIfEmpty is on', async () => { + pdp.resolveWith({ allow: true }); + + await permit.check('alice', 'read', { type: 'doc' }); + + expect(pdp.last?.data).toHaveProperty('resource', { type: 'doc', tenant: 'default' }); + }); + + it('keeps the resource tenant untouched when one is already set', async () => { + pdp.resolveWith({ allow: true }); + + await permit.check('alice', 'read', { type: 'doc', tenant: 'acme' }); + + expect(pdp.last?.data).toHaveProperty('resource.tenant', 'acme'); + }); + + it('does not inject a tenant when useDefaultTenantIfEmpty is off', async () => { + ({ permit, pdp } = createMockPermit({ useDefaultTenantIfEmpty: false })); + pdp.resolveWith({ allow: true }); + + await permit.check('alice', 'read', { type: 'doc' }); + + expect(pdp.last?.data).toHaveProperty('resource', { type: 'doc' }); + }); + }); + + describe('check - OPA path', () => { + it('POSTs to `root` on the OPA client with an { input } wrapper', async () => { + opa.resolveWith({ result: { allow: true } }); + + const allowed = await permit.check( + 'alice', + 'read', + { type: 'doc', tenant: 't1' }, + {}, + { useOpa: true }, + ); + + expect(allowed).toBe(true); + expect(opa.last?.method).toBe('POST'); + expect(opa.last?.origin).toBe('http://localhost:8181'); + expect(opa.last?.path).toBe('/v1/data/permit/root'); + expect(opa.last?.data).toEqual({ + input: { + user: { key: 'alice' }, + action: 'read', + resource: { type: 'doc', tenant: 't1' }, + context: {}, + }, + }); + // The OPA path must not touch the PDP client. + expect(pdp.requests.length).toBe(0); + }); + }); + + describe('check - response shaping', () => { + it('returns the boolean from a plain `{ allow }` PDP decision', async () => { + pdp.resolveWith({ allow: false }); + + expect(await permit.check('alice', 'read', 'doc')).toBe(false); + }); + + it('unwraps `{ result: { allow } }` from an OPA decision', async () => { + opa.resolveWith({ result: { allow: false } }); + + expect(await permit.check('alice', 'read', 'doc', {}, { useOpa: true })).toBe(false); + }); + }); + + describe('check - timeout passthrough', () => { + it.each([0, 1234])( + 'forwards per-call timeout %i to the PDP request config', + async (timeout) => { + const { client } = (permit as unknown as { enforcer: { client: AxiosInstance } }).enforcer; + let seenTimeout: number | undefined; + client.defaults.adapter = async ( + config: InternalAxiosRequestConfig, + ): Promise => { + seenTimeout = config.timeout; + return { data: { allow: true }, status: 200, statusText: 'OK', headers: {}, config }; + }; + + await permit.check('alice', 'read', 'doc', {}, { timeout }); + + expect(seenTimeout).toBe(timeout); + }, + ); + }); + + describe('bulkCheck', () => { + it('POSTs the mapped inputs to `allowed/bulk` and returns one boolean per check', async () => { + pdp.resolveWith({ allow: [{ allow: true }, { allow: false }] }); + const checks: ICheckQuery[] = [ + { user: 'u1', action: 'read', resource: 'doc' }, + { user: { key: 'u2' }, action: 'write', resource: { type: 'task', key: '1', tenant: 't' } }, + ]; + + const decisions = await permit.bulkCheck(checks, { region: 'eu' }); + + expect(decisions).toEqual([true, false]); + expect(pdp.last?.method).toBe('POST'); + expect(pdp.last?.path).toBe('/allowed/bulk'); + expect(pdp.last?.data).toEqual([ + { + user: { key: 'u1' }, + action: 'read', + resource: { type: 'doc', tenant: 'default' }, + context: { region: 'eu' }, + }, + { + user: { key: 'u2' }, + action: 'write', + resource: { type: 'task', key: '1', tenant: 't' }, + context: { region: 'eu' }, + }, + ]); + }); + + it('unwraps an OPA-shaped `{ result: { allow } }` bulk decision', async () => { + pdp.resolveWith({ result: { allow: [{ allow: true }, { allow: false }] } }); + + const decisions = await permit.bulkCheck([ + { user: 'u1', action: 'read', resource: 'doc' }, + { user: 'u2', action: 'read', resource: 'doc' }, + ]); + + expect(decisions).toEqual([true, false]); + }); + + it('returns an empty array for an empty check list', async () => { + pdp.resolveWith({ allow: [] }); + + expect(await permit.bulkCheck([])).toEqual([]); + }); + + it.each([0, 1234])( + 'forwards per-call timeout %i to the PDP request config', + async (timeout) => { + const { client } = (permit as unknown as { enforcer: { client: AxiosInstance } }).enforcer; + let seenTimeout: number | undefined; + client.defaults.adapter = async ( + config: InternalAxiosRequestConfig, + ): Promise => { + seenTimeout = config.timeout; + return { + data: { allow: [{ allow: true }] }, + status: 200, + statusText: 'OK', + headers: {}, + config, + }; + }; + + await permit.bulkCheck([{ user: 'u1', action: 'read', resource: 'doc' }], {}, { timeout }); + + expect(seenTimeout).toBe(timeout); + }, + ); + }); + + describe('getUserPermissions', () => { + it('POSTs permission filters and derived context to `user-permissions`', async () => { + pdp.resolveWith({ 'doc:1': { permissions: ['read'] } }); + + const permissions = await permit.getUserPermissions('bob', ['t1', 't2'], ['doc:1'], ['doc']); + + expect(permissions).toEqual({ 'doc:1': { permissions: ['read'] } }); + expect(pdp.last?.method).toBe('POST'); + expect(pdp.last?.path).toBe('/user-permissions'); + expect(pdp.last?.data).toEqual({ + user: { key: 'bob' }, + tenants: ['t1', 't2'], + resources: ['doc:1'], + resource_types: ['doc'], + context: {}, + }); + }); + + it('omits undefined filters and wraps a string user into { key }', async () => { + pdp.resolveWith({}); + + await permit.getUserPermissions('bob'); + + expect(pdp.last?.data).toEqual({ user: { key: 'bob' }, context: {} }); + }); + + it('unwraps an OPA-shaped `{ result: { permissions } }` response', async () => { + pdp.resolveWith({ result: { permissions: { 'doc:1': { permissions: ['read'] } } } }); + + const permissions = await permit.getUserPermissions('bob'); + + expect(permissions).toEqual({ 'doc:1': { permissions: ['read'] } }); + }); + + it.each([0, 1234])( + 'forwards per-call timeout %i to the PDP request config', + async (timeout) => { + const { client } = (permit as unknown as { enforcer: { client: AxiosInstance } }).enforcer; + let seenTimeout: number | undefined; + client.defaults.adapter = async ( + config: InternalAxiosRequestConfig, + ): Promise => { + seenTimeout = config.timeout; + return { data: {}, status: 200, statusText: 'OK', headers: {}, config }; + }; + + await permit.getUserPermissions('bob', undefined, undefined, undefined, { timeout }); + + expect(seenTimeout).toBe(timeout); + }, + ); + }); +}); diff --git a/src/tests/unit/enforcement/opa-base-url.spec.ts b/src/tests/unit/enforcement/opa-base-url.spec.ts new file mode 100644 index 00000000..c3e60017 --- /dev/null +++ b/src/tests/unit/enforcement/opa-base-url.spec.ts @@ -0,0 +1,125 @@ +import axios, { type AxiosInstance, type InternalAxiosRequestConfig } from 'axios'; +import pino from 'pino'; + +import { buildOpaBaseUrl } from '#src/enforcement/enforcer'; +import { Permit, PermitError } from '#src/index'; + +// The OPA client base URL is derived from the configured PDP URL by forcing the +// OPA port (8181) and appending the OPA data path. This was previously built +// with the `url-parse` package and is now built with the native WHATWG `URL` +// (#106). For absolute http(s) PDP URLs in canonical form the result matches what +// url-parse produced, and these assertions lock that string. WHATWG parsing also +// normalizes input that url-parse kept verbatim (dot segments, percent-encoding, +// IDN hosts); the dot-segment test below pins that intended difference. + +// A non-default scheme, port and path, so a constructor that ignores the configured +// PDP (or an OPA client that ignores the derived base URL) fails the tests below. +const CONFIGURED_PDP = 'https://pdp.example.com:1234/prefix/'; +const EXPECTED_OPA_CHECK_URL = 'https://pdp.example.com:8181/prefix/v1/data/permit/root'; + +// Reaches the private SDK OPA facade to inspect its URL construction. +interface PermitInternals { + enforcer: { opaClient: AxiosInstance }; +} + +// Records the URL axios would request and answers with an OPA allow decision, so the +// check runs end to end without a network call. +function captureRequestUrls(instance: AxiosInstance): string[] { + const urls: string[] = []; + instance.defaults.adapter = async (config: InternalAxiosRequestConfig) => { + urls.push(axios.getUri(config)); + return { status: 200, statusText: 'OK', headers: {}, config, data: { allow: true } }; + }; + return urls; +} + +function errorThrownBy(fn: () => unknown): unknown { + try { + fn(); + } catch (error) { + return error; + } + throw new Error('Expected the call to throw, but it returned normally'); +} + +describe('buildOpaBaseUrl', () => { + it('derives the OPA URL from the default PDP', () => { + expect(buildOpaBaseUrl('http://localhost:7766')).toBe('http://localhost:8181/v1/data/permit/'); + }); + + it('yields the same URL with or without a trailing slash', () => { + expect(buildOpaBaseUrl('http://localhost:7766/')).toBe('http://localhost:8181/v1/data/permit/'); + }); + + it('adds port 8181 to an https host without an explicit port', () => { + expect(buildOpaBaseUrl('https://pdp.example.com')).toBe( + 'https://pdp.example.com:8181/v1/data/permit/', + ); + }); + + it('overrides an existing port with 8181', () => { + expect(buildOpaBaseUrl('https://pdp.example.com:1234')).toBe( + 'https://pdp.example.com:8181/v1/data/permit/', + ); + }); + + it('preserves the existing concatenation behaviour for a path prefix', () => { + // Pre-existing url-parse quirk: a path with no trailing slash glues onto the data path. + expect(buildOpaBaseUrl('http://localhost:7766/prefix')).toBe( + 'http://localhost:8181/prefixv1/data/permit/', + ); + expect(buildOpaBaseUrl('http://localhost:7766/prefix/')).toBe( + 'http://localhost:8181/prefix/v1/data/permit/', + ); + }); + + it('resolves dot segments in the PDP path before the data path', () => { + // url-parse kept them verbatim and produced `/a/..v1/data/permit/`. + expect(buildOpaBaseUrl('https://pdp.example.com/a/..')).toBe( + 'https://pdp.example.com:8181/v1/data/permit/', + ); + }); + + it.each(['localhost', '//localhost:7766'])( + 'throws a PermitError naming the pdp option for %j (no scheme)', + (pdp) => { + // Bare hosts and `//host:port` throw at construction; `localhost:7766` is misparsed, + // not rejected. + const error = errorThrownBy(() => buildOpaBaseUrl(pdp)); + expect(error).toBeInstanceOf(PermitError); + expect((error as PermitError).message).toMatch(/"pdp" option.*absolute http\(s\) URL/); + }, + ); +}); + +describe('Permit with a configured PDP URL', () => { + it('does not expose credentials from an invalid PDP URL', () => { + const error = errorThrownBy( + () => new Permit({ token: 'test-token', pdp: 'http://pdp-user:pdp-secret@localhost:bad' }), + ); + expect(error).toBeInstanceOf(TypeError); + expect(error).toHaveProperty( + 'message', + expect.stringMatching(/Invalid pdp:.*absolute http\(s\) URL/), + ); + // Serialize the way the SDK's pino logger would, so enumerable error fields are covered too. + expect(JSON.stringify(pino.stdSerializers.err(error as Error))).not.toContain('pdp-secret'); + }); + + it('posts a useOpa check to the OPA root derived from the configured PDP', async () => { + const permit = new Permit({ token: 'test-token', pdp: CONFIGURED_PDP }); + const urls = captureRequestUrls((permit as unknown as PermitInternals).enforcer.opaClient); + + expect(await permit.check('user', 'read', 'document', {}, { useOpa: true })).toBe(true); + expect(urls).toEqual([EXPECTED_OPA_CHECK_URL]); + }); + + it('posts a useOpa check through an injected opaAxiosInstance to the OPA root', async () => { + const opaAxiosInstance = axios.create(); + const urls = captureRequestUrls(opaAxiosInstance); + const permit = new Permit({ token: 'test-token', pdp: CONFIGURED_PDP, opaAxiosInstance }); + + expect(await permit.check('user', 'read', 'document', {}, { useOpa: true })).toBe(true); + expect(urls).toEqual([EXPECTED_OPA_CHECK_URL]); + }); +}); diff --git a/src/tests/unit/enforcement/pdp-errors.spec.ts b/src/tests/unit/enforcement/pdp-errors.spec.ts new file mode 100644 index 00000000..03da7546 --- /dev/null +++ b/src/tests/unit/enforcement/pdp-errors.spec.ts @@ -0,0 +1,235 @@ +import { inspect } from 'node:util'; + +import { Permit, PermitConnectionError, PermitPDPStatusError } from '#src/index'; +import { type CheckConfig } from '#src/utils/context'; +import { assertPdpRequest, startPdp, TEST_TOKEN } from '#src/tests/helpers/pdp-test-server'; +import { rejectionOf } from '#src/tests/helpers/rejection'; + +const user = { + key: 'user-1', + email: 'private-user@example.test', + attributes: { privateNote: 'private-attribute-value' }, +}; +const input = { + user, + action: 'read', + resource: { type: 'document', key: 'one', tenant: 'default' }, + context: { source: 'unit-test' }, +}; + +const operations: { + name: string; + path: string; + body: unknown; + denied: unknown; + sdk?: string | undefined; + perCallErrors: boolean; + malformedBodies: unknown[]; + call: (permit: Permit, config?: CheckConfig) => Promise; +}[] = [ + { + name: 'check', + path: '/allowed', + body: input, + denied: false, + perCallErrors: true, + malformedBodies: [{}, 'not a PDP response'], + call: (permit, config) => permit.check(user, 'read', 'document:one', input.context, config), + }, + { + name: 'bulkCheck', + path: '/allowed/bulk', + body: [input, { ...input, action: 'write', resource: { ...input.resource, key: 'two' } }], + denied: [false, false], + perCallErrors: true, + malformedBodies: [{}, 'not a PDP response'], + call: (permit, config) => + permit.bulkCheck( + [ + { user, action: 'read', resource: 'document:one' }, + { user, action: 'write', resource: 'document:two' }, + ], + input.context, + config, + ), + }, + { + name: 'getUserPermissions', + path: '/user-permissions', + body: { + user, + tenants: ['tenant-1'], + resources: ['document:one'], + resource_types: ['document'], + context: {}, + }, + denied: {}, + perCallErrors: true, + // An empty object is a valid, empty permission map. + malformedBodies: ['not a PDP response', null], + call: (permit, config) => + permit.getUserPermissions(user, ['tenant-1'], ['document:one'], ['document'], config), + }, + { + name: 'checkAllTenants', + path: '/allowed/all-tenants', + body: { ...input, resource: { type: 'document', key: 'one' } }, + denied: [], + sdk: 'node', + perCallErrors: false, + malformedBodies: [{}, 'not a PDP response'], + call: (permit) => permit.checkAllTenants(user, 'read', 'document:one', input.context), + }, +]; + +interface Scenario { + name: string; + reply?: { status: number; body: unknown }; + message?: string; +} + +const statusMessage = 'got an unexpected status code:'; +const statusScenarios: Scenario[] = [ + { + name: '401', + reply: { status: 401, body: { detail: 'invalid test credentials' } }, + message: statusMessage, + }, + { + name: '500', + reply: { status: 500, body: { detail: 'test PDP failure' } }, + message: statusMessage, + }, + { + name: '201', + reply: { status: 201, body: { detail: 'unexpected success status' } }, + message: statusMessage, + }, + { name: '502', reply: { status: 502, body: 'upstream unavailable' }, message: statusMessage }, + { name: 'timeout' }, +]; + +function scenariosFor(operation: { malformedBodies: unknown[] }): Scenario[] { + const malformed = operation.malformedBodies.map((body) => ({ + name: `200 with body ${JSON.stringify(body)}`, + reply: { status: 200, body }, + message: 'got an unexpected response body from the PDP', + })); + return [...statusScenarios, ...malformed]; +} + +function assertSafeError(error: Error): void { + expect(inspect(error)).not.toContain(TEST_TOKEN); + expect(error.message).not.toContain(user.email); + expect(error.message).not.toContain('privateNote'); + expect(error.message).not.toContain(user.attributes.privateNote); +} + +describe('PDP error classification (unit)', () => { + for (const operation of operations) { + for (const scenario of scenariosFor(operation)) { + it(`PER-16494: ${operation.name} classifies ${scenario.name}`, async () => { + const reply = scenario.reply; + const pdp = await startPdp(reply); + const options = { + token: TEST_TOKEN, + pdp: pdp.url, + timeout: reply ? undefined : 500, + retry: false as const, + log: { level: 'silent' }, + }; + const permit = new Permit(options); + const error = await rejectionOf(operation.call(permit)); + assertSafeError(error); + if (reply) { + expect(error).toBeInstanceOf(PermitPDPStatusError); + expect(error).toBeInstanceOf(PermitConnectionError); + assert( + error instanceof PermitPDPStatusError, + 'Expected an HTTP status error with status and response body', + ); + expect(error.statusCode).toBe(reply.status); + expect(error.responseBody).toStrictEqual(reply.body); + const prefix = `Permit.${operation.name}() ${scenario.message}`; + expect(error.message.startsWith(prefix), error.message).toBe(true); + expect(error.message).toContain(String(reply.status)); + expect(error.message).not.toContain('cannot connect'); + } else { + expect(error).toBeInstanceOf(PermitConnectionError); + expect(error).not.toBeInstanceOf(PermitPDPStatusError); + assert( + error instanceof PermitConnectionError, + 'Expected a connection error for a transport timeout', + ); + expect(error.message).toContain('timeout of 500ms exceeded'); + expect(error.message).toContain(pdp.url); + expect('statusCode' in error).toBe(false); + expect('responseBody' in error).toBe(false); + } + + const failClosed = new Permit({ ...options, throwOnError: false }); + expect(await operation.call(failClosed)).toStrictEqual(operation.denied); + if (operation.perCallErrors) { + expect(await operation.call(permit, { throwOnError: false })).toStrictEqual( + operation.denied, + ); + const overridden = await rejectionOf(operation.call(failClosed, { throwOnError: true })); + assertSafeError(overridden); + expect(overridden).toBeInstanceOf(PermitConnectionError); + expect(overridden instanceof PermitPDPStatusError).toBe(reply !== undefined); + } + + expect(pdp.requests).toHaveLength(operation.perCallErrors ? 4 : 2); + for (const request of pdp.requests) { + assertPdpRequest(request, { + path: operation.path, + body: operation.body, + sdk: operation.sdk, + }); + } + }); + } + } + + const invalidResource = 'document:one:extra'; + const inputErrorOperations: { + name: string; + denied: unknown; + call: (permit: Permit) => Promise; + }[] = [ + { + name: 'check', + denied: false, + call: (permit) => permit.check('user-1', 'read', invalidResource), + }, + { + name: 'bulkCheck', + denied: [false], + call: (permit) => + permit.bulkCheck([{ user: 'user-1', action: 'read', resource: invalidResource }]), + }, + { + name: 'checkAllTenants', + denied: [], + call: (permit) => permit.checkAllTenants('user-1', 'read', invalidResource), + }, + ]; + + for (const operation of inputErrorOperations) { + it(`PER-16494: ${operation.name} applies throwOnError to an invalid resource`, async () => { + const pdp = await startPdp({ status: 200, body: {} }); + const options = { + token: TEST_TOKEN, + pdp: pdp.url, + retry: false as const, + log: { level: 'silent' }, + }; + const error = await rejectionOf(operation.call(new Permit(options))); + expect(error.message).toContain('expected a resource type or type:key'); + expect(error.message).not.toContain(invalidResource); + const failClosed = new Permit({ ...options, throwOnError: false }); + expect(await operation.call(failClosed)).toStrictEqual(operation.denied); + expect(pdp.requests).toHaveLength(0); + }); + } +}); diff --git a/src/tests/unit/fixtures.spec.ts b/src/tests/unit/fixtures.spec.ts new file mode 100644 index 00000000..c65c3e59 --- /dev/null +++ b/src/tests/unit/fixtures.spec.ts @@ -0,0 +1,115 @@ +import { AxiosError, AxiosHeaders } from 'axios'; +import pino from 'pino'; + +import { PermitApiError } from '#src/index'; +import { cleanUp, expectNotFound, handleApiError, ignoreNotFound } from '#src/tests/fixtures'; + +/** A REST error as the SDK raises it; no status means the request got no response. */ +function apiError(status?: number, data: unknown = { message: 'failed' }): PermitApiError { + const config = { + method: 'delete', + url: 'https://api.test/v2/facts/users/u1', + headers: new AxiosHeaders(), + }; + const response = + status === undefined ? undefined : { status, statusText: '', headers: {}, config, data }; + const axiosError = new AxiosError('socket hang up', undefined, config, undefined, response); + return new PermitApiError('failed', axiosError); +} + +const silentLogger = pino({ level: 'silent' }); + +describe('handleApiError', () => { + it('names the request and the reply, and keeps the API error as the cause', () => { + const error = apiError(422, { message: 'invalid key' }); + + const thrown = (() => { + try { + handleApiError(error, 'creating the environment', silentLogger); + } catch (caught) { + return caught; + } + })(); + + expect(thrown).toHaveProperty( + 'message', + 'creating the environment: DELETE https://api.test/v2/facts/users/u1 returned 422: ' + + '{"message":"invalid key"}', + ); + expect(thrown).toHaveProperty('cause', error); + }); + + it('says when the request got no response', () => { + expect(() => handleApiError(apiError(), 'listing', silentLogger)).toThrow( + 'listing: DELETE https://api.test/v2/facts/users/u1 got no response: socket hang up', + ); + }); +}); + +describe('ignoreNotFound', () => { + it('tolerates a 404', () => { + expect(ignoreNotFound(apiError(404))).toBeUndefined(); + }); + + it.each([ + ['a 403', apiError(403)], + ['a 500', apiError(500)], + ['a request without a response', apiError()], + ['a non-API error', new TypeError('boom')], + ])('rethrows %s', (_, error) => { + expect(() => ignoreNotFound(error)).toThrow(error); + }); +}); + +describe('cleanUp', () => { + it('runs every step and reports each failure other than a 404 at the end', async () => { + const forbidden = apiError(403); + const ran: string[] = []; + const step = (name: string, error?: unknown) => async () => { + ran.push(name); + if (error) { + throw error; + } + }; + + const failure = await cleanUp({ + 'user u1': step('user', forbidden), + 'tenant t1': step('tenant', apiError(404)), + 'role r1': step('role', new TypeError('boom')), + 'resource d1': step('resource'), + }).catch((error: unknown) => error); + + expect(ran).toEqual(['user', 'tenant', 'role', 'resource']); + expect(failure).toHaveProperty( + 'message', + 'cleanup failed: user u1 (HTTP 403: failed); role r1 (TypeError: boom)', + ); + expect(failure).toHaveProperty('cause', forbidden); + }); + + it('resolves when every step succeeds or finds nothing to delete', async () => { + await expect( + cleanUp({ + 'user u1': async () => undefined, + 'tenant t1': () => Promise.reject(apiError(404)), + }), + ).resolves.toBeUndefined(); + }); +}); + +describe('expectNotFound', () => { + it('resolves when the read fails with a 404', async () => { + await expect(expectNotFound(Promise.reject(apiError(404)), 'user u1')).resolves.toBeUndefined(); + }); + + it('rejects when the entity is still there', async () => { + await expect(expectNotFound(Promise.resolve({ key: 'u1' }), 'user u1')).rejects.toThrow( + 'user u1 still exists', + ); + }); + + it('rejects with the original error when the read fails otherwise', async () => { + const error = apiError(500); + await expect(expectNotFound(Promise.reject(error), 'user u1')).rejects.toBe(error); + }); +}); diff --git a/src/tests/unit/logger-http.spec.ts b/src/tests/unit/logger-http.spec.ts new file mode 100644 index 00000000..7927f569 --- /dev/null +++ b/src/tests/unit/logger-http.spec.ts @@ -0,0 +1,127 @@ +import { createServer, Socket } from 'node:net'; + +import { + assertLogs, + buildLoggerChild, + captureLogs, + type LoggerChild, + type LogMode, + type PdpOperation, +} from '#src/tests/helpers/logger-test-process'; +import { assertPdpRequest, startPdp } from '#src/tests/helpers/pdp-test-server'; + +interface FailingPdp { + url: string; + received: () => number; +} + +/** + * Starts a TCP listener for the current test that closes each connection without an HTTP reply. + * The listener closes when the test finishes. + */ +async function startResettingPdp(): Promise { + let connections = 0; + const server = createServer((socket: Socket) => { + connections++; + socket.destroy(); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve(); + }); + }); + onTestFinished( + () => + new Promise((resolve, reject) => { + server.close((error) => (error ? reject(error) : resolve())); + }), + ); + const address = server.address(); + if (address === null || typeof address === 'string') { + throw new Error('Expected the resetting PDP to listen on a TCP port'); + } + return { url: `http://127.0.0.1:${address.port}`, received: () => connections }; +} + +async function startFailingPdp(scenario: 401 | 500 | 'reset'): Promise { + if (scenario === 'reset') { + return startResettingPdp(); + } + const pdp = await startPdp({ status: scenario, body: { detail: 'test PDP failure' } }); + return { url: pdp.url, received: () => pdp.requests.length }; +} + +/** Asserts that the SDK logged the failure once, naming the method that failed. */ +function assertOneErrorRecord(stdout: string, operation: PdpOperation) { + const errorMessages = stdout + .trim() + .split('\n') + .map((line) => JSON.parse(line) as { level: number; msg: string }) + .filter((record) => record.level === 50) + .map((record) => record.msg); + expect(errorMessages, errorMessages.join('\n---\n')).toHaveLength(1); + for (const message of errorMessages) { + expect(message).toContain(`permit.${operation}(`); + } +} + +describe('SDK logging over HTTP (unit)', () => { + let child: LoggerChild; + + beforeAll(async () => { + child = await buildLoggerChild(); + return child.remove; + }); + + const modes: LogMode[] = ['json', 'env', 'pretty']; + for (const mode of modes) { + it(`PER-16493: ${mode} HTTP debug output keeps authorization out of logs`, async () => { + const pdp = await startPdp({ status: 200, body: { allow: true } }); + const output = await captureLogs(child, mode, pdp.url); + assertLogs(output, mode); + expect(output.stdout).toContain('Sending HTTP request: POST allowed'); + expect(output.stdout).toContain('Received HTTP response: POST allowed, status: 200'); + expect(pdp.requests).toHaveLength(1); + assertPdpRequest(pdp.requests[0], { + path: '/allowed', + body: { + user: { key: 'user-1' }, + action: 'read', + resource: { type: 'document', key: 'one', tenant: 'default' }, + context: {}, + }, + }); + }); + } + + const operations: PdpOperation[] = [ + 'check', + 'bulkCheck', + 'getUserPermissions', + 'checkAllTenants', + ]; + for (const mode of ['json', 'pretty'] as const) { + for (const operation of operations) { + for (const scenario of [401, 500, 'reset'] as const) { + for (const throwOnError of [true, false]) { + const title = `PER-16493: ${mode} ${operation} ${scenario} throw=${throwOnError}`; + it(title, async () => { + const pdp = await startFailingPdp(scenario); + const output = await captureLogs(child, mode, pdp.url, { + operation, + throwOnError, + failure: scenario === 'reset' ? 'transport' : 'status', + }); + assertLogs(output, mode, throwOnError); + expect(pdp.received()).toBe(1); + if (mode === 'json' && throwOnError) { + assertOneErrorRecord(output.stdout, operation); + } + }); + } + } + } + } +}); diff --git a/src/tests/unit/logger.spec.ts b/src/tests/unit/logger.spec.ts new file mode 100644 index 00000000..e29513ca --- /dev/null +++ b/src/tests/unit/logger.spec.ts @@ -0,0 +1,23 @@ +import { + assertLogs, + buildLoggerChild, + captureLogs, + type LoggerChild, + type LogMode, +} from '#src/tests/helpers/logger-test-process'; + +describe('LoggerFactory (unit)', () => { + let child: LoggerChild; + + beforeAll(async () => { + child = await buildLoggerChild(); + return child.remove; + }); + + const modes: LogMode[] = ['default', 'json', 'env', 'pretty', 'env-pretty']; + for (const mode of modes) { + it(`PER-16493: ${mode} logging creates 12 instances without warnings or leaks`, async () => { + assertLogs(await captureLogs(child, mode, undefined, { instances: 12 }), mode); + }); + } +}); diff --git a/src/tests/unit/release-workflow.spec.ts b/src/tests/unit/release-workflow.spec.ts index 3ddc1d67..bf2e1330 100644 --- a/src/tests/unit/release-workflow.spec.ts +++ b/src/tests/unit/release-workflow.spec.ts @@ -1,17 +1,19 @@ import { spawnSync } from 'child_process'; import { + copyFileSync, existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, + symlinkSync, writeFileSync, } from 'fs'; import { tmpdir } from 'os'; import { delimiter, join } from 'path'; -import test, { ExecutionContext } from 'ava'; +import { expect, onTestFinished, test } from 'vitest'; const root = process.cwd(); const workflow = readFileSync(join(root, '.github/workflows/node_sdk_publish.yaml'), 'utf8'); @@ -26,14 +28,28 @@ function stepScript(name: string): string { return script.replace(/^ {10}/gm, ''); } -const bumpScript = stepScript('Bump version at package.json'); +const bumpScript = 'node scripts/set-release-version.mjs'; const publishScript = stepScript('Publish package to NPM'); -function fixture(t: ExecutionContext) { +function fixture(version = manifest.version) { const cwd = mkdtempSync(join(tmpdir(), 'permit-release-')); - t.teardown(() => rmSync(cwd, { recursive: true, force: true })); + onTestFinished(() => rmSync(cwd, { recursive: true, force: true })); const bin = join(cwd, 'bin'); mkdirSync(bin); + mkdirSync(join(cwd, 'scripts')); + for (const file of [ + 'set-release-version.mjs', + 'check-release-gates.mjs', + 'check-release-tag.mjs', + 'package.json', + ]) { + copyFileSync(join(root, 'scripts', file), join(cwd, 'scripts', file)); + } + symlinkSync(join(root, 'node_modules'), join(cwd, 'node_modules'), 'dir'); + writeFileSync( + join(cwd, 'scripts/audit-dependencies.mjs'), + 'process.exitCode = Number(process.env.AUDIT_STATUS ?? 0);', + ); writeFileSync( join(bin, 'standard-version'), '#!/bin/bash\nset -euo pipefail\ntouch lifecycle-ran\nexit 73\n', @@ -41,24 +57,26 @@ function fixture(t: ExecutionContext) { ); const pkg = { ...manifest, + version, scripts: { ...manifest.scripts, + version: 'standard-version', preversion: 'standard-version', postversion: 'standard-version', }, }; writeFileSync(join(cwd, 'package.json'), JSON.stringify(pkg, null, 2) + '\n'); - const lockfile = readFileSync(join(root, 'yarn.lock'), 'utf8'); - writeFileSync(join(cwd, 'yarn.lock'), lockfile); + const lockfile = readFileSync(join(root, 'pnpm-lock.yaml'), 'utf8'); + writeFileSync(join(cwd, 'pnpm-lock.yaml'), lockfile); const env = { ...process.env, NODE_PATH: join(root, 'node_modules'), - PATH: bin + delimiter + process.env.PATH, + PATH: bin + delimiter + process.env['PATH'], npm_config_offline: 'true', npm_config_update_notifier: 'false', }; const git = spawnSync('git', ['init', '--quiet'], { cwd, env, encoding: 'utf8' }); - t.is(git.status, 0, git.stderr); + expect(git.status, git.stderr).toBe(0); const gitHead = readFileSync(join(cwd, '.git/HEAD'), 'utf8'); return { cwd, @@ -79,12 +97,12 @@ function fixture(t: ExecutionContext) { return JSON.parse(readFileSync(join(cwd, 'package.json'), 'utf8')); }, assertUnchangedState() { - t.false(existsSync(join(cwd, 'lifecycle-ran'))); - t.false(existsSync(join(cwd, 'package-lock.json'))); - t.is(readFileSync(join(cwd, 'yarn.lock'), 'utf8'), lockfile); - t.is(readFileSync(join(cwd, '.git/HEAD'), 'utf8'), gitHead); - t.deepEqual(readdirSync(join(cwd, '.git/refs/heads')), []); - t.deepEqual(readdirSync(join(cwd, '.git/refs/tags')), []); + expect(existsSync(join(cwd, 'lifecycle-ran'))).toBe(false); + expect(existsSync(join(cwd, 'package-lock.json'))).toBe(false); + expect(readFileSync(join(cwd, 'pnpm-lock.yaml'), 'utf8')).toBe(lockfile); + expect(readFileSync(join(cwd, '.git/HEAD'), 'utf8')).toBe(gitHead); + expect(readdirSync(join(cwd, '.git/refs/heads'))).toStrictEqual([]); + expect(readdirSync(join(cwd, '.git/refs/tags'))).toStrictEqual([]); }, }; } @@ -99,12 +117,15 @@ for (const [tag, version] of [ ['v2.7.7+build.1', '2.7.7'], ['2.7.7-rc.1+build.1', '2.7.7-rc.1'], ]) { - test(`release bump normalizes ${tag} and permits reruns`, (t) => { - const f = fixture(t); + test(`release bump normalizes ${tag} and permits reruns`, () => { + const f = fixture(version); for (let attempt = 0; attempt < 2; attempt++) { - const result = f.run(bumpScript, { RELEASE_TAG: tag }); - t.is(result.status, 0, result.stderr); - t.deepEqual(f.readPackage(), { ...f.pkg, version }); + const result = f.run(bumpScript, { + RELEASE_TAG: tag, + IS_PRERELEASE: String(version.includes('-')), + }); + expect(result.status, result.stderr).toBe(0); + expect(f.readPackage()).toStrictEqual({ ...f.pkg, version }); f.assertUnchangedState(); } }); @@ -127,55 +148,183 @@ for (const tag of [ 'v2.7.7$(touch${IFS}injected)', 'v2.7.7`touch${IFS}injected`', ]) { - test(`release bump rejects ${JSON.stringify(tag)} before changing the manifest`, (t) => { - const f = fixture(t); + test(`release bump rejects ${JSON.stringify(tag)} before changing the manifest`, () => { + const f = fixture(); const before = readFileSync(join(f.cwd, 'package.json'), 'utf8'); const result = f.run(bumpScript, { RELEASE_TAG: tag }); - t.is(result.status, 1, result.stderr); - t.regex(result.stderr, /not a valid semantic version/); - t.is(readFileSync(join(f.cwd, 'package.json'), 'utf8'), before); - t.false(existsSync(join(f.cwd, 'injected'))); + expect(result.status, result.stderr).toBe(1); + expect(result.stderr).toMatch(/not a valid semantic version/); + expect(readFileSync(join(f.cwd, 'package.json'), 'utf8')).toBe(before); + expect(existsSync(join(f.cwd, 'injected'))).toBe(false); f.assertUnchangedState(); }); } -test('release bump propagates npm failure', (t) => { - const f = fixture(t); +test('the legacy version command cannot replace a reviewed package version', () => { + const f = fixture(); + f.stubNpm('touch npm-ran\n'); + const before = readFileSync(join(f.cwd, 'package.json'), 'utf8'); + const result = f.run(bumpScript, { RELEASE_TAG: 'v9.9.9', IS_PRERELEASE: 'false' }); + expect(result.status).toBe(1); + expect(result.stderr).toContain('match the committed package version'); + expect(existsSync(join(f.cwd, 'npm-ran'))).toBe(false); + expect(readFileSync(join(f.cwd, 'package.json'), 'utf8')).toBe(before); + f.assertUnchangedState(); +}); + +test('the legacy version command cannot bypass prerelease consistency', () => { + const f = fixture(); + f.stubNpm('touch npm-ran\n'); + const result = f.run(bumpScript, { RELEASE_TAG: `v${manifest.version}`, IS_PRERELEASE: 'true' }); + expect(result.status).toBe(1); + expect(result.stderr).toContain('prerelease setting'); + expect(existsSync(join(f.cwd, 'npm-ran'))).toBe(false); + f.assertUnchangedState(); +}); + +test('release bump propagates npm failure', () => { + const f = fixture(); f.stubNpm('exit 42\n'); - const result = f.run(bumpScript, { RELEASE_TAG: 'v2.7.7' }); - t.is(result.status, 42, result.stderr); - t.deepEqual(f.readPackage(), f.pkg); + const result = f.run(bumpScript, { RELEASE_TAG: `v${manifest.version}`, IS_PRERELEASE: 'false' }); + expect(result.status, result.stderr).toBe(42); + expect(f.readPackage()).toStrictEqual(f.pkg); }); -test('release bump catches an npm success that leaves the wrong version', (t) => { - const f = fixture(t); - f.stubNpm('exit 0\n'); - const result = f.run(bumpScript, { RELEASE_TAG: 'v2.7.7' }); - t.is(result.status, 1, result.stderr); - t.regex(result.stderr, /Version mismatch/); +test('release bump catches an npm success that leaves the wrong version', () => { + const f = fixture(); + f.stubNpm( + `node <<'NODE' +const fs = require('fs'); +const p = require('./package.json'); +p.version = '0.0.0'; +fs.writeFileSync('package.json', JSON.stringify(p)); +NODE`, + ); + const result = f.run(bumpScript, { RELEASE_TAG: `v${manifest.version}`, IS_PRERELEASE: 'false' }); + expect(result.status, result.stderr).toBe(1); + expect(result.stderr).toMatch(/Version mismatch/); }); -test('release bump detects a corrupted version lifecycle script', (t) => { - const f = fixture(t); - f.pkg.scripts.version = '2.5.2'; - writeFileSync(join(f.cwd, 'package.json'), JSON.stringify(f.pkg)); - const result = f.run(bumpScript, { RELEASE_TAG: 'v2.7.7' }); - t.is(result.status, 1, result.stderr); - t.regex(result.stderr, /scripts.version was corrupted/); +test('release bump detects npm corruption of unrelated package metadata', () => { + const f = fixture(); + f.stubNpm( + `node <<'NODE' +const fs = require('fs'); +const p = require('./package.json'); +p.scripts.version = 'corrupted'; +fs.writeFileSync('package.json', JSON.stringify(p)); +NODE`, + ); + const result = f.run(bumpScript, { RELEASE_TAG: `v${manifest.version}`, IS_PRERELEASE: 'false' }); + expect(result.status, result.stderr).toBe(1); + expect(result.stderr).toMatch(/changed package metadata/); }); +for (const result of ['failure', 'cancelled', 'skipped']) { + test(`unsuccessful candidate ${result} makes publication unreachable`, () => { + const f = fixture(); + f.stubNpm('touch published\n'); + const checkedScript = 'node scripts/check-release-gates.mjs\n' + publishScript; + const run = f.run(checkedScript, { + IS_PRERELEASE: 'false', + GATE_STAGE: 'publication', + GATE_RESULTS: JSON.stringify({ + candidate: { result }, + 'publication-acceptance': { result: 'success' }, + }), + }); + expect(run.status).toBe(1); + expect(existsSync(join(f.cwd, 'published'))).toBe(false); + }); +} + for (const prerelease of ['true', 'false']) { for (const status of [0, 42]) { - test(`publish selects its dist-tag and propagates exit ${status} (${prerelease})`, (t) => { - const f = fixture(t); + test(`publish selects its dist-tag and propagates exit ${status} (${prerelease})`, () => { + const f = fixture(); f.stubNpm(`printf '%s\\n' "$@" > publish-args\nexit ${status}\n`); const result = f.run(publishScript, { IS_PRERELEASE: prerelease }); - t.is(result.status, status, result.stderr); - const args = ['publish', '--access', 'public']; + expect(result.status, result.stderr).toBe(status); + const args = [ + 'publish', + '.test-results/release-candidate/permitio.tgz', + '--ignore-scripts', + '--access', + 'public', + ]; if (prerelease === 'true') { args.push('--tag', 'rc'); } - t.deepEqual(readFileSync(join(f.cwd, 'publish-args'), 'utf8').trim().split('\n'), args); + expect(readFileSync(join(f.cwd, 'publish-args'), 'utf8').trim().split('\n')).toStrictEqual( + args, + ); }); } } + +test('invalid prerelease metadata cannot publish', () => { + const f = fixture(); + f.stubNpm('touch published\n'); + const result = f.run(publishScript, { IS_PRERELEASE: 'unknown' }); + expect(result.status).toBe(1); + expect(existsSync(join(f.cwd, 'published'))).toBe(false); +}); + +const ci = readFileSync(join(root, '.github/workflows/ci.yaml'), 'utf8'); +const cleanupBlock = ci + .split(' - name: Delete temp Permit envs\n')[1] + ?.split('\n required-checks:')[0] + ?.split(' run: |\n')[1]; +if (!cleanupBlock) throw new Error('Cannot find owned-environment cleanup script.'); +const cleanupScript = cleanupBlock.replace(/^ {10}/gm, ''); + +for (const [statuses, expected] of [ + [['200', '404'], 0], + [['500', '204'], 1], + [['404', '503'], 1], + [['network', '404'], 1], +] as const) { + test(`cleanup attempts both environments and reports ${statuses.join(', ')}`, () => { + const f = fixture(); + writeFileSync( + join(f.cwd, 'bin/curl'), + `#!/bin/bash +set -euo pipefail +count=0 +if [[ -f calls ]]; then count=$(cat calls); fi +count=$((count + 1)) +printf '%s' "$count" > calls +if [[ "$count" == "1" ]]; then status='${statuses[0]}'; else status='${statuses[1]}'; fi +if [[ "$status" == "network" ]]; then exit 42; fi +printf '%s' "$status" +`, + { mode: 0o755 }, + ); + const result = f.run(cleanupScript, { + NODE_LABELS: '22 24', + ENV_KEY_PREFIX: 'owned-fixture', + PROJECT_ID: 'fixture', + PROJECT_API_KEY: 'fixture', + }); + expect(result.status, result.stderr).toBe(expected); + expect(readFileSync(join(f.cwd, 'calls'), 'utf8')).toBe('2'); + if (expected === 1) expect(result.stderr).toContain('::error::Temp env owned-fixture-'); + }); +} + +test('required aggregates always evaluate missing or failed dependencies', () => { + const candidate = readFileSync(join(root, '.github/workflows/release-candidate.yaml'), 'utf8'); + for (const [source, job] of [ + [ci, 'required-checks'], + [candidate, 'candidate-ready'], + ] as const) { + const block = source.split(` ${job}:\n`)[1]; + expect(block).toContain(' if: always()'); + expect(block).toContain('GATE_RESULTS: ${{ toJSON(needs) }}'); + expect(block).toContain('node scripts/check-release-gates.mjs'); + } + expect(workflow).toContain('needs: [candidate, publication-acceptance]'); + expect(workflow).not.toContain('pnpm pack'); + expect(workflow).not.toContain('pnpm build'); + expect(workflow).not.toContain('pnpm install'); +}); diff --git a/src/tests/unit/retry-interceptor.spec.ts b/src/tests/unit/retry-interceptor.spec.ts deleted file mode 100644 index 5fd1e099..00000000 --- a/src/tests/unit/retry-interceptor.spec.ts +++ /dev/null @@ -1,233 +0,0 @@ -import test from 'ava'; -import { AxiosError, AxiosInstance, InternalAxiosRequestConfig } from 'axios'; - -// Reaches the private REST (config.axiosInstance) and PDP (enforcer.client) -// instances for the behavior tests below. -interface PermitInternals { - config: { axiosInstance: AxiosInstance }; - enforcer: { client: AxiosInstance }; -} - -// Tiny delays keep every retry near-instant and deterministic (no real waits). -const tiny = { maxRetries: 2, retryDelay: 1, maxDelay: 5, backoffMultiplier: 1 }; - -// Installs a custom adapter that counts invocations and always rejects with a -// synthetic AxiosError carrying the live request config, so axios-retry can -// re-dispatch the request and we can observe how many times it ran. -function installRejectingAdapter(instance: AxiosInstance, status = 503): { count: () => number } { - let calls = 0; - instance.defaults.adapter = (config: InternalAxiosRequestConfig): Promise => { - calls += 1; - const error = new Error('synthetic failure') as AxiosError; - error.isAxiosError = true; - error.config = config; - error.toJSON = () => ({}); - error.response = { - status, - statusText: 'Error', - headers: {}, - config, - data: {}, - }; - return Promise.reject(error); - }; - return { count: () => calls }; -} - -// Installs an adapter that rejects with a synthetic 503 for the first -// `failTimes` calls, then resolves with a success response, so we can prove a -// retry actually recovers. -function installRejectThenResolveAdapter( - instance: AxiosInstance, - failTimes: number, -): { count: () => number } { - let calls = 0; - instance.defaults.adapter = (config: InternalAxiosRequestConfig) => { - calls += 1; - if (calls <= failTimes) { - const error = new Error('synthetic failure') as AxiosError; - error.isAxiosError = true; - error.config = config; - error.toJSON = () => ({}); - error.response = { status: 503, statusText: 'Error', headers: {}, config, data: {} }; - return Promise.reject(error); - } - return Promise.resolve({ - status: 200, - statusText: 'OK', - headers: {}, - config, - data: { ok: true }, - }); - }; - return { count: () => calls }; -} - -async function newPermit(overrides: Record): Promise { - const { Permit } = await import('../../index'); - return new Permit({ token: 'test', ...overrides }) as unknown as PermitInternals; -} - -test('REST and PDP use separate axios instances', async (t) => { - const permit = await newPermit({ retry: { maxRetries: 1 }, pdpRetry: { maxRetries: 1 } }); - - t.not(permit.config.axiosInstance, permit.enforcer.client); -}); - -test('REST instance does not retry POST while PDP instance does', async (t) => { - const permit = await newPermit({ retry: tiny, pdpRetry: tiny }); - - const rest = installRejectingAdapter(permit.config.axiosInstance); - const pdp = installRejectingAdapter(permit.enforcer.client); - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'POST', url: '/x' })); - await t.throwsAsync(() => permit.enforcer.client.request({ method: 'POST', url: '/x' })); - - // REST never retries POST -> exactly one adapter call. - t.is(rest.count(), 1); - // PDP retries POST (maxRetries: 2) -> initial call + two retries = three. - t.is(pdp.count(), 3); -}); - -test('a retryable GET retries up to maxRetries then rejects', async (t) => { - const permit = await newPermit({ retry: tiny }); - const rest = installRejectingAdapter(permit.config.axiosInstance); - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'GET', url: '/x' })); - - // maxRetries: 2 -> initial call + two retries = three total. - t.is(rest.count(), 3); -}); - -test('a non-retryable status (400) is not retried', async (t) => { - const permit = await newPermit({ retry: tiny }); - const rest = installRejectingAdapter(permit.config.axiosInstance, 400); - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'GET', url: '/x' })); - - t.is(rest.count(), 1); -}); - -test('a disallowed method on the REST instance is not retried', async (t) => { - const permit = await newPermit({ retry: tiny }); - const rest = installRejectingAdapter(permit.config.axiosInstance); - - // PUT is in DEFAULT_RETRY_METHODS but POST is not, so POST must not retry. - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'POST', url: '/x' })); - - t.is(rest.count(), 1); -}); - -test('disabled retry (retry: false) installs no retry', async (t) => { - const permit = await newPermit({ retry: false }); - const rest = installRejectingAdapter(permit.config.axiosInstance); - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'GET', url: '/x' })); - - t.is(rest.count(), 1); -}); - -test('REST instance never retries POST even when the user opts POST in', async (t) => { - // POST is stripped from the REST retryMethods regardless of user config, so - // non-idempotent REST writes are never repeated. - const permit = await newPermit({ retry: { ...tiny, retryMethods: ['GET', 'POST'] } }); - const rest = installRejectingAdapter(permit.config.axiosInstance); - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'POST', url: '/x' })); - - t.is(rest.count(), 1); -}); - -test.serial('maps axios-retry retryCount to our 0-based attempt number', async (t) => { - // axios-retry passes a 1-based retryCount; the interceptor must subtract one - // so the first retry uses attempt 0. With jitter removed, attempt 0 -> 30ms - // and attempt 1 (the off-by-one bug) -> 90ms. We capture the delay axios-retry - // schedules via setTimeout instead of measuring wall-clock time, so the check - // is deterministic and concurrency-safe. - const realRandom = Math.random; - const realSetTimeout = global.setTimeout; - const scheduledDelays: number[] = []; - Math.random = () => 0; // strip jitter - // Capture the delay, then fire immediately so the retry still proceeds. - global.setTimeout = ((fn: () => void, delay?: number): ReturnType => { - scheduledDelays.push(delay ?? 0); - return realSetTimeout(fn, 0); - }) as typeof setTimeout; - try { - const permit = await newPermit({ - retry: { maxRetries: 1, retryDelay: 30, backoffMultiplier: 3, maxDelay: 10000 }, - }); - installRejectingAdapter(permit.config.axiosInstance); - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'GET', url: '/x' })); - - t.true(scheduledDelays.includes(30), `expected a 30ms delay, got ${scheduledDelays.join(',')}`); - t.false(scheduledDelays.includes(90), 'attempt-1 (off-by-one) delay must not be used'); - } finally { - Math.random = realRandom; - global.setTimeout = realSetTimeout; - } -}); - -test('a retry recovers: GET succeeds after one failed attempt', async (t) => { - const permit = await newPermit({ - retry: { maxRetries: 2, retryDelay: 1, maxDelay: 5, backoffMultiplier: 1 }, - }); - const rest = installRejectThenResolveAdapter(permit.config.axiosInstance, 1); - - const response = await permit.config.axiosInstance.request({ method: 'GET', url: '/x' }); - - // Initial failure + one retry that succeeds. - t.is(rest.count(), 2); - t.is(response.status, 200); - t.deepEqual(response.data, { ok: true }); -}); - -test.serial('Retry-After header drives the retry delay end-to-end', async (t) => { - // 429 with `retry-after: 2` (seconds) must produce a 2000ms scheduled delay, - // which exceeds the 10ms backoff and is under maxDelay, proving Retry-After - // flows through calculateRetryDelay via our retryDelay callback. The - // Retry-After branch returns the exact value with no jitter, so we only need - // to capture the setTimeout delay (nothing is actually awaited). - const realSetTimeout = global.setTimeout; - const scheduledDelays: number[] = []; - global.setTimeout = ((fn: () => void, delay?: number): ReturnType => { - scheduledDelays.push(delay ?? 0); - return realSetTimeout(fn, 0); - }) as typeof setTimeout; - try { - const permit = await newPermit({ - retry: { maxRetries: 1, retryDelay: 10, maxDelay: 30000, backoffMultiplier: 1 }, - }); - - let calls = 0; - permit.config.axiosInstance.defaults.adapter = ( - config: InternalAxiosRequestConfig, - ): Promise => { - calls += 1; - const error = new Error('rate limited') as AxiosError; - error.isAxiosError = true; - error.config = config; - error.toJSON = () => ({}); - error.response = { - status: 429, - statusText: 'Too Many Requests', - headers: { 'retry-after': '2' }, - config, - data: {}, - }; - return Promise.reject(error); - }; - - await t.throwsAsync(() => permit.config.axiosInstance.request({ method: 'GET', url: '/x' })); - - // 429 is retryable and GET is allowed, so it retried once. - t.is(calls, 2); - t.true( - scheduledDelays.includes(2000), - `expected a 2000ms delay, got ${scheduledDelays.join(',')}`, - ); - } finally { - global.setTimeout = realSetTimeout; - } -}); diff --git a/src/tests/unit/retry.spec.ts b/src/tests/unit/retry.spec.ts index 4d13dcd1..bbafcb29 100644 --- a/src/tests/unit/retry.spec.ts +++ b/src/tests/unit/retry.spec.ts @@ -1,15 +1,14 @@ -import test from 'ava'; import { AxiosError, AxiosHeaders } from 'axios'; import { calculateRetryDelay, DEFAULT_RETRY_CONFIG, defaultRetryCondition, - IRetryConfig, + type IRetryConfig, parseRetryAfter, resolveRetryConfig, RETRYABLE_STATUS_CODES, -} from '../../utils/retry'; +} from '#src/utils/retry'; // Helper to create mock AxiosError function createAxiosError(status?: number): AxiosError { @@ -35,101 +34,102 @@ function createAxiosError(status?: number): AxiosError { // Tests for RETRYABLE_STATUS_CODES // ============================================ -test('RETRYABLE_STATUS_CODES contains expected status codes', (t) => { - t.deepEqual(RETRYABLE_STATUS_CODES, [408, 429, 500, 502, 503, 504]); +it('RETRYABLE_STATUS_CODES contains expected status codes', () => { + expect(RETRYABLE_STATUS_CODES).toEqual([408, 429, 500, 502, 503, 504]); }); // ============================================ // Tests for defaultRetryCondition // ============================================ -test('defaultRetryCondition returns true for network errors (no response)', (t) => { +it('defaultRetryCondition returns true for a transient network error', () => { const error = createAxiosError(); - t.true(defaultRetryCondition(error)); + error.code = 'ECONNRESET'; + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns true for 408 Request Timeout', (t) => { +it('defaultRetryCondition returns true for 408 Request Timeout', () => { const error = createAxiosError(408); - t.true(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns true for 429 Too Many Requests', (t) => { +it('defaultRetryCondition returns true for 429 Too Many Requests', () => { const error = createAxiosError(429); - t.true(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns true for 500 Internal Server Error', (t) => { +it('defaultRetryCondition returns true for 500 Internal Server Error', () => { const error = createAxiosError(500); - t.true(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns true for 502 Bad Gateway', (t) => { +it('defaultRetryCondition returns true for 502 Bad Gateway', () => { const error = createAxiosError(502); - t.true(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns true for 503 Service Unavailable', (t) => { +it('defaultRetryCondition returns true for 503 Service Unavailable', () => { const error = createAxiosError(503); - t.true(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns true for 504 Gateway Timeout', (t) => { +it('defaultRetryCondition returns true for 504 Gateway Timeout', () => { const error = createAxiosError(504); - t.true(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(true); }); -test('defaultRetryCondition returns false for 400 Bad Request', (t) => { +it('defaultRetryCondition returns false for 400 Bad Request', () => { const error = createAxiosError(400); - t.false(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(false); }); -test('defaultRetryCondition returns false for 401 Unauthorized', (t) => { +it('defaultRetryCondition returns false for 401 Unauthorized', () => { const error = createAxiosError(401); - t.false(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(false); }); -test('defaultRetryCondition returns false for 403 Forbidden', (t) => { +it('defaultRetryCondition returns false for 403 Forbidden', () => { const error = createAxiosError(403); - t.false(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(false); }); -test('defaultRetryCondition returns false for 404 Not Found', (t) => { +it('defaultRetryCondition returns false for 404 Not Found', () => { const error = createAxiosError(404); - t.false(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(false); }); -test('defaultRetryCondition returns false for 422 Unprocessable Entity', (t) => { +it('defaultRetryCondition returns false for 422 Unprocessable Entity', () => { const error = createAxiosError(422); - t.false(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(false); }); -test('defaultRetryCondition returns false for 200 OK', (t) => { +it('defaultRetryCondition returns false for 200 OK', () => { const error = createAxiosError(200); - t.false(defaultRetryCondition(error)); + expect(defaultRetryCondition(error)).toBe(false); }); // ============================================ // Tests for parseRetryAfter // ============================================ -test('parseRetryAfter parses integer seconds correctly', (t) => { - t.is(parseRetryAfter('5'), 5000); - t.is(parseRetryAfter('60'), 60000); - t.is(parseRetryAfter('0'), 0); - t.is(parseRetryAfter('120'), 120000); +it('parseRetryAfter parses integer seconds correctly', () => { + expect(parseRetryAfter('5')).toBe(5000); + expect(parseRetryAfter('60')).toBe(60000); + expect(parseRetryAfter('0')).toBe(0); + expect(parseRetryAfter('120')).toBe(120000); }); -test('parseRetryAfter returns null for invalid values', (t) => { - t.is(parseRetryAfter('invalid'), null); - t.is(parseRetryAfter(''), null); - t.is(parseRetryAfter('abc123'), null); +it('parseRetryAfter returns null for invalid values', () => { + expect(parseRetryAfter('invalid')).toBe(null); + expect(parseRetryAfter('')).toBe(null); + expect(parseRetryAfter('abc123')).toBe(null); }); -test('parseRetryAfter returns null for non digits-only delta-seconds', (t) => { - t.is(parseRetryAfter('5abc'), null); +it('parseRetryAfter returns null for non digits-only delta-seconds', () => { + expect(parseRetryAfter('5abc')).toBe(null); }); -test.serial('parseRetryAfter parses HTTP-date format', (t) => { +it('parseRetryAfter parses HTTP-date format', () => { const realNow = Date.now; try { const fixedNow = Date.UTC(2015, 9, 21, 7, 28, 0); // "Wed, 21 Oct 2015 07:28:00 GMT" @@ -137,20 +137,20 @@ test.serial('parseRetryAfter parses HTTP-date format', (t) => { // 10 seconds in the future relative to the stubbed clock const httpDate = new Date(fixedNow + 10000).toUTCString(); - t.is(parseRetryAfter(httpDate), 10000); + expect(parseRetryAfter(httpDate)).toBe(10000); } finally { Date.now = realNow; } }); -test.serial('parseRetryAfter returns 0 for past HTTP-date', (t) => { +it('parseRetryAfter returns 0 for past HTTP-date', () => { const realNow = Date.now; try { const fixedNow = Date.UTC(2015, 9, 21, 7, 28, 0); Date.now = () => fixedNow; const httpDate = new Date(fixedNow - 10000).toUTCString(); - t.is(parseRetryAfter(httpDate), 0); + expect(parseRetryAfter(httpDate)).toBe(0); } finally { Date.now = realNow; } @@ -160,23 +160,26 @@ test.serial('parseRetryAfter returns 0 for past HTTP-date', (t) => { // Tests for calculateRetryDelay // ============================================ -test('calculateRetryDelay calculates exponential backoff correctly', (t) => { +it('calculateRetryDelay calculates exponential backoff correctly', () => { const config = { ...DEFAULT_RETRY_CONFIG, retryDelay: 1000, backoffMultiplier: 2 }; // First retry (attempt 0): 1000 * 2^0 = 1000ms + jitter const delay0 = calculateRetryDelay(0, config); - t.true(delay0 >= 1000 && delay0 <= 1100); // 10% jitter max + expect(delay0).toBeGreaterThanOrEqual(1000); + expect(delay0).toBeLessThanOrEqual(1100); // 10% jitter max // Second retry (attempt 1): 1000 * 2^1 = 2000ms + jitter const delay1 = calculateRetryDelay(1, config); - t.true(delay1 >= 2000 && delay1 <= 2200); + expect(delay1).toBeGreaterThanOrEqual(2000); + expect(delay1).toBeLessThanOrEqual(2200); // Third retry (attempt 2): 1000 * 2^2 = 4000ms + jitter const delay2 = calculateRetryDelay(2, config); - t.true(delay2 >= 4000 && delay2 <= 4400); + expect(delay2).toBeGreaterThanOrEqual(4000); + expect(delay2).toBeLessThanOrEqual(4400); }); -test('calculateRetryDelay respects maxDelay limit', (t) => { +it('calculateRetryDelay respects maxDelay limit', () => { const config = { ...DEFAULT_RETRY_CONFIG, retryDelay: 1000, @@ -186,24 +189,24 @@ test('calculateRetryDelay respects maxDelay limit', (t) => { // Even with high multiplier, should cap at maxDelay const delay = calculateRetryDelay(5, config); - t.true(delay <= 5000); + expect(delay).toBe(5000); }); -test('calculateRetryDelay respects Retry-After header', (t) => { +it('calculateRetryDelay respects Retry-After header', () => { const config = { ...DEFAULT_RETRY_CONFIG, respectRetryAfter: true }; const delay = calculateRetryDelay(0, config, '3'); - t.is(delay, 3000); + expect(delay).toBe(3000); }); -test('calculateRetryDelay caps Retry-After at maxDelay', (t) => { +it('calculateRetryDelay caps Retry-After at maxDelay', () => { const config = { ...DEFAULT_RETRY_CONFIG, respectRetryAfter: true, maxDelay: 5000 }; const delay = calculateRetryDelay(0, config, '60'); - t.is(delay, 5000); + expect(delay).toBe(5000); }); -test('calculateRetryDelay ignores Retry-After when disabled', (t) => { +it('calculateRetryDelay ignores Retry-After when disabled', () => { const config = { ...DEFAULT_RETRY_CONFIG, respectRetryAfter: false, @@ -213,61 +216,62 @@ test('calculateRetryDelay ignores Retry-After when disabled', (t) => { const delay = calculateRetryDelay(0, config, '60'); // Should use exponential backoff, not Retry-After - t.true(delay >= 1000 && delay <= 1100); + expect(delay).toBeGreaterThanOrEqual(1000); + expect(delay).toBeLessThanOrEqual(1100); }); // ============================================ // Tests for resolveRetryConfig // ============================================ -test('resolveRetryConfig returns defaults when config is undefined', (t) => { +it('resolveRetryConfig returns defaults when config is undefined', () => { const resolved = resolveRetryConfig(undefined); - t.false(resolved.enabled); - t.is(resolved.maxRetries, 3); - t.is(resolved.retryDelay, 1000); - t.is(resolved.backoffMultiplier, 2); - t.is(resolved.maxDelay, 30000); - t.true(resolved.respectRetryAfter); - t.deepEqual(resolved.retryMethods, ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']); + expect(resolved.enabled).toBe(false); + expect(resolved.maxRetries).toBe(3); + expect(resolved.retryDelay).toBe(1000); + expect(resolved.backoffMultiplier).toBe(2); + expect(resolved.maxDelay).toBe(30000); + expect(resolved.respectRetryAfter).toBe(true); + expect(resolved.retryMethods).toEqual(['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']); }); -test('resolveRetryConfig opts in when a config object is provided', (t) => { +it('resolveRetryConfig opts in when a config object is provided', () => { const resolved = resolveRetryConfig({ maxRetries: 5 }); - t.true(resolved.enabled); + expect(resolved.enabled).toBe(true); }); -test('resolveRetryConfig normalizes retry methods to uppercase', (t) => { +it('resolveRetryConfig normalizes retry methods to uppercase', () => { const resolved = resolveRetryConfig({ retryMethods: ['get', 'post'] }); - t.deepEqual(resolved.retryMethods, ['GET', 'POST']); + expect(resolved.retryMethods).toEqual(['GET', 'POST']); }); -test('resolveRetryConfig returns a copy that does not mutate the default', (t) => { +it('resolveRetryConfig returns a copy that does not mutate the default', () => { const resolved = resolveRetryConfig(undefined); resolved.retryMethods.push('PATCH'); - t.deepEqual(DEFAULT_RETRY_CONFIG.retryMethods, ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']); + expect(DEFAULT_RETRY_CONFIG.retryMethods).toEqual(['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']); }); -test('DEFAULT_RETRY_CONFIG.retryMethods is frozen', (t) => { - t.true(Object.isFrozen(DEFAULT_RETRY_CONFIG.retryMethods)); +it('DEFAULT_RETRY_CONFIG.retryMethods is frozen', () => { + expect(Object.isFrozen(DEFAULT_RETRY_CONFIG.retryMethods)).toBe(true); }); -test('RETRYABLE_STATUS_CODES is frozen', (t) => { - t.true(Object.isFrozen(RETRYABLE_STATUS_CODES)); +it('RETRYABLE_STATUS_CODES is frozen', () => { + expect(Object.isFrozen(RETRYABLE_STATUS_CODES)).toBe(true); }); -test('resolveRetryConfig returns disabled config when false', (t) => { +it('resolveRetryConfig returns disabled config when false', () => { const resolved = resolveRetryConfig(false); - t.false(resolved.enabled); + expect(resolved.enabled).toBe(false); // Other defaults should still be present - t.is(resolved.maxRetries, 3); + expect(resolved.maxRetries).toBe(3); }); -test('resolveRetryConfig merges user config with defaults', (t) => { +it('resolveRetryConfig merges user config with defaults', () => { const userConfig: IRetryConfig = { maxRetries: 5, retryDelay: 500, @@ -275,14 +279,14 @@ test('resolveRetryConfig merges user config with defaults', (t) => { const resolved = resolveRetryConfig(userConfig); - t.true(resolved.enabled); - t.is(resolved.maxRetries, 5); // User value - t.is(resolved.retryDelay, 500); // User value - t.is(resolved.backoffMultiplier, 2); // Default - t.is(resolved.maxDelay, 30000); // Default + expect(resolved.enabled).toBe(true); + expect(resolved.maxRetries).toBe(5); // User value + expect(resolved.retryDelay).toBe(500); // User value + expect(resolved.backoffMultiplier).toBe(2); // Default + expect(resolved.maxDelay).toBe(30000); // Default }); -test('resolveRetryConfig allows custom retry condition', (t) => { +it('resolveRetryConfig allows custom retry condition', () => { const customCondition = () => false; const userConfig: IRetryConfig = { retryCondition: customCondition, @@ -290,20 +294,20 @@ test('resolveRetryConfig allows custom retry condition', (t) => { const resolved = resolveRetryConfig(userConfig); - t.is(resolved.retryCondition, customCondition); + expect(resolved.retryCondition).toBe(customCondition); }); -test('resolveRetryConfig allows custom retry methods', (t) => { +it('resolveRetryConfig allows custom retry methods', () => { const userConfig: IRetryConfig = { retryMethods: ['GET', 'POST'], }; const resolved = resolveRetryConfig(userConfig); - t.deepEqual(resolved.retryMethods, ['GET', 'POST']); + expect(resolved.retryMethods).toEqual(['GET', 'POST']); }); -test('resolveRetryConfig allows disabling via enabled: false', (t) => { +it('resolveRetryConfig allows disabling via enabled: false', () => { const userConfig: IRetryConfig = { enabled: false, maxRetries: 10, @@ -311,56 +315,56 @@ test('resolveRetryConfig allows disabling via enabled: false', (t) => { const resolved = resolveRetryConfig(userConfig); - t.false(resolved.enabled); - t.is(resolved.maxRetries, 10); + expect(resolved.enabled).toBe(false); + expect(resolved.maxRetries).toBe(10); }); // ============================================ // Tests for DEFAULT_RETRY_CONFIG // ============================================ -test('DEFAULT_RETRY_CONFIG has expected default values', (t) => { - t.false(DEFAULT_RETRY_CONFIG.enabled); - t.is(DEFAULT_RETRY_CONFIG.maxRetries, 3); - t.is(DEFAULT_RETRY_CONFIG.retryDelay, 1000); - t.is(DEFAULT_RETRY_CONFIG.backoffMultiplier, 2); - t.is(DEFAULT_RETRY_CONFIG.maxDelay, 30000); - t.true(DEFAULT_RETRY_CONFIG.respectRetryAfter); - t.deepEqual(DEFAULT_RETRY_CONFIG.retryMethods, ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']); - t.is(typeof DEFAULT_RETRY_CONFIG.retryCondition, 'function'); +it('DEFAULT_RETRY_CONFIG has expected default values', () => { + expect(DEFAULT_RETRY_CONFIG.enabled).toBe(false); + expect(DEFAULT_RETRY_CONFIG.maxRetries).toBe(3); + expect(DEFAULT_RETRY_CONFIG.retryDelay).toBe(1000); + expect(DEFAULT_RETRY_CONFIG.backoffMultiplier).toBe(2); + expect(DEFAULT_RETRY_CONFIG.maxDelay).toBe(30000); + expect(DEFAULT_RETRY_CONFIG.respectRetryAfter).toBe(true); + expect(DEFAULT_RETRY_CONFIG.retryMethods).toEqual(['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']); + expect(typeof DEFAULT_RETRY_CONFIG.retryCondition).toBe('function'); }); // ============================================ // Tests for exports from SDK // ============================================ -test('retry types are exported from SDK', async (t) => { - const sdk = await import('../../index'); +it('retry types are exported from SDK', async () => { + const sdk = await import('#src/index'); - t.truthy(sdk.RETRYABLE_STATUS_CODES); - t.deepEqual(sdk.RETRYABLE_STATUS_CODES, [408, 429, 500, 502, 503, 504]); + expect(sdk.RETRYABLE_STATUS_CODES).toBeTruthy(); + expect(sdk.RETRYABLE_STATUS_CODES).toEqual([408, 429, 500, 502, 503, 504]); }); -test('Permit accepts retry configuration', async (t) => { - const { Permit } = await import('../../index'); +it('Permit accepts retry configuration', async () => { + const { Permit } = await import('#src/index'); // With retry off (opt-in default) const permit1 = new Permit({ token: 'test' }); - t.truthy(permit1); + expect(permit1).toBeTruthy(); // With custom retry config const permit2 = new Permit({ token: 'test', retry: { maxRetries: 5 }, }); - t.truthy(permit2); + expect(permit2).toBeTruthy(); // With retry disabled const permit3 = new Permit({ token: 'test', retry: false, }); - t.truthy(permit3); + expect(permit3).toBeTruthy(); // With separate PDP retry config const permit4 = new Permit({ @@ -368,5 +372,5 @@ test('Permit accepts retry configuration', async (t) => { retry: { maxRetries: 3 }, pdpRetry: { maxRetries: 5 }, }); - t.truthy(permit4); + expect(permit4).toBeTruthy(); }); diff --git a/src/tests/unit/role-extends.spec.ts b/src/tests/unit/role-extends.spec.ts index b4d13ea5..06bae197 100644 --- a/src/tests/unit/role-extends.spec.ts +++ b/src/tests/unit/role-extends.spec.ts @@ -1,6 +1,6 @@ -import test from 'ava'; +import { expect, test } from 'vitest'; -import { Permit } from '../../index'; +import { Permit } from '#src/index'; type RoleCreate = Parameters[0]; type RoleRead = Awaited>; @@ -9,13 +9,12 @@ type ResourceRoleCreate = Parameters[1 type ResourceRoleRead = Awaited>; type ResourceRoleUpdate = Parameters[2]; -type IsExact = (() => T extends A ? 1 : 2) extends () => T extends B ? 1 : 2 - ? true - : false; +type IsExact = + (() => T extends A ? 1 : 2) extends () => T extends B ? 1 : 2 ? true : false; type Assert = T; type Inheritance = { extends?: Array }; -// yarn test:unit runs build:types before AVA. Pick preserves the optional modifier, and exact +// lint:types checks these contracts. Pick preserves the optional modifier, and exact // equality rejects any, null, non-array values, and a required property (even with undefined). export type RoleInheritanceContracts = [ Assert, Inheritance>>, @@ -76,7 +75,7 @@ const cases: Array<{ name: string; inheritance: Inheritance }> = [ ]; for (const { name, inheritance } of cases) { - test(`roles create/update/get preserve ${name}`, async (t) => { + test(`roles create/update/get preserve ${name}`, async () => { const { permit, requests } = createClient(inheritance); const created = await permit.api.roles.create({ key: 'editor', @@ -86,10 +85,10 @@ for (const { name, inheritance } of cases) { const updated = await permit.api.roles.update('editor', { ...inheritance }); const fetched = await permit.api.roles.get('editor'); - t.deepEqual(created.extends, inheritance.extends); - t.deepEqual(updated.extends, inheritance.extends); - t.deepEqual(fetched.extends, inheritance.extends); - t.deepEqual(requests, [ + expect(created.extends).toStrictEqual(inheritance.extends); + expect(updated.extends).toStrictEqual(inheritance.extends); + expect(fetched.extends).toStrictEqual(inheritance.extends); + expect(requests).toStrictEqual([ { method: 'post', url: 'https://api.permit.io/v2/schema/proj/env/roles', @@ -108,7 +107,7 @@ for (const { name, inheritance } of cases) { ]); }); - test(`resource roles create/update/get preserve ${name}`, async (t) => { + test(`resource roles create/update/get preserve ${name}`, async () => { const { permit, requests } = createClient(inheritance); const created = await permit.api.resourceRoles.create('doc', { key: 'editor', @@ -118,10 +117,10 @@ for (const { name, inheritance } of cases) { const updated = await permit.api.resourceRoles.update('doc', 'editor', { ...inheritance }); const fetched = await permit.api.resourceRoles.get('doc', 'editor'); - t.deepEqual(created.extends, inheritance.extends); - t.deepEqual(updated.extends, inheritance.extends); - t.deepEqual(fetched.extends, inheritance.extends); - t.deepEqual(requests, [ + expect(created.extends).toStrictEqual(inheritance.extends); + expect(updated.extends).toStrictEqual(inheritance.extends); + expect(fetched.extends).toStrictEqual(inheritance.extends); + expect(requests).toStrictEqual([ { method: 'post', url: 'https://api.permit.io/v2/schema/proj/env/resources/doc/roles', diff --git a/src/tests/unit/utils/context.spec.ts b/src/tests/unit/utils/context.spec.ts new file mode 100644 index 00000000..760b4275 --- /dev/null +++ b/src/tests/unit/utils/context.spec.ts @@ -0,0 +1,56 @@ +import { type Context, ContextStore } from '#src/utils/context'; + +describe('ContextStore (unit)', () => { + let store: ContextStore; + + beforeEach(() => { + store = new ContextStore(); + }); + + describe('add / getDerivedContext', () => { + it('overlays the per-query context on top of the base context', () => { + store.add({ a: 1, b: 2 }); + + const derived = store.getDerivedContext({ b: 99, c: 3 }); + + // The query value for `b` wins over the base value. + expect(derived).toEqual({ a: 1, b: 99, c: 3 }); + }); + + it('does not mutate the base context when deriving', () => { + store.add({ a: 1, b: 2 }); + + store.getDerivedContext({ b: 99, c: 3 }); + + // A fresh derivation must still see the original, unmodified base. + expect(store.getDerivedContext({})).toEqual({ a: 1, b: 2 }); + }); + + it('returns a new object rather than the stored base', () => { + store.add({ a: 1 }); + + const first = store.getDerivedContext({}); + const second = store.getDerivedContext({}); + + expect(first).toEqual({ a: 1 }); + expect(first).not.toBe(second); + }); + + it('accumulates and overrides keys across successive add() calls', () => { + store.add({ a: 1 }); + store.add({ b: 2 }); + store.add({ a: 9 }); + + expect(store.getDerivedContext({})).toEqual({ a: 9, b: 2 }); + }); + + it('derives a copy of the query context when the base is empty', () => { + const query: Context = { only: 'me' }; + + const derived = store.getDerivedContext(query); + + expect(derived).toEqual({ only: 'me' }); + expect(derived).not.toBe(query); + }); + }); +}); diff --git a/src/tests/unit/wait-for-sync.spec.ts b/src/tests/unit/wait-for-sync.spec.ts new file mode 100644 index 00000000..693287ce --- /dev/null +++ b/src/tests/unit/wait-for-sync.spec.ts @@ -0,0 +1,94 @@ +import { type InternalAxiosRequestConfig } from 'axios'; + +import { Permit } from '#src/index'; + +// Neither address is an SDK default, so a request sent to one of them used the configured value. +const PDP_URL = 'http://pdp.test:7000'; +const API_URL = 'http://api.test:8000'; + +const assignment = { user: 'u1', role: 'r1', tenant: 't1' }; + +function createPermit(proxyFactsViaPdp: boolean): Permit { + return new Permit({ token: 'test-token', pdp: PDP_URL, apiUrl: API_URL, proxyFactsViaPdp }); +} + +/** + * Records each request the SDK's REST client sends, at the adapter, after the SDK and axios + * have built it. The API key scope lookup is answered with an environment-level scope. + */ +function captureRequests(permit: Permit): InternalAxiosRequestConfig[] { + const sent: InternalAxiosRequestConfig[] = []; + permit.config.axiosInstance.defaults.adapter = async (config) => { + sent.push(config); + const data = config.url?.endsWith('/v2/api-key/scope') + ? { organization_id: 'org', project_id: 'proj', environment_id: 'env' } + : {}; + return { data, status: 200, statusText: 'OK', headers: {}, config }; + }; + return sent; +} + +function roleAssignmentWrites(sent: InternalAxiosRequestConfig[]): InternalAxiosRequestConfig[] { + return sent.filter( + (config) => config.method === 'post' && config.url?.endsWith('/role_assignments'), + ); +} + +it('waitForSync(0) sends the write to the PDP with X-Wait-Timeout: 0', async () => { + const permit = createPermit(true); + const sent = captureRequests(permit); + + await permit.api.users.waitForSync(0).assignRole(assignment); + + const [write] = roleAssignmentWrites(sent); + expect(write?.url).toBe(`${PDP_URL}/v2/facts/proj/env/role_assignments`); + expect(write?.headers.get('X-Wait-Timeout')).toBe('0'); + expect(write?.headers.has('X-Timeout-Policy')).toBe(false); +}); + +it('waitForSync(null) sends an empty X-Wait-Timeout, which waits without a limit', async () => { + const permit = createPermit(true); + const sent = captureRequests(permit); + + await permit.api.users.waitForSync(null).assignRole(assignment); + + const [write] = roleAssignmentWrites(sent); + expect(write?.headers.get('X-Wait-Timeout')).toBe(''); +}); + +it('waitForSync(timeout, policy) sends both headers', async () => { + const permit = createPermit(true); + const sent = captureRequests(permit); + + await permit.api.users.waitForSync(5, 'fail').assignRole(assignment); + + const [write] = roleAssignmentWrites(sent); + expect(write?.headers.get('X-Wait-Timeout')).toBe('5'); + expect(write?.headers.get('X-Timeout-Policy')).toBe('fail'); +}); + +it('waitForSync leaves the headers of the client it was called on unchanged', async () => { + const permit = createPermit(true); + const sent = captureRequests(permit); + + permit.api.users.waitForSync(5, 'fail'); + await permit.api.users.assignRole(assignment); + + const [write] = roleAssignmentWrites(sent); + expect(write?.url).toBe(`${PDP_URL}/v2/facts/proj/env/role_assignments`); + expect(write?.headers.has('X-Wait-Timeout')).toBe(false); + expect(write?.headers.has('X-Timeout-Policy')).toBe(false); +}); + +it('waitForSync does nothing without proxyFactsViaPdp', async () => { + const permit = createPermit(false); + const sent = captureRequests(permit); + + const synced = permit.api.users.waitForSync(0); + await synced.assignRole(assignment); + + expect(synced).toBe(permit.api.users); + const [write] = roleAssignmentWrites(sent); + expect(write?.url).toBe(`${API_URL}/v2/facts/proj/env/role_assignments`); + expect(write?.headers.has('X-Wait-Timeout')).toBe(false); +}); diff --git a/src/tests/unit/wait-for.spec.ts b/src/tests/unit/wait-for.spec.ts new file mode 100644 index 00000000..cb943501 --- /dev/null +++ b/src/tests/unit/wait-for.spec.ts @@ -0,0 +1,215 @@ +import { AxiosError, AxiosHeaders } from 'axios'; + +import { PermitApiError, PermitConnectionError, PermitPDPStatusError } from '#src/index'; +import { waitFor, waitForCheck } from '#src/tests/helpers/wait-for'; + +beforeEach(() => { + vi.useFakeTimers(); +}); + +afterEach(() => { + vi.useRealTimers(); +}); + +/** A REST error as the SDK raises it; no status means the request got no response. */ +function apiError(status?: number): PermitApiError { + const config = { headers: new AxiosHeaders() }; + const response = + status === undefined ? undefined : { status, statusText: '', headers: {}, config, data: {} }; + const axiosError = new AxiosError('request failed', undefined, config, undefined, response); + return new PermitApiError(`status ${status}`, axiosError); +} + +/** Records how long, on the fake clock, the promise took to settle. */ +function track(promise: Promise): { settledAfterMs?: number } { + const start = Date.now(); + const state: { settledAfterMs?: number } = {}; + const record = () => { + state.settledAfterMs = Date.now() - start; + }; + promise.then(record, record); + return state; +} + +describe('waitFor', () => { + it('resolves with the first accepted value and stops calling the probe', async () => { + let count = 0; + const probe = vi.fn(() => ++count); + + const result = waitFor(probe, (value) => value === 3, { timeoutMs: 10_000, intervalMs: 100 }); + await vi.advanceTimersByTimeAsync(200); + + await expect(result).resolves.toBe(3); + await vi.advanceTimersByTimeAsync(1_000); + expect(probe).toHaveBeenCalledTimes(3); + }); + + it('rejects at the deadline with the message and the last value', async () => { + let count = 0; + const result = waitFor( + () => ++count, + () => false, + { + timeoutMs: 1_000, + intervalMs: 100, + message: 'the counter was never accepted', + describe: (value) => `count=${value}`, + }, + ); + const settled = track(result); + const assertion = expect(result).rejects.toThrow( + 'waitFor timed out after 1000ms and 11 attempts: the counter was never accepted; ' + + 'last value: count=11', + ); + + await vi.advanceTimersByTimeAsync(1_000); + + expect(settled.settledAfterMs).toBe(1_000); + await assertion; + }); + + it('cuts the last pause short so the final attempt starts at the deadline', async () => { + const probe = vi.fn(() => false); + + const result = waitFor(probe, (value) => value, { timeoutMs: 2_500, intervalMs: 1_000 }); + const settled = track(result); + const assertion = expect(result).rejects.toThrow('after 2500ms and 4 attempts'); + + await vi.advanceTimersByTimeAsync(2_500); + + expect(settled.settledAfterMs).toBe(2_500); + expect(probe).toHaveBeenCalledTimes(4); + await assertion; + }); + + it('fails an attempt that never settles and still rejects on time', async () => { + const probe = vi.fn(() => new Promise(() => undefined)); + + const result = waitFor(probe, (value) => value, { + timeoutMs: 1_000, + intervalMs: 100, + attemptTimeoutMs: 300, + }); + const settled = track(result); + const assertion = expect(result).rejects.toThrow( + 'last error: AttemptTimeoutError: the attempt did not settle within 300ms', + ); + + await vi.advanceTimersByTimeAsync(1_300); + + expect(settled.settledAfterMs).toBeLessThanOrEqual(1_300); + expect(probe.mock.calls.length).toBeGreaterThan(1); + await assertion; + }); + + it.each([ + ['a TypeError from the probe', new TypeError('cannot read properties of undefined')], + ['a REST 404', apiError(404)], + ['a REST 403', apiError(403)], + ['a PDP 400', new PermitPDPStatusError('bad request', 400)], + ['a malformed PDP response', new PermitPDPStatusError('unexpected body', 200)], + ])('rejects at once on %s, which waiting cannot fix', async (_, error) => { + const probe = vi.fn((): boolean => { + throw error; + }); + + const result = waitFor(probe, () => true, { timeoutMs: 10_000, intervalMs: 100 }); + const settled = track(result); + await vi.advanceTimersByTimeAsync(0); + + expect(settled.settledAfterMs).toBe(0); + await expect(result).rejects.toBe(error); + expect(probe).toHaveBeenCalledTimes(1); + }); + + it.each([ + ['a PDP connection failure', new PermitConnectionError('connect ECONNREFUSED')], + ['a PDP 502', new PermitPDPStatusError('bad gateway', 502)], + ['a REST request without a response', apiError()], + ['a REST 429', apiError(429)], + ['a REST 503', apiError(503)], + ])('retries after %s', async (_, error) => { + let calls = 0; + const probe = vi.fn(() => { + calls += 1; + if (calls === 1) { + throw error; + } + return true; + }); + + const result = waitFor(probe, (value) => value, { timeoutMs: 10_000, intervalMs: 100 }); + await vi.advanceTimersByTimeAsync(100); + + await expect(result).resolves.toBe(true); + expect(probe).toHaveBeenCalledTimes(2); + }); + + it('reports the last outcome rather than an earlier error', async () => { + let calls = 0; + const probe = () => { + calls += 1; + if (calls === 1) { + throw new PermitConnectionError('connect ECONNREFUSED'); + } + return false; + }; + + const result = waitFor(probe, (value) => value, { timeoutMs: 500, intervalMs: 100 }); + const failure = result.catch((error: unknown) => error); + await vi.advanceTimersByTimeAsync(500); + + const error = await failure; + expect(String(error)).toMatch(/last value: false$/); + expect(String(error)).not.toContain('ECONNREFUSED'); + expect(error).not.toHaveProperty('cause'); + }); + + it('keeps the last error as the cause of the timeout', async () => { + const connectionError = new PermitConnectionError('connect ECONNREFUSED'); + + const result = waitFor( + (): boolean => { + throw connectionError; + }, + () => true, + { timeoutMs: 300, intervalMs: 100 }, + ); + const failure = result.catch((error: unknown) => error); + await vi.advanceTimersByTimeAsync(300); + + const error = await failure; + expect(String(error)).toContain('last error: PermitConnectionError: connect ECONNREFUSED'); + expect(error).toHaveProperty('cause', connectionError); + }); +}); + +describe('waitForCheck', () => { + it('resolves once the check returns the expected decision', async () => { + const decisions = [true, true, false]; + const check = vi.fn(async () => decisions.shift() ?? true); + + const result = waitForCheck(check, false, { intervalMs: 100 }); + await vi.advanceTimersByTimeAsync(200); + + await expect(result).resolves.toBe(false); + expect(check).toHaveBeenCalledTimes(3); + }); + + it('keeps its 60 second budget when timeoutMs is passed as undefined', async () => { + const check = vi.fn(async () => false); + + const result = waitForCheck(check, true, { timeoutMs: undefined }); + const settled = track(result); + const assertion = expect(result).rejects.toThrow( + 'waitFor timed out after 60000ms and 61 attempts: permit.check did not become true', + ); + + await vi.advanceTimersByTimeAsync(59_999); + expect(settled.settledAfterMs).toBeUndefined(); + await vi.advanceTimersByTimeAsync(1); + + expect(settled.settledAfterMs).toBe(60_000); + await assertion; + }); +}); diff --git a/src/tests/vitest.d.ts b/src/tests/vitest.d.ts new file mode 100644 index 00000000..07a91bad --- /dev/null +++ b/src/tests/vitest.d.ts @@ -0,0 +1,7 @@ +import 'vitest'; + +declare module 'vitest' { + interface TaskMeta { + coverageUnavailable?: string; + } +} diff --git a/src/types.d.ts b/src/types.d.ts deleted file mode 100644 index 134366c5..00000000 --- a/src/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'require-in-the-middle' { - function OnRequire(exports: any, name: string, basedir: string): unknown; - function Hook(modules: string[], options: any, onrequire: typeof OnRequire): any; - export = Hook; -} diff --git a/src/utils/context.ts b/src/utils/context.ts index 69d8e7e3..d874808a 100644 --- a/src/utils/context.ts +++ b/src/utils/context.ts @@ -3,31 +3,40 @@ export interface Context { } export interface CheckConfig { + /** + * Use OPA for check(); discovery/filtering/URL checks reject true regardless of error policy. + * Existing bulk/permission queries retain their configured throw/deny policy. + */ useOpa?: boolean; + /** Request timeout in milliseconds; zero disables the timeout for this call. */ timeout?: number; throwOnError?: boolean; } -export interface ContextTransform { - (context: Context): Context; +/** Options for a permission query, including its request-specific context. */ +export interface GetUserPermissionsConfig extends CheckConfig { + context?: Context; +} + +/** Per-call URL authorization options for a compatible container PDP. */ +export interface CheckUrlConfig extends CheckConfig { + /** Tenant key; omitted or empty uses the configured default when default tenancy is enabled. */ + tenant?: string; + /** Request context overriding the existing global context. */ + context?: Context; } /** - * Store for contexted passed as part of check() queries + * Stores global context merged into each authorization query. */ export class ContextStore { private baseContext: Context = {}; // cross-query context (global context) - private transforms: ContextTransform[] = []; /** * add context to the base context */ public add(context: Context): void { - this.baseContext = Object.assign(this.baseContext, context); - } - - public registerTransform(transform: ContextTransform): void { - this.transforms.push(transform); + this.baseContext = { ...this.baseContext, ...context }; } /** @@ -36,14 +45,6 @@ export class ContextStore { * context overrides the base (global) context. */ public getDerivedContext(context: Context): Context { - return Object.assign({}, this.baseContext, context); - } - - public transform(initialContext: Context): Context { - let context = { ...initialContext }; - for (const transform of this.transforms) { - context = transform(context); - } - return context; + return { ...this.baseContext, ...context }; } } diff --git a/src/utils/diagnostics.ts b/src/utils/diagnostics.ts new file mode 100644 index 00000000..115db249 --- /dev/null +++ b/src/utils/diagnostics.ts @@ -0,0 +1,532 @@ +import axios, { AxiosError, AxiosHeaders, type InternalAxiosRequestConfig } from 'axios'; + +const REDACTED = '[REDACTED]'; +const MAX_TEXT = 1024; +const MAX_ITEMS = 8; +const BODY_FIELDS = new Set(['message', 'detail', 'error_code', 'code', 'msg', 'errors']); +const REQUEST_HEADERS = new Set([ + 'accept', + 'accept-encoding', + 'content-length', + 'content-type', + 'user-agent', + 'x-permit-sdk-version', + 'x-timeout-policy', + 'x-wait-timeout', +]); +const RESPONSE_HEADERS = new Set(['content-type', 'content-length', 'retry-after']); + +interface CollectedSecrets { + values: string[]; + complete: boolean; +} +type SecretContext = readonly string[] | CollectedSecrets; + +const failurePrivacyKey = Symbol.for('permitio.diagnostics.failurePrivacy.v1'); + +function sharedFailurePrivacy(): WeakMap { + const descriptor = Object.getOwnPropertyDescriptor(globalThis, failurePrivacyKey); + if (descriptor) { + const value: unknown = descriptor.value; + if ( + !('value' in descriptor) || + !(value instanceof WeakMap) || + descriptor.enumerable || + descriptor.writable || + descriptor.configurable + ) { + throw new TypeError( + 'Permit diagnostic privacy state is incompatible; load compatible SDK entry points.', + ); + } + return value; + } + const registry = new WeakMap(); + Object.defineProperty(globalThis, failurePrivacyKey, { + value: registry, + enumerable: false, + writable: false, + configurable: false, + }); + return registry; +} + +const failurePrivacy = sharedFailurePrivacy(); + +function mergeDiagnosticSecrets(left: SecretContext, right: SecretContext): CollectedSecrets { + const result: CollectedSecrets = { values: [], complete: true }; + const seen = new Set(); + let characters = 0; + for (const context of [left, right]) { + if ('complete' in context && !context.complete) return { values: [], complete: false }; + for (const value of 'complete' in context ? context.values : context) { + if (!value || seen.has(value)) continue; + characters += value.length; + if (seen.size >= 512 || characters > 65_536) return { values: [], complete: false }; + seen.add(value); + result.values.push(value); + } + } + return result; +} + +/** + * Records bounded request privacy without changing the caller's thrown object or retaining requests. + * + * @internal + * @param error - Original adapter, interceptor or retry-hook failure. + * @param secrets - Request-private values; reused failures merge conservatively within fixed bounds. + */ +export function recordDiagnosticSecrets(error: unknown, secrets: SecretContext): void { + if ((typeof error === 'object' && error !== null) || typeof error === 'function') { + failurePrivacy.set(error, mergeDiagnosticSecrets(secrets, failurePrivacy.get(error) ?? [])); + } +} + +/** + * Recovers request privacy for unchanged caller failures at public error boundaries. + * + * @internal + * @param error - Failure returned by an SDK-owned transport or a directly supplied cause. + * @param secrets - Additional known values, including the SDK token. + * @returns Bounded request privacy; uninspectable primitive failures fail closed. + */ +export function diagnosticErrorSecrets( + error: unknown, + secrets: SecretContext = [], +): CollectedSecrets { + const recorded = + (typeof error === 'object' && error !== null) || typeof error === 'function' + ? (failurePrivacy.get(error) ?? []) + : typeof error === 'string' || typeof error === 'number' || typeof error === 'boolean' + ? { values: [], complete: false } + : []; + const privacy = mergeDiagnosticSecrets(secrets, recorded); + return axios.isAxiosError(error) ? diagnosticRequestSecrets(error, privacy) : privacy; +} + +function redactPrivateValues(value: string, secrets: SecretContext): string { + if (value.length > 65_536 || ('complete' in secrets && !secrets.complete)) return REDACTED; + const values = 'complete' in secrets ? secrets.values : secrets; + let text = value; + for (const secret of [...new Set(values)].sort((left, right) => right.length - left.length)) { + if (!secret) continue; + const spellings = new Set([secret, JSON.stringify(secret).slice(1, -1)]); + try { + spellings.add(encodeURIComponent(secret)); + spellings.add(encodeURI(secret)); + } catch { + // Lone surrogates have no valid URI spelling; the literal secret is still removed. + } + for (const spelling of spellings) text = text.split(spelling).join(REDACTED); + const decoded = text.replace(/(?:%[0-9a-f]{2})+/gi, (encoded) => + Buffer.from(encoded.replaceAll('%', ''), 'hex').toString('utf8'), + ); + // Mixed percent spellings are detected without changing the original diagnostic route. + if ([...spellings].some((spelling) => decoded.includes(spelling))) return REDACTED; + } + return text; +} + +/** + * Returns a bounded URL with user information, query values and fragments removed. + * + * @param value - Absolute HTTP(S) URL or relative request path. + * @param secrets - Values removed before URL normalization or output truncation. + * @returns A safe route, undefined for an absent URL, or a redaction marker for invalid input. + */ +export function diagnosticUrl( + value: string | undefined, + secrets: SecretContext = [], +): string | undefined { + if (value === undefined) return undefined; + value = redactPrivateValues(value, secrets); + if (value === REDACTED) return REDACTED; + try { + const absolute = /^https?:\/\//i.test(value); + const url = new URL(value, 'http://diagnostic.invalid/'); + if (!['http:', 'https:'].includes(url.protocol)) return REDACTED; + const path = url.pathname.replace(/permit_key_[\w-]+/gi, REDACTED); + return ( + absolute + ? `${url.protocol}//${url.host}${path}` + : value.startsWith('/') + ? path + : path.replace(/^\//, '') + ).slice(0, MAX_TEXT); + } catch { + return REDACTED; + } +} + +/** + * Bounds text and removes supplied secrets, bearer credentials and URL credential components. + * + * @param value - Description to sanitize, including valid strings with unpaired surrogates. + * @param secrets - Known private values; incomplete collection redacts the entire description. + * @returns Bounded text that contains none of the supplied values or credential URL components. + */ +export function diagnosticText(value: string, secrets: SecretContext = []): string { + let text = redactPrivateValues(value, secrets); + text = text + .replace(/https?:\/\/[^\s<>"']+/gi, (url) => diagnosticUrl(url) ?? REDACTED) + .replace(/\b(?:Bearer|Basic)\s+[^\s,;"']+/gi, REDACTED) + .replace(/permit_key_[\w-]+/gi, REDACTED) + .replace(/\b(?:api[_-]?key|token|password|secret)\s*[:=]\s*[^\s,;"']+/gi, REDACTED) + .replace(/[\r\n\t]/g, ' '); + return text.length > MAX_TEXT ? `${text.slice(0, MAX_TEXT)} [truncated]` : text; +} + +/** + * Collects string and numeric values that may be echoed in diagnostics without invoking getters. + * + * @param value - Request data, parameters, credentials or omitted response fields. + * @returns Private values and whether the bounded traversal could inspect every value safely. + */ +export function diagnosticSecrets(value: unknown): CollectedSecrets { + const result: CollectedSecrets = { values: [], complete: true }; + const seen = new Set(); + let remaining = 512; + let characters = 65_536; + function visit(item: unknown, depth: number): void { + if (!result.complete) return; + if (remaining-- <= 0 || depth > 12) { + result.complete = false; + return; + } + if (typeof item === 'number' && Number.isFinite(item)) item = String(item); + if (typeof item === 'string') { + characters -= item.length; + if (characters < 0) result.complete = false; + else if (item) result.values.push(item); + return; + } + if (item === null || typeof item !== 'object' || seen.has(item)) return; + seen.add(item); + for (const key of Object.keys(item)) { + const descriptor = Object.getOwnPropertyDescriptor(item, key); + if (descriptor && 'value' in descriptor) visit(descriptor.value, depth + 1); + else result.complete = false; + if (!result.complete) return; + } + } + if (typeof value === 'string') { + if (value.length > 65_536) result.complete = false; + else { + try { + visit(JSON.parse(value), 0); + } catch { + visit(value, 0); + } + } + } else visit(value, 0); + return result; +} + +function omittedResponseSecrets(value: unknown, secrets: SecretContext): CollectedSecrets { + const privacy: CollectedSecrets = { values: [], complete: true }; + let fields = 64; + function collectOmitted(item: unknown, depth: number): void { + if (item === null || typeof item !== 'object') return; + if (depth >= 4) { + privacy.complete = false; + return; + } + if (Array.isArray(item)) { + if (item.length > MAX_ITEMS) { + privacy.complete = false; + return; + } + const keys = Object.keys(item); + if (keys.length > MAX_ITEMS) { + privacy.complete = false; + return; + } + for (const key of keys) { + const field = Object.getOwnPropertyDescriptor(item, key); + const index = Number(key); + if ( + !field || + !('value' in field) || + !Number.isInteger(index) || + index < 0 || + String(index) !== key || + index >= item.length + ) { + privacy.complete = false; + return; + } + } + for (let index = 0; index < Math.min(item.length, MAX_ITEMS); index++) { + const field = Object.getOwnPropertyDescriptor(item, String(index)); + if (field && 'value' in field) collectOmitted(field.value, depth + 1); + else privacy.complete = false; + } + return; + } + for (const key of Object.keys(item)) { + if (fields-- <= 0) { + privacy.complete = false; + return; + } + const descriptor = Object.getOwnPropertyDescriptor(item, key); + if (!descriptor || !('value' in descriptor)) { + privacy.complete = false; + continue; + } + if (BODY_FIELDS.has(key)) collectOmitted(descriptor.value, depth + 1); + else { + const found = diagnosticSecrets(descriptor.value); + privacy.values.push(...found.values); + privacy.complete &&= found.complete && privacy.values.length <= 512; + } + } + } + collectOmitted(value, 0); + return mergeDiagnosticSecrets(secrets, privacy); +} + +/** + * Retains bounded error-description fields while excluding private response attributes. + * + * @param value - Untrusted JSON or text response body. + * @param secrets - Known private values to remove from retained descriptions. + * @returns A bounded diagnostic body. The shape differs from the raw response and is unknown. + */ +export function diagnosticBody(value: unknown, secrets: SecretContext = []): unknown { + const privacy = omittedResponseSecrets(value, secrets); + let remaining = 16; + let characters = 2048; + function visit(item: unknown, depth: number): unknown { + if (remaining-- <= 0) return REDACTED; + if (item === null || item === undefined || typeof item === 'boolean') return item; + if (typeof item === 'number') { + return Number.isFinite(item) && diagnosticText(String(item), privacy) === String(item) + ? item + : REDACTED; + } + if (typeof item === 'string') { + if (characters === 0) return REDACTED; + const text = diagnosticText(item, privacy).slice(0, characters); + characters -= text.length; + return text; + } + if (typeof item !== 'object' || depth >= 4) return REDACTED; + if (Array.isArray(item)) { + const array: unknown[] = []; + for (let index = 0; index < Math.min(item.length, MAX_ITEMS); index++) { + const field = Object.getOwnPropertyDescriptor(item, String(index)); + array.push(field && 'value' in field ? visit(field.value, depth + 1) : REDACTED); + } + return array; + } + const body: Record = {}; + for (const key of BODY_FIELDS) { + const field = Object.getOwnPropertyDescriptor(item, key); + if (field && 'value' in field) body[key] = visit(field.value, depth + 1); + } + return body; + } + return visit(value, 0); +} + +/** + * Accepts only actual HTTP status values for errors and structured request logs. + * + * @param value - Untrusted status supplied by a response or caller adapter. + * @returns The integer HTTP status, or undefined for missing or malformed metadata. + */ +export function diagnosticStatus(value: unknown): number | undefined { + return typeof value === 'number' && Number.isInteger(value) && value >= 100 && value <= 599 + ? value + : undefined; +} + +/** + * Reads HTTP status and transport code without copying arbitrary error properties. + * + * @param error - Failed request or detached error cause. + * @param secrets - Private values to exclude from custom transport codes. + * @returns Valid HTTP status and bounded code metadata when safely available. + */ +export function diagnosticMetadata( + error: unknown, + secrets: SecretContext = [], +): { status?: number; code?: string } { + if (!(error instanceof Error) && !axios.isAxiosError(error)) return {}; + const record = error as Error & { status?: unknown; code?: unknown }; + const status = diagnosticStatus( + axios.isAxiosError(error) ? (error.response?.status ?? error.status) : record.status, + ); + const code = record.code; + return { + ...(status !== undefined ? { status } : {}), + ...(typeof code === 'string' && + /^[A-Z][A-Z0-9_]{0,63}$/.test(code) && + diagnosticText(code, secrets) === code + ? { code } + : {}), + }; +} + +/** + * Selects message/detail/text diagnostics with an actionable fallback for missing bodies. + * + * @param error - Axios error, other Error, string rejection or unknown failure. + * @param secrets - Known credentials and private values to redact. + * @returns A bounded failure description, HTTP status fallback or configuration guidance. + */ +export function diagnosticMessage(error: unknown, secrets: SecretContext = []): string { + if (axios.isAxiosError(error)) { + const body = diagnosticBody(error.response?.data, secrets); + function message(value: unknown): string | undefined { + if (typeof value === 'string') return value.trim() || undefined; + if (Array.isArray(value)) return value.map(message).filter(Boolean).join('; ') || undefined; + if (value !== null && typeof value === 'object') { + const fields = value as Record; + return message(fields['message']) ?? message(fields['detail']) ?? message(fields['msg']); + } + return undefined; + } + const description = message(body); + if (description && description !== REDACTED) return diagnosticText(description, secrets); + const status = diagnosticMetadata(error, secrets).status; + if (status !== undefined) return `Permit API request failed with HTTP ${status}.`; + } + if (error instanceof Error && typeof error.message === 'string' && error.message.trim()) { + const description = diagnosticText(error.message, secrets); + if (description !== REDACTED) return description; + } + if (typeof error === 'string' && error.trim()) { + const description = diagnosticText(error, secrets); + if (description !== REDACTED) return description; + } + return 'Permit request failed without an error description; check connectivity and configuration.'; +} + +/** + * Makes a detached Error cause containing a safe message, status and transport code. + * + * @param error - Original failure, whose cause, stack and custom properties are never retained. + * @param secrets - Additional known credentials and private values. + * @returns A safe Error with bounded SDK stack frames and useful metadata. + */ +export function diagnosticCause(error: unknown, secrets: SecretContext = []): Error { + const privacy = diagnosticErrorSecrets(error, secrets); + const cause = new Error(diagnosticMessage(error, privacy)); + cause.name = axios.isAxiosError(error) ? 'AxiosError' : 'Error'; + if (cause.stack !== undefined) cause.stack = cause.stack.split('\n').slice(0, 5).join('\n'); + return Object.assign(cause, diagnosticMetadata(error, privacy)); +} + +/** + * Collects secrets from omitted request/response values, headers and URL credentials. + * + * @param error - Request/response metadata to inspect without mutation. + * @param secrets - Additional credentials, including the SDK token and caller default headers. + * @returns Private values and a flag that causes redaction when collection exceeds its limits. + */ +export function diagnosticRequestSecrets( + error: Pick, 'config' | 'response'>, + secrets: SecretContext = [], +): CollectedSecrets { + const config = error.config; + const result = mergeDiagnosticSecrets(secrets, failurePrivacy.get(error) ?? []); + function collect(value: unknown): void { + const found = diagnosticSecrets(value); + result.values.push(...found.values); + result.complete &&= found.complete && result.values.length <= 512; + } + collect(config?.data); + collect(config?.params); + collect(config?.auth); + for (const [name, value] of Object.entries(config?.headers ?? {})) { + if (!REQUEST_HEADERS.has(name.toLowerCase())) { + collect(value); + if (typeof value === 'string') collect(value.replace(/^(Bearer|Basic)\s+/i, '')); + } + } + for (const [name, value] of Object.entries(error.response?.headers ?? {})) { + if (!RESPONSE_HEADERS.has(name.toLowerCase())) collect(value); + } + for (const address of [config?.url, config?.baseURL]) { + if (!address) continue; + try { + const url = new URL(address, 'http://diagnostic.invalid/'); + collect(decodeURIComponent(url.username)); + collect(decodeURIComponent(url.password)); + for (const value of url.searchParams.values()) collect(value); + collect(url.hash.slice(1)); + } catch { + // Malformed URLs are omitted in diagnosticUrl; keep the original value out of text too. + collect(address); + } + } + const privacy = omittedResponseSecrets(error.response?.data, result); + failurePrivacy.set(error, privacy); + return privacy; +} + +/** + * Makes an Axios snapshot without request bodies, sockets, hooks or the original cause/stack. + * + * @param error - Original Axios failure. The caller's error is never mutated. + * @param secrets - Additional known credentials, including the SDK token. + * @returns A detached Axios error with bounded request, response and failure diagnostics. + */ +export function diagnosticAxiosError( + error: AxiosError, + secrets: SecretContext = [], +): AxiosError { + const config = error.config; + const privateValues = diagnosticRequestSecrets(error, secrets); + const headers = new AxiosHeaders(); + for (const [name, value] of Object.entries(config?.headers ?? {}).slice(0, 32)) { + headers.set( + diagnosticText(name, privateValues), + REQUEST_HEADERS.has(name.toLowerCase()) + ? diagnosticText(String(value), privateValues) + : REDACTED, + ); + } + const safeConfig: InternalAxiosRequestConfig = { + headers, + ...(config?.method !== undefined && { method: diagnosticText(config.method, privateValues) }), + ...(config?.url !== undefined && { + url: diagnosticUrl(config.url, privateValues) ?? REDACTED, + }), + ...(config?.baseURL !== undefined && { + baseURL: diagnosticUrl(config.baseURL, privateValues) ?? REDACTED, + }), + ...(config?.timeout !== undefined && + Number.isFinite(config.timeout) && { timeout: config.timeout }), + }; + const metadata = diagnosticMetadata(error, privateValues); + const snapshot = new AxiosError( + diagnosticMessage(error, privateValues), + metadata.code, + safeConfig, + ); + if (snapshot.stack !== undefined) + snapshot.stack = snapshot.stack.split('\n').slice(0, 5).join('\n'); + if (error.response && metadata.status !== undefined) { + const responseHeaders = new AxiosHeaders(); + for (const [name, value] of Object.entries(error.response.headers).slice(0, 32)) { + responseHeaders.set( + diagnosticText(name, privateValues), + RESPONSE_HEADERS.has(name.toLowerCase()) + ? diagnosticText(String(value), privateValues) + : REDACTED, + ); + } + snapshot.response = { + status: metadata.status, + statusText: '', + headers: responseHeaders, + data: diagnosticBody(error.response.data, privateValues), + config: safeConfig, + }; + } + if (metadata.status !== undefined) snapshot.status = metadata.status; + return snapshot; +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 27ee9abc..38330f9d 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -1,24 +1 @@ export type Dict = Record; - -export function isDict(val: any): val is Dict { - return (val as Dict) !== undefined; -} - -/** - * JS Equivalent to python dict(zip()) - * - * generates a dict-like object (record) from two same-size lists - * if lists are not same-size, returns undefined. - * @param keys - * @param values - */ -export function dictZip(keys: string[], values: string[]): Record | undefined { - if (keys.length === values.length) { - return keys.reduce((acc: Record, curr: string, index: number) => { - acc[curr] = values[index]; - return acc; - }, {}); - } else { - return undefined; - } -} diff --git a/src/utils/http-logger.ts b/src/utils/http-logger.ts deleted file mode 100644 index 8606cbfb..00000000 --- a/src/utils/http-logger.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; -import pino from 'pino'; - -export class AxiosLoggingInterceptor { - static setupInterceptor(axiosInstance: AxiosInstance, logger: pino.Logger): void { - // Add a request interceptor - axiosInstance.interceptors.request.use( - function (request: InternalAxiosRequestConfig) { - request.headers = request.headers || {}; // Ensure headers are not undefined - logger.debug(`Sending HTTP request: ${request?.method?.toUpperCase()} ${request?.url}`); - return request; - }, - function (error: any) { - // Do something with request error - return Promise.reject(error); - }, - ); - - // Add a response interceptor - axiosInstance.interceptors.response.use( - function (response: AxiosResponse) { - logger.debug( - `Received HTTP response: ${response?.config?.method?.toUpperCase()} ${ - response?.config?.url - }, status: ${response?.status}`, - ); - return response; - }, - function (error) { - return Promise.reject(error); - }, - ); - } -} diff --git a/src/utils/http-transport.test.ts b/src/utils/http-transport.test.ts new file mode 100644 index 00000000..03633e06 --- /dev/null +++ b/src/utils/http-transport.test.ts @@ -0,0 +1,604 @@ +import axios, { + AxiosError, + AxiosHeaders, + CanceledError, + type InternalAxiosRequestConfig, +} from 'axios'; +import pino from 'pino'; +import { afterEach, expect, test, vi } from 'vitest'; + +import { createOwnedTransport } from '#src/utils/http-transport'; +import { resolveRetryConfig, type IRetryConfig } from '#src/utils/retry'; + +const logger = pino({ level: 'silent' }); +const policy = { maxRetries: 1, retryDelay: 0, maxDelay: 0 }; +const success = (config: InternalAxiosRequestConfig, data: unknown = { ok: true }) => ({ + data, + status: 200, + statusText: 'OK', + headers: {}, + config, +}); +function failed(config: InternalAxiosRequestConfig, code = 'ERR_BAD_RESPONSE', status?: number) { + return new AxiosError( + 'transport failed', + code, + config, + { marker: 'request' }, + status === undefined ? undefined : { ...success(config), status }, + ); +} +function owned(caller: ReturnType, retry: IRetryConfig = policy) { + return createOwnedTransport({ caller, logger, retry: resolveRetryConfig(retry), name: 'test' }); +} +afterEach(() => vi.restoreAllMocks()); + +test('explicit suppressed headers override caller defaults without changing the caller', async () => { + const seen: InternalAxiosRequestConfig[] = []; + const caller = axios.create({ + headers: { common: { 'X-Disabled': 'default', 'X-Empty': 'default' } }, + adapter: async (config) => { + seen.push(config); + return success(config); + }, + }); + await owned(caller).get('/sdk', { headers: { 'X-Disabled': false, 'X-Empty': null } }); + await caller.get('/direct'); + expect(seen[0]?.headers.get('X-Disabled')).toBe(false); + expect(seen[0]?.headers.get('X-Empty')).toBeNull(); + expect(seen[1]?.headers.get('X-Disabled')).toBe('default'); + expect(seen[1]?.headers.get('X-Empty')).toBe('default'); +}); + +test('preserves live caller defaults, transforms and intentional interceptors once per attempt', async () => { + const events: string[] = []; + const caller = axios.create({ + timeout: 700, + headers: { common: { 'X-Caller': 'original' } }, + transformRequest: [ + (data, headers) => { + events.push('request-transform'); + expect(data).toEqual({ query: true }); + headers.set('X-Transform', 'yes'); + return JSON.stringify(data); + }, + ], + transformResponse: [ + (data) => { + events.push('response-transform'); + return JSON.parse(data); + }, + ], + }); + caller.interceptors.request.use( + (config) => { + events.push('request-hook'); + return config; + }, + undefined, + { synchronous: true, runWhen: (config) => config.method === 'post' }, + ); + caller.interceptors.response.use((response) => { + events.push('response-hook'); + return response; + }); + const attempts: InternalAxiosRequestConfig[] = []; + caller.defaults.adapter = async (config) => { + events.push('adapter'); + attempts.push(config); + expect(config.data).toBe('{"query":true}'); + if (attempts.length === 1) { + const error = failed(config, 'ERR_BAD_RESPONSE', 503); + if (error.response) error.response.data = '{"error":true}'; + throw error; + } + return success(config, '{"ok":true}'); + }; + const client = owned(caller, { ...policy, retryMethods: ['POST'] }); + caller.defaults.timeout = 900; + caller.defaults.headers.common['X-Caller'] = 'live'; + const response = await client.post( + '/query', + { query: true }, + { + baseURL: 'https://sdk.invalid', + headers: { Authorization: 'Bearer sdk', 'Content-Type': 'application/json' }, + }, + ); + expect(response.data).toEqual({ ok: true }); + expect(attempts).toHaveLength(2); + expect(attempts[0]?.timeout).toBe(900); + expect(attempts[1]?.timeout).toBeGreaterThan(0); + expect(attempts[1]?.timeout).toBeLessThanOrEqual(900); + for (const attempt of attempts) { + expect(attempt.headers.get('X-Caller')).toBe('live'); + expect(attempt.headers.get('X-Transform')).toBe('yes'); + expect(attempt.headers.get('Authorization')).toBe('Bearer sdk'); + expect(attempt.baseURL).toBe('https://sdk.invalid'); + } + expect(events).toEqual([ + 'request-hook', + 'request-transform', + 'adapter', + 'response-transform', + 'request-hook', + 'request-transform', + 'adapter', + 'response-transform', + 'response-hook', + ]); + expect(caller.interceptors.request.handlers).toHaveLength(1); + expect(caller.interceptors.response.handlers).toHaveLength(1); + expect(caller.defaults.timeout).toBe(900); +}); + +test('keeps the original Axios error, status, response, request and config', async () => { + const caller = axios.create(); + let error: AxiosError | undefined; + caller.defaults.adapter = async (config) => { + error = failed(config, 'ERR_BAD_RESPONSE', 400); + throw error; + }; + const promise = owned(caller).get('/failure'); + await expect(promise).rejects.toMatchObject({ + code: 'ERR_BAD_RESPONSE', + response: { status: 400 }, + request: { marker: 'request' }, + }); + await expect(promise).rejects.toBe(error); +}); + +for (const code of [ + 'ERR_CANCELED', + 'ERR_BAD_OPTION', + 'ERR_BAD_OPTION_VALUE', + 'ERR_INVALID_URL', + 'ERR_NOT_SUPPORT', + 'ERR_DEPRECATED', + 'ERR_FR_TOO_MANY_REDIRECTS', +]) { + test(`does not call a permissive retry predicate for ${code}`, async () => { + const predicate = vi.fn(() => true); + const caller = axios.create(); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, code); + }; + const client = createOwnedTransport({ + caller, + logger, + name: 'test', + retry: resolveRetryConfig({ ...policy, retryCondition: predicate }), + }); + await expect(client.get('/error')).rejects.toMatchObject({ code }); + expect(request).toHaveBeenCalledTimes(1); + expect(predicate).not.toHaveBeenCalled(); + }); +} + +for (const code of [undefined, 'UNKNOWN', 'ENOTFOUND']) { + test(`does not retry an unclassified response-less error ${code}`, async () => { + const caller = axios.create(); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw new AxiosError('unknown', code, config); + }; + await expect(owned(caller).get('/error')).rejects.toThrow('unknown'); + expect(request).toHaveBeenCalledTimes(1); + }); +} + +test('does not retry a transport CanceledError without a signal', async () => { + const caller = axios.create(); + const predicate = vi.fn(() => true); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw new CanceledError('stop', config); + }; + const client = createOwnedTransport({ + caller, + logger, + name: 'test', + retry: resolveRetryConfig({ ...policy, retryCondition: predicate }), + }); + await expect(client.get('/error')).rejects.toThrow('stop'); + expect(request).toHaveBeenCalledTimes(1); + expect(predicate).not.toHaveBeenCalled(); +}); + +test('a pre-aborted caller signal prevents even the first caller pipeline', async () => { + const caller = axios.create({ signal: AbortSignal.abort() }); + const request = vi.spyOn(caller, 'request'); + await expect(owned(caller).get('/error')).rejects.toMatchObject({ code: 'ERR_CANCELED' }); + expect(request).not.toHaveBeenCalled(); +}); + +for (const cancellation of ['signal', 'token']) { + test(`cancelling ${cancellation} during backoff releases subscriptions and stops retry`, async () => { + vi.useFakeTimers(); + try { + const controller = new AbortController(); + const token = axios.CancelToken.source(); + const caller = axios.create( + cancellation === 'signal' ? { signal: controller.signal } : { cancelToken: token.token }, + ); + const remove = vi.spyOn(controller.signal, 'removeEventListener'); + const unsubscribe = vi.spyOn(token.token, 'unsubscribe'); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + const client = owned(caller, { ...policy, retryDelay: 5000, maxDelay: 5000 }); + const promise = client.get('/error'); + const rejected = expect(promise).rejects.toMatchObject({ code: 'ERR_CANCELED' }); + await vi.advanceTimersByTimeAsync(0); + expect(vi.getTimerCount()).toBe(1); + if (cancellation === 'signal') controller.abort(); + else token.cancel('stop'); + await rejected; + expect(vi.getTimerCount()).toBe(0); + expect(request).toHaveBeenCalledTimes(1); + if (cancellation === 'signal') expect(remove).toHaveBeenCalled(); + else expect(unsubscribe).toHaveBeenCalled(); + } finally { + vi.useRealTimers(); + } + }); +} + +for (const timeout of [undefined, 0, 100]) { + test(`forwards ${timeout} timeout without a facade default override`, async () => { + const caller = axios.create({ timeout: 900 }); + const seen: (number | undefined)[] = []; + caller.defaults.adapter = async (config) => { + seen.push(config.timeout); + return success(config); + }; + await owned(caller).get('/success', timeout === undefined ? {} : { timeout }); + expect(seen).toEqual([timeout ?? 900]); + }); +} + +test('does not schedule a retry whose delay exhausts the total timeout budget', async () => { + const caller = axios.create({ timeout: 30 }); + const request = vi.spyOn(caller, 'request'); + const timer = vi.spyOn(globalThis, 'setTimeout'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + await expect( + owned(caller, { ...policy, retryDelay: 50, maxDelay: 50 }).get('/error'), + ).rejects.toMatchObject({ code: 'ERR_NETWORK' }); + expect(request).toHaveBeenCalledTimes(1); + expect(timer).not.toHaveBeenCalled(); +}); + +test('rejects a nonboolean custom retry result instead of allowing a truthy value', async () => { + const caller = axios.create(); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + const invalid = Reflect.apply(resolveRetryConfig, undefined, [ + { ...policy, retryCondition: () => 'true' }, + ]); + const client = createOwnedTransport({ caller, logger, name: 'test', retry: invalid }); + await expect(client.get('/error')).rejects.toThrow('expected a boolean'); +}); + +test('ignores malformed Retry-After values while retaining the original exhausted error', async () => { + const caller = axios.create(); + let calls = 0; + let last: AxiosError | undefined; + caller.defaults.adapter = async (config) => { + calls += 1; + last = failed(config, 'ERR_BAD_RESPONSE', 429); + if (last.response) + last.response.headers = new AxiosHeaders({ 'Retry-After': ['bad', 'header'] }); + throw last; + }; + const promise = owned(caller).get('/error'); + await expect(promise).rejects.toThrow('transport failed'); + await expect(promise).rejects.toBe(last); + expect(calls).toBe(2); +}); + +for (const method of ['get', 'put', 'delete']) { + test(`${method} exhausts exactly the configured retry count`, async () => { + const caller = axios.create(); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_BAD_RESPONSE', 503); + }; + await expect( + owned(caller, { ...policy, maxRetries: 2 }).request({ method, url: '/error' }), + ).rejects.toThrow('transport failed'); + expect(request).toHaveBeenCalledTimes(3); + }); +} + +test('uses the first backoff delay and honors Retry-After through the transport boundary', async () => { + vi.useFakeTimers(); + vi.spyOn(Math, 'random').mockReturnValue(0); + try { + for (const retryAfter of [undefined, '2']) { + const caller = axios.create(); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + const error = failed(config, 'ERR_BAD_RESPONSE', 429); + if (error.response && retryAfter !== undefined) + error.response.headers['retry-after'] = retryAfter; + throw error; + }; + const promise = owned(caller, { + maxRetries: 1, + retryDelay: 30, + maxDelay: 5000, + backoffMultiplier: 3, + }).get('/error'); + const rejected = expect(promise).rejects.toThrow('transport failed'); + const delay = retryAfter === undefined ? 30 : 2000; + await vi.advanceTimersByTimeAsync(delay - 1); + expect(request).toHaveBeenCalledTimes(1); + await vi.advanceTimersByTimeAsync(1); + await rejected; + expect(request).toHaveBeenCalledTimes(2); + expect(vi.getTimerCount()).toBe(0); + } + } finally { + vi.useRealTimers(); + } +}); + +test('isolates SDK logging without intercepting the caller direct request', async () => { + const caller = axios.create({ adapter: async (config) => success(config) }); + const firstLogger = pino({ level: 'silent' }); + const secondLogger = pino({ level: 'silent' }); + const firstLog = vi.spyOn(firstLogger, 'debug'); + const secondLog = vi.spyOn(secondLogger, 'debug'); + const first = createOwnedTransport({ + caller, + logger: firstLogger, + retry: resolveRetryConfig(false), + name: 'first', + }); + createOwnedTransport({ + caller, + logger: secondLogger, + retry: resolveRetryConfig(false), + name: 'second', + }); + await first.get('/sdk'); + expect(firstLog.mock.calls.map((call) => call[1])).toEqual([ + 'Sending HTTP request: GET /sdk', + 'Received HTTP response: GET /sdk, status: 200', + ]); + expect(secondLog).not.toHaveBeenCalled(); + await caller.get('/direct'); + expect(firstLog).toHaveBeenCalledTimes(2); + expect(secondLog).not.toHaveBeenCalled(); +}); + +for (const timeout of [-1, NaN, Infinity, 2_147_483_648]) { + test(`rejects invalid timeout ${timeout} before caller execution`, async () => { + const caller = axios.create(); + const request = vi.spyOn(caller, 'request'); + await expect(owned(caller).get('/error', { timeout })).rejects.toThrow('Invalid HTTP timeout'); + expect(request).not.toHaveBeenCalled(); + }); +} + +test('preserves a custom retry predicate failure rather than masking it', async () => { + const caller = axios.create(); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + const failure = new Error('custom policy failed'); + const client = owned(caller, { + ...policy, + retryCondition: () => { + throw failure; + }, + }); + await expect(client.get('/error')).rejects.toBe(failure); +}); + +test('reads the caller transform defaults anew for each retry attempt', async () => { + const caller = axios.create({ transformRequest: [(data) => JSON.stringify({ first: data })] }); + const bodies: unknown[] = []; + caller.defaults.adapter = async (config) => { + bodies.push(config.data); + if (bodies.length === 1) { + caller.defaults.transformRequest = [(data) => JSON.stringify({ second: data })]; + throw failed(config, 'ERR_NETWORK'); + } + return success(config); + }; + await owned(caller).put( + '/query', + { raw: true }, + { headers: { 'Content-Type': 'application/json' } }, + ); + expect(bodies).toEqual(['{"first":{"raw":true}}', '{"second":{"raw":true}}']); +}); + +test('preserves intentional caller recovery and transform replacement', async () => { + const caller = axios.create(); + const transform = vi.fn((data) => data); + caller.interceptors.request.use((config) => { + config.transformRequest = [transform]; + return config; + }); + caller.interceptors.response.use(undefined, (error) => { + assert(axios.isAxiosError(error) && error.config); + return success(error.config, { callerRecovered: true }); + }); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_BAD_RESPONSE', 503); + }; + const response = await owned(caller).get('/query'); + expect(response.data).toEqual({ callerRecovered: true }); + expect(transform).toHaveBeenCalledTimes(1); + expect(request).toHaveBeenCalledTimes(1); +}); + +test('preserves an unexpected caller exception without retrying', async () => { + const caller = axios.create(); + const failure = new Error('caller hook failed'); + caller.interceptors.request.use(() => { + throw failure; + }); + const request = vi.spyOn(caller, 'request'); + await expect(owned(caller).get('/query')).rejects.toBe(failure); + expect(request).toHaveBeenCalledTimes(1); +}); + +for (const retry of [ + false, + { ...policy, retryMethods: [] }, + { ...policy, retryCondition: () => false }, +] satisfies (IRetryConfig | false)[]) { + test(`disabled or excluded retry policy stays single-attempt ${JSON.stringify(retry)}`, async () => { + const caller = axios.create(); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + const client = createOwnedTransport({ + caller, + logger, + name: 'test', + retry: resolveRetryConfig(retry), + }); + await expect(client.get('/query')).rejects.toThrow('transport failed'); + expect(request).toHaveBeenCalledTimes(1); + }); +} + +for (const header of ['Retry-After', 'retry-after']) { + test(`honors case-insensitive ${header} before scheduling beyond the timeout budget`, async () => { + const caller = axios.create({ timeout: 100 }); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + const error = failed(config, 'ERR_BAD_RESPONSE', 429); + if (error.response) error.response.headers = new AxiosHeaders({ [header]: '2' }); + throw error; + }; + await expect(owned(caller, { ...policy, maxDelay: 200 }).get('/query')).rejects.toThrow( + 'transport failed', + ); + expect(request).toHaveBeenCalledTimes(1); + }); +} + +test('a canceled caller token prevents any caller pipeline or retry callback', async () => { + const token = axios.CancelToken.source(); + token.cancel('already canceled'); + const caller = axios.create({ cancelToken: token.token }); + const request = vi.spyOn(caller, 'request'); + const predicate = vi.fn(() => true); + await expect( + owned(caller, { ...policy, retryCondition: predicate }).get('/query'), + ).rejects.toMatchObject({ code: 'ERR_CANCELED' }); + expect(request).not.toHaveBeenCalled(); + expect(predicate).not.toHaveBeenCalled(); +}); + +test('event-loop delay cannot start another attempt after the retry budget expires', async () => { + vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] }); + let clock = 0; + vi.spyOn(performance, 'now').mockImplementation(() => clock); + try { + const caller = axios.create({ timeout: 30 }); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + const promise = owned(caller, { ...policy, retryDelay: 10, maxDelay: 10 }).get('/query'); + const rejected = expect(promise).rejects.toMatchObject({ code: 'ERR_NETWORK' }); + await vi.advanceTimersByTimeAsync(0); + expect(vi.getTimerCount()).toBe(1); + clock = 40; + await vi.advanceTimersByTimeAsync(10); + await rejected; + expect(request).toHaveBeenCalledTimes(1); + expect(vi.getTimerCount()).toBe(0); + } finally { + vi.useRealTimers(); + } +}); + +for (const cancellation of ['signal', 'token']) { + test(`caller-hook ${cancellation} cancels backoff before re-entering its pipeline`, async () => { + vi.useFakeTimers(); + try { + const controller = new AbortController(); + const token = axios.CancelToken.source(); + const remove = vi.spyOn(controller.signal, 'removeEventListener'); + const unsubscribe = vi.spyOn(token.token, 'unsubscribe'); + const caller = axios.create(); + const hook = vi.fn((config: InternalAxiosRequestConfig) => { + if (cancellation === 'signal') config.signal = controller.signal; + else config.cancelToken = token.token; + return config; + }); + caller.interceptors.request.use(hook); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + const client = owned(caller, { ...policy, retryDelay: 350, maxDelay: 350 }); + const promise = client.get('/query'); + const rejected = expect(promise).rejects.toMatchObject({ code: 'ERR_CANCELED' }); + await vi.advanceTimersByTimeAsync(0); + expect(vi.getTimerCount()).toBe(1); + if (cancellation === 'signal') controller.abort(); + else token.cancel('stop'); + await vi.advanceTimersByTimeAsync(0); + expect(vi.getTimerCount()).toBe(0); + await rejected; + await vi.advanceTimersByTimeAsync(1000); + expect(request).toHaveBeenCalledTimes(1); + expect(hook).toHaveBeenCalledTimes(1); + if (cancellation === 'signal') expect(remove).toHaveBeenCalled(); + else expect(unsubscribe).toHaveBeenCalled(); + } finally { + vi.useRealTimers(); + } + }); +} + +for (const method of ['post', 'patch']) { + test(`does not retry a safe request rewritten to ${method} by a caller hook`, async () => { + const caller = axios.create(); + const predicate = vi.fn(() => true); + caller.interceptors.request.use((config) => { + config.method = method; + return config; + }); + const seen: (string | undefined)[] = []; + caller.defaults.adapter = async (config) => { + seen.push(config.method); + throw failed(config, 'ERR_BAD_RESPONSE', 503); + }; + await expect( + owned(caller, { ...policy, retryCondition: predicate }).get('/query'), + ).rejects.toThrow('transport failed'); + expect(seen).toEqual([method]); + expect(predicate).not.toHaveBeenCalled(); + }); +} + +test('rewriting an originally unsafe request to GET does not enable SDK retry', async () => { + const caller = axios.create(); + caller.interceptors.request.use((config) => { + config.method = 'get'; + return config; + }); + const request = vi.spyOn(caller, 'request'); + caller.defaults.adapter = async (config) => { + throw failed(config, 'ERR_NETWORK'); + }; + await expect(owned(caller).post('/query', {})).rejects.toThrow('transport failed'); + expect(request).toHaveBeenCalledTimes(1); +}); diff --git a/src/utils/http-transport.ts b/src/utils/http-transport.ts new file mode 100644 index 00000000..172d4906 --- /dev/null +++ b/src/utils/http-transport.ts @@ -0,0 +1,212 @@ +import axios, { + CanceledError, + isAxiosError, + type AxiosDefaults, + type AxiosInstance, + type AxiosRequestConfig, + type AxiosResponse, + type InternalAxiosRequestConfig, +} from 'axios'; +import { type Logger } from 'pino'; + +import { + diagnosticRequestSecrets, + diagnosticSecrets, + diagnosticStatus, + diagnosticUrl, + recordDiagnosticSecrets, +} from '#src/utils/diagnostics'; + +import { + calculateRetryDelay, + isNonRetryableError, + type IResolvedRetryConfig, +} from '#src/utils/retry'; + +interface TransportOptions { + caller: AxiosInstance; + logger: Logger; + retry: IResolvedRetryConfig; + name: string; + defaults?: Pick; +} + +function throwIfCancelled(config: InternalAxiosRequestConfig): void { + config.cancelToken?.throwIfRequested(); + if (config.signal?.aborted) throw new CanceledError('Request canceled', config); +} + +/** Waits between attempts, releasing both cancellation subscriptions on every completion. */ +function waitForRetry( + delay: number, + configs: readonly InternalAxiosRequestConfig[], +): Promise { + for (const config of configs) throwIfCancelled(config); + const signals = new Set( + configs.map((config) => config.signal).filter((signal) => signal !== undefined), + ); + const tokens = new Set( + configs.map((config) => config.cancelToken).filter((token) => token !== undefined), + ); + return new Promise((resolve, reject) => { + const cleanup = () => { + clearTimeout(timer); + for (const signal of signals) signal.removeEventListener?.('abort', cancel); + for (const token of tokens) token.unsubscribe(cancel); + }; + const cancel = () => { + cleanup(); + const config = configs.find((entry) => entry.cancelToken?.reason || entry.signal?.aborted); + reject(config?.cancelToken?.reason ?? new CanceledError('Request canceled', config)); + }; + const timer = setTimeout(() => { + cleanup(); + resolve(); + }, delay); + for (const signal of signals) signal.addEventListener?.('abort', cancel); + for (const token of tokens) token.subscribe(cancel); + if (configs.some((config) => config.signal?.aborted || config.cancelToken?.reason)) cancel(); + }); +} + +async function dispatch( + options: TransportOptions, + config: InternalAxiosRequestConfig, +): Promise { + // The SDK may supply serialized JSON; the caller owns applied transforms and its adapter. + const { + adapter: _adapter, + transformRequest: _request, + transformResponse: _response, + ...requestConfig + } = config; + const forward: InternalAxiosRequestConfig = requestConfig; + const signal = forward.signal ?? options.caller.defaults.signal; + const cancelToken = forward.cancelToken ?? options.caller.defaults.cancelToken; + if (signal !== undefined) forward.signal = signal; + if (cancelToken !== undefined) forward.cancelToken = cancelToken; + const timeout = forward.timeout ?? options.caller.defaults.timeout; + if ( + timeout !== undefined && + (!Number.isFinite(timeout) || timeout < 0 || timeout > 2_147_483_647) + ) { + throw new TypeError('Invalid HTTP timeout: expected milliseconds between 0 and 2147483647.'); + } + const callerSecrets = diagnosticSecrets(options.caller.defaults.headers); + const privacy = diagnosticRequestSecrets({ config: forward }, callerSecrets); + const requestUrl = diagnosticUrl(forward.url, privacy) ?? ''; + const started = performance.now(); + const method = (forward.method ?? 'GET').toUpperCase(); + const retry = options.retry; + const canRetry = retry.enabled && retry.retryMethods.includes(method); + let retries = 0; + let cancellationConfig = forward; + try { + while (true) { + throwIfCancelled(forward); + throwIfCancelled(cancellationConfig); + // Axios applies default Basic auth after merging headers. Keep the SDK's explicit Bearer + // token authoritative without touching caller defaults; caller hooks may still replace transforms. + const transforms = options.caller.defaults.transformRequest; + forward.transformRequest = [ + ...(Array.isArray(transforms) ? transforms : transforms ? [transforms] : []), + function clearDefaultBasicAuth(this: InternalAxiosRequestConfig, data: unknown): unknown { + delete this.auth; + return data; + }, + ]; + options.logger.debug( + { transport: options.name, method, url: requestUrl }, + `Sending HTTP request: ${method} ${requestUrl}`, + ); + try { + // Plain headers let a caller's other Axios module instance merge its live defaults. + const response = await options.caller.request({ + ...forward, + headers: { ...forward.headers }, + }); + const status = diagnosticStatus(response.status); + options.logger.debug( + { + transport: options.name, + method, + url: requestUrl, + status, + }, + `Received HTTP response: ${method} ${requestUrl}, status: ${status ?? 'unknown'}`, + ); + return response; + } catch (error) { + throwIfCancelled(forward); + if (isAxiosError(error) && error.config) cancellationConfig = error.config; + throwIfCancelled(cancellationConfig); + if ( + !canRetry || + retries >= retry.maxRetries || + !isAxiosError(error) || + !retry.retryMethods.includes((error.config?.method ?? method).toUpperCase()) || + isNonRetryableError(error) + ) + throw error; + const decision = retry.retryCondition(error); + if (typeof decision !== 'boolean') { + throw new TypeError('Invalid retry.retryCondition result: expected a boolean.', { + cause: error, + }); + } + if (!decision) throw error; + const retryAfter = Object.entries(error.response?.headers ?? {}).find( + ([name]) => name.toLowerCase() === 'retry-after', + )?.[1]; + const delay = calculateRetryDelay(retries, retry, retryAfter); + if (timeout !== undefined && timeout > 0 && performance.now() - started + delay >= timeout) + throw error; + retries += 1; + const status = diagnosticStatus(error.response?.status); + options.logger.warn( + { + transport: options.name, + method, + url: requestUrl, + retry: retries, + status, + }, + `[${options.name}] Request failed (${status ?? 'network error'}), ` + + `retry ${retries}/${retry.maxRetries}: ${method} ${requestUrl}`, + ); + await waitForRetry(delay, [forward, cancellationConfig]); + throwIfCancelled(cancellationConfig); + if (timeout !== undefined && timeout > 0) { + const remaining = timeout - (performance.now() - started); + if (remaining <= 0) throw error; + forward.timeout = remaining; + } + } + } + } catch (error) { + recordDiagnosticSecrets(error, privacy); + throw error; + } +} + +/** + * Creates a private SDK facade without registering anything on the caller's Axios instance. + * + * @param options - Caller transport, SDK retry/logging policy and explicit routing defaults. + * @returns An SDK-owned instance delegating each attempt through the caller's live pipeline. + */ +export function createOwnedTransport(options: TransportOptions): AxiosInstance { + const client = axios.create(); + const defaults: AxiosDefaults = { + allowAbsoluteUrls: true, + adapter: (config) => dispatch(options, config), + transformRequest: [], + transformResponse: [], + headers: { common: {}, delete: {}, get: {}, head: {}, post: {}, put: {}, patch: {} }, + }; + // Axios binds request() to this original defaults object. Clear only our new facade's + // inherited defaults so an implicit timeout:0 or transform cannot mask caller defaults. + for (const key of Object.keys(client.defaults)) Reflect.deleteProperty(client.defaults, key); + Object.assign(client.defaults, defaults, options.defaults); + return client; +} diff --git a/src/utils/regex.ts b/src/utils/regex.ts deleted file mode 100644 index 61f17521..00000000 --- a/src/utils/regex.ts +++ /dev/null @@ -1,48 +0,0 @@ -export function escapeRegex(s: string): string { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); -} - -function makeRegexGlobal(re: RegExp): RegExp { - if (re.global) { - return re; - } - - let flags = 'g'; - flags += re.ignoreCase ? 'i' : ''; - flags += re.multiline ? 'm' : ''; - - return new RegExp(re.source, flags); -} - -export interface RegexMatch { - start: number; // index of match first letter - end: number; // index of match last letter - length: number; // length of matched string - groups: string[]; -} - -/** - * RegExp: Get all matches and capturing groups - * @param {RegExp} re - * @param {String} str - * @returns {Array>} - */ -export function matchAll(re: RegExp, str: string): RegexMatch[] { - const matches = []; - - const regex = makeRegexGlobal(re); - - let groups; - while ((groups = regex.exec(str)) !== null) { - const found = Array.from(groups); - const length = found[0].length; - matches.push({ - start: groups.index, - end: groups.index + length - 1, - length: length, - groups: found, - }); - } - - return matches; -} diff --git a/src/utils/retry-interceptor.ts b/src/utils/retry-interceptor.ts deleted file mode 100644 index 69cd418e..00000000 --- a/src/utils/retry-interceptor.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { AxiosError, AxiosInstance } from 'axios'; -import axiosRetry from 'axios-retry'; -import { Logger } from 'pino'; - -import { calculateRetryDelay, IResolvedRetryConfig } from './retry'; - -/** - * Installs retry behavior on an axios instance using the axios-retry library, - * driven by our resolved retry configuration (delay/condition policy). - */ -export class AxiosRetryInterceptor { - /** - * Setup retry on an axios instance. - * - * @param axiosInstance - The axios instance to add retry capability to - * @param config - Resolved retry configuration - * @param logger - Logger instance for retry attempt logging - * @param clientName - Name of the client for logging purposes (e.g., 'API', 'PDP', 'OPA') - */ - static setupInterceptor( - axiosInstance: AxiosInstance, - config: IResolvedRetryConfig, - logger: Logger, - clientName = 'HTTP', - ): void { - if (!config.enabled) { - return; - } - - axiosRetry(axiosInstance, { - retries: config.maxRetries, - shouldResetTimeout: true, - - // Preserve our policy: per-instance method filtering (REST excludes POST, - // PDP includes it) plus our error condition (network + retryable status). - retryCondition: (error: AxiosError): boolean => { - const method = (error.config?.method ?? 'GET').toUpperCase(); - if (!config.retryMethods.includes(method)) { - return false; - } - return config.retryCondition(error); - }, - - // axios-retry's retryCount is 1-based (1 on the first retry); our - // calculateRetryDelay expects a 0-based attempt number, so subtract one. - retryDelay: (retryCount: number, error: AxiosError): number => { - const retryAfterHeader = error.response?.headers?.['retry-after'] as string | undefined; - return calculateRetryDelay(retryCount - 1, config, retryAfterHeader); - }, - - onRetry: (retryCount: number, error: AxiosError): void => { - const status = error.response?.status ?? 'network error'; - const method = (error.config?.method ?? 'GET').toUpperCase(); - const url = error.config?.url ?? 'unknown'; - logger.warn( - `[${clientName}] Request failed (${status}), ` + - `retry ${retryCount}/${config.maxRetries}: ${method} ${url}`, - ); - }, - }); - } -} diff --git a/src/utils/retry.test.ts b/src/utils/retry.test.ts new file mode 100644 index 00000000..f55ec76a --- /dev/null +++ b/src/utils/retry.test.ts @@ -0,0 +1,98 @@ +import { AxiosError, CanceledError } from 'axios'; +import { expect, test, vi } from 'vitest'; + +import { + calculateRetryDelay, + defaultRetryCondition, + parseRetryAfter, + resolveRetryConfig, +} from '#src/utils/retry'; + +for (const value of [ + null, + true, + [], + 1, + 'enabled', + { enabled: null }, + { enabled: 'true' }, + { respectRetryAfter: 1 }, + { maxRetries: -1 }, + { maxRetries: 0.5 }, + { maxRetries: Number.MAX_SAFE_INTEGER + 1 }, + { maxRetries: NaN }, + { maxRetries: Infinity }, + { retryDelay: -1 }, + { retryDelay: Infinity }, + { retryDelay: 2_147_483_648 }, + { maxDelay: NaN }, + { maxDelay: -1 }, + { maxDelay: 2_147_483_648 }, + { backoffMultiplier: 0.5 }, + { backoffMultiplier: Infinity }, + { retryCondition: true }, + { retryMethods: 'GET' }, + { retryMethods: ['invalid'] }, + { retryMethods: [3] }, + { retryMethods: Array(1) }, +]) { + test(`rejects invalid JavaScript retry configuration ${JSON.stringify(value)}`, () => { + expect(() => Reflect.apply(resolveRetryConfig, undefined, [value])).toThrow(/Invalid retry/); + }); +} + +for (const code of [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ECONNABORTED', + 'ETIMEDOUT', + 'EAI_AGAIN', + 'EPIPE', + 'ENETUNREACH', + 'EHOSTUNREACH', + 'ERR_NETWORK', +]) { + test(`classifies transient network code ${code}`, () => { + expect(defaultRetryCondition(new AxiosError('network', code))).toBe(true); + }); +} +for (const code of [ + undefined, + 'ERR_BAD_OPTION_VALUE', + 'ERR_INVALID_URL', + 'ERR_CANCELED', + 'UNKNOWN', + 'ENOTFOUND', +]) { + test(`does not classify missing/permanent code ${code} as transient`, () => { + expect(defaultRetryCondition(new AxiosError('failure', code))).toBe(false); + }); +} +test('cancellation stays nonretryable without a code', () => { + const error = new CanceledError('stop'); + delete error.code; + expect(defaultRetryCondition(error)).toBe(false); +}); + +for (const header of [null, 5, ['5'], {}, '', '-1', '1.5', 'Infinity', '9'.repeat(400)]) { + test(`ignores malformed Retry-After ${JSON.stringify(header)}`, () => { + expect(parseRetryAfter(header)).toBeNull(); + }); +} +for (const retryDelay of [0, 100]) { + test(`bounds backoff overflow with initial delay ${retryDelay}`, () => { + const random = vi.spyOn(Math, 'random').mockReturnValue(0); + try { + const config = resolveRetryConfig({ + retryDelay, + backoffMultiplier: Number.MAX_VALUE, + maxDelay: 1000, + }); + const delay = calculateRetryDelay(10, config); + expect(delay).toBe(retryDelay === 0 ? 0 : 1000); + expect(Number.isFinite(delay)).toBe(true); + } finally { + random.mockRestore(); + } + }); +} diff --git a/src/utils/retry.ts b/src/utils/retry.ts index 0cec80f2..17d47b3f 100644 --- a/src/utils/retry.ts +++ b/src/utils/retry.ts @@ -1,4 +1,4 @@ -import { AxiosError } from 'axios'; +import { AxiosError, isCancel } from 'axios'; /** * HTTP status codes that should trigger a retry. @@ -61,7 +61,8 @@ export interface IRetryConfig { /** * Custom function to determine if a request should be retried. - * If not provided, uses default retry condition (network errors + retryable status codes). + * If not provided, retries recognized transient network errors and retryable status codes. + * Cancellation, invalid request configuration and unsafe REST methods cannot be overridden. */ retryCondition?: RetryConditionFn; @@ -72,9 +73,10 @@ export interface IRetryConfig { /** * HTTP methods to retry. Defaults to ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']. - * POST is excluded by default as it may not be idempotent. + * REST POST/PATCH are never retried by the SDK, even if listed. PDP/OPA authorization + * POST requests are idempotent and are added to their separate retry policy. */ - retryMethods?: string[]; + retryMethods?: readonly string[]; } /** @@ -95,13 +97,41 @@ export interface IResolvedRetryConfig { * Default retry condition: retry on network errors and retryable HTTP status codes */ export function defaultRetryCondition(error: AxiosError): boolean { - // Network errors (no response) - connection refused, timeout, etc. - if (!error.response) { - return true; - } + if (isNonRetryableError(error)) return false; + if (error.response) return RETRYABLE_STATUS_CODES.includes(error.response.status); + return transientNetworkCodes.has(error.code ?? ''); +} + +const transientNetworkCodes = new Set([ + 'ERR_NETWORK', + 'ECONNRESET', + 'ECONNREFUSED', + 'ECONNABORTED', + 'ETIMEDOUT', + 'EAI_AGAIN', + 'EPIPE', + 'ENETUNREACH', + 'EHOSTUNREACH', +]); +const permanentErrorCodes = new Set([ + 'ERR_CANCELED', + 'ERR_BAD_OPTION', + 'ERR_BAD_OPTION_VALUE', + 'ERR_INVALID_URL', + 'ERR_NOT_SUPPORT', + 'ERR_DEPRECATED', + 'ERR_FR_TOO_MANY_REDIRECTS', +]); - // Retryable status codes - return RETRYABLE_STATUS_CODES.includes(error.response.status); +/** Cancellation and invalid request configuration cannot be overridden by retry predicates. */ +export function isNonRetryableError(error: AxiosError): boolean { + return ( + isCancel(error) || + Boolean(error.config?.signal?.aborted) || + Boolean(error.config?.cancelToken?.reason) || + permanentErrorCodes.has(error.code ?? '') || + (!error.response && ['ERR_BAD_REQUEST', 'ERR_BAD_RESPONSE'].includes(error.code ?? '')) + ); } /** @@ -129,16 +159,19 @@ export const DEFAULT_RETRY_CONFIG: IResolvedRetryConfig = Object.freeze({ * @param value - The Retry-After header value * @returns The delay in milliseconds, or null if parsing fails */ -export function parseRetryAfter(value: string): number | null { +export function parseRetryAfter(value: unknown): number | null { + if (typeof value !== 'string') return null; // Try parsing as delta-seconds. Per the Retry-After spec this must be // digits only, so reject values like "5abc" that parseInt would accept. const trimmed = value.trim(); if (/^\d+$/.test(trimmed)) { - return Number(trimmed) * 1000; + const milliseconds = Number(trimmed) * 1000; + return Number.isFinite(milliseconds) ? milliseconds : null; } // Try parsing as HTTP-date (e.g., "Wed, 21 Oct 2015 07:28:00 GMT") - const date = Date.parse(value); + if (!/^[A-Za-z]{3,9},?\s/.test(trimmed)) return null; + const date = Date.parse(trimmed); if (!isNaN(date)) { return Math.max(0, date - Date.now()); } @@ -157,7 +190,7 @@ export function parseRetryAfter(value: string): number | null { export function calculateRetryDelay( attemptNumber: number, config: IResolvedRetryConfig, - retryAfterHeader?: string, + retryAfterHeader?: unknown, ): number { // Respect Retry-After header if present and configured if (config.respectRetryAfter && retryAfterHeader) { @@ -168,7 +201,13 @@ export function calculateRetryDelay( } // Exponential backoff: delay * (multiplier ^ attempt) - const exponentialDelay = config.retryDelay * Math.pow(config.backoffMultiplier, attemptNumber); + const exponentialDelay = + config.retryDelay === 0 + ? 0 + : Math.min( + config.retryDelay * Math.pow(config.backoffMultiplier, attemptNumber), + config.maxDelay, + ); // Add jitter (0-10% of the delay) to prevent thundering herd const jitter = Math.random() * 0.1 * exponentialDelay; @@ -189,7 +228,7 @@ export function resolveRetryConfig( // No retry config (undefined) or explicit `false` => retries are off. // Return a fresh object with a cloned retryMethods array so callers can // never mutate DEFAULT_RETRY_CONFIG or its array. - if (!userConfig) { + if (userConfig === undefined || userConfig === false) { return { ...DEFAULT_RETRY_CONFIG, enabled: false, @@ -197,6 +236,7 @@ export function resolveRetryConfig( }; } + validateRetryConfig(userConfig); // Providing a retry config object opts you in, unless `enabled: false` is set. const retryMethods = userConfig.retryMethods ?? DEFAULT_RETRY_CONFIG.retryMethods; return { @@ -212,3 +252,62 @@ export function resolveRetryConfig( retryMethods: retryMethods.map((m) => m.toUpperCase()), }; } + +const maximumTimerDelay = 2_147_483_647; +const httpMethods = new Set([ + 'GET', + 'HEAD', + 'OPTIONS', + 'PUT', + 'DELETE', + 'POST', + 'PATCH', + 'TRACE', + 'CONNECT', +]); + +function validateRetryConfig(config: IRetryConfig): void { + if (config === null || typeof config !== 'object' || Array.isArray(config)) { + throw new TypeError('Invalid retry configuration: use an options object or false.'); + } + for (const key of ['enabled', 'respectRetryAfter'] as const) { + if (config[key] !== undefined && typeof config[key] !== 'boolean') { + throw new TypeError(`Invalid retry.${key}: expected a boolean.`); + } + } + if ( + config.maxRetries !== undefined && + (!Number.isSafeInteger(config.maxRetries) || config.maxRetries < 0) + ) { + throw new TypeError('Invalid retry.maxRetries: expected a nonnegative safe integer.'); + } + for (const key of ['retryDelay', 'maxDelay'] as const) { + const value = config[key]; + if ( + value !== undefined && + (!Number.isFinite(value) || value < 0 || value > maximumTimerDelay) + ) { + throw new TypeError( + `Invalid retry.${key}: expected milliseconds between 0 and ${maximumTimerDelay}.`, + ); + } + } + if ( + config.backoffMultiplier !== undefined && + (!Number.isFinite(config.backoffMultiplier) || config.backoffMultiplier < 1) + ) { + throw new TypeError('Invalid retry.backoffMultiplier: expected a finite number of at least 1.'); + } + if (config.retryCondition !== undefined && typeof config.retryCondition !== 'function') { + throw new TypeError('Invalid retry.retryCondition: expected a function returning a boolean.'); + } + if ( + config.retryMethods !== undefined && + (!Array.isArray(config.retryMethods) || + Array.from(config.retryMethods).some( + (method) => typeof method !== 'string' || !httpMethods.has(method.toUpperCase()), + )) + ) { + throw new TypeError('Invalid retry.retryMethods: expected an array of HTTP method names.'); + } +} diff --git a/src/utils/types.ts b/src/utils/types.ts deleted file mode 100644 index 2c0042c2..00000000 --- a/src/utils/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type RecursivePartial = { - [P in keyof T]?: RecursivePartial; -}; diff --git a/tools/compiler/docs.mjs b/tools/compiler/docs.mjs new file mode 100644 index 00000000..54ddf1de --- /dev/null +++ b/tools/compiler/docs.mjs @@ -0,0 +1,27 @@ +import { Application } from 'typedoc'; +import { resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; + +const args = process.argv.slice(2).filter((arg) => arg !== '--'); +const watch = args.includes('--watch'); +const outputIndex = args.indexOf('--out'); +const output = outputIndex === -1 ? 'docs' : args[outputIndex + 1]; +if (!output || output.startsWith('--')) throw new Error('--out requires an output directory.'); +const app = await Application.bootstrapWithPlugins({ options: 'typedoc.json', watch }); +async function generate(project) { + await app.generateDocs(project, output); + const { auditPublicExports, checkReferenceLinks } = await import( + pathToFileURL(resolve('scripts/public-reference.mjs')).href + ); + const contracts = auditPublicExports(process.cwd()); + const result = checkReferenceLinks(output, contracts.groups); + console.log('Public reference check PASS: ' + JSON.stringify(result)); +} +if (watch) { + await app.convertAndWatch(generate); +} else { + const project = await app.convert(); + if (!project) throw new Error('Documentation conversion failed; fix the reported diagnostics.'); + await generate(project); + if (app.logger.hasErrors() || app.logger.hasWarnings()) process.exitCode = 1; +} diff --git a/tools/compiler/index.mjs b/tools/compiler/index.mjs new file mode 100644 index 00000000..a37e84bc --- /dev/null +++ b/tools/compiler/index.mjs @@ -0,0 +1,2 @@ +// TypeScript 7 ships a native CLI; these tools need the maintained JavaScript compiler API. +export { default } from 'typescript'; diff --git a/tools/compiler/package.json b/tools/compiler/package.json new file mode 100644 index 00000000..f31fd787 --- /dev/null +++ b/tools/compiler/package.json @@ -0,0 +1,11 @@ +{ + "name": "@permitio/compiler-tools", + "version": "0.0.0", + "private": true, + "type": "module", + "exports": "./index.mjs", + "dependencies": { + "typedoc": "0.28.20", + "typescript": "6.0.3" + } +} diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..0125a593 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "target": "ES2023", + "lib": ["ES2023", "DOM"], + "rootDir": "src", + "outDir": "build", + "module": "ESNext", + "moduleResolution": "Bundler", + "declaration": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "strict": true, + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "verbatimModuleSyntax": true, + "isolatedModules": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "types": ["node"], + "paths": { + "#src/*": ["./src/*"] + } + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "src/tests", "src/**/*.test.ts"] +} diff --git a/tsconfig.json b/tsconfig.json index f766dcf7..452f2625 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,52 +1,3 @@ { - "compilerOptions": { - "target": "es2017", - "outDir": "build/main", - "rootDir": "src", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "inlineSourceMap": true, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - "resolveJsonModule": true /* Include modules imported with .json extension. */, - "strict": true /* Enable all strict type-checking options. */, - /* Strict Type-Checking Options */ - // "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, - // "strictNullChecks": true /* Enable strict null checks. */, - // "strictFunctionTypes": true /* Enable strict checking of function types. */, - // "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */, - // "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */, - // "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */, - /* Additional Checks */ - "noUnusedLocals": false /* Report errors on unused locals. */, - "noUnusedParameters": false /* Report errors on unused parameters. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, - /* Debugging Options */ - "traceResolution": false /* Report module resolution log messages. */, - "listEmittedFiles": false /* Print names of generated files part of the compilation. */, - "listFiles": false /* Print names of files part of the compilation. */, - "pretty": true /* Stylize errors and messages using color and context. */, - /* Experimental Options */ - // "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, - // "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */, - "lib": [ - "es2017", - "DOM" - ], - "types": [ - "node" - ], - "typeRoots": [ - "node_modules/@types", - "src/types" - ] - }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "node_modules/**" - ], - "compileOnSave": false -} \ No newline at end of file + "extends": "./tsconfig.test.json" +} diff --git a/tsconfig.module.json b/tsconfig.module.json deleted file mode 100644 index dfb74fa3..00000000 --- a/tsconfig.module.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "target": "esnext", - "outDir": "build/module", - "module": "esnext" - }, - "exclude": [ - "node_modules/**" - ] -} diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 00000000..ffcdadaf --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "noEmit": true, + "rootDir": ".", + "types": ["node", "vitest/globals"] + }, + "include": ["src/**/*.ts", "vitest.config.mts"], + "exclude": ["node_modules"] +} diff --git a/tsup.config.ts b/tsup.config.ts deleted file mode 100644 index 86ffdead..00000000 --- a/tsup.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'tsup'; - -export default defineConfig({ - entry: ['src/**/*.ts'], - format: ['cjs', 'esm'], - dts: false, - splitting: false, - // Source maps are intentionally not emitted: they are not used by the test - // suite and previously shipped ~77 MB of .map files in the published package - // (see PER-15197). The published artifact is the self-contained build/index.* - // bundle only; per-file outputs below exist solely so the test suite can - // import internal modules by relative path. - sourcemap: false, - clean: true, - outDir: 'build', - target: 'node16', -}); diff --git a/typedoc.json b/typedoc.json index bce29271..d6e3f7e6 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,7 +1,8 @@ { - "entryPoints": ["src/index.ts"], - "exclude": ["**/*.spec.ts"], - "out": "docs", - "excludePrivate": true, - "excludeProtected": true -} \ No newline at end of file + "entryPoints": ["src/index.ts"], + "tsconfig": "tsconfig.build.json", + "exclude": ["**/*.spec.ts"], + "out": "docs", + "excludePrivate": true, + "excludeProtected": true +} diff --git a/vitest.config.mts b/vitest.config.mts new file mode 100644 index 00000000..7c7b1d47 --- /dev/null +++ b/vitest.config.mts @@ -0,0 +1,69 @@ +import { fileURLToPath } from 'node:url'; + +import { + defineConfig, + type TestProjectInlineConfiguration, + type TestUserConfig, +} from 'vitest/config'; + +type ProjectOptions = NonNullable; + +// The integration and e2e suites share one Permit environment. A project with `isolate: true`, +// `maxWorkers: 1` and the default `sequence.groupOrder` has its files placed in Vitest's single +// sequential group, which runs one file at a time, so the backend files never overlap, even when +// both projects run in the same `vitest run`. `bail: 1` stops the run at the first failure, so +// later files don't wait out their propagation budgets against an environment left in an +// unknown state. afterAll hooks still run after a bail or a test timeout. +const serialBackend: ProjectOptions = { + globals: true, + pool: 'forks', + isolate: true, + maxWorkers: 1, + fileParallelism: false, + bail: 1, + testTimeout: 300_000, + hookTimeout: 300_000, +}; + +const projects: TestProjectInlineConfiguration[] = [ + { test: { name: 'codegen', include: ['scripts/check-codegen.spec.mjs', 'scripts/*.test.mjs'] } }, + { + test: { + name: 'unit', + globals: true, + include: ['src/tests/unit/**/*.spec.ts', 'src/**/*.test.ts'], + }, + }, + { + test: { + name: 'module-imports', + globals: true, + include: ['src/tests/module-imports/**/*.spec.ts'], + }, + }, + { + test: { name: 'integration', include: ['src/tests/endpoints/**/*.spec.ts'], ...serialBackend }, + }, + { test: { name: 'e2e', include: ['src/tests/e2e/**/*.spec.ts'], ...serialBackend } }, +]; + +// Inline projects don't inherit root test options, so only run-wide settings belong here. +const test: TestUserConfig = { + projects: projects.map((project) => ({ + ...project, + resolve: { + alias: { + '#src': fileURLToPath(new URL('./src', import.meta.url)), + '#scripts': fileURLToPath(new URL('./scripts', import.meta.url)), + }, + }, + })), + coverage: { + provider: 'v8', + include: ['src/**/*.ts'], + exclude: ['src/openapi/**', 'src/tests/**', 'src/**/*.test.ts'], + reporter: ['text', 'html', 'lcov', 'json-summary'], + }, +}; + +export default defineConfig({ test }); diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 4d08fd79..00000000 --- a/yarn.lock +++ /dev/null @@ -1,7012 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - -"@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@ava/typescript@^1.1.1": - version "1.1.1" - resolved "https://registry.npmjs.org/@ava/typescript/-/typescript-1.1.1.tgz" - integrity sha512-KbLUAe2cWXK63WLK6LnOJonjwEDU/8MNXCOA1ooX/YFZgKRmeAD1kZu+2K0ks5fnOCEcckNQAooyBNGdZUmMQA== - dependencies: - escape-string-regexp "^2.0.0" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.27.1": - version "7.27.1" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz" - integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== - dependencies: - "@babel/helper-validator-identifier" "^7.27.1" - js-tokens "^4.0.0" - picocolors "^1.1.1" - -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/compat-data@^7.22.9": - version "7.22.9" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" - integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== - -"@babel/core@^7.0.0", "@babel/core@^7.7.5": - version "7.22.10" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz" - integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.10" - "@babel/generator" "^7.22.10" - "@babel/helper-compilation-targets" "^7.22.10" - "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.10" - "@babel/parser" "^7.22.10" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.10" - "@babel/types" "^7.22.10" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.1" - -"@babel/generator@^7.22.10", "@babel/generator@^7.27.3": - version "7.27.5" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz" - integrity sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw== - dependencies: - "@babel/parser" "^7.27.5" - "@babel/types" "^7.27.3" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^3.0.2" - -"@babel/helper-compilation-targets@^7.22.10": - version "7.22.10" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz" - integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== - dependencies: - "@babel/compat-data" "^7.22.9" - "@babel/helper-validator-option" "^7.22.5" - browserslist "^4.21.9" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz" - integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== - -"@babel/helper-module-imports@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz" - integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-transforms@^7.22.9": - version "7.22.9" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz" - integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-module-imports" "^7.22.5" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.5" - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.27.1": - version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz" - integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== - -"@babel/helper-validator-identifier@^7.22.5", "@babel/helper-validator-identifier@^7.27.1": - version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz" - integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== - -"@babel/helper-validator-option@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz" - integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== - -"@babel/helpers@^7.22.10": - version "7.22.10" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz" - integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== - dependencies: - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.10" - "@babel/types" "^7.22.10" - -"@babel/highlight@^7.10.4": - version "7.22.10" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz" - integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== - dependencies: - "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.4.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.22.10", "@babel/parser@^7.27.2", "@babel/parser@^7.27.4", "@babel/parser@^7.27.5": - version "7.27.5" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz" - integrity sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg== - dependencies: - "@babel/types" "^7.27.3" - -"@babel/runtime@^7.21.0": - version "7.22.10" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz" - integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/template@^7.22.5", "@babel/template@^7.27.2": - version "7.27.2" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz" - integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/parser" "^7.27.2" - "@babel/types" "^7.27.1" - -"@babel/traverse@^7.22.10", "@babel/traverse@^7.24.8": - version "7.27.4" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz" - integrity sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.27.3" - "@babel/parser" "^7.27.4" - "@babel/template" "^7.27.2" - "@babel/types" "^7.27.3" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.27.1", "@babel/types@^7.27.3": - version "7.27.6" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz" - integrity sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q== - dependencies: - "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" - -"@bitauth/libauth@^1.17.1": - version "1.19.1" - resolved "https://registry.npmjs.org/@bitauth/libauth/-/libauth-1.19.1.tgz" - integrity sha512-R524tD5VwOt3QRHr7N518nqTVR/HKgfWL4LypekcGuNQN8R4PWScvuRcRzrY39A28kLztMv+TJdiKuMNbkU1ug== - -"@commitlint/config-validator@^17.6.7": - version "17.6.7" - resolved "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.6.7.tgz" - integrity sha512-vJSncmnzwMvpr3lIcm0I8YVVDJTzyjy7NZAeXbTXy+MPUdAr9pKyyg7Tx/ebOQ9kqzE6O9WT6jg2164br5UdsQ== - dependencies: - "@commitlint/types" "^17.4.4" - ajv "^8.11.0" - -"@commitlint/execute-rule@^17.4.0": - version "17.4.0" - resolved "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz" - integrity sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA== - -"@commitlint/load@>6.1.1": - version "17.7.1" - resolved "https://registry.npmjs.org/@commitlint/load/-/load-17.7.1.tgz" - integrity sha512-S/QSOjE1ztdogYj61p6n3UbkUvweR17FQ0zDbNtoTLc+Hz7vvfS7ehoTMQ27hPSjVBpp7SzEcOQu081RLjKHJQ== - dependencies: - "@commitlint/config-validator" "^17.6.7" - "@commitlint/execute-rule" "^17.4.0" - "@commitlint/resolve-extends" "^17.6.7" - "@commitlint/types" "^17.4.4" - "@types/node" "20.4.7" - chalk "^4.1.0" - cosmiconfig "^8.0.0" - cosmiconfig-typescript-loader "^4.0.0" - lodash.isplainobject "^4.0.6" - lodash.merge "^4.6.2" - lodash.uniq "^4.5.0" - resolve-from "^5.0.0" - ts-node "^10.8.1" - typescript "^4.6.4 || ^5.0.0" - -"@commitlint/resolve-extends@^17.6.7": - version "17.6.7" - resolved "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.6.7.tgz" - integrity sha512-PfeoAwLHtbOaC9bGn/FADN156CqkFz6ZKiVDMjuC2N5N0740Ke56rKU7Wxdwya8R8xzLK9vZzHgNbuGhaOVKIg== - dependencies: - "@commitlint/config-validator" "^17.6.7" - "@commitlint/types" "^17.4.4" - import-fresh "^3.0.0" - lodash.mergewith "^4.6.2" - resolve-from "^5.0.0" - resolve-global "^1.0.0" - -"@commitlint/types@^17.4.4": - version "17.4.4" - resolved "https://registry.npmjs.org/@commitlint/types/-/types-17.4.4.tgz" - integrity sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ== - dependencies: - chalk "^4.1.0" - -"@concordance/react@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz" - integrity sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA== - dependencies: - arrify "^1.0.1" - -"@cspell/dict-aws@^1.0.13": - version "1.0.14" - resolved "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-1.0.14.tgz" - integrity sha512-K21CfB4ZpKYwwDQiPfic2zJA/uxkbsd4IQGejEvDAhE3z8wBs6g6BwwqdVO767M9NgZqc021yAVpr79N5pWe3w== - -"@cspell/dict-bash@^1.0.11": - version "1.0.18" - resolved "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-1.0.18.tgz" - integrity sha512-kJIqQ+FD2TCSgaaP5XLEDgy222+pVWTc+VhveNO++gnTWU3BCVjkD5LjfW7g/CmGONnz+nwXDueWspProaSdJw== - -"@cspell/dict-companies@^1.0.35": - version "1.0.40" - resolved "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-1.0.40.tgz" - integrity sha512-Aw07qiTroqSST2P5joSrC4uOA05zTXzI2wMb+me3q4Davv1D9sCkzXY0TGoC2vzhNv5ooemRi9KATGaBSdU1sw== - -"@cspell/dict-cpp@^1.1.37": - version "1.1.40" - resolved "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-1.1.40.tgz" - integrity sha512-sscfB3woNDNj60/yGXAdwNtIRWZ89y35xnIaJVDMk5TPMMpaDvuk0a34iOPIq0g4V+Y8e3RyAg71SH6ADwSjGw== - -"@cspell/dict-cryptocurrencies@^1.0.10": - version "1.0.10" - resolved "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-1.0.10.tgz" - integrity sha512-47ABvDJOkaST/rXipNMfNvneHUzASvmL6K/CbOFpYKfsd0x23Jc9k1yaOC7JAm82XSC/8a7+3Yu+Fk2jVJNnsA== - -"@cspell/dict-csharp@^1.0.10": - version "1.0.11" - resolved "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-1.0.11.tgz" - integrity sha512-nub+ZCiTgmT87O+swI+FIAzNwaZPWUGckJU4GN402wBq420V+F4ZFqNV7dVALJrGaWH7LvADRtJxi6cZVHJKeA== - -"@cspell/dict-css@^1.0.10": - version "1.0.13" - resolved "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-1.0.13.tgz" - integrity sha512-HU8RbFRoGanFH85mT01Ot/Ay48ixr/gG25VPLtdq56QTrmPsw79gxYm/5Qay16eQbpoPIxaj5CAWNam+DX4GbA== - -"@cspell/dict-django@^1.0.25": - version "1.0.26" - resolved "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-1.0.26.tgz" - integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== - -"@cspell/dict-dotnet@^1.0.24": - version "1.0.32" - resolved "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-1.0.32.tgz" - integrity sha512-9H9vXrgJB4KF8xsyTToXO53cXD33iyfrpT4mhCds+YLUw3P3x3E9myszgJzshnrxYBvQZ+QMII57Qr6SjZVk4Q== - -"@cspell/dict-elixir@^1.0.23": - version "1.0.26" - resolved "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-1.0.26.tgz" - integrity sha512-hz1yETUiRJM7yjN3mITSnxcmZaEyaBbyJhpZPpg+cKUil+xhHeZ2wwfbRc83QHGmlqEuDWbdCFqKSpCDJYpYhg== - -"@cspell/dict-en_us@^1.2.39": - version "1.2.45" - resolved "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-1.2.45.tgz" - integrity sha512-UPwR4rfiJCxnS+Py+EK9E4AUj3aPZE4p/yBRSHN+5aBQConlI0lLDtMceH5wlupA/sQTU1ERZGPJA9L96jVSyQ== - -"@cspell/dict-en-gb@^1.1.27": - version "1.1.33" - resolved "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz" - integrity sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g== - -"@cspell/dict-filetypes@^1.1.5": - version "1.1.8" - resolved "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-1.1.8.tgz" - integrity sha512-EllahNkhzvLWo0ptwu0l3oEeAJOQSUpZnDfnKRIh6mJVehuSovNHwA9vrdZ8jBUjuqcfaN2e7c32zN0D/qvWJQ== - -"@cspell/dict-fonts@^1.0.13": - version "1.0.14" - resolved "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-1.0.14.tgz" - integrity sha512-VhIX+FVYAnqQrOuoFEtya6+H72J82cIicz9QddgknsTqZQ3dvgp6lmVnsQXPM3EnzA8n1peTGpLDwHzT7ociLA== - -"@cspell/dict-fullstack@^1.0.36": - version "1.0.39" - resolved "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-1.0.39.tgz" - integrity sha512-Mbi+zWdiP9yzL+X4YD9Tgcm5YQ95Ql+Y3vF2LRnOY6g2QWaijTRN1rgksVuxzpFqHi//+bx2uoUb0XEKBYDi8g== - -"@cspell/dict-golang@^1.1.24": - version "1.1.24" - resolved "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-1.1.24.tgz" - integrity sha512-qq3Cjnx2U1jpeWAGJL1GL0ylEhUMqyaR36Xij6Y6Aq4bViCRp+HRRqk0x5/IHHbOrti45h3yy7ii1itRFo+Xkg== - -"@cspell/dict-haskell@^1.0.12": - version "1.0.13" - resolved "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-1.0.13.tgz" - integrity sha512-kvl8T84cnYRPpND/P3D86P6WRSqebsbk0FnMfy27zo15L5MLAb3d3MOiT1kW3vEWfQgzUD7uddX/vUiuroQ8TA== - -"@cspell/dict-html-symbol-entities@^1.0.23": - version "1.0.23" - resolved "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-1.0.23.tgz" - integrity sha512-PV0UBgcBFbBLf/m1wfkVMM8w96kvfHoiCGLWO6BR3Q9v70IXoE4ae0+T+f0CkxcEkacMqEQk/I7vuE9MzrjaNw== - -"@cspell/dict-html@^1.1.5": - version "1.1.9" - resolved "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-1.1.9.tgz" - integrity sha512-vvnYia0tyIS5Fdoz+gEQm77MGZZE66kOJjuNpIYyRHCXFAhWdYz3SmkRm6YKJSWSvuO+WBJYTKDvkOxSh3Fx/w== - -"@cspell/dict-java@^1.0.22": - version "1.0.23" - resolved "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-1.0.23.tgz" - integrity sha512-LcOg9srYLDoNGd8n3kbfDBlZD+LOC9IVcnFCdua1b/luCHNVmlgBx7e677qPu7olpMYOD5TQIVW2OmM1+/6MFA== - -"@cspell/dict-latex@^1.0.23": - version "1.0.25" - resolved "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-1.0.25.tgz" - integrity sha512-cEgg91Migqcp1SdVV7dUeMxbPDhxdNo6Fgq2eygAXQjIOFK520FFvh/qxyBvW90qdZbIRoU2AJpchyHfGuwZFA== - -"@cspell/dict-lorem-ipsum@^1.0.22": - version "1.0.22" - resolved "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-1.0.22.tgz" - integrity sha512-yqzspR+2ADeAGUxLTfZ4pXvPl7FmkENMRcGDECmddkOiuEwBCWMZdMP5fng9B0Q6j91hQ8w9CLvJKBz10TqNYg== - -"@cspell/dict-lua@^1.0.16": - version "1.0.16" - resolved "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-1.0.16.tgz" - integrity sha512-YiHDt8kmHJ8nSBy0tHzaxiuitYp+oJ66ffCYuFWTNB3//Y0SI4OGHU3omLsQVeXIfCeVrO4DrVvRDoCls9B5zQ== - -"@cspell/dict-node@^1.0.10": - version "1.0.12" - resolved "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-1.0.12.tgz" - integrity sha512-RPNn/7CSkflAWk0sbSoOkg0ORrgBARUjOW3QjB11KwV1gSu8f5W/ij/S50uIXtlrfoBLqd4OyE04jyON+g/Xfg== - -"@cspell/dict-npm@^1.0.10": - version "1.0.16" - resolved "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-1.0.16.tgz" - integrity sha512-RwkuZGcYBxL3Yux3cSG/IOWGlQ1e9HLCpHeyMtTVGYKAIkFAVUnGrz20l16/Q7zUG7IEktBz5O42kAozrEnqMQ== - -"@cspell/dict-php@^1.0.23": - version "1.0.25" - resolved "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-1.0.25.tgz" - integrity sha512-RoBIP5MRdByyPaXcznZMfOY1JdCMYPPLua5E9gkq0TJO7bX5mC9hyAKfYBSWVQunZydd82HZixjb5MPkDFU1uw== - -"@cspell/dict-powershell@^1.0.14": - version "1.0.19" - resolved "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-1.0.19.tgz" - integrity sha512-zF/raM/lkhXeHf4I43OtK0gP9rBeEJFArscTVwLWOCIvNk21MJcNoTYoaGw+c056+Q+hJL0psGLO7QN+mxYH1A== - -"@cspell/dict-python@^1.0.32": - version "1.0.38" - resolved "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-1.0.38.tgz" - integrity sha512-KuyOQaby9NID/pn7EkXilpUxjVIvvyLzhr7BPsDS6FcvUE8Yhss6bJowEDHSv6pa+W2387phoqbDf2rTicquAA== - -"@cspell/dict-ruby@^1.0.12": - version "1.0.15" - resolved "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-1.0.15.tgz" - integrity sha512-I76hJA///lc1pgmDTGUFHN/O8KLIZIU/8TgIYIGI6Ix/YzSEvWNdQYbANn6JbCynS0X+7IbZ2Ft+QqvmGtIWuA== - -"@cspell/dict-rust@^1.0.22": - version "1.0.23" - resolved "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-1.0.23.tgz" - integrity sha512-lR4boDzs79YD6+30mmiSGAMMdwh7HTBAPUFSB0obR3Kidibfc3GZ+MHWZXay5dxZ4nBKM06vyjtanF9VJ8q1Iw== - -"@cspell/dict-scala@^1.0.21": - version "1.0.21" - resolved "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-1.0.21.tgz" - integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== - -"@cspell/dict-software-terms@^1.0.24": - version "1.0.48" - resolved "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-1.0.48.tgz" - integrity sha512-pfF3Ys2gRffu5ElqkH7FQMDMi/iZMyOzpGMb3FSH0PJ2AnRQ5rRNWght1h2L36YxvXl0mWVaFrrfwiOyRIc8ZQ== - -"@cspell/dict-typescript@^1.0.16": - version "1.0.20" - resolved "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-1.0.20.tgz" - integrity sha512-yIuGeeZtQA2gqpGefGjZqBl8iGJpIYWz0QzDqsscNi2qfSnLsbjM0RkRbTehM8y9gGGe7xfgUP5adxceJa5Krg== - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@esbuild/darwin-arm64@0.25.5": - version "0.25.5" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz" - integrity sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ== - -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== - dependencies: - ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" - import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - strip-json-comments "^3.1.1" - -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== - dependencies: - "@humanwhocodes/object-schema" "^1.2.0" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/object-schema@^1.2.0": - version "1.2.1" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@hutson/parse-repository-url@^3.0.0": - version "3.0.2" - resolved "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz" - integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== - -"@isaacs/cliui@^8.0.2": - version "8.0.2" - resolved "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz" - integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== - dependencies: - string-width "^5.1.2" - string-width-cjs "npm:string-width@^4.2.0" - strip-ansi "^7.0.1" - strip-ansi-cjs "npm:strip-ansi@^6.0.1" - wrap-ansi "^8.1.0" - wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/nyc-config-typescript@^1.0.1": - version "1.0.2" - resolved "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.2.tgz" - integrity sha512-iKGIyMoyJuFnJRSVTZ78POIRvNnwZaWIf8vG4ZS3rQq58MMDrqEX2nnzx0R28V2X8JvmKYiqY9FP2hlJsm8A0w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": - version "0.3.8" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz" - integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": - version "3.1.1" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" - integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== - -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.25" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@lukeed/csprng@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz" - integrity sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA== - -"@nestjs/axios@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz" - integrity sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w== - dependencies: - axios "0.27.2" - -"@nestjs/common@^7.0.0 || ^8.0.0 || ^9.0.0", "@nestjs/common@^9.0.0", "@nestjs/common@9.3.11": - version "9.3.11" - resolved "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz" - integrity sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A== - dependencies: - iterare "1.2.1" - tslib "2.5.0" - uid "2.0.1" - -"@nestjs/core@9.3.11": - version "9.3.11" - resolved "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz" - integrity sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ== - dependencies: - "@nuxtjs/opencollective" "0.3.2" - fast-safe-stringify "2.1.1" - iterare "1.2.1" - path-to-regexp "3.2.0" - tslib "2.5.0" - uid "2.0.1" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@nuxtjs/opencollective@0.3.2": - version "0.3.2" - resolved "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz" - integrity sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA== - dependencies: - chalk "^4.1.0" - consola "^2.15.0" - node-fetch "^2.6.1" - -"@openapitools/openapi-generator-cli@^2.5.2": - version "2.7.0" - resolved "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz" - integrity sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg== - dependencies: - "@nestjs/axios" "0.1.0" - "@nestjs/common" "9.3.11" - "@nestjs/core" "9.3.11" - "@nuxtjs/opencollective" "0.3.2" - chalk "4.1.2" - commander "8.3.0" - compare-versions "4.1.4" - concurrently "6.5.1" - console.table "0.10.0" - fs-extra "10.1.0" - glob "7.1.6" - inquirer "8.2.5" - lodash "4.17.21" - reflect-metadata "0.1.13" - rxjs "7.8.0" - tslib "2.0.3" - -"@pkgjs/parseargs@^0.11.0": - version "0.11.0" - resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz" - integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== - -"@rollup/rollup-darwin-arm64@4.44.0": - version "4.44.0" - resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.0.tgz" - integrity sha512-VGF3wy0Eq1gcEIkSCr8Ke03CWT+Pm2yveKLaDvq51pPpZza3JX/ClxXOCmTYYq3us5MvEuNRTaeyFThCKRQhOA== - -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - -"@tokenizer/token@^0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz" - integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.4" - resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz" - integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== - -"@types/body-parser@*": - version "1.19.2" - resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.35" - resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/estree@1.0.8": - version "1.0.8" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz" - integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== - -"@types/express-serve-static-core@^4.17.33": - version "4.17.35" - resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz" - integrity sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - "@types/send" "*" - -"@types/express@^4.17.9": - version "4.17.17" - resolved "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/http-errors@*": - version "2.0.1" - resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz" - integrity sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ== - -"@types/json-schema@^7.0.7": - version "7.0.12" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@types/lodash@^4.14.166": - version "4.14.197" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz" - integrity sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g== - -"@types/mime@*", "@types/mime@^1": - version "1.3.2" - resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" - integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== - -"@types/minimist@^1.2.0": - version "1.2.2" - resolved "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz" - integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== - -"@types/node@*", "@types/node@^14.14.14": - version "14.18.54" - resolved "https://registry.npmjs.org/@types/node/-/node-14.18.54.tgz" - integrity sha512-uq7O52wvo2Lggsx1x21tKZgqkJpvwCseBBPtX/nKQfpVlEsLOb11zZ1CRsWUKvJF0+lzuA9jwvA7Pr2Wt7i3xw== - -"@types/node@20.4.7": - version "20.4.7" - resolved "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz" - integrity sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g== - -"@types/normalize-package-data@^2.4.0": - version "2.4.1" - resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz" - integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/send@*": - version "0.17.1" - resolved "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz" - integrity sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q== - dependencies: - "@types/mime" "^1" - "@types/node" "*" - -"@types/serve-static@*": - version "1.15.2" - resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz" - integrity sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw== - dependencies: - "@types/http-errors" "*" - "@types/mime" "*" - "@types/node" "*" - -"@types/url-parse@^1.4.11": - version "1.4.11" - resolved "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.11.tgz" - integrity sha512-FKvKIqRaykZtd4n47LbK/W/5fhQQ1X7cxxzG9A48h0BGN+S04NH7ervcCjM8tyR0lyGru83FAHSmw2ObgKoESg== - -"@typescript-eslint/eslint-plugin@^4.0.1": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== - dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/experimental-utils@^4.9.1", "@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== - dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - -"@typescript-eslint/parser@^4.0.0", "@typescript-eslint/parser@^4.0.1": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== - dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" - -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== - dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -acorn-jsx@^5.3.1: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-walk@^8.0.0, acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.0.4, acorn@^8.14.0, acorn@^8.4.1: - version "8.15.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz" - integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== - -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -add-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz" - integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== - -agent-base@6: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv@^6.10.0: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.1, ajv@^8.11.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-align@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz" - integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== - dependencies: - string-width "^4.1.0" - -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.1.0" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz" - integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== - -ansi-sequence-parser@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz" - integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -ansi-styles@^6.0.0: - version "6.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz" - integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - -ansi-styles@^6.1.0: - version "6.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz" - integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz" - integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -append-transform@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz" - integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== - dependencies: - default-require-extensions "^3.0.0" - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" - integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -argv@0.0.2: - version "0.0.2" - resolved "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz" - integrity sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw== - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz" - integrity sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw== - -array-ify@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz" - integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== - -array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - is-string "^1.0.7" - -array-timsort@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz" - integrity sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array.prototype.findlastindex@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz" - integrity sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.1.3" - -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.2.4, array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -arraybuffer.prototype.slice@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz" - integrity sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw== - dependencies: - array-buffer-byte-length "^1.0.0" - call-bind "^1.0.2" - define-properties "^1.2.0" - get-intrinsic "^1.2.1" - is-array-buffer "^3.0.2" - is-shared-array-buffer "^1.0.2" - -arrgv@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz" - integrity sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw== - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" - integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== - -arrify@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -async@^3.2.4: - version "3.2.6" - resolved "https://registry.npmjs.org/async/-/async-3.2.6.tgz" - integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atomic-sleep@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz" - integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== - -ava@^3.12.1: - version "3.15.0" - resolved "https://registry.npmjs.org/ava/-/ava-3.15.0.tgz" - integrity sha512-HGAnk1SHPk4Sx6plFAUkzV/XC1j9+iQhOzt4vBly18/yo0AV8Oytx7mtJd/CR8igCJ5p160N/Oo/cNJi2uSeWA== - dependencies: - "@concordance/react" "^2.0.0" - acorn "^8.0.4" - acorn-walk "^8.0.0" - ansi-styles "^5.0.0" - arrgv "^1.0.2" - arrify "^2.0.1" - callsites "^3.1.0" - chalk "^4.1.0" - chokidar "^3.4.3" - chunkd "^2.0.1" - ci-info "^2.0.0" - ci-parallel-vars "^1.0.1" - clean-yaml-object "^0.1.0" - cli-cursor "^3.1.0" - cli-truncate "^2.1.0" - code-excerpt "^3.0.0" - common-path-prefix "^3.0.0" - concordance "^5.0.1" - convert-source-map "^1.7.0" - currently-unhandled "^0.4.1" - debug "^4.3.1" - del "^6.0.0" - emittery "^0.8.0" - equal-length "^1.0.0" - figures "^3.2.0" - globby "^11.0.1" - ignore-by-default "^2.0.0" - import-local "^3.0.2" - indent-string "^4.0.0" - is-error "^2.2.2" - is-plain-object "^5.0.0" - is-promise "^4.0.0" - lodash "^4.17.20" - matcher "^3.0.0" - md5-hex "^3.0.1" - mem "^8.0.0" - ms "^2.1.3" - ora "^5.2.0" - p-event "^4.2.0" - p-map "^4.0.0" - picomatch "^2.2.2" - pkg-conf "^3.1.0" - plur "^4.0.0" - pretty-ms "^7.0.1" - read-pkg "^5.2.0" - resolve-cwd "^3.0.0" - slash "^3.0.0" - source-map-support "^0.5.19" - stack-utils "^2.0.3" - strip-ansi "^6.0.0" - supertap "^2.0.0" - temp-dir "^2.0.0" - trim-off-newlines "^1.0.1" - update-notifier "^5.0.1" - write-file-atomic "^3.0.3" - yargs "^16.2.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -axios@^1.7.4: - version "1.10.0" - resolved "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz" - integrity sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -axios@0.27.2: - version "0.27.2" - resolved "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== - dependencies: - follow-redirects "^1.14.9" - form-data "^4.0.0" - -axios-retry@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/axios-retry/-/axios-retry-4.5.0.tgz" - integrity sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ== - dependencies: - is-retry-allowed "^2.2.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bl@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -blueimp-md5@^2.10.0: - version "2.19.0" - resolved "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz" - integrity sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w== - -boxen@^5.0.0: - version "5.1.2" - resolved "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz" - integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== - dependencies: - ansi-align "^3.0.0" - camelcase "^6.2.0" - chalk "^4.1.0" - cli-boxes "^2.2.1" - string-width "^4.2.2" - type-fest "^0.20.2" - widest-line "^3.1.0" - wrap-ansi "^7.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@^4.21.9, "browserslist@>= 4.21.0": - version "4.21.10" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz" - integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== - dependencies: - caniuse-lite "^1.0.30001517" - electron-to-chromium "^1.4.477" - node-releases "^2.0.13" - update-browserslist-db "^1.0.11" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -bundle-name@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz" - integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== - dependencies: - run-applescript "^7.0.0" - -bundle-require@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz" - integrity sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA== - dependencies: - load-tsconfig "^0.2.3" - -cac@^6.7.14: - version "6.7.14" - resolved "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz" - integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== - -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -cachedir@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz" - integrity sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw== - -caching-transform@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz" - integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== - dependencies: - hasha "^5.0.0" - make-dir "^3.0.0" - package-hash "^4.0.0" - write-file-atomic "^3.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0, callsites@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001517: - version "1.0.30001521" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz" - integrity sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ== - -chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - -chokidar@^3.4.3: - version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chokidar@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz" - integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== - dependencies: - readdirp "^4.0.1" - -chunkd@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz" - integrity sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -ci-parallel-vars@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz" - integrity sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg== - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -clean-yaml-object@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz" - integrity sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw== - -cli-boxes@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz" - integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-spinners@^2.5.0: - version "2.9.0" - resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz" - integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== - -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - -cli-truncate@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz" - integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== - dependencies: - slice-ansi "^5.0.0" - string-width "^5.0.0" - -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone-response@^1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz" - integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== - dependencies: - mimic-response "^1.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - -code-excerpt@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz" - integrity sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw== - dependencies: - convert-to-spaces "^1.0.1" - -codecov@^3.5.0: - version "3.8.3" - resolved "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz" - integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA== - dependencies: - argv "0.0.2" - ignore-walk "3.0.4" - js-yaml "3.14.1" - teeny-request "7.1.1" - urlgrey "1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -colorette@^2.0.16, colorette@^2.0.7: - version "2.0.20" - resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^13.0.0: - version "13.1.0" - resolved "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz" - integrity sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw== - -commander@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - -commander@^7.0.0: - version "7.2.0" - resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^9.3.0: - version "9.5.0" - resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -commander@8.3.0: - version "8.3.0" - resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -comment-json@^4.0.6, comment-json@^4.1.0: - version "4.2.3" - resolved "https://registry.npmjs.org/comment-json/-/comment-json-4.2.3.tgz" - integrity sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw== - dependencies: - array-timsort "^1.0.3" - core-util-is "^1.0.3" - esprima "^4.0.1" - has-own-prop "^2.0.0" - repeat-string "^1.6.1" - -commitizen@^4.0.3: - version "4.3.0" - resolved "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz" - integrity sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw== - dependencies: - cachedir "2.3.0" - cz-conventional-changelog "3.3.0" - dedent "0.7.0" - detect-indent "6.1.0" - find-node-modules "^2.1.2" - find-root "1.1.0" - fs-extra "9.1.0" - glob "7.2.3" - inquirer "8.2.5" - is-utf8 "^0.2.1" - lodash "4.17.21" - minimist "1.2.7" - strip-bom "4.0.0" - strip-json-comments "3.1.1" - -common-path-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz" - integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -compare-func@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz" - integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== - dependencies: - array-ify "^1.0.0" - dot-prop "^5.1.0" - -compare-versions@4.1.4: - version "4.1.4" - resolved "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz" - integrity sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz" - integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.0.2" - typedarray "^0.0.6" - -concordance@^5.0.1: - version "5.0.4" - resolved "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz" - integrity sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw== - dependencies: - date-time "^3.1.0" - esutils "^2.0.3" - fast-diff "^1.2.0" - js-string-escape "^1.0.1" - lodash "^4.17.15" - md5-hex "^3.0.1" - semver "^7.3.2" - well-known-symbols "^2.0.0" - -concurrently@6.5.1: - version "6.5.1" - resolved "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz" - integrity sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag== - dependencies: - chalk "^4.1.0" - date-fns "^2.16.1" - lodash "^4.17.21" - rxjs "^6.6.3" - spawn-command "^0.0.2-1" - supports-color "^8.1.0" - tree-kill "^1.2.2" - yargs "^16.2.0" - -confbox@^0.1.8: - version "0.1.8" - resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz" - integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== - -configstore@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz" - integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== - dependencies: - dot-prop "^5.2.0" - graceful-fs "^4.1.2" - make-dir "^3.0.0" - unique-string "^2.0.0" - write-file-atomic "^3.0.0" - xdg-basedir "^4.0.0" - -consola@^2.15.0: - version "2.15.3" - resolved "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz" - integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== - -consola@^3.4.0: - version "3.4.2" - resolved "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz" - integrity sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA== - -console.table@0.10.0: - version "0.10.0" - resolved "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz" - integrity sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g== - dependencies: - easy-table "1.1.0" - -conventional-changelog-angular@^5.0.12: - version "5.0.13" - resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz" - integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-atom@^2.0.8: - version "2.0.8" - resolved "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz" - integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== - dependencies: - q "^1.5.1" - -conventional-changelog-codemirror@^2.0.8: - version "2.0.8" - resolved "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz" - integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== - dependencies: - q "^1.5.1" - -conventional-changelog-config-spec@2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz" - integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== - -conventional-changelog-conventionalcommits@^4.5.0, conventional-changelog-conventionalcommits@4.6.3: - version "4.6.3" - resolved "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz" - integrity sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g== - dependencies: - compare-func "^2.0.0" - lodash "^4.17.15" - q "^1.5.1" - -conventional-changelog-core@^4.2.1: - version "4.2.4" - resolved "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz" - integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== - dependencies: - add-stream "^1.0.0" - conventional-changelog-writer "^5.0.0" - conventional-commits-parser "^3.2.0" - dateformat "^3.0.0" - get-pkg-repo "^4.0.0" - git-raw-commits "^2.0.8" - git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.1" - lodash "^4.17.15" - normalize-package-data "^3.0.0" - q "^1.5.1" - read-pkg "^3.0.0" - read-pkg-up "^3.0.0" - through2 "^4.0.0" - -conventional-changelog-ember@^2.0.9: - version "2.0.9" - resolved "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz" - integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== - dependencies: - q "^1.5.1" - -conventional-changelog-eslint@^3.0.9: - version "3.0.9" - resolved "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz" - integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== - dependencies: - q "^1.5.1" - -conventional-changelog-express@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz" - integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== - dependencies: - q "^1.5.1" - -conventional-changelog-jquery@^3.0.11: - version "3.0.11" - resolved "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz" - integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== - dependencies: - q "^1.5.1" - -conventional-changelog-jshint@^2.0.9: - version "2.0.9" - resolved "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz" - integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-preset-loader@^2.3.4: - version "2.3.4" - resolved "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz" - integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== - -conventional-changelog-writer@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz" - integrity sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ== - dependencies: - conventional-commits-filter "^2.0.7" - dateformat "^3.0.0" - handlebars "^4.7.7" - json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^8.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^4.0.0" - -conventional-changelog@3.1.25: - version "3.1.25" - resolved "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.25.tgz" - integrity sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ== - dependencies: - conventional-changelog-angular "^5.0.12" - conventional-changelog-atom "^2.0.8" - conventional-changelog-codemirror "^2.0.8" - conventional-changelog-conventionalcommits "^4.5.0" - conventional-changelog-core "^4.2.1" - conventional-changelog-ember "^2.0.9" - conventional-changelog-eslint "^3.0.9" - conventional-changelog-express "^2.0.6" - conventional-changelog-jquery "^3.0.11" - conventional-changelog-jshint "^2.0.9" - conventional-changelog-preset-loader "^2.3.4" - -conventional-commit-types@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz" - integrity sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg== - -conventional-commits-filter@^2.0.7: - version "2.0.7" - resolved "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz" - integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== - dependencies: - lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-parser@^3.2.0: - version "3.2.4" - resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz" - integrity sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q== - dependencies: - is-text-path "^1.0.1" - JSONStream "^1.0.4" - lodash "^4.17.15" - meow "^8.0.0" - split2 "^3.0.0" - through2 "^4.0.0" - -conventional-recommended-bump@6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz" - integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== - dependencies: - concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.7" - conventional-commits-parser "^3.2.0" - git-raw-commits "^2.0.8" - git-semver-tags "^4.1.1" - meow "^8.0.0" - q "^1.5.1" - -convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -convert-to-spaces@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz" - integrity sha512-cj09EBuObp9gZNQCzc7hByQyrs6jVGE+o9kSJmeUoj+GiPiJvi5LYqEH/Hmme4+MTLHM+Ejtq+FChpjjEnsPdQ== - -core-util-is@^1.0.3, core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cosmiconfig-typescript-loader@^4.0.0: - version "4.4.0" - resolved "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz" - integrity sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw== - -cosmiconfig@^8.0.0, cosmiconfig@>=7: - version "8.2.0" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz" - integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== - dependencies: - import-fresh "^3.2.1" - js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.6: - version "7.0.6" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" - integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-random-string@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz" - integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== - -crypto-random-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz" - integrity sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA== - dependencies: - type-fest "^1.0.1" - -cspell-glob@^0.1.25: - version "0.1.25" - resolved "https://registry.npmjs.org/cspell-glob/-/cspell-glob-0.1.25.tgz" - integrity sha512-/XaSHrGBpMJa+duFz3GKOWfrijrfdHT7a/XGgIcq3cymCSpOH+DPho42sl0jLI/hjM+8yv2m8aEoxRT8yVSnlg== - dependencies: - micromatch "^4.0.2" - -cspell-io@^4.1.7: - version "4.1.7" - resolved "https://registry.npmjs.org/cspell-io/-/cspell-io-4.1.7.tgz" - integrity sha512-V0/tUu9FnIS3v+vAvDT6NNa14Nc/zUNX8+YUUOfFAiDJJTdqefmvcWjOJBIMYBf3wIk9iWLmLbMM+bNHqr7DSQ== - dependencies: - iconv-lite "^0.6.2" - iterable-to-stream "^1.0.1" - -cspell-lib@^4.3.12: - version "4.3.12" - resolved "https://registry.npmjs.org/cspell-lib/-/cspell-lib-4.3.12.tgz" - integrity sha512-yCCb6MoW1K8Tsr/WVEQoO4dfYhH9bCsjQayccb8MlyDaNNuWJHuX+gUGHsZSXSuChSh8PrTWKXJzs13/uM977g== - dependencies: - "@cspell/dict-aws" "^1.0.13" - "@cspell/dict-bash" "^1.0.11" - "@cspell/dict-companies" "^1.0.35" - "@cspell/dict-cpp" "^1.1.37" - "@cspell/dict-cryptocurrencies" "^1.0.10" - "@cspell/dict-csharp" "^1.0.10" - "@cspell/dict-css" "^1.0.10" - "@cspell/dict-django" "^1.0.25" - "@cspell/dict-dotnet" "^1.0.24" - "@cspell/dict-elixir" "^1.0.23" - "@cspell/dict-en_us" "^1.2.39" - "@cspell/dict-en-gb" "^1.1.27" - "@cspell/dict-filetypes" "^1.1.5" - "@cspell/dict-fonts" "^1.0.13" - "@cspell/dict-fullstack" "^1.0.36" - "@cspell/dict-golang" "^1.1.24" - "@cspell/dict-haskell" "^1.0.12" - "@cspell/dict-html" "^1.1.5" - "@cspell/dict-html-symbol-entities" "^1.0.23" - "@cspell/dict-java" "^1.0.22" - "@cspell/dict-latex" "^1.0.23" - "@cspell/dict-lorem-ipsum" "^1.0.22" - "@cspell/dict-lua" "^1.0.16" - "@cspell/dict-node" "^1.0.10" - "@cspell/dict-npm" "^1.0.10" - "@cspell/dict-php" "^1.0.23" - "@cspell/dict-powershell" "^1.0.14" - "@cspell/dict-python" "^1.0.32" - "@cspell/dict-ruby" "^1.0.12" - "@cspell/dict-rust" "^1.0.22" - "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.24" - "@cspell/dict-typescript" "^1.0.16" - comment-json "^4.1.0" - configstore "^5.0.1" - cspell-io "^4.1.7" - cspell-trie-lib "^4.2.8" - cspell-util-bundle "^4.1.11" - fs-extra "^9.1.0" - gensequence "^3.1.1" - minimatch "^3.0.4" - resolve-from "^5.0.0" - resolve-global "^1.0.0" - vscode-uri "^3.0.2" - -cspell-trie-lib@^4.2.8: - version "4.2.8" - resolved "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-4.2.8.tgz" - integrity sha512-Nt3c0gxOYXIc3/yhALDukpje1BgR6guvlUKWQO2zb0r7qRWpwUw2j2YM4dWbHQeH/3Hx5ei4Braa6cMaiJ5YBw== - dependencies: - gensequence "^3.1.1" - -cspell-util-bundle@^4.1.11: - version "4.1.11" - resolved "https://registry.npmjs.org/cspell-util-bundle/-/cspell-util-bundle-4.1.11.tgz" - integrity sha512-or3OGKydZs1NwweMIgnA48k8H3F5zK4e5lonjUhpEzLYQZ2nB23decdoqZ8ogFC8pFTA40tZKDsMJ0b+65gX4Q== - -cspell@^4.1.0: - version "4.2.8" - resolved "https://registry.npmjs.org/cspell/-/cspell-4.2.8.tgz" - integrity sha512-eqan8+lCU9bSp8Tl4+SR/ccBnuPyMmp7evck/RlMdFTjLh/s+3vQ5hQyBzbzK8w2MMqL84CymW7BwIOKjpylSg== - dependencies: - chalk "^4.1.0" - commander "^7.0.0" - comment-json "^4.0.6" - cspell-glob "^0.1.25" - cspell-lib "^4.3.12" - fs-extra "^9.1.0" - gensequence "^3.1.1" - get-stdin "^8.0.0" - glob "^7.1.6" - minimatch "^3.0.4" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz" - integrity sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng== - dependencies: - array-find-index "^1.0.1" - -cz-conventional-changelog@^3.3.0, cz-conventional-changelog@3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz" - integrity sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw== - dependencies: - chalk "^2.4.1" - commitizen "^4.0.3" - conventional-commit-types "^3.0.0" - lodash.map "^4.5.1" - longest "^2.0.1" - word-wrap "^1.0.3" - optionalDependencies: - "@commitlint/load" ">6.1.1" - -dargs@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz" - integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== - -date-fns@^2.16.1: - version "2.30.0" - resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz" - integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== - dependencies: - "@babel/runtime" "^7.21.0" - -date-time@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz" - integrity sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg== - dependencies: - time-zone "^1.0.0" - -dateformat@^3.0.0: - version "3.0.3" - resolved "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz" - integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== - -dateformat@^4.6.3: - version "4.6.3" - resolved "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz" - integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.4.0, debug@4: - version "4.4.1" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz" - integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== - dependencies: - ms "^2.1.3" - -decamelize-keys@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz" - integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== - dependencies: - decamelize "^1.1.0" - map-obj "^1.0.0" - -decamelize@^1.1.0, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" - integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== - dependencies: - mimic-response "^1.0.0" - -dedent@0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -default-browser-id@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz" - integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== - -default-browser@^5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz" - integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== - dependencies: - bundle-name "^4.1.0" - default-browser-id "^5.0.0" - -default-require-extensions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz" - integrity sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw== - dependencies: - strip-bom "^4.0.0" - -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -define-lazy-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz" - integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== - -define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -del@^6.0.0: - version "6.1.1" - resolved "https://registry.npmjs.org/del/-/del-6.1.1.tgz" - integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== - dependencies: - globby "^11.0.1" - graceful-fs "^4.2.4" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.2" - p-map "^4.0.0" - rimraf "^3.0.2" - slash "^3.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz" - integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== - -detect-indent@^6.0.0, detect-indent@6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz" - integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== - -detect-newline@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dot-prop@^5.1.0, dot-prop@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - -dotgitignore@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/dotgitignore/-/dotgitignore-2.1.0.tgz" - integrity sha512-sCm11ak2oY6DglEPpCB8TixLjWAxd3kJTs6UIcSasNYxXdFPV+YKlye92c8H4kKFqV5qYMIh7d+cYecEg0dIkA== - dependencies: - find-up "^3.0.0" - minimatch "^3.0.4" - -duplexer3@^0.1.4: - version "0.1.5" - resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz" - integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== - -eastasianwidth@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" - integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - -easy-table@1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz" - integrity sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA== - optionalDependencies: - wcwidth ">=1.0.1" - -electron-to-chromium@^1.4.477: - version "1.4.494" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.494.tgz" - integrity sha512-KF7wtsFFDu4ws1ZsSOt4pdmO1yWVNWCFtijVYZPUeW4SV7/hy/AESjLn/+qIWgq7mHscNOKAwN5AIM1+YAy+Ww== - -email-addresses@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/email-addresses/-/email-addresses-5.0.0.tgz" - integrity sha512-4OIPYlA6JXqtVn8zpHpGiI7vE6EQOAg16aGnDMIAlZVinnoZ8208tW1hAbjWydgN/4PLTT9q+O1K6AH/vALJGw== - -emittery@^0.8.0: - version "0.8.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enquirer@^2.3.5, "enquirer@>= 2.3.0 < 3": - version "2.4.1" - resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz" - integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== - dependencies: - ansi-colors "^4.1.1" - strip-ansi "^6.0.1" - -equal-length@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz" - integrity sha512-TK2m7MvWPt/v3dan0BCNp99pytIE5UGrUj7F0KZirNX8xz8fDFUAZfgm8uB5FuQq9u0sMeDocYBfEhsd1nwGoA== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: - version "1.22.1" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz" - integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== - dependencies: - array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.1" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.1" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.5.0" - safe-array-concat "^1.0.0" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-buffer "^1.0.0" - typed-array-byte-length "^1.0.0" - typed-array-byte-offset "^1.0.0" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.10" - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-error@^4.0.1: - version "4.1.1" - resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - -esbuild@^0.25.0, esbuild@>=0.18: - version "0.25.5" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz" - integrity sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ== - optionalDependencies: - "@esbuild/aix-ppc64" "0.25.5" - "@esbuild/android-arm" "0.25.5" - "@esbuild/android-arm64" "0.25.5" - "@esbuild/android-x64" "0.25.5" - "@esbuild/darwin-arm64" "0.25.5" - "@esbuild/darwin-x64" "0.25.5" - "@esbuild/freebsd-arm64" "0.25.5" - "@esbuild/freebsd-x64" "0.25.5" - "@esbuild/linux-arm" "0.25.5" - "@esbuild/linux-arm64" "0.25.5" - "@esbuild/linux-ia32" "0.25.5" - "@esbuild/linux-loong64" "0.25.5" - "@esbuild/linux-mips64el" "0.25.5" - "@esbuild/linux-ppc64" "0.25.5" - "@esbuild/linux-riscv64" "0.25.5" - "@esbuild/linux-s390x" "0.25.5" - "@esbuild/linux-x64" "0.25.5" - "@esbuild/netbsd-arm64" "0.25.5" - "@esbuild/netbsd-x64" "0.25.5" - "@esbuild/openbsd-arm64" "0.25.5" - "@esbuild/openbsd-x64" "0.25.5" - "@esbuild/sunos-x64" "0.25.5" - "@esbuild/win32-arm64" "0.25.5" - "@esbuild/win32-ia32" "0.25.5" - "@esbuild/win32-x64" "0.25.5" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-goat@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz" - integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== - -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-config-prettier@^6.11.0: - version "6.15.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz" - integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== - dependencies: - get-stdin "^6.0.0" - -eslint-import-resolver-node@^0.3.7: - version "0.3.9" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz" - integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== - dependencies: - debug "^3.2.7" - is-core-module "^2.13.0" - resolve "^1.22.4" - -eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== - dependencies: - debug "^3.2.7" - -eslint-plugin-eslint-comments@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz" - integrity sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ== - dependencies: - escape-string-regexp "^1.0.5" - ignore "^5.0.5" - -eslint-plugin-functional@^3.0.2: - version "3.7.2" - resolved "https://registry.npmjs.org/eslint-plugin-functional/-/eslint-plugin-functional-3.7.2.tgz" - integrity sha512-BuWPOeE0nuXYlZjObYOHnYf7G3iG+sysxw84I579MsrH+hy5XdXb2sdabmXQ5z7eFGCg2/DWNbZ/yz5GAgtcUg== - dependencies: - "@typescript-eslint/experimental-utils" "^4.9.1" - array.prototype.flatmap "^1.2.4" - deepmerge "^4.2.2" - escape-string-regexp "^4.0.0" - object.fromentries "^2.0.3" - -eslint-plugin-import@^2.22.0: - version "2.28.0" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz" - integrity sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q== - dependencies: - array-includes "^3.1.6" - array.prototype.findlastindex "^1.2.2" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.8.0" - has "^1.0.3" - is-core-module "^2.12.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.fromentries "^2.0.6" - object.groupby "^1.0.0" - object.values "^1.1.6" - resolve "^1.22.3" - semver "^6.3.1" - tsconfig-paths "^3.14.2" - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint@*, "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^5.0.0 || ^6.0.0 || ^7.0.0", eslint@^7.8.0, eslint@>=3.14.1, eslint@>=4.19.1, eslint@>=5: - version "7.32.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.0.1" - doctrine "^3.0.0" - enquirer "^2.3.5" - escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.0.4" - natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -esprima@^4.0.0, esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.5.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2, esutils@^2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -events@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -execa@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz" - integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== - dependencies: - homedir-polyfill "^1.0.1" - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - -fast-copy@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.1.tgz" - integrity sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-diff@^1.2.0: - version "1.3.0" - resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - -fast-glob@^3.2.9: - version "3.3.1" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz" - integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fast-redact@^3.1.1: - version "3.3.0" - resolved "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz" - integrity sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ== - -fast-safe-stringify@^2.1.1, fast-safe-stringify@2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz" - integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== - -fast-url-parser@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz" - integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== - dependencies: - punycode "^1.3.2" - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -fdir@^6.4.4: - version "6.4.6" - resolved "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz" - integrity sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w== - -figures@^3.0.0, figures@^3.1.0, figures@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -file-type@^18.7.0: - version "18.7.0" - resolved "https://registry.npmjs.org/file-type/-/file-type-18.7.0.tgz" - integrity sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw== - dependencies: - readable-web-to-node-stream "^3.0.2" - strtok3 "^7.0.0" - token-types "^5.0.1" - -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz" - integrity sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ== - -filenamify@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz" - integrity sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.1" - trim-repeated "^1.0.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-cache-dir@^3.2.0, find-cache-dir@^3.3.1: - version "3.3.2" - resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-node-modules@^2.1.2: - version "2.1.3" - resolved "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz" - integrity sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg== - dependencies: - findup-sync "^4.0.0" - merge "^2.1.1" - -find-root@1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - -find-up@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -findup-sync@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz" - integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^4.0.2" - resolve-dir "^1.0.1" - -fix-dts-default-cjs-exports@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz" - integrity sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg== - dependencies: - magic-string "^0.30.17" - mlly "^1.7.4" - rollup "^4.34.8" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -follow-redirects@^1.14.9, follow-redirects@^1.15.6: - version "1.15.9" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz" - integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -foreground-child@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz" - integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== - dependencies: - cross-spawn "^7.0.0" - signal-exit "^3.0.2" - -foreground-child@^3.1.0: - version "3.3.1" - resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz" - integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== - dependencies: - cross-spawn "^7.0.6" - signal-exit "^4.0.1" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -fromentries@^1.2.0: - version "1.3.2" - resolved "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz" - integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== - -fs-extra@^11.1.1: - version "11.3.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz" - integrity sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@10.1.0: - version "10.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@9.1.0: - version "9.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - -functions-have-names@^1.2.2, functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gensequence@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/gensequence/-/gensequence-3.1.1.tgz" - integrity sha512-ys3h0hiteRwmY6BsvSttPmkhC0vEQHPJduANBRtH/dlDPZ0UBIb/dXy80IcckXyuQ6LKg+PloRqvGER9IS7F7g== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-proto "^1.0.1" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-pkg-repo@^4.0.0: - version "4.2.1" - resolved "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz" - integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA== - dependencies: - "@hutson/parse-repository-url" "^3.0.0" - hosted-git-info "^4.0.0" - through2 "^2.0.0" - yargs "^16.2.0" - -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - -get-stdin@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz" - integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== - -get-stdin@^9.0.0: - version "9.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz" - integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA== - -get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -gh-pages@^6.1.1: - version "6.3.0" - resolved "https://registry.npmjs.org/gh-pages/-/gh-pages-6.3.0.tgz" - integrity sha512-Ot5lU6jK0Eb+sszG8pciXdjMXdBJ5wODvgjR+imihTqsUWF2K6dJ9HST55lgqcs8wWcw6o6wAsUzfcYRhJPXbA== - dependencies: - async "^3.2.4" - commander "^13.0.0" - email-addresses "^5.0.0" - filenamify "^4.3.0" - find-cache-dir "^3.3.1" - fs-extra "^11.1.1" - globby "^11.1.0" - -git-raw-commits@^2.0.8: - version "2.0.11" - resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz" - integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== - dependencies: - dargs "^7.0.0" - lodash "^4.17.15" - meow "^8.0.0" - split2 "^3.0.0" - through2 "^4.0.0" - -git-remote-origin-url@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz" - integrity sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw== - dependencies: - gitconfiglocal "^1.0.0" - pify "^2.3.0" - -git-semver-tags@^4.0.0, git-semver-tags@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz" - integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== - dependencies: - meow "^8.0.0" - semver "^6.0.0" - -gitconfiglocal@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz" - integrity sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ== - dependencies: - ini "^1.3.2" - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^10.3.10: - version "10.4.5" - resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== - dependencies: - foreground-child "^3.1.0" - jackspeak "^3.1.2" - minimatch "^9.0.4" - minipass "^7.1.2" - package-json-from-dist "^1.0.0" - path-scurry "^1.11.1" - -glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@7.1.6: - version "7.1.6" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^8.0.0: - version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -glob@7.2.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-dirs@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz" - integrity sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg== - dependencies: - ini "^1.3.4" - -global-dirs@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz" - integrity sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA== - dependencies: - ini "2.0.0" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz" - integrity sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg== - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.6.0: - version "13.21.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz" - integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== - dependencies: - type-fest "^0.20.2" - -globals@^13.9.0: - version "13.21.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz" - integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== - dependencies: - type-fest "^0.20.2" - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^11.0.1, globby@^11.0.3, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -got@^9.6.0: - version "9.6.0" - resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - -graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: - version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -handlebars@^4.7.7: - version "4.7.8" - resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-own-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz" - integrity sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-yarn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz" - integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hasha@^5.0.0: - version "5.2.2" - resolved "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz" - integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== - dependencies: - is-stream "^2.0.0" - type-fest "^0.8.0" - -help-me@^4.0.1: - version "4.2.0" - resolved "https://registry.npmjs.org/help-me/-/help-me-4.2.0.tgz" - integrity sha512-TAOnTB8Tz5Dw8penUuzHVrKNKlCIbwwbHnXraNJxPwf8LRtE2HlM84RYuezMFcwOJmoYOCWVDyJ8TQGxn9PgxA== - dependencies: - glob "^8.0.0" - readable-stream "^3.6.0" - -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -hosted-git-info@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -hosted-git-info@^4.0.1: - version "4.1.0" - resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-cache-semantics@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - -http-proxy-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -husky@^7.0.0: - version "7.0.4" - resolved "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz" - integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== - -iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore-by-default@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz" - integrity sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw== - -ignore-walk@3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz" - integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== - dependencies: - minimatch "^3.0.4" - -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.0.5, ignore@^5.1.8, ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz" - integrity sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A== - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: - version "1.3.8" - resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -ini@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" - integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== - -inquirer@8.2.5: - version "8.2.5" - resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz" - integrity sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.5.5" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - wrap-ansi "^7.0.0" - -internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -irregular-plurals@^3.2.0: - version "3.5.0" - resolved "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz" - integrity sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ== - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.5.0: - version "2.13.0" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz" - integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - -is-error@^2.2.2: - version "2.2.2" - resolved "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz" - integrity sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-fullwidth-code-point@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz" - integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-inside-container@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz" - integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== - dependencies: - is-docker "^3.0.0" - -is-installed-globally@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz" - integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== - dependencies: - global-dirs "^3.0.0" - is-path-inside "^3.0.2" - -is-interactive@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz" - integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-npm@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz" - integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -is-path-cwd@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-inside@^3.0.2: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - -is-promise@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz" - integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-retry-allowed@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz" - integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-text-path@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz" - integrity sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w== - dependencies: - text-extensions "^1.0.0" - -is-typed-array@^1.1.10, is-typed-array@^1.1.9: - version "1.1.12" - resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== - dependencies: - which-typed-array "^1.1.11" - -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -is-utf8@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" - integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-windows@^1.0.1, is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz" - integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== - dependencies: - is-inside-container "^1.0.0" - -is-yarn-global@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz" - integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-hook@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz" - integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== - dependencies: - append-transform "^2.0.0" - -istanbul-lib-instrument@^4.0.0: - version "4.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== - dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-processinfo@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz" - integrity sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg== - dependencies: - archy "^1.0.0" - cross-spawn "^7.0.3" - istanbul-lib-coverage "^3.2.0" - p-map "^3.0.0" - rimraf "^3.0.0" - uuid "^8.3.2" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.0.2: - version "3.1.6" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz" - integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -iterable-to-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/iterable-to-stream/-/iterable-to-stream-1.0.1.tgz" - integrity sha512-O62gD5ADMUGtJoOoM9U6LQ7i4byPXUNoHJ6mqsmkQJcom331ZJGDApWgDESWyBMEHEJRjtHozgIiTzYo9RU4UA== - -iterare@1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz" - integrity sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q== - -jackspeak@^3.1.2: - version "3.4.3" - resolved "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz" - integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - -joycon@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz" - integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== - -js-string-escape@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz" - integrity sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg== - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@3.14.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz" - integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz" - integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -json5@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - -json5@^2.2.2: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" - integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== - -JSONStream@^1.0.4: - version "1.3.5" - resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -kind-of@^6.0.3: - version "6.0.3" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -latest-version@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz" - integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== - dependencies: - package-json "^6.3.0" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -lilconfig@^3.1.1: - version "3.1.3" - resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz" - integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== - -lilconfig@2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz" - integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -lint-staged@^12.1.2: - version "12.5.0" - resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-12.5.0.tgz" - integrity sha512-BKLUjWDsKquV/JuIcoQW4MSAI3ggwEImF1+sB4zaKvyVx1wBk3FsG7UK9bpnmBTN1pm7EH2BBcMwINJzCRv12g== - dependencies: - cli-truncate "^3.1.0" - colorette "^2.0.16" - commander "^9.3.0" - debug "^4.3.4" - execa "^5.1.1" - lilconfig "2.0.5" - listr2 "^4.0.5" - micromatch "^4.0.5" - normalize-path "^3.0.0" - object-inspect "^1.12.2" - pidtree "^0.5.0" - string-argv "^0.3.1" - supports-color "^9.2.2" - yaml "^1.10.2" - -listr2@^4.0.5: - version "4.0.5" - resolved "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz" - integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== - dependencies: - cli-truncate "^2.1.0" - colorette "^2.0.16" - log-update "^4.0.0" - p-map "^4.0.0" - rfdc "^1.3.0" - rxjs "^7.5.5" - through "^2.3.8" - wrap-ansi "^7.0.0" - -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz" - integrity sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw== - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -load-json-file@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz" - integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== - dependencies: - graceful-fs "^4.1.15" - parse-json "^4.0.0" - pify "^4.0.1" - strip-bom "^3.0.0" - type-fest "^0.3.0" - -load-tsconfig@^0.2.3: - version "0.2.5" - resolved "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz" - integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz" - integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== - -lodash.ismatch@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz" - integrity sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g== - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.map@^4.5.1: - version "4.6.0" - resolved "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz" - integrity sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.mergewith@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz" - integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz" - integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" - integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== - -lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - -longest@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz" - integrity sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q== - -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lru-cache@^10.2.0: - version "10.4.3" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz" - integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lunr@^2.3.9: - version "2.3.9" - resolved "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - -magic-string@^0.30.17: - version "0.30.17" - resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz" - integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.5.0" - -make-dir@^3.0.0, make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -map-age-cleaner@^0.1.3: - version "0.1.3" - resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - -map-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" - integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== - -map-obj@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz" - integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== - -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - -matcher@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz" - integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng== - dependencies: - escape-string-regexp "^4.0.0" - -md5-hex@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz" - integrity sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw== - dependencies: - blueimp-md5 "^2.10.0" - -mem@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz" - integrity sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA== - dependencies: - map-age-cleaner "^0.1.3" - mimic-fn "^3.1.0" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz" - integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== - -meow@^12.1.1: - version "12.1.1" - resolved "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz" - integrity sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw== - -meow@^8.0.0: - version "8.1.2" - resolved "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz" - integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz" - integrity sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-fn@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz" - integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== - -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.0: - version "9.0.3" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.4: - version "9.0.5" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== - dependencies: - brace-expansion "^2.0.1" - -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" - -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== - -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: - version "7.1.2" - resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" - integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== - -mlly@^1.7.4: - version "1.7.4" - resolved "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz" - integrity sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw== - dependencies: - acorn "^8.14.0" - pathe "^2.0.1" - pkg-types "^1.3.0" - ufo "^1.5.4" - -modify-values@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz" - integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== - -module-details-from-path@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz" - integrity sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A== - -ms@^2.1.1, ms@^2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - -mz@^2.7.0: - version "2.7.0" - resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-fetch@^2.6.1: - version "2.6.12" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz" - integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== - dependencies: - whatwg-url "^5.0.0" - -node-preload@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz" - integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== - dependencies: - process-on-spawn "^1.0.0" - -node-releases@^2.0.13: - version "2.0.13" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz" - integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== - -normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0: - version "3.0.3" - resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^4.1.0: - version "4.5.1" - resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz" - integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== - -npm-run-all@^4.1.5: - version "4.1.5" - resolved "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz" - integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== - dependencies: - ansi-styles "^3.2.1" - chalk "^2.4.1" - cross-spawn "^6.0.5" - memorystream "^0.3.1" - minimatch "^3.0.4" - pidtree "^0.3.0" - read-pkg "^3.0.0" - shell-quote "^1.6.1" - string.prototype.padend "^3.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -nyc@^15.1.0, nyc@>=15: - version "15.1.0" - resolved "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz" - integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== - dependencies: - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - caching-transform "^4.0.0" - convert-source-map "^1.7.0" - decamelize "^1.2.0" - find-cache-dir "^3.2.0" - find-up "^4.1.0" - foreground-child "^2.0.0" - get-package-type "^0.1.0" - glob "^7.1.6" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-processinfo "^2.0.2" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - make-dir "^3.0.0" - node-preload "^0.2.1" - p-map "^3.0.0" - process-on-spawn "^1.0.0" - resolve-from "^5.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - spawn-wrap "^2.0.0" - test-exclude "^6.0.0" - yargs "^15.0.2" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.12.2, object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.fromentries@^2.0.3, object.fromentries@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz" - integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.groupby@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.0.tgz" - integrity sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.21.2" - get-intrinsic "^1.2.1" - -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -on-exit-leak-free@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz" - integrity sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -open-cli@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/open-cli/-/open-cli-8.0.0.tgz" - integrity sha512-3muD3BbfLyzl+aMVSEfn2FfOqGdPYR0O4KNnxXsLEPE2q9OSjBfJAaB6XKbrUzLgymoSMejvb5jpXJfru/Ko2A== - dependencies: - file-type "^18.7.0" - get-stdin "^9.0.0" - meow "^12.1.1" - open "^10.0.0" - tempy "^3.1.0" - -open@^10.0.0: - version "10.1.2" - resolved "https://registry.npmjs.org/open/-/open-10.1.2.tgz" - integrity sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw== - dependencies: - default-browser "^5.2.1" - define-lazy-prop "^3.0.0" - is-inside-container "^1.0.0" - is-wsl "^3.1.0" - -optionator@^0.9.1: - version "0.9.3" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== - dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - -ora@^5.2.0, ora@^5.4.1: - version "5.4.1" - resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz" - integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz" - integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== - -p-event@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz" - integrity sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ== - dependencies: - p-timeout "^3.1.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" - integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== - dependencies: - aggregate-error "^3.0.0" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-timeout@^3.1.0: - version "3.2.0" - resolved "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -package-hash@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz" - integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== - dependencies: - graceful-fs "^4.1.15" - hasha "^5.0.0" - lodash.flattendeep "^4.4.0" - release-zalgo "^1.0.0" - -package-json-from-dist@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz" - integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== - -package-json@^6.3.0: - version "6.5.0" - resolved "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz" - integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== - dependencies: - got "^9.6.0" - registry-auth-token "^4.0.0" - registry-url "^5.0.0" - semver "^6.2.0" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz" - integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse-ms@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz" - integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz" - integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-scurry@^1.11.1: - version "1.11.1" - resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz" - integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== - dependencies: - lru-cache "^10.2.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - -path-to-regexp@^6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz" - integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw== - -path-to-regexp@3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz" - integrity sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA== - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pathe@^2.0.1: - version "2.0.3" - resolved "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz" - integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== - -peek-readable@^5.1.3: - version "5.4.2" - resolved "https://registry.npmjs.org/peek-readable/-/peek-readable-5.4.2.tgz" - integrity sha512-peBp3qZyuS6cNIJ2akRNG1uo1WJ1d0wTxg/fxMdZ0BqCVhx242bSFHM9eNqflfJVS9SsgkzgT/1UgnsurBOTMg== - -picocolors@^1.0.0, picocolors@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" - integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -"picomatch@^3 || ^4", picomatch@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz" - integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== - -pidtree@^0.3.0: - version "0.3.1" - resolved "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz" - integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== - -pidtree@^0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/pidtree/-/pidtree-0.5.0.tgz" - integrity sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA== - -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz" - integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pino-abstract-transport@^1.0.0, pino-abstract-transport@v1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz" - integrity sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA== - dependencies: - readable-stream "^4.0.0" - split2 "^4.0.0" - -pino-pretty@10.2.0: - version "10.2.0" - resolved "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.2.0.tgz" - integrity sha512-tRvpyEmGtc2D+Lr3FulIZ+R1baggQ4S3xD2Ar93KixFEDx6SEAUP3W5aYuEw1C73d6ROrNcB2IXLteW8itlwhA== - dependencies: - colorette "^2.0.7" - dateformat "^4.6.3" - fast-copy "^3.0.0" - fast-safe-stringify "^2.1.1" - help-me "^4.0.1" - joycon "^3.1.1" - minimist "^1.2.6" - on-exit-leak-free "^2.1.0" - pino-abstract-transport "^1.0.0" - pump "^3.0.0" - readable-stream "^4.0.0" - secure-json-parse "^2.4.0" - sonic-boom "^3.0.0" - strip-json-comments "^3.1.1" - -pino-std-serializers@^6.0.0: - version "6.2.2" - resolved "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz" - integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA== - -pino@8.11.0: - version "8.11.0" - resolved "https://registry.npmjs.org/pino/-/pino-8.11.0.tgz" - integrity sha512-Z2eKSvlrl2rH8p5eveNUnTdd4AjJk8tAsLkHYZQKGHP4WTh2Gi1cOSOs3eWPqaj+niS3gj4UkoreoaWgF3ZWYg== - dependencies: - atomic-sleep "^1.0.0" - fast-redact "^3.1.1" - on-exit-leak-free "^2.1.0" - pino-abstract-transport v1.0.0 - pino-std-serializers "^6.0.0" - process-warning "^2.0.0" - quick-format-unescaped "^4.0.3" - real-require "^0.2.0" - safe-stable-stringify "^2.3.1" - sonic-boom "^3.1.0" - thread-stream "^2.0.0" - -pirates@^4.0.1: - version "4.0.7" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz" - integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== - -pkg-conf@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz" - integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ== - dependencies: - find-up "^3.0.0" - load-json-file "^5.2.0" - -pkg-dir@^4.1.0, pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-types@^1.3.0: - version "1.3.1" - resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz" - integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== - dependencies: - confbox "^0.1.8" - mlly "^1.7.4" - pathe "^2.0.1" - -plur@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz" - integrity sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg== - dependencies: - irregular-plurals "^3.2.0" - -postcss-load-config@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz" - integrity sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g== - dependencies: - lilconfig "^3.1.1" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz" - integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== - -prettier@^2.5.1: - version "2.8.8" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - -pretty-ms@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz" - integrity sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q== - dependencies: - parse-ms "^2.1.0" - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process-on-spawn@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz" - integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== - dependencies: - fromentries "^1.2.0" - -process-warning@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz" - integrity sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@^1.3.2: - version "1.4.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" - integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== - -punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -pupa@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz" - integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== - dependencies: - escape-goat "^2.0.0" - -q@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz" - integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-format-unescaped@^4.0.3: - version "4.0.4" - resolved "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz" - integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== - -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - -rc@^1.2.8, rc@1.2.8: - version "1.2.8" - resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz" - integrity sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw== - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz" - integrity sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA== - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.6.0, readable-stream@3: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^4.0.0: - version "4.4.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz" - integrity sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - string_decoder "^1.3.0" - -readable-stream@^4.7.0: - version "4.7.0" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz" - integrity sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - string_decoder "^1.3.0" - -readable-stream@~2.3.6: - version "2.3.8" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-web-to-node-stream@^3.0.2: - version "3.0.4" - resolved "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.4.tgz" - integrity sha512-9nX56alTf5bwXQ3ZDipHJhusu9NTQJ/CVPtb/XHAJCXihZeitfJvIRS4GqQ/mfIoOE3IelHMrpayVrosdHBuLw== - dependencies: - readable-stream "^4.7.0" - -readdirp@^4.0.1: - version "4.1.2" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz" - integrity sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg== - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -real-require@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz" - integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -reflect-metadata@^0.1.12, reflect-metadata@0.1.13: - version "0.1.13" - resolved "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz" - integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== - -regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== - -regexp.prototype.flags@^1.5.0: - version "1.5.0" - resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" - -regexpp@^3.1.0: - version "3.2.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -registry-auth-token@^4.0.0: - version "4.2.2" - resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz" - integrity sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg== - dependencies: - rc "1.2.8" - -registry-url@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz" - integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== - dependencies: - rc "^1.2.8" - -release-zalgo@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz" - integrity sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA== - dependencies: - es6-error "^4.0.1" - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-in-the-middle@^5.1.0: - version "5.2.0" - resolved "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.2.0.tgz" - integrity sha512-efCx3b+0Z69/LGJmm9Yvi4cqEdxnoGnxYxGxBghkkTTFeXRtTCmmhO0AnAfHz59k957uTSuy8WaHqOs8wbYUWg== - dependencies: - debug "^4.1.1" - module-details-from-path "^1.0.3" - resolve "^1.22.1" - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz" - integrity sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg== - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-global@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz" - integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw== - dependencies: - global-dirs "^0.1.1" - -resolve@^1.10.0, resolve@^1.22.1, resolve@^1.22.3, resolve@^1.22.4: - version "1.22.4" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz" - integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz" - integrity sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ== - dependencies: - lowercase-keys "^1.0.0" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== - -rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup@^4.34.8: - version "4.44.0" - resolved "https://registry.npmjs.org/rollup/-/rollup-4.44.0.tgz" - integrity sha512-qHcdEzLCiktQIfwBq420pn2dP+30uzqYxv9ETm91wdt2R9AFcWfjNAmje4NWlnCIQ5RMTzVf0ZyisOKqHR6RwA== - dependencies: - "@types/estree" "1.0.8" - optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.44.0" - "@rollup/rollup-android-arm64" "4.44.0" - "@rollup/rollup-darwin-arm64" "4.44.0" - "@rollup/rollup-darwin-x64" "4.44.0" - "@rollup/rollup-freebsd-arm64" "4.44.0" - "@rollup/rollup-freebsd-x64" "4.44.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.44.0" - "@rollup/rollup-linux-arm-musleabihf" "4.44.0" - "@rollup/rollup-linux-arm64-gnu" "4.44.0" - "@rollup/rollup-linux-arm64-musl" "4.44.0" - "@rollup/rollup-linux-loongarch64-gnu" "4.44.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.44.0" - "@rollup/rollup-linux-riscv64-gnu" "4.44.0" - "@rollup/rollup-linux-riscv64-musl" "4.44.0" - "@rollup/rollup-linux-s390x-gnu" "4.44.0" - "@rollup/rollup-linux-x64-gnu" "4.44.0" - "@rollup/rollup-linux-x64-musl" "4.44.0" - "@rollup/rollup-win32-arm64-msvc" "4.44.0" - "@rollup/rollup-win32-ia32-msvc" "4.44.0" - "@rollup/rollup-win32-x64-msvc" "4.44.0" - fsevents "~2.3.2" - -run-applescript@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz" - integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A== - -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -"rxjs@^6.0.0 || ^7.0.0", rxjs@^7.1.0, rxjs@^7.5.5, rxjs@7.8.0: - version "7.8.0" - resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz" - integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== - dependencies: - tslib "^2.1.0" - -rxjs@^6.6.3: - version "6.6.7" - resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - -safe-array-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz" - integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - has-symbols "^1.0.3" - isarray "^2.0.5" - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -safe-stable-stringify@^2.3.1: - version "2.4.3" - resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz" - integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -secure-json-parse@^2.4.0: - version "2.7.0" - resolved "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz" - integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== - -semver-diff@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz" - integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== - dependencies: - semver "^6.3.0" - -semver@^5.5.0: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@^6.0.0: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^6.2.0: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^6.3.0: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3: - version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" - -"semver@2 || 3 || 4 || 5": - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -serialize-error@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz" - integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw== - dependencies: - type-fest "^0.13.1" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@^1.6.1: - version "1.8.1" - resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz" - integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== - -shiki@^0.14.1: - version "0.14.3" - resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz" - integrity sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g== - dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -signal-exit@^4.0.1: - version "4.1.0" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" - integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slice-ansi@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz" - integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== - dependencies: - ansi-styles "^6.0.0" - is-fullwidth-code-point "^4.0.0" - -sonic-boom@^3.0.0, sonic-boom@^3.1.0: - version "3.3.0" - resolved "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.3.0.tgz" - integrity sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g== - dependencies: - atomic-sleep "^1.0.0" - -source-map-support@^0.5.17, source-map-support@^0.5.19: - version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@0.8.0-beta.0: - version "0.8.0-beta.0" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz" - integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== - dependencies: - whatwg-url "^7.0.0" - -spawn-command@^0.0.2-1: - version "0.0.2-1" - resolved "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz" - integrity sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg== - -spawn-wrap@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz" - integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== - dependencies: - foreground-child "^2.0.0" - is-windows "^1.0.2" - make-dir "^3.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - which "^2.0.1" - -spdx-correct@^3.0.0: - version "3.2.0" - resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz" - integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== - -split@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/split/-/split-1.0.1.tgz" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - dependencies: - through "2" - -split2@^3.0.0: - version "3.2.2" - resolved "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz" - integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== - dependencies: - readable-stream "^3.0.0" - -split2@^4.0.0: - version "4.2.0" - resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" - integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -standard-version@^9.0.0: - version "9.5.0" - resolved "https://registry.npmjs.org/standard-version/-/standard-version-9.5.0.tgz" - integrity sha512-3zWJ/mmZQsOaO+fOlsa0+QK90pwhNd042qEcw6hKFNoLFs7peGyvPffpEBbK/DSGPbyOvli0mUIFv5A4qTjh2Q== - dependencies: - chalk "^2.4.2" - conventional-changelog "3.1.25" - conventional-changelog-config-spec "2.1.0" - conventional-changelog-conventionalcommits "4.6.3" - conventional-recommended-bump "6.1.0" - detect-indent "^6.0.0" - detect-newline "^3.1.0" - dotgitignore "^2.1.0" - figures "^3.1.0" - find-up "^5.0.0" - git-semver-tags "^4.0.0" - semver "^7.1.1" - stringify-package "^1.0.1" - yargs "^16.0.0" - -stream-events@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz" - integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== - dependencies: - stubs "^3.0.0" - -string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -string-argv@^0.3.1: - version "0.3.2" - resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz" - integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== - -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^5.0.0: - version "5.1.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" - integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^9.2.2" - strip-ansi "^7.0.1" - -string-width@^5.0.1, string-width@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" - integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^9.2.2" - strip-ansi "^7.0.1" - -string.prototype.padend@^3.0.0: - version "3.1.4" - resolved "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz" - integrity sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -stringify-package@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz" - integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1: - version "7.1.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz" - integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== - dependencies: - ansi-regex "^6.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-bom@^4.0.0, strip-bom@4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - -strip-outer@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - -strtok3@^7.0.0: - version "7.1.1" - resolved "https://registry.npmjs.org/strtok3/-/strtok3-7.1.1.tgz" - integrity sha512-mKX8HA/cdBqMKUr0MMZAFssCkIGoZeSCMXgnt79yKxNFguMLVFgRe6wB+fsL0NmoHDbeyZXczy7vEPSoo3rkzg== - dependencies: - "@tokenizer/token" "^0.3.0" - peek-readable "^5.1.3" - -stubs@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz" - integrity sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw== - -sucrase@^3.35.0: - version "3.35.0" - resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz" - integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== - dependencies: - "@jridgewell/gen-mapping" "^0.3.2" - commander "^4.0.0" - glob "^10.3.10" - lines-and-columns "^1.1.6" - mz "^2.7.0" - pirates "^4.0.1" - ts-interface-checker "^0.1.9" - -supertap@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/supertap/-/supertap-2.0.0.tgz" - integrity sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA== - dependencies: - arrify "^2.0.1" - indent-string "^4.0.0" - js-yaml "^3.14.0" - serialize-error "^7.0.1" - strip-ansi "^6.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.1.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^9.2.2: - version "9.4.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz" - integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -table@^6.0.9: - version "6.8.1" - resolved "https://registry.npmjs.org/table/-/table-6.8.1.tgz" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - -teeny-request@7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.1.tgz" - integrity sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg== - dependencies: - http-proxy-agent "^4.0.0" - https-proxy-agent "^5.0.0" - node-fetch "^2.6.1" - stream-events "^1.0.5" - uuid "^8.0.0" - -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - -temp-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz" - integrity sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw== - -tempy@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/tempy/-/tempy-3.1.0.tgz" - integrity sha512-7jDLIdD2Zp0bDe5r3D2qtkd1QOCacylBuL7oa4udvN6v2pqr4+LcCr67C8DR1zkpaZ8XosF5m1yQSabKAW6f2g== - dependencies: - is-stream "^3.0.0" - temp-dir "^3.0.0" - type-fest "^2.12.2" - unique-string "^3.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-extensions@^1.0.0: - version "1.9.0" - resolved "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz" - integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz" - integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - -thread-stream@^2.0.0: - version "2.4.0" - resolved "https://registry.npmjs.org/thread-stream/-/thread-stream-2.4.0.tgz" - integrity sha512-xZYtOtmnA63zj04Q+F9bdEay5r47bvpo1CaNqsKi7TpoJHcotUez8Fkfo2RJWpW91lnnaApdpRbVwCWsy+ifcw== - dependencies: - real-require "^0.2.0" - -through@^2.3.6, through@^2.3.8, "through@>=2.2.7 <3", through@2: - version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz" - integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== - dependencies: - readable-stream "3" - -time-zone@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz" - integrity sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA== - -tinyexec@^0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz" - integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA== - -tinyglobby@^0.2.11: - version "0.2.14" - resolved "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz" - integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ== - dependencies: - fdir "^6.4.4" - picomatch "^4.0.2" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -token-types@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz" - integrity sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg== - dependencies: - "@tokenizer/token" "^0.3.0" - ieee754 "^1.2.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz" - integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== - dependencies: - punycode "^2.1.0" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - -trim-newlines@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" - integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - -trim-off-newlines@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz" - integrity sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg== - -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz" - integrity sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg== - dependencies: - escape-string-regexp "^1.0.2" - -ts-interface-checker@^0.1.9: - version "0.1.13" - resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz" - integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== - -ts-node@^10.8.1, ts-node@>=10: - version "10.9.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -ts-node@^9.0.0: - version "9.1.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz" - integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== - dependencies: - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.17" - yn "3.1.1" - -tsconfig-paths@^3.14.2: - version "3.14.2" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.1.0: - version "2.6.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz" - integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== - -tslib@2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== - -tslib@2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -tsup@^8.5.0: - version "8.5.0" - resolved "https://registry.npmjs.org/tsup/-/tsup-8.5.0.tgz" - integrity sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ== - dependencies: - bundle-require "^5.1.0" - cac "^6.7.14" - chokidar "^4.0.3" - consola "^3.4.0" - debug "^4.4.0" - esbuild "^0.25.0" - fix-dts-default-cjs-exports "^1.0.0" - joycon "^3.1.1" - picocolors "^1.1.1" - postcss-load-config "^6.0.1" - resolve-from "^5.0.0" - rollup "^4.34.8" - source-map "0.8.0-beta.0" - sucrase "^3.35.0" - tinyexec "^0.3.2" - tinyglobby "^0.2.11" - tree-kill "^1.2.2" - -tsutils@^3.0.0, tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.3.0: - version "0.3.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.0: - version "0.8.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-fest@^1.0.1: - version "1.4.0" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz" - integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== - -type-fest@^2.12.2: - version "2.19.0" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== - -typed-array-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz" - integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - is-typed-array "^1.1.10" - -typed-array-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz" - integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" - -typed-array-byte-offset@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz" - integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -typedoc@^0.24.7: - version "0.24.8" - resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz" - integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== - dependencies: - lunr "^2.3.9" - marked "^4.3.0" - minimatch "^9.0.0" - shiki "^0.14.1" - -"typescript@^3.4.1 || ^4.0.0", typescript@^4.6.4, "typescript@^4.6.4 || ^5.0.0", typescript@>=2.7, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=4, typescript@>=4.5.0, "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x": - version "4.9.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -ufo@^1.5.4: - version "1.6.1" - resolved "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz" - integrity sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA== - -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - -uid@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz" - integrity sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A== - dependencies: - "@lukeed/csprng" "^1.0.0" - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unique-string@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz" - integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== - dependencies: - crypto-random-string "^2.0.0" - -unique-string@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz" - integrity sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ== - dependencies: - crypto-random-string "^4.0.0" - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -update-notifier@^5.0.1: - version "5.1.0" - resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz" - integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== - dependencies: - boxen "^5.0.0" - chalk "^4.1.0" - configstore "^5.0.1" - has-yarn "^2.1.0" - import-lazy "^2.1.0" - is-ci "^2.0.0" - is-installed-globally "^0.4.0" - is-npm "^5.0.0" - is-yarn-global "^0.3.0" - latest-version "^5.1.0" - pupa "^2.1.1" - semver "^7.3.4" - semver-diff "^3.1.1" - xdg-basedir "^4.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz" - integrity sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ== - dependencies: - prepend-http "^2.0.0" - -url-parse@^1.5.10: - version "1.5.10" - resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -urlgrey@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/urlgrey/-/urlgrey-1.0.0.tgz" - integrity sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w== - dependencies: - fast-url-parser "^1.1.3" - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -uuid@^8.0.0, uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -v8-compile-cache@^2.0.3: - version "2.4.0" - resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz" - integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - -vscode-uri@^3.0.2: - version "3.0.7" - resolved "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz" - integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA== - -wcwidth@^1.0.1, wcwidth@>=1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -well-known-symbols@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz" - integrity sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz" - integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== - -which-typed-array@^1.1.10, which-typed-array@^1.1.11: - version "1.1.11" - resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz" - integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -which@^1.2.14: - version "1.3.1" - resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -widest-line@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" - integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== - dependencies: - string-width "^4.0.0" - -word-wrap@^1.0.3: - version "1.2.5" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz" - integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== - dependencies: - ansi-styles "^6.1.0" - string-width "^5.0.1" - strip-ansi "^7.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -xdg-basedir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" - integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== - -xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.2: - version "1.10.2" - resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yaml@^2.4.2: - version "2.8.0" - resolved "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz" - integrity sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ== - -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^20.2.2, yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs@^15.0.2: - version "15.4.1" - resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" - -yargs@^16.0.0, yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==